diff options
Diffstat (limited to 'uxd.c')
-rw-r--r-- | uxd.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -73,6 +73,7 @@ int dump_column = 0; int filepos = 0; /* options */ +int bold = 0; /* -b */ int hilite_multi = 0; /* -r */ int mono = 0; /* -m */ long display_offset = 0; /* -o */ @@ -120,8 +121,10 @@ void parse_options(int argc, char **argv) { version(); } - while((opt = my_getopt(argc, argv, "l:rmo:s:uhv")) != -1) { + while((opt = my_getopt(argc, argv, "bl:rmo:s:uhv")) != -1) { switch(opt) { + case 'b': + bold = 1; break; case 'l': limit = parse_number(optarg); break; case 'r': @@ -204,7 +207,7 @@ void next_normal_color() { void append_color(char *buf, int fgcolor, int bgcolor) { char tmpbuf[100]; - sprintf(tmpbuf, "\x1b[0;3%d", fgcolor); + sprintf(tmpbuf, "\x1b[%d;3%d", bold, fgcolor); strcat(buf, tmpbuf); if(bgcolor) { sprintf(tmpbuf, ";4%d", bgcolor); |