Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!zehntel!hplabs!sri-unix!support@UCI-750A.ARPA From: support@UCI-750A.ARPA Newsgroups: net.unix-wizards Subject: leave +nnnn doesn't work at all Message-ID: <580@sri-arpa.UUCP> Date: Tue, 31-Jul-84 13:27:27 EDT Article-I.D.: sri-arpa.580 Posted: Tue Jul 31 13:27:27 1984 Date-Received: Sat, 4-Aug-84 00:42:03 EDT Lines: 107 From: Support Group (agent: Richard Johnson)Description: Leave doesn't work if you specify the time using the "+" syntax. When the bug causing this is fixed, it gives a bogus error message. Repeat-By: Type "leave +1". You'll never see the warning. Fix: Diff listing follows: (We install all bug fixes so that compiling with "-DUCI" is needed to compile them in. Ignore the ifdef's.) *** bk_leave.c Thu Mar 31 11:57:12 1983 --- leave.c Fri Jul 20 19:10:06 1984 *************** *** 1,4 static char *sccsid = "@(#)leave.c 4.3 (Berkeley) 3/31/83"; #include #include /* --- 1,12 ----- static char *sccsid = "@(#)leave.c 4.3 (Berkeley) 3/31/83"; + /* UCICHANGES (enabled via -DUCI): + + 0) Fri Jul 20 19:08:21 1984 Sources (agent: Richard Johnson) + Leave doesn't ever print a message if you use the "+nnnn" syntax. + Even if it did, then it would give a bogus error. + (ucb/leave.c) + + */ #include #include /* *************** *** 32,37 if (buff[0] == '\n') exit(0); if (buff[0] == '+') { diff = atoi(buff+1); doalarm(diff); --- 40,48 ----- if (buff[0] == '\n') exit(0); + #ifdef UCI + strcpy(origlogin,getlogin()); + #endif UCI if (buff[0] == '+') { diff = atoi(buff+1); doalarm(diff); *************** *** 35,40 if (buff[0] == '+') { diff = atoi(buff+1); doalarm(diff); } if (buff[0] < '0' || buff[0] > '9') { printf("usage: %s [hhmm]\n",argv[0]); --- 46,54 ----- if (buff[0] == '+') { diff = atoi(buff+1); doalarm(diff); + #ifdef UCI + exit(0); + #endif UCI } if (buff[0] < '0' || buff[0] > '9') { printf("usage: %s [hhmm]\n",argv[0]); *************** *** 40,45 printf("usage: %s [hhmm]\n",argv[0]); exit(1); } strcpy(origlogin,getlogin()); tod = atoi(buff); --- 54,60 ----- printf("usage: %s [hhmm]\n",argv[0]); exit(1); } + #ifndef UCI strcpy(origlogin,getlogin()); #endif UCI *************** *** 41,46 exit(1); } strcpy(origlogin,getlogin()); tod = atoi(buff); hours = tod / 100; --- 56,62 ----- } #ifndef UCI strcpy(origlogin,getlogin()); + #endif UCI tod = atoi(buff); hours = tod / 100;