home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff319.lzh
/
CNewsSrc
/
cnews.orig.lzh
/
nntpdiffs
/
cdiff.1.5.5
< prev
next >
Wrap
Text File
|
1989-06-27
|
6KB
|
249 lines
Only in .: Cnews.diff
Common subdirectories: ../nntp.1.5.5/common and ./common
Common subdirectories: ../nntp.1.5.5/doc and ./doc
Common subdirectories: ../nntp.1.5.5/inews and ./inews
Common subdirectories: ../nntp.1.5.5/rrnpatches and ./rrnpatches
Common subdirectories: ../nntp.1.5.5/server and ./server
Common subdirectories: ../nntp.1.5.5/support and ./support
Common subdirectories: ../nntp.1.5.5/xfer and ./xfer
Common subdirectories: ../nntp.1.5.5/xmit and ./xmit
diff -c -r ../nntp.1.5.5/server/Makefile ./server/Makefile
*** ../nntp.1.5.5/server/Makefile Tue Jun 6 22:46:14 1989
--- ./server/Makefile Tue Jun 6 23:33:45 1989
***************
*** 3,8 ****
--- 3,9 ----
#
SRVROBJ = main.o serve.o access.o access_inet.o access_dnet.o active.o \
+ batch.o \
ahbs.o globals.o group.o help.o ihave.o list.o misc.o netaux.o \
newgroups.o newnews.o nextlast.o ngmatch.o post.o parsit.o scandir.o \
slave.o spawn.o strcasecmp.o subnet.o time.o xhdr.o fakesyslog.o \
***************
*** 9,14 ****
--- 10,16 ----
../common/version.o
SRVRSRC = main.c serve.c access.c access_inet.c access_dnet.c active.c \
+ batch.c \
ahbs.c globals.c group.c help.c ihave.c list.c misc.c netaux.c \
newgroups.c newnews.c nextlast.c ngmatch.c post.c parsit.c scandir.c \
slave.c spawn.c strcasecmp.c subnet.c time.c xhdr.c fakesyslog.c \
***************
*** 19,25 ****
SRCS = ${SRVRSRC}
# -ldbm here if you've #define'ed DBM in ../common/conf.h
! LIBS =
CFLAGS = -O
--- 21,27 ----
SRCS = ${SRVRSRC}
# -ldbm here if you've #define'ed DBM in ../common/conf.h
! LIBS = -ldbm
CFLAGS = -O
Only in ./server: batch.c
diff -c -r ../nntp.1.5.5/server/ihave.c ./server/ihave.c
*** ../nntp.1.5.5/server/ihave.c Tue Jun 6 22:46:12 1989
--- ./server/ihave.c Tue Jun 6 23:47:02 1989
***************
*** 52,59 ****
(void) strcat(errbuf, " NNTP server out of space. Try later.");
retcode = 0; /* indicates that an error occurred */
! } else retcode =
! spawn(rnews, "rnews", (char *) 0, CONT_XFER, ERR_XFERFAIL, errbuf);
if (retcode <= 0)
printf("%d %s\r\n", ERR_XFERFAIL, errbuf);
--- 52,65 ----
(void) strcat(errbuf, " NNTP server out of space. Try later.");
retcode = 0; /* indicates that an error occurred */
! } else
! #ifdef UNBATCHED_INPUT
! retcode = spawn(rnews, "rnews", (char *) 0, CONT_XFER,
! ERR_XFERFAIL, errbuf);
! #else
! /* C news input hook */
! retcode = batch_input_article(CONT_XFER, ERR_XFERFAIL, errbuf);
! #endif
if (retcode <= 0)
printf("%d %s\r\n", ERR_XFERFAIL, errbuf);
diff -c -r ../nntp.1.5.5/server/misc.c ./server/misc.c
*** ../nntp.1.5.5/server/misc.c Tue Jun 6 22:46:12 1989
--- ./server/misc.c Tue Jun 6 23:33:46 1989
***************
*** 80,86 ****
*
* Side effects: opens dbm database
* (only once, keeps it open after that).
- * Converts "msg_id" to lower case.
*/
#ifndef NDBM
--- 80,85 ----
***************
*** 113,122 ****
datum key, content;
#endif USGHIST
static FILE *hfp = NULL; /* history file, text version */
-
- for (cp = msg_id; *cp != '\0'; ++cp)
- if (isupper(*cp))
- *cp = tolower(*cp);
#ifdef USGHIST
hfp = fopen(histfile(msg_id), "r");
--- 112,117 ----
diff -c -r ../nntp.1.5.5/server/newnews.c ./server/newnews.c
*** ../nntp.1.5.5/server/newnews.c Tue Jun 6 22:48:36 1989
--- ./server/newnews.c Tue Jun 6 23:33:46 1989
***************
*** 249,257 ****
* Side effects: Seeks in history file, modifies line.
*/
! seekuntil(fp, key, line, linesize)
FILE *fp;
! char *key;
char *line;
int linesize;
{
--- 249,257 ----
* Side effects: Seeks in history file, modifies line.
*/
! seekuntil(fp, akey, line, linesize)
FILE *fp;
! char *akey;
char *line;
int linesize;
{
***************
*** 258,264 ****
--- 258,267 ----
char datetime[32];
register int c;
register long top, bot, mid;
+ extern long dtol();
+ char key[30];
+ (void) sprintf(key, "%ld", dtol(akey)); /* akey -> time_t in ascii */
bot = 0;
(void) fseek(fp, 0L, 2);
top = ftell(fp);
***************
*** 321,326 ****
--- 324,332 ----
}
+ /*
+ * C news version of getword.
+ */
getword(fp, w, line, linesize)
FILE *fp;
register char *w;
***************
*** 328,363 ****
int linesize;
{
register char *cp;
if (fgets(line, linesize, fp) == NULL)
return (0);
! if (cp = index(line, '\t')) {
! /*
! * The following gross hack is present because the history file date
! * format is braindamaged. They like "mm/dd/yy hh:mm", which is useless
! * for relative comparisons of dates using something like atoi() or
! * strcmp. So, this changes their format into yymmddhhmm. Sigh.
! *
! * 12345678901234 ("x" for cp[x])
! * mm/dd/yy hh:mm (their lousy representation)
! * yymmddhhmm (our good one)
! * 0123456789 ("x" for w[x])
! */
! *cp = '\0';
! (void) strncpy(w, cp+1, 15);
! w[0] = cp[7]; /* Years */
! w[1] = cp[8];
! w[2] = cp[1]; /* Months */
! w[3] = cp[2];
! w[4] = cp[4]; /* Days */
! w[5] = cp[5];
! w[6] = cp[10]; /* Hours */
! w[7] = cp[11];
! w[8] = cp[13]; /* Minutes */
! w[9] = cp[14];
! w[10] = '\0';
! } else
! w[0] = '\0';
return (1);
}
--- 334,356 ----
int linesize;
{
register char *cp;
+ extern char *index();
if (fgets(line, linesize, fp) == NULL)
return (0);
! w[0] = '\0'; /* in case of bad format */
! if (cp = index(line, '\t')) { /* find 2nd field */
! register char *endp;
!
! *cp++ = '\0';
! endp = index(cp, '~'); /* end of date-received */
! if (endp == NULL)
! endp = index(cp, '\t'); /* end of expiry */
! if (endp != NULL) {
! (void) strncpy(w, cp, endp - cp);
! w[endp - cp] = '\0';
! }
! }
return (1);
}
diff -c -r ../nntp.1.5.5/server/serve.c ./server/serve.c
*** ../nntp.1.5.5/server/serve.c Tue Jun 6 22:48:36 1989
--- ./server/serve.c Tue Jun 6 23:41:46 1989
***************
*** 263,268 ****
--- 263,279 ----
(void) fflush(stdout);
+ (void) fflush(stdout);
+
+ #ifndef UNBATCHED_INPUT
+ {
+ char errbuf[2 * NNTP_STRLEN];
+
+ enqpartbatch(CONT_XFER, ERR_XFERFAIL, errbuf);
+ }
+ #endif
+
+
#ifdef LOG
if (ferror(stdout))
syslog(LOG_ERR, "%s disconnect: %m", hostname);
***************
*** 311,317 ****
#ifdef PROFILE
profile();
#endif
-
exit(0);
}
--- 322,327 ----