Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37040618
en ru br
Репозитории ALT
S:2.9.1-alt1.qa2
5.1: 2.8-alt4
4.1: 2.8-alt4
4.0: 2.8-alt4
3.0: 2.8-alt4
www.altlinux.org/Changes

Группа :: Звук
Пакет: aumix

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: aumix-2.8-deb-fgbg.patch
Скачать


This patch fixes the default foreground and background colours in curses
mode.  With this patch, the current terminals colours are used, instead
of a default B&W.
Patch by Paul Slootman <paul@debian.org>.
diff -Naur aumix-2.8/doc/aumix.1 aumix-2.8.new/doc/aumix.1
--- aumix-2.8/doc/aumix.1	2002-09-07 11:12:32.000000000 +0200
+++ aumix-2.8.new/doc/aumix.1	2002-11-29 19:08:36.000000000 +0100
@@ -315,7 +315,9 @@
 If either foreground or background is given as
 .Ql \- ,
 then the default color for that is used.
-The defaults are a white foreground and black background.
+If aumix is linked against ncurses, then the terminal's
+default fore or background will be used; else the default foreground is
+white and the default background is black.
 .Pp
 An xpm icon is provided.
 .Sh VERSION
diff -Naur aumix-2.8/src/curses.c aumix-2.8.new/src/curses.c
--- aumix-2.8/src/curses.c	2002-10-23 17:07:40.000000000 +0200
+++ aumix-2.8.new/src/curses.c	2002-11-29 19:08:36.000000000 +0100
@@ -278,6 +278,9 @@
 		if (schemefile == NULL)
 			return EFILE;
 	}
+#ifdef NCURSES_VERSION
+	use_default_colors();
+#endif
 	while (fgets(buf, BUFSIZ, schemefile)) {
 		p = buf;
 		while (*p && isspace(*p))	/* skip whitespace */
@@ -302,8 +305,13 @@
 		back = strtok(NULL, " \t\n");
 		if (!back)	/* only two items */
 			continue;
+#ifdef NCURSES_VERSION
+		bg = -1;	/* use_default_colors extension */
+		fg = -1;
+#else
 		bg = COLOR_BLACK;
 		fg = COLOR_WHITE;
+#endif
 		/* Check whether fore or back match names of colors. */
 		for (ii = COLOR_BLACK; ii < sizeof(colors) / sizeof(*colors); ii++) {
 			if (strcasecmp(fore, colors[ii]) == 0)
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin