From 0eb482b37818f15a721a440ea180a752424a53a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Groenvall?= Date: Tue, 30 Jan 1996 20:59:05 +0000 Subject: [PATCH] Improve user feedback on password input. Remove warnings by using K&R C prototype for callback function. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@218 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/xnlock/xnlock.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/appl/xnlock/xnlock.c b/appl/xnlock/xnlock.c index a720d3363..d4808aff8 100644 --- a/appl/xnlock/xnlock.c +++ b/appl/xnlock/xnlock.c @@ -10,7 +10,7 @@ #include "config.h" #include "protos.h" #define KERBEROS -RCSID("$Header$"); +RCSID("$Id$"); #endif #include @@ -33,7 +33,7 @@ char name[100]; char realm[REALM_SZ + 1]; #endif -char SPACE_STRING[] = " "; +char *SPACE_STRING = " "; char STRING[] = "****************"; #define MAX_PASSWD_LENGTH (sizeof(STRING)) @@ -495,7 +495,9 @@ Visibility(Widget w, XtPointer client_data, XEvent *event, Boolean *_b) } static void -countdown(int* _t, XtIntervalId *_d) +countdown(_t, _d) + int* _t; + XtIntervalId *_d; { int *timeout = _t; char buf[16]; @@ -828,6 +830,10 @@ main (int argc, char **argv) XGCValues gcvalues; char **list; + srand(getpid()); + for (i = 0; i < (sizeof(STRING)-2); i++) + STRING[i] = ((unsigned long)rand() % ('~' - ' ')) + ' '; + locked_at = time(0); if ((ProgName = rindex(*argv, '/')) != 0)