Cmail patch to version 1.2
Jonathan Knight
jonathan at cs.keele.ac.uk
Wed Oct 25 03:38:01 AEST 1989
Looks like I made a mistake.
The problem arises when no arguments are given to cmail. On a Sun
this caused a core dump. The patch is below, apply to cmail using
patch or by hand if you really want.
Note that I've also stuck a 'you may do as you wish' message in
the README in case anybody thought they couldn't.
*** ../c2/README Tue Oct 24 17:27:14 1989
--- README Tue Oct 24 17:28:54 1989
***************
*** 16,21
Microport 2.4 (SYSVR2) (R.I.P.)
SunOS 3.5 (BSD4.2) (Yellow Pages)
Bugs, etc can be sent to:
______ JANET :jonathan at uk.ac.keele.cs Jonathan Knight,
--- 16,24 -----
Microport 2.4 (SYSVR2) (R.I.P.)
SunOS 3.5 (BSD4.2) (Yellow Pages)
+ You may copy this code without restriction.
+ You may rip bits out that you like without restriction.
+
Bugs, etc can be sent to:
______ JANET :jonathan at uk.ac.keele.cs Jonathan Knight,
*** ../c2/cmail.c Tue Oct 24 17:27:21 1989
--- cmail.c Tue Oct 24 17:26:09 1989
***************
*** 6,11
Version 1.1
Fixed manual page
Usage: mailfor [-v] user1 user2 user3 ....
Users can be given as regular expressions.
--- 6,14 -----
Version 1.1
Fixed manual page
+ Version 1.2
+ Fixed reference to argv[1] which could be undefined.
+
Usage: mailfor [-v] user1 user2 user3 ....
Users can be given as regular expressions.
***************
*** 19,26
#define FNAMESIZE 25
#define PRINT1 "%-10.10s %-25.25s "
! #define VERSION "1.1"
! #define DATE "8 July 1989"
#define YEAR "1989"
/* Include files
--- 22,29 -----
#define FNAMESIZE 25
#define PRINT1 "%-10.10s %-25.25s "
! #define VERSION "1.2"
! #define DATE "24 October 1989"
#define YEAR "1989"
/* Include files
***************
*** 134,140
time to print it out.
*/
! if (strcmp(*argv, "-v") == 0)
{ printf("\n%s Version %s, %s\n(C) Copyright %s Jonathan Knight\n\n",
myname, VERSION, DATE, YEAR);
++argv;
--- 137,143 -----
time to print it out.
*/
! if (argc && (strcmp(*argv, "-v") == 0))
{ printf("\n%s Version %s, %s\n(C) Copyright %s Jonathan Knight\n\n",
myname, VERSION, DATE, YEAR);
++argv;
--
______ JANET :jonathan at uk.ac.keele.cs Jonathan Knight,
/ BITNET:jonathan%cs.kl.ac.uk at ukacrl Department of Computer Science
/ _ __ other :jonathan at cs.keele.ac.uk University of Keele, Keele,
(_/ (_) / / UUCP :...!ukc!kl-cs!jonathan Staffordshire. ST5 5BG. U.K.
More information about the Alt.sources
mailing list