… | |
… | |
68 | struct linematrix *lines; |
68 | struct linematrix *lines; |
69 | int width = STD_WIDTH, height = STD_HEIGHT, listlen; |
69 | int width = STD_WIDTH, height = STD_HEIGHT, listlen; |
70 | int win_x = LOC_X, win_y = LOC_Y; |
70 | int win_x = LOC_X, win_y = LOC_Y; |
71 | int font_descent, font_height; |
71 | int font_descent, font_height; |
72 | int do_reopen; |
72 | int do_reopen; |
73 | struct timeval interval = { 3, 0 }; |
73 | struct timeval interval = { 2, 400000 }; |
74 | XFontSet fontset; |
74 | XFontSet fontset; |
75 | |
75 | |
76 | /* command line options */ |
76 | /* command line options */ |
77 | int opt_noinitial, opt_shade, opt_frame, opt_reverse, opt_nofilename, |
77 | int opt_noinitial, opt_shade, opt_frame, opt_reverse, opt_nofilename, |
78 | opt_whole, opt_update, geom_mask, reload = 0; |
78 | opt_outline, opt_whole, opt_update, geom_mask, reload = 0; |
79 | const char *command = NULL, |
79 | const char *command = NULL, |
80 | *fontname = USE_FONT, *dispname = NULL, *def_color = DEF_COLOR, |
80 | *fontname = USE_FONT, *dispname = NULL, *def_color = DEF_COLOR, |
81 | *continuation = "[+]"; |
81 | *continuation = "[+]"; |
82 | |
82 | |
83 | struct logfile_entry *loglist = NULL, *loglist_tail = NULL; |
83 | struct logfile_entry *loglist = NULL, *loglist_tail = NULL; |
… | |
… | |
340 | offset -= font_height; |
340 | offset -= font_height; |
341 | |
341 | |
342 | if (offset < miny || offset > maxy) |
342 | if (offset < miny || offset > maxy) |
343 | continue; |
343 | continue; |
344 | |
344 | |
|
|
345 | if (opt_outline) |
|
|
346 | { |
|
|
347 | XSetForeground (disp, WinGC, black_color); |
|
|
348 | XmbDrawString (disp, root, fontset, WinGC, win_x - 1, |
|
|
349 | win_y + offset + 1, line->line, line->len); |
|
|
350 | XmbDrawString (disp, root, fontset, WinGC, win_x + 1, |
|
|
351 | win_y + offset + 1, line->line, line->len); |
|
|
352 | XmbDrawString (disp, root, fontset, WinGC, win_x - 1, |
|
|
353 | win_y + offset - 1, line->line, line->len); |
|
|
354 | XmbDrawString (disp, root, fontset, WinGC, win_x + 1, |
|
|
355 | win_y + offset - 1, line->line, line->len); |
|
|
356 | } |
345 | if (opt_shade) |
357 | else if (opt_shade) |
346 | { |
358 | { |
347 | XSetForeground (disp, WinGC, black_color); |
359 | XSetForeground (disp, WinGC, black_color); |
348 | XmbDrawString (disp, root, fontset, WinGC, win_x + 2, |
360 | XmbDrawString (disp, root, fontset, WinGC, win_x + 2, |
349 | win_y + offset + 2, line->line, line->len); |
361 | win_y + offset + 2, line->line, line->len); |
350 | } |
362 | } |
… | |
… | |
857 | reload = atoi (argv[++i]); |
869 | reload = atoi (argv[++i]); |
858 | command = argv[++i]; |
870 | command = argv[++i]; |
859 | } |
871 | } |
860 | else if (!strcmp (arg, "-shade")) |
872 | else if (!strcmp (arg, "-shade")) |
861 | opt_shade = 1; |
873 | opt_shade = 1; |
|
|
874 | else if (!strcmp (arg, "-outline")) |
|
|
875 | opt_outline = 1; |
862 | else if (!strcmp (arg, "-frame")) |
876 | else if (!strcmp (arg, "-frame")) |
863 | opt_frame = 1; |
877 | opt_frame = 1; |
864 | else if (!strcmp (arg, "-no-filename")) |
878 | else if (!strcmp (arg, "-no-filename")) |
865 | opt_nofilename = 1; |
879 | opt_nofilename = 1; |
866 | else if (!strcmp (arg, "-reverse")) |
880 | else if (!strcmp (arg, "-reverse")) |
… | |
… | |
1070 | " defaults to \"[+]\"\n" |
1084 | " defaults to \"[+]\"\n" |
1071 | " -shade add shading to font\n" |
1085 | " -shade add shading to font\n" |
1072 | " -noinitial don't display the last file lines on\n" |
1086 | " -noinitial don't display the last file lines on\n" |
1073 | " startup\n" |
1087 | " startup\n" |
1074 | " -i | -interval seconds interval between checks (fractional\n" |
1088 | " -i | -interval seconds interval between checks (fractional\n" |
1075 | " values o.k.). Default 3 seconds\n" |
1089 | " values o.k.). Default 2.4 seconds\n" |
1076 | " -V display version information and exit\n" |
1090 | " -V display version information and exit\n" |
1077 | "\n"); |
1091 | "\n"); |
1078 | printf ("Example:\n%s -g 80x25+100+50 -font fixed /var/log/messages,green " |
1092 | printf ("Example:\n%s -g 80x25+100+50 -font fixed /var/log/messages,green " |
1079 | "/var/log/secure,red,'ALERT'\n", myname); |
1093 | "/var/log/secure,red,'ALERT'\n", myname); |
1080 | exit (0); |
1094 | exit (0); |