… | |
… | |
59 | int w = -1, h = -1, font_width, font_height, font_descent; |
59 | int w = -1, h = -1, font_width, font_height, font_descent; |
60 | int do_reopen; |
60 | int do_reopen; |
61 | struct timeval interval = { 2, 400000 }; /* see Knuth */ |
61 | struct timeval interval = { 2, 400000 }; /* see Knuth */ |
62 | |
62 | |
63 | /* command line options */ |
63 | /* command line options */ |
64 | int opt_noinitial, opt_shade, opt_frame, opt_reverse, opt_nofilename, |
64 | int opt_noinitial, opt_shade, opt_frame, opt_reverse=0, opt_nofilename, |
65 | geom_mask, reload = 3600; |
65 | geom_mask, reload = 3600; |
66 | const char *command = NULL, |
66 | const char *command = NULL, |
67 | *fontname = USE_FONT, *dispname = NULL, *def_color = DEF_COLOR; |
67 | *fontname = USE_FONT, *dispname = NULL, *def_color = DEF_COLOR; |
68 | |
68 | |
69 | struct logfile_entry *loglist = NULL, *loglist_tail = NULL; |
69 | struct logfile_entry *loglist = NULL, *loglist_tail = NULL; |
… | |
… | |
238 | offset -= font_height; |
238 | offset -= font_height; |
239 | |
239 | |
240 | if (offset < miny || offset > maxy) |
240 | if (offset < miny || offset > maxy) |
241 | continue; |
241 | continue; |
242 | |
242 | |
|
|
243 | if (opt_reverse) |
|
|
244 | temp = detabificate (lines[listlen-lin-1].line); |
|
|
245 | else |
243 | temp = detabificate (lines[lin].line); |
246 | temp = detabificate (lines[lin].line); |
244 | |
247 | |
245 | if (opt_shade) |
248 | if (opt_shade) |
246 | { |
249 | { |
247 | XSetForeground (disp, WinGC, black_color); |
250 | XSetForeground (disp, WinGC, black_color); |
248 | XDrawString (disp, root, WinGC, win_x + 2, win_y + offset + 2, |
251 | XDrawString (disp, root, WinGC, win_x + 2, win_y + offset + 2, |