http://packetstormsecurity.org/UNIX/admin/xscreensaver-4.00.tar.gz
[xscreensaver] / hacks / noseguy.c
index aa0f1c6c39765bedbce1d44bcb65842e4f9eaf86..0bf10d82899aee773bee6174e58bc8f9910b1bbf 100644 (file)
@@ -1,5 +1,5 @@
 /* xscreensaver, Copyright (c) 1992, 1996, 1997, 1998
- *  Jamie Zawinski <jwz@netscape.com>
+ *  Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -11,7 +11,8 @@
  */
 
 /* Make a little guy with a big nose and a hat wanter around the screen,
-   spewing out messages.  Derived from xnlock by Dan Heller <argv@sun.com>.
+   spewing out messages.  Derived from xnlock by 
+   Dan Heller <argv@danheller.com>.
  */
 
 #include "screenhack.h"
@@ -542,7 +543,9 @@ get_words (void)
              sprintf (buf, "\"%s\" produced no output!", orig_program);
            else if (!first_time &&
                     (strstr (buf, ": not found") ||
-                     strstr (buf, ": Not found")))
+                     strstr (buf, ": Not found") ||
+                      strstr (buf, ": command not found") ||
+                      strstr (buf, ": Command not found")))
              switch (random () % 20)
                {
                case 1: strcat (buf, "( Get with the program, bub. )\n");
@@ -610,14 +613,14 @@ get_words (void)
 char *progclass = "Noseguy";
 
 char *defaults [] = {
-  "Noseguy.background: black",         /* to placate SGI */
-  "Noseguy.foreground: gray80",
+  ".background:                black",
+  ".foreground:                gray80",
 #ifndef VMS
   "*mode:              program",
 #else
   "*mode:              string",
 #endif
-  "*program:           " ZIPPY_PROGRAM,
+  "*program:           " FORTUNE_PROGRAM,
   "noseguy.font:       -*-new century schoolbook-*-r-*-*-*-180-*-*-*-*-*-*",
   0
 };
@@ -713,7 +716,8 @@ screenhack (Display *d, Window w)
   while (1)
     {
       next_fn();
-      XSync (dpy, True);
+      XSync (dpy, False);
+      screenhack_handle_events (dpy);
       usleep (interval * 1000);
     }
 }