tim@pilchuck.Data-IO.COM (The Daemon's Slave) (04/30/87)
For those people who are using Lee Ward's getmap.c program to automatically unpack your UUCP maps you will have problems with the latest map postings. The problem occurs in the way it determines if it's in or out of a map whithin the posting. This last posting of the maps has lines that look like this. cat << \SHAR_EOF > README ... read me information SHAR_EOF Getmap will determine the map delimiter to be "\SHAR_EOF" while it's actually "SHAR_EOF". This will cause "Read/sync" errors from getmap and too many open files if you are unbatching all of the maps at the same time. Below is a temporary fix to the problem and may not be the best. Basically it will now pass the check for the delimiter if the delimiter is either "DELIMITER" or "\DELIMITER". Line numbers and or contents may vary. *** getmap.c.orig Wed Apr 29 16:30:00 1987 --- getmap.c Wed Apr 29 16:27:20 1987 *************** *** 27,33 **** #include <sys/stat.h> #include <sys/dir.h> ! char *mapgrp = "/usr/spool/news/mod/map/news"; char *mapdir = "/usr/spool/news/Maps"; char *seqfil = "/usr/spool/news/Maps/.seq"; #ifdef LOG --- 27,33 ---- #include <sys/stat.h> #include <sys/dir.h> ! char *mapgrp = "/usr/spool/news/comp/mail/maps"; char *mapdir = "/usr/spool/news/Maps"; char *seqfil = "/usr/spool/news/Maps/.seq"; #ifdef LOG *************** *** 169,174 **** --- 169,175 ---- int state = SEARCH, sizdel = 0; FILE *isd, *osd; extern FILE *fopen(); + char *p; if ((isd = fopen(file, "r")) == NULL) { *************** *** 187,192 **** --- 188,195 ---- case SEARCH: if (gotcat(buf, tofil, BUFSIZ, delim, BUFSIZ)) { state = INAMAP; + p = delim; + p++; sizdel = strlen(delim); if ((osd = fopen(tofil, "w")) == NULL) { #ifdef LOG *************** *** 198,204 **** break; case SKIPPING: case INAMAP: ! if (strncmp(buf, delim, sizdel) == 0) { state = SEARCH; if (osd != NULL) (void )fclose(osd); --- 201,208 ---- break; case SKIPPING: case INAMAP: ! if ((strncmp(buf, delim, sizdel) == 0) || ! (strncmp(buf, p, (sizdel - 1)) == 0)) { state = SEARCH; if (osd != NULL) (void )fclose(osd); -- ..decvax!microsoft-\ <tim@pilchuck.Data-IO.COM> Tim Rosmus (Sys Admin) ..cbosgd!fluke------\ Data I/O - FutureNet Corp. ....ihnp4!uw-beaver--------!tikal!pilchuck!tim 10525 Willows Road N.E. ..hplabs!hplvla!hplsla---/ P.O. Box 97046 - (206) 881-6444