Ticket #229 (closed defect: fixed)

Opened 16 years ago

Last modified 15 years ago

ncurses "default color" change to -1 when available

Reported by: robert.david.public@… Owned by: andrew_b
Priority: major Milestone: 4.7
Component: mc-core Version: 4.6.2
Keywords: commited-master Cc:
Blocked By: Blocking:
Branch state: Votes for changeset:

Description (last modified by metux) (diff)

When using ncurses, there is problem with setting default color to transparent on capable terminals. This is caused by color index going from 0+ but the default terminal color is -1 in ncurses. So mc doesnt show true default color, but BLACK.

This also has to be dependant on terminal support, if it supports default colors or not. Good inspiration about this is in htop source -> CRT.c -> CRT_setColors


branch:229_ncurses_colors
changeset:2f2acb9a0aa2c403d4257a682ebb98d134a48cfd

Attachments

ncurses_default_color_fix.patch (498 bytes) - added by Robert 16 years ago.
Ncurses fix default color patch

Change History

Changed 16 years ago by Robert

Ncurses fix default color patch

comment:1 Changed 16 years ago by metux

  • Keywords review added
  • Description modified (diff)
  • Milestone changed from 4.7 to 4.6.3

as its a bug, moving to 4.6.3

comment:2 Changed 16 years ago by metux

  • Keywords vote-metux added
  • Status changed from new to accepted
  • Owner set to metux

comment:3 Changed 16 years ago by metux

  • Keywords rework added; review vote-metux removed

Segfaults, but might be an ncurses bug.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7b896c0 (LWP 1690)]
0xb7bfa80e in assume_default_colors () from /lib/libncurses.so.5
(gdb) backtrace
#0 0xb7bfa80e in assume_default_colors () from /lib/libncurses.so.5
#1 0xb7bd9c10 in ?? () from /lib/libncurses.so.5
#2 0xb7c18ff4 in ?? () from /lib/libncurses.so.5
#3 0xb7f51ca0 in ?? () from /lib/ld-linux.so.2
#4 0xbff51480 in ?? ()
#5 0xbff51418 in ?? ()
#6 0xb7f4a1a0 in ?? () from /lib/ld-linux.so.2
#7 0xb7bfa944 in use_default_colors () from /lib/libncurses.so.5
#8 0xffffffff in ?? ()
#9 0xb7d46ff4 in ?? () from /lib/libc.so.6
#10 0x08060924 in init_colors ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

comment:4 Changed 16 years ago by andrew_b

  • Status changed from accepted to assigned
  • Owner changed from metux to andrew_b
  • Version changed from 4.6.1 to 4.6.2
  • Keywords review added; rework removed

Rebased to current mc-4.6.

Please review.

No segmentation fault for me.

comment:6 Changed 16 years ago by slavazanko

  • Milestone changed from 4.6.2.1 to 4.7

comment:7 Changed 16 years ago by slavazanko

  • Keywords vote-slavazanko added

branch now rebased to master.

Looks good. No coredumps.

comment:8 Changed 16 years ago by angel_il

  • Keywords vote-angel_il added

comment:9 Changed 16 years ago by slavazanko

  • Keywords approved added; review removed

comment:10 Changed 16 years ago by andrew_b

  • Status changed from assigned to testing
  • Keywords commited-master added; vote-slavazanko vote-angel_il approved removed
  • Resolution set to fixed

comment:11 Changed 16 years ago by angel_il

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.