X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fnoseguy.c;h=0bf10d82899aee773bee6174e58bc8f9910b1bbf;hb=8eb2873d7054e705c4e83f22d18c40946a9e2529;hp=a84ee6b65daf40b65b1154e9230dcca1e8056e5c;hpb=f3e0240915ed9f9b3a61781f5c7002d587563fe0;p=xscreensaver diff --git a/hacks/noseguy.c b/hacks/noseguy.c index a84ee6b6..0bf10d82 100644 --- a/hacks/noseguy.c +++ b/hacks/noseguy.c @@ -1,5 +1,5 @@ -/* xscreensaver, Copyright (c) 1992, 1996, 1997 - * Jamie Zawinski +/* xscreensaver, Copyright (c) 1992, 1996, 1997, 1998 + * Jamie Zawinski * * 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 . + spewing out messages. Derived from xnlock by + Dan Heller . */ #include "screenhack.h" @@ -58,23 +59,23 @@ static void (*next_fn) (void); #ifdef HAVE_XPM # include -# include "noses/nose-f1.xpm" -# include "noses/nose-f2.xpm" -# include "noses/nose-f3.xpm" -# include "noses/nose-f4.xpm" -# include "noses/nose-l1.xpm" -# include "noses/nose-l2.xpm" -# include "noses/nose-r1.xpm" -# include "noses/nose-r2.xpm" +# include "images/noseguy/nose-f1.xpm" +# include "images/noseguy/nose-f2.xpm" +# include "images/noseguy/nose-f3.xpm" +# include "images/noseguy/nose-f4.xpm" +# include "images/noseguy/nose-l1.xpm" +# include "images/noseguy/nose-l2.xpm" +# include "images/noseguy/nose-r1.xpm" +# include "images/noseguy/nose-r2.xpm" #else -# include "noses/nose-f1.xbm" -# include "noses/nose-f2.xbm" -# include "noses/nose-f3.xbm" -# include "noses/nose-f4.xbm" -# include "noses/nose-l1.xbm" -# include "noses/nose-l2.xbm" -# include "noses/nose-r1.xbm" -# include "noses/nose-r2.xbm" +# include "images/noseguy/nose-f1.xbm" +# include "images/noseguy/nose-f2.xbm" +# include "images/noseguy/nose-f3.xbm" +# include "images/noseguy/nose-f4.xbm" +# include "images/noseguy/nose-l1.xbm" +# include "images/noseguy/nose-l2.xbm" +# include "images/noseguy/nose-r1.xbm" +# include "images/noseguy/nose-r2.xbm" #endif static void @@ -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); } }