~mdw
/
sgt
/
tweak
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update the man page to remove two of the BUGS.
[sgt/tweak]
/
slang.c
diff --git
a/slang.c
b/slang.c
index
0dca727
..
172c5db
100644
(file)
--- a/
slang.c
+++ b/
slang.c
@@
-1,3
+1,5
@@
+#include "tweak.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@
-11,8
+13,6
@@
#include <slang.h>
#include <slang.h>
-#include "tweak.h"
-
#if defined(unix) && !defined(GO32)
static int sigwinch (int sigtype)
{
#if defined(unix) && !defined(GO32)
static int sigwinch (int sigtype)
{
@@
-109,7
+109,7
@@
void display_write_chars(char *str, int len)
SLsmg_write_nchars(str, len);
}
SLsmg_write_nchars(str, len);
}
-void display_define_colour(int colour, int fg, int bg)
+void display_define_colour(int colour, int fg, int bg
, int reverse
)
{
static char *colours[16] = {
"black", "red", "green", "brown",
{
static char *colours[16] = {
"black", "red", "green", "brown",
@@
-119,6
+119,12
@@
void display_define_colour(int colour, int fg, int bg)
};
char cname[40];
};
char cname[40];
+ if (fg < 0 && bg < 0) {
+ /* FIXME: not sure how to support terminal default fg+bg */
+ fg = 7;
+ bg = 0;
+ }
+
sprintf(cname, "colour%d", colour);
SLtt_set_color(colour, cname, colours[fg], colours[bg]);
sprintf(cname, "colour%d", colour);
SLtt_set_color(colour, cname, colours[fg], colours[bg]);