X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=driver%2Ftest-passwd.c;h=eaa884ff2ecb460769e3bcf0c48cc5373b440faa;hb=82c5080773aae5e72ec155327c075775e023d2ee;hp=f86f8069f83f13dde550525ced06689955b32124;hpb=0ed85ca0e4b0eae40a4f50a51d63f2f41e45373a;p=xscreensaver diff --git a/driver/test-passwd.c b/driver/test-passwd.c index f86f8069..eaa884ff 100644 --- a/driver/test-passwd.c +++ b/driver/test-passwd.c @@ -1,4 +1,4 @@ -/* xscreensaver, Copyright (c) 1998 Jamie Zawinski +/* xscreensaver, Copyright (c) 1998, 2001 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 @@ -14,7 +14,11 @@ itself. */ -#define WHICH 0 +#define WHICH_PASS 100 +#define WHICH_SPLASH 101 +#define WHICH_TTY 102 + +#define WHICH WHICH_PASS #ifdef HAVE_CONFIG_H # include "config.h" @@ -133,7 +137,7 @@ main (int argc, char **argv) progclass = "XScreenSaver"; -#if (WHICH != 2) +#if (WHICH != WHICH_TTY) toplevel_shell = XtAppInitialize (&si->app, progclass, 0, 0, &argc, argv, fallback, 0, 0); @@ -162,7 +166,7 @@ main (int argc, char **argv) while (1) { -#if WHICH == 0 +#if WHICH == WHICH_PASS if (unlock_p (si)) fprintf (stderr, "%s: password correct\n", progname); else @@ -170,7 +174,7 @@ main (int argc, char **argv) XSync(si->dpy, False); sleep (3); -#elif WHICH == 1 +#elif WHICH == WHICH_SPLASH { XEvent event; make_splash_dialog (si); @@ -186,7 +190,7 @@ main (int argc, char **argv) XSync (si->dpy, False); sleep (1); } -#elif WHICH == 2 +#elif WHICH == WHICH_TTY { char *pass; char buf[255]; @@ -204,6 +208,8 @@ main (int argc, char **argv) else printf ("%s: Wrong!\n", progname); } +#else +# error bogus WHICH value! #endif } }