Smail3 log file parser *PATCH1*
Jeff Beadles
jeff at onion.pdx.com
Thu Dec 27 14:23:59 AEST 1990
Well, Oops. There was a bug in the original posting. It was just a tiny
off-by-one, but it does seem to hit some sites. Anyway, here's patch1. It
also adds a little bit of System V compatibility. Use "-DSYSV" to compile if
needed.
To apply: run thru sh/unshar, and patch -p0 < smaillog.patch1
Thanks to Randy (news at m2xenix) for pointing out that there was a problem, and
(unbeknown to him) James Deeble for the use of his System V host (techbook)
to debug.
Major Grrrrr...'s to sdb. It would have been fixed several times faster with
gdb or even dbx. :-)
If you run into any problems, (or fixup how error's are handled :-), please
send them to me in email and I'll add them to my copy of the source also.
Have fun!
-Jeff
#--------------------------------CUT HERE-------------------------------------
#! /bin/sh
#
# This is a shell archive. Save this into a file, edit it
# and delete all lines above this comment. Then give this
# file to sh by executing the command "sh file". The files
# will be extracted into the current directory owned by
# you with default permissions.
#
# The files contained herein are:
#
# -rw-r--r-- 1 jeff 1267 Dec 26 19:21 smaillog.patch1
#
echo 'x - smaillog.patch1'
if test -f smaillog.patch1; then echo 'shar: not overwriting smaillog.patch1'; else
sed 's/^X//' << '________This_Is_The_END________' > smaillog.patch1
X*** smail.old.c Wed Dec 26 19:05:37 1990
X--- smaillog.c Wed Dec 26 19:05:22 1990
X***************
X*** 12,18
X * jeff at onion.pdx.com
X * or uunet!onion.pdx.com!jeff
X *
X! * $Header: smaillog.c,v 1.4 90/12/24 22:23:36 jeff Exp $
X */
X
X
X
X--- 12,18 -----
X * jeff at onion.pdx.com
X * or uunet!onion.pdx.com!jeff
X *
X! * $Header: smaillog.c,v 1.5 90/12/26 19:04:56 jeff Exp $
X */
X
X
X***************
X*** 18,23
X
X #include <stdio.h>
X #include <ctype.h>
X #include <strings.h>
X
X void add_data();
X
X--- 18,28 -----
X
X #include <stdio.h>
X #include <ctype.h>
X+ #ifdef SYSV
X+ #include <string.h>
X+ #define index strchr
X+ #define rindex strrchr
X+ #else
X #include <strings.h>
X #endif /* SYSV */
X
X***************
X*** 19,24
X #include <stdio.h>
X #include <ctype.h>
X #include <strings.h>
X
X void add_data();
X struct qlist *lookup();
X
X--- 24,30 -----
X #define rindex strrchr
X #else
X #include <strings.h>
X+ #endif /* SYSV */
X
X void add_data();
X struct qlist *lookup();
X***************
X*** 274,280
X /*
X * Save the string
X */
X! cp = mspace( (unsigned int)(strlen(str)));
X (void)strcpy(cp, str);
X
X /*
X
X--- 280,286 -----
X /*
X * Save the string
X */
X! cp = mspace( (unsigned int)(strlen(str) + 1));
X (void)strcpy(cp, str);
X
X /*
________This_Is_The_END________
if test `wc -c < smaillog.patch1` -ne 1267; then
echo 'shar: smaillog.patch1 was damaged during transit (should have been 1267 bytes)'
fi
fi ; : end of overwriting check
exit 0
More information about the Alt.sources.d
mailing list