ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/root-tail/root-tail.c
(Generate patch)

Comparing root-tail/root-tail.c (file contents):
Revision 1.52 by chris_moore, Thu Apr 8 00:37:03 2004 UTC vs.
Revision 1.63 by chris_moore, Thu Apr 15 00:38:13 2004 UTC

1/* 1/*
2 * Copyright 2001 by Marco d'Itri <md@linux.it> 2 * Copyright 2001 by Marco d'Itri <md@linux.it>
3 * Copyright 2000,2001,2002,2003,2004 3 * Copyright 2000,2001,2002,2003,2004
4 * Marc Lehmann <pcg@goof.com>, 4 * Marc Lehmann <pcg@goof.com>,
5 * Chris Moore <chris.moore@mail.com>,
5 * and many others, see README 6 * and many others, see README
6 * 7 *
7 * Original version by Mike Baker. 8 * Original version by Mike Baker.
8 * 9 *
9 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
65 int font_ascent; 66 int font_ascent;
66 FILE *fp; /* FILE struct associated with file */ 67 FILE *fp; /* FILE struct associated with file */
67 ino_t inode; /* inode of the file opened */ 68 ino_t inode; /* inode of the file opened */
68 off_t last_size; /* file size at the last check */ 69 off_t last_size; /* file size at the last check */
69 unsigned long color; /* color to be used for printing */ 70 unsigned long color; /* color to be used for printing */
71 const char *colorname; /* color name/string */
70 int partial; /* true if the last line isn't complete */ 72 int partial; /* true if the last line isn't complete */
71 int lastpartial; /* true if the previous output wasn't complete */ 73 int lastpartial; /* true if the previous output wasn't complete */
72 struct line_node *last; /* last line we output */ 74 struct line_node *last; /* last line we output */
73 int modified; /* true if line is modified & needs displaying */ 75 int modified; /* true if line is modified & needs displaying */
74}; 76};
121struct timeval interval = { 2, 400000 }; 123struct timeval interval = { 2, 400000 };
122 124
123/* command line options */ 125/* command line options */
124int opt_noinitial, opt_shade, opt_frame, opt_reverse, opt_nofilename, 126int opt_noinitial, opt_shade, opt_frame, opt_reverse, opt_nofilename,
125 opt_outline, opt_noflicker, opt_whole, opt_update, opt_wordwrap, 127 opt_outline, opt_noflicker, opt_whole, opt_update, opt_wordwrap,
126 opt_justify, geom_mask, reload = 0; 128 opt_justify, geom_mask, opt_minspace, reload;
127const char *command = NULL, 129const char *command = NULL,
128 *fontname = USE_FONT, *dispname = NULL, *def_color = DEF_COLOR, 130 *fontname = USE_FONT, *dispname = NULL, *def_color = DEF_COLOR,
129 *continuation = "|| ", *cont_color = DEF_CONT_COLOR; 131 *continuation = "|| ", *cont_color = DEF_CONT_COLOR;
130 132
131struct logfile_entry *loglist = NULL, *loglist_tail = NULL; 133struct logfile_entry *loglist = NULL, *loglist_tail = NULL;
150/* prototypes */ 152/* prototypes */
151void list_files (int); 153void list_files (int);
152void force_reopen (int); 154void force_reopen (int);
153void force_refresh (int); 155void force_refresh (int);
154void blank_window (int); 156void blank_window (int);
157#ifdef USE_TOON_GET_ROOT_WINDOW
158Window ToonGetRootWindow(Display *, int, Window *);
159#endif /* USE_TOON_GET_ROOT_WINDOW */
155 160
156void InitWindow (void); 161void InitWindow (void);
157unsigned long GetColor (const char *); 162unsigned long GetColor (const char *);
158void redraw (int); 163void redraw (int);
159void refresh (int, int, int, int); 164void refresh (int, int, int, int);
220 fprintf (stderr, "can't allocate %s\n", ColorName); 225 fprintf (stderr, "can't allocate %s\n", ColorName);
221 226
222 return Color.pixel; 227 return Color.pixel;
223} 228}
224 229
230#ifndef USE_TOON_GET_ROOT_WINDOW
225static Window 231static void
226root_window (Display * display, int screen_number) 232find_root_window (Display *display, int screen_number)
227{ 233{
234 if (!root)
235 {
228 Atom SWM_VROOT = XInternAtom (display, "__SWM_VROOT", False); 236 Atom SWM_VROOT = XInternAtom (display, "__SWM_VROOT", False);
237 Atom NAUTILUS_DESKTOP_WINDOW_ID = XInternAtom (display, "NAUTILUS_DESKTOP_WINDOW_ID", False);
229 Window real_root_window = RootWindow (display, screen_number); 238 root = RootWindow (display, screen_number);
230 239
231 if (root) /* root window set via option */
232 return root;
233
234 if (SWM_VROOT != None)
235 {
236 Window unused, *windows; 240 Window unused, *windows = 0;
237 unsigned int count; 241 unsigned int count;
238 242
243 Atom type;
244 int format;
245 unsigned long nitems, bytes_after_return;
246 unsigned char *virtual_root_window;
247
248 if (XGetWindowProperty (display, root, NAUTILUS_DESKTOP_WINDOW_ID,
249 0, 1, False, XA_WINDOW, &type, &format,
250 &nitems, &bytes_after_return,
251 &virtual_root_window) == Success
252 && type == XA_WINDOW)
253 {
239 if (XQueryTree (display, real_root_window, &unused, &unused, &windows, 254 if (XQueryTree (display, *(Window *)virtual_root_window, &unused, &unused, &windows, &count))
240 &count)) 255 root = windows[count - 1];
256
257 XFree (virtual_root_window);
258 }
259 else if (XQueryTree (display, root, &unused, &unused, &windows, &count))
241 { 260 {
242 int i; 261 int i;
243 262
244 for (i = 0; i < count; i++) 263 for (i = 0; i < count; i++)
245 { 264 {
246 Atom type;
247 int format;
248 unsigned long nitems, bytes_after_return;
249 unsigned char *virtual_root_window;
250
251 if (XGetWindowProperty (display, windows[i], SWM_VROOT, 265 if (XGetWindowProperty (display, windows[i], SWM_VROOT,
252 0, 1, False, XA_WINDOW, &type, &format, 266 0, 1, False, XA_WINDOW, &type, &format,
253 &nitems, &bytes_after_return, 267 &nitems, &bytes_after_return,
254 &virtual_root_window) == Success) 268 &virtual_root_window) == Success
269 && type == XA_WINDOW)
255 { 270 {
256 if (type != None)
257 {
258 if (type == XA_WINDOW)
259 {
260 XFree (windows);
261 return (Window) virtual_root_window; 271 root = *(Window *)virtual_root_window;
262 } 272 XFree (virtual_root_window);
263 else
264 fprintf (stderr,
265 "__SWM_VROOT property type mismatch");
266 } 273 break;
267 } 274 }
268 else 275 }
269 fprintf (stderr,
270 "failed to get __SWM_VROOT property on window 0x%lx",
271 windows[i]);
272 }
273 276
274 if (count)
275 XFree (windows); 277 XFree (windows);
276 } 278 }
277 else 279 else
278 fprintf (stderr, "Can't query tree on root window 0x%lx", 280 fprintf (stderr, "Can't query tree on root window 0x%lx", root);
279 real_root_window);
280 } 281 }
281 else
282 /* This shouldn't happen. The Xlib documentation is wrong BTW. */
283 fprintf (stderr, "Can't intern atom __SWM_VROOT");
284
285 return real_root_window;
286} 282}
283#endif /* USE_TOON_GET_ROOT_WINDOW */
287 284
288void 285void
289InitWindow (void) 286InitWindow (void)
290{ 287{
291 XGCValues gcv; 288 XGCValues gcv;
301 298
302 screen = DefaultScreen (disp); 299 screen = DefaultScreen (disp);
303 ScreenHeight = DisplayHeight (disp, screen); 300 ScreenHeight = DisplayHeight (disp, screen);
304 ScreenWidth = DisplayWidth (disp, screen); 301 ScreenWidth = DisplayWidth (disp, screen);
305 302
306 root = root_window (disp, screen); 303 find_root_window (disp, screen);
307 304
308 gcm = GCBackground; 305 gcm = GCBackground;
309 gcv.graphics_exposures = True; 306 gcv.graphics_exposures = True;
310 WinGC = XCreateGC (disp, root, gcm, &gcv); 307 WinGC = XCreateGC (disp, root, gcm, &gcv);
311 XMapWindow (disp, root); 308 XMapWindow (disp, root);
309
312 XSetForeground (disp, WinGC, GetColor (DEF_COLOR)); 310 XSetForeground (disp, WinGC, GetColor (DEF_COLOR));
313 311
314 for (e = loglist; e; e = e->next) 312 for (e = loglist; e; e = e->next)
315 { 313 {
316 char **missing_charset_list; 314 char **missing_charset_list;
339 XFontSetExtents *xfe = XExtentsOfFontSet (e->fontset); 337 XFontSetExtents *xfe = XExtentsOfFontSet (e->fontset);
340 338
341 e->font_height = xfe->max_logical_extent.height; 339 e->font_height = xfe->max_logical_extent.height;
342 e->font_ascent = -xfe->max_logical_extent.y; 340 e->font_ascent = -xfe->max_logical_extent.y;
343 } 341 }
342
343 if (e->font_height > height - effect_y_space)
344 {
345 fprintf(stderr, "\n the display isn't tall enough to display a single line in font '%s'\n",
346 e->fontname);
347 fprintf(stderr, "\n the geometry in use is %d pixels tall\n", height);
348 fprintf(stderr, "\n font '%s' is %d pixels tall\n", e->fontname, e->font_height);
349 if (effect_y_space)
350 fprintf(stderr, "\n the shade or outline options need an extra %d pixel%s of vertical space\n",
351 effect_y_space, effect_y_space == 1 ? "" : "s");
352 fprintf(stderr, "\n");
353 exit(1);
354 }
344 } 355 }
345 356
346 if (geom_mask & XNegative) 357 if (geom_mask & XNegative)
347 win_x = win_x + ScreenWidth - width; 358 win_x = win_x + ScreenWidth - width;
348 if (geom_mask & YNegative) 359 if (geom_mask & YNegative)
349 win_y = win_y + ScreenHeight - height; 360 win_y = win_y + ScreenHeight - height;
350 361
351 if (opt_outline)
352 { 362 {
353 /* adding outline increases the total width and height by 2 363 struct logfile_entry *e;
354 pixels each, and offsets the text one pixel right and one 364
355 pixel down */ 365 for (e = loglist; e; e = e->next)
356 effect_x_space = effect_y_space = 2; 366 e->color = GetColor (e->colorname);
357 effect_x_offset = effect_y_offset = 1;
358 } 367 }
359 else if (opt_shade)
360 {
361 /* adding a shadow increases the space used */
362 effect_x_space = abs (SHADE_X);
363 effect_y_space = abs (SHADE_Y);
364
365 /* if the shadow is to the right and below then we don't need
366 * to move the text to make space for it, but shadows to the left
367 * and above need accomodating */
368 effect_x_offset = SHADE_X > 0 ? 0 : -SHADE_X;
369 effect_y_offset = SHADE_Y > 0 ? 0 : -SHADE_Y;
370 }
371 else
372 {
373 effect_x_space = effect_y_space = 0;
374 effect_x_offset = effect_y_offset = 0;
375 }
376 368
377 XSelectInput (disp, root, ExposureMask | FocusChangeMask); 369 XSelectInput (disp, root, ExposureMask | FocusChangeMask);
378} 370}
379 371
380/* 372/*
395void draw_text (Display *disp, Window root, GC WinGC, int x, int y, struct line_node *line, int foreground) 387void draw_text (Display *disp, Window root, GC WinGC, int x, int y, struct line_node *line, int foreground)
396{ 388{
397 if (line->wrapped_right && opt_justify && line->breaks) 389 if (line->wrapped_right && opt_justify && line->breaks)
398 { 390 {
399 int i; 391 int i;
400 for (i = 0; i < line->num_words; i++) { 392 for (i = 0; i < line->num_words; i++)
401 XmbDrawString (disp, root, line->logfile->fontset, WinGC, 393 XmbDrawString (disp, root, line->logfile->fontset, WinGC,
402 x + line->breaks[i].width + ((i * line->free_pixels) / (line->num_words - 1)) + continuation_width * line->wrapped_left, y, 394 x + line->breaks[i].width + ((i * line->free_pixels) / (line->num_words - 1))
395 + continuation_width * line->wrapped_left, y,
403 line->line + line->breaks[i].index, 396 line->line + line->breaks[i].index,
404 line->breaks[i].len); 397 line->breaks[i].len);
405 } 398
406 if (line->wrapped_left) 399 if (line->wrapped_left)
407 { 400 {
408 if (foreground) XSetForeground (disp, WinGC, continuation_color); 401 if (foreground) XSetForeground (disp, WinGC, continuation_color);
409 XmbDrawString (disp, root, line->logfile->fontset, WinGC, x, y, continuation, continuation_length); 402 XmbDrawString (disp, root, line->logfile->fontset, WinGC, x, y, continuation, continuation_length);
410 } 403 }
411 } 404 }
412 else 405 else
413 { 406 {
414 XmbDrawString (disp, root, line->logfile->fontset, WinGC, x + continuation_width * line->wrapped_left, y, line->line, line->len); 407 XmbDrawString (disp, root, line->logfile->fontset, WinGC, x + continuation_width * line->wrapped_left,
408 y, line->line, line->len);
409
415 if (line->wrapped_left) 410 if (line->wrapped_left)
416 { 411 {
417 if (foreground) XSetForeground (disp, WinGC, continuation_color); 412 if (foreground) XSetForeground (disp, WinGC, continuation_color);
418 XmbDrawString (disp, root, line->logfile->fontset, WinGC, x, y, continuation, continuation_length); 413 XmbDrawString (disp, root, line->logfile->fontset, WinGC, x, y, continuation, continuation_length);
419 } 414 }
565 XClearArea (disp, root, win_x, win_y + offset - (opt_reverse ? 0 : space), 560 XClearArea (disp, root, win_x, win_y + offset - (opt_reverse ? 0 : space),
566 width + MARGIN_OF_ERROR, space, False); 561 width + MARGIN_OF_ERROR, space, False);
567#endif 562#endif
568 } 563 }
569 564
565 /* at least one of the lines must fit in the allocated area. we've
566 * already checked at initialisation time that all the fonts are small
567 * enough to fit at least one line in the display area, but assert it
568 * again here to be sure */
569 assert(line != linelist);
570
570 /* any lines that didn't just get looked at are never going to be, so break the chain */ 571 /* any lines that didn't just get looked at are never going to be, so break the chain */
571 if (line) line->prev->next = 0; 572 if (line) line->prev->next = 0;
572 573
573 /* and throw them all away */ 574 /* and throw them all away */
574 while (line) 575 while (line)
649 * otherwise allocates a new string and copies p2 to it 650 * otherwise allocates a new string and copies p2 to it
650 */ 651 */
651char * 652char *
652concat_line (char *p1, const char *p2) 653concat_line (char *p1, const char *p2)
653{ 654{
654 assert(p2);
655
656 int l1 = p1 ? strlen (p1) : 0; 655 int l1 = p1 ? strlen (p1) : 0;
657 int l2 = strlen (p2); 656 int l2 = strlen (p2);
658 char *r; 657 char *r;
658
659 assert (p2);
659 660
660 if (p1) 661 if (p1)
661 r = xrealloc(p1, l1 + l2 + 1); 662 r = xrealloc(p1, l1 + l2 + 1);
662 else 663 else
663 r = xmalloc (l2 + 1); 664 r = xmalloc (l2 + 1);
919 int start_w = log->last->wrapped_left ? continuation_width : 0; 920 int start_w = log->last->wrapped_left ? continuation_width : 0;
920 int w = start_w; 921 int w = start_w;
921 int wrapped = 0; 922 int wrapped = 0;
922 char *break_p = NULL; 923 char *break_p = NULL;
923 int width_at_break_p = 0; 924 int width_at_break_p = 0;
925 int prefix_len;
926
924 spaces = 0; 927 spaces = 0;
925 928
926 if (opt_justify) 929 if (opt_justify)
927 breaks[spaces].index = breaks[spaces].width = 0; 930 breaks[spaces].index = breaks[spaces].width = 0;
928 931
985 /* if we're wrapping at spaces, and the line is long enough to 988 /* if we're wrapping at spaces, and the line is long enough to
986 * wrap, and we've seen a space already, and the space wasn't 989 * wrap, and we've seen a space already, and the space wasn't
987 * the first character on the line, then wrap at the space */ 990 * the first character on the line, then wrap at the space */
988 if (!wrapped) 991 if (!wrapped)
989 break; 992 break;
990
991 int prefix_len;
992 993
993 /* choose where to break the line */ 994 /* choose where to break the line */
994 if (opt_wordwrap && break_p && break_p != beg) 995 if (opt_wordwrap && break_p && break_p != beg)
995 { 996 {
996 prefix_len = break_p - beg; 997 prefix_len = break_p - beg;
1155 continue; 1156 continue;
1156 } 1157 }
1157 1158
1158 /* print filename if any, and if last line was from 1159 /* print filename if any, and if last line was from
1159 * different file */ 1160 * different file */
1160 if (!opt_nofilename && lastprinted != current && current->desc[0]) 1161 if (lastprinted != current)
1161 { 1162 {
1162 current->last = 0; 1163 current->last = 0;
1164 if (!opt_nofilename && current->desc[0])
1165 {
1163 insert_new_line (xstrdup ("["), current); 1166 insert_new_line (xstrdup ("["), current);
1164 append_to_existing_line (xstrdup (current->desc), current); 1167 append_to_existing_line (xstrdup (current->desc), current);
1165 append_to_existing_line (xstrdup ("]"), current); 1168 append_to_existing_line (xstrdup ("]"), current);
1166 } 1169 }
1170 }
1167 1171
1168 /* if we're dealing with partial lines, and the last 1172 /* if we're dealing with partial lines, and the last
1169 * time we showed the line it wasn't finished ... */ 1173 * time we showed the line it wasn't finished ... */
1170 if (!opt_whole && current->lastpartial) 1174 if (!opt_whole && current->lastpartial)
1171 { 1175 {
1279 char *transform = NULL; 1283 char *transform = NULL;
1280#endif 1284#endif
1281 1285
1282 setlocale (LC_CTYPE, ""); /* try to initialize the locale. */ 1286 setlocale (LC_CTYPE, ""); /* try to initialize the locale. */
1283 1287
1284 /* window needs to be initialized before colorlookups can be done */
1285 /* just a dummy to get the color lookups right */
1286 geom_mask = NoValue;
1287 InitWindow ();
1288
1289 for (i = 1; i < argc; i++) 1288 for (i = 1; i < argc; i++)
1290 { 1289 {
1291 const char *arg = argv[i]; 1290 const char *arg = argv[i];
1292 1291
1293 if (arg[0] == '-' && arg[1] != '\0' && arg[1] != ',') 1292 if (arg[0] == '-' && arg[1] != '\0' && arg[1] != ',')
1328 } 1327 }
1329 else if (!strcmp (arg, "-shade")) 1328 else if (!strcmp (arg, "-shade"))
1330 opt_shade = 1; 1329 opt_shade = 1;
1331 else if (!strcmp (arg, "-outline")) 1330 else if (!strcmp (arg, "-outline"))
1332 opt_outline = 1; 1331 opt_outline = 1;
1332 else if (!strcmp (arg, "-minspace"))
1333 opt_minspace = 1;
1333 else if (!strcmp (arg, "-noflicker")) 1334 else if (!strcmp (arg, "-noflicker"))
1334 opt_noflicker = 1; 1335 opt_noflicker = 1;
1335 else if (!strcmp (arg, "-frame")) 1336 else if (!strcmp (arg, "-frame"))
1336 opt_frame = 1; 1337 opt_frame = 1;
1337 else if (!strcmp (arg, "-no-filename")) 1338 else if (!strcmp (arg, "-no-filename"))
1351 else if (!strcmp (arg, "-color")) 1352 else if (!strcmp (arg, "-color"))
1352 def_color = argv[++i]; 1353 def_color = argv[++i];
1353 else if (!strcmp (arg, "-noinitial")) 1354 else if (!strcmp (arg, "-noinitial"))
1354 opt_noinitial = 1; 1355 opt_noinitial = 1;
1355 else if (!strcmp (arg, "-id")) 1356 else if (!strcmp (arg, "-id"))
1356 root = atoi (argv[++i]); 1357 {
1358 unsigned long id;
1359
1360 if (sscanf (argv[++i], "%li", &id) == 1 && id)
1361 root = id;
1362 }
1357 else if (!strcmp (arg, "-interval") || !strcmp (arg, "-i")) 1363 else if (!strcmp (arg, "-interval") || !strcmp (arg, "-i"))
1358 { 1364 {
1359 double iv = atof (argv[++i]); 1365 double iv = atof (argv[++i]);
1360 1366
1361 interval.tv_sec = (int) iv; 1367 interval.tv_sec = (int) iv;
1401 if (fcntl (0, F_SETFL, O_NONBLOCK) < 0) 1407 if (fcntl (0, F_SETFL, O_NONBLOCK) < 0)
1402 perror ("fcntl"), exit (1); 1408 perror ("fcntl"), exit (1);
1403 1409
1404 e->fname = NULL; 1410 e->fname = NULL;
1405 e->inode = 0; 1411 e->inode = 0;
1412 if (desc == arg)
1406 e->desc = xstrdup ("stdin"); 1413 e->desc = xstrdup ("stdin");
1414 else
1415 e->desc = xstrdup (desc);
1407 } 1416 }
1408 else 1417 else
1409 { 1418 {
1410 e->fname = xstrdup (fname); 1419 e->fname = xstrdup (fname);
1411 1420
1413 perror (fname), exit (1); 1422 perror (fname), exit (1);
1414 1423
1415 e->desc = xstrdup (desc); 1424 e->desc = xstrdup (desc);
1416 } 1425 }
1417 1426
1418 e->color = GetColor (fcolor); 1427 e->colorname = fcolor;
1419 e->partial = 0; 1428 e->partial = 0;
1420 e->fontname = fontname; 1429 e->fontname = fontname;
1421 e->last = NULL; 1430 e->last = NULL;
1422 e->next = NULL; 1431 e->next = NULL;
1423 1432
1483 } 1492 }
1484 else 1493 else
1485 printf ("compiled '%s' OK to %x\n", transform, (int)transformre); 1494 printf ("compiled '%s' OK to %x\n", transform, (int)transformre);
1486 } 1495 }
1487#endif 1496#endif
1497
1498 if (opt_outline && !opt_minspace)
1499 {
1500 /* adding outline increases the total width and height by 2
1501 pixels each, and offsets the text one pixel right and one
1502 pixel down */
1503 effect_x_space = effect_y_space = 2;
1504 effect_x_offset = effect_y_offset = 1;
1505 }
1506 else if (opt_shade && !opt_minspace)
1507 {
1508 /* adding a shadow increases the space used */
1509 effect_x_space = abs (SHADE_X);
1510 effect_y_space = abs (SHADE_Y);
1511
1512 /* if the shadow is to the right and below then we don't need
1513 * to move the text to make space for it, but shadows to the left
1514 * and above need accomodating */
1515 effect_x_offset = SHADE_X > 0 ? 0 : -SHADE_X;
1516 effect_y_offset = SHADE_Y > 0 ? 0 : -SHADE_Y;
1517 }
1518 else
1519 {
1520 effect_x_space = effect_y_space = 0;
1521 effect_x_offset = effect_y_offset = 0;
1522 }
1488 1523
1489 InitWindow (); 1524 InitWindow ();
1490 1525
1491 install_signal (SIGINT, blank_window); 1526 install_signal (SIGINT, blank_window);
1492 install_signal (SIGQUIT, blank_window); 1527 install_signal (SIGQUIT, blank_window);
1572 " -reverse print new lines at the top\n" 1607 " -reverse print new lines at the top\n"
1573 " -whole wait for \\n before showing a line\n" 1608 " -whole wait for \\n before showing a line\n"
1574 " -partial show lines even if they don't end with a \\n\n" 1609 " -partial show lines even if they don't end with a \\n\n"
1575 " -update allow updates to old partial lines\n" 1610 " -update allow updates to old partial lines\n"
1576 " -cont string to prefix continued partial lines with\n" 1611 " -cont string to prefix continued partial lines with\n"
1612 " defaults to \"|| \"\n"
1577 " -wordwrap wrap long lines at spaces to avoid breaking words\n" 1613 " -wordwrap wrap long lines at spaces to avoid breaking words\n"
1578 " defaults to \"[+]\"\n"
1579 " -shade add shading to font\n" 1614 " -shade add shading to font\n"
1615 " -outline add black outline to font\n"
1616 " -minspace force minimum line spacing\n"
1580 " -noinitial don't display the last file lines on\n" 1617 " -noinitial don't display the last file lines on\n"
1581 " startup\n" 1618 " startup\n"
1582 " -i | -interval seconds interval between checks (fractional\n" 1619 " -i | -interval seconds interval between checks (fractional\n"
1583 " values o.k.). Default 2.4 seconds\n" 1620 " values o.k.). Default 2.4 seconds\n"
1584 " -V display version information and exit\n" 1621 " -V display version information and exit\n"
1614 if (setsid () == -1) 1651 if (setsid () == -1)
1615 return -1; 1652 return -1;
1616 1653
1617 return 0; 1654 return 0;
1618} 1655}
1619
1620/* todo - get reverse display working again */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines