rkive patch01 - part 2 of 2
Kent Landfield
kent at ssbell.UUCP
Mon Jul 17 07:53:18 AEST 1989
This is the second of 2 parts which make up the first patch
to rkive. Please assure that you have *both* parts since
*together*, they constitute one (*1*) complete patch.
-Kent+
------------ Cut, snip, rip, tear, slice, dice ... -------------
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of archive 2 (of 2)."
# Contents: Patch1-p1of2
# Wrapped by kent at ssbell on Sun Jul 16 16:20:29 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Patch1-p1of2' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'Patch1-p1of2'\"
else
echo shar: Extracting \"'Patch1-p1of2'\" \(49821 characters\)
sed "s/^X//" >'Patch1-p1of2' <<'END_OF_FILE'
X*** O.Changes Sat Jul 15 00:40:25 1989
X--- Changes Sun Jul 16 13:42:21 1989
X***************
X*** 0 ****
X--- 1,86 ----
X+ @(#)Changes 1.2 7/15/89 PATCH #1
X+
X+ WARNING **************************************** WARNING
X+
X+ The format of the .patchlog changed in this patch. The
X+ reason being, the Patch-To: auxiliary header line was
X+ finally agreed on and now includes the package name in it.
X+ A complete set of .patchlogs will be posted in comp.source.d
X+ soon.
X+
X+ WARNING **************************************** WARNING
X+
X+ The following is a list of the changes made during this patch.
X+
X+ article.c:
X+ * Added more forgiveness for multiple blank lines between the News
X+ header and the Auxiliary headers. :-) :-) Some people have a unique
X+ way of submitting bug reports... :-)
X+
X+ ckconfig.c:
X+ * Added the ability have ckconfig display information on
X+ a per-newsgroup basis.
X+ * Added Chronological archiving support.
X+ * Changed index to mindex so as to make the BSD getopt() happy.
X+
X+ ck_name.c:
X+ * A new file that contains the function check_archive_name() function.
X+ * Split out during the ongoing development of the "random software
X+ downloader". Anybody want to name this "thing" ?..
X+
X+ disp_grp.c:
X+ * Added Chronological archiving support.
X+ * Changed index to mindex so as to make the BSD getopt() happy.
X+
X+ header.c:
X+ * Changed the storage type of article.patch_issue to string.
X+ * Modified the code to store the patch_issue as a string.
X+ * Modified the code to support the changed format of the Patch-To: line.
X+
X+ makedir.c:
X+ * Reversed the order of the chown/chmod calls for the system() version
X+ so that you don't have to be root to use it...
X+
X+ news_arc.c:
X+ * Added the code to support Chronological archiving in save_article() and the
X+ new function chronpath().
X+ * Added more forgiveness for multiple blank lines between the News header and
X+ the Auxiliary headers.
X+ * Added NO_MONTH_DIR ifdef to decide which way the Chronological archiving
X+ is to be done.
X+ * Copy_article() was written to reduce the duplicated code at the end of
X+ save_article() and do_problem().
X+ * Split out compression suffix manipulation routines suffix(), remove_suffix(),
X+ and expand_name() for use in the random software downloader.
X+ * Split out check_archive_name() for use in the random software downloader.
X+ * Added DIR_MODE define for the modes of the directories when created.
X+ * Moved write_patch_log() into a new function, copy_article().
X+ * Reformated the .patchlog to meet the finally stable Patch-To: format.
X+ * Cleaned up a typo that was duplicated in Problem error messages.
X+
X+ rkive.c:
X+ * Added a check to verify the file is not zero bytes in length.
X+ * Added Chronological archiving support.
X+ * Added check for "test" in logit.
X+ * In set_ownership(), added a "CYA" in the event that compression fails
X+ because no saving is produced. Set_ownership() attempts the filename
X+ without the suffix added when the attempt on the filename with the
X+ suffix failed. In this manner, file permissions get set even if the
X+ compression routine fails.
X+ * Also in set_ownership(), moved the chmod before the chown/chgrp so
X+ that you did not need to be root to run rkive and give away files.
X+ * Changed index to mindex so as to make the BSD getopt() happy.
X+
X+ setup.c:
X+ * Added Chronological archiving support.
X+ * Changed the default archive type to Chronological.
X+ * Corrected error message for invalid PATCHES type.
X+ * Added CHECK_LOGNAME ifdef around getpwnam() so as to all for
X+ remote mail addresses.
X+ * Changed index to mindex so as to make the BSD getopt() happy.
X+
X+ suffix.c:
X+ * Created suffix.h to split out the compression suffix structure and tables.
X+ * Created the file suffix.c to split out the compression suffix related
X+ code for use in the random software downloader. Damn, I have to find a
X+ name for that thing...
X*** O.IDEAS Fri Jul 14 21:29:06 1989
X--- IDEAS Sun Jul 16 13:42:24 1989
X***************
X*** 1,4 ****
X! @(#)IDEAS 1.1 6/1/89
X What follows is my ideas file. It gives you a glimse into some enhancements,
X ideas, problems and work in progress for rkive. This is a minimal list but
X it will grow after you send me your good ideas. :-)
X--- 1,4 ----
X! @(#)IDEAS 1.2 7/15/89
X What follows is my ideas file. It gives you a glimse into some enhancements,
X ideas, problems and work in progress for rkive. This is a minimal list but
X it will grow after you send me your good ideas. :-)
X***************
X*** 5,11 ****
X
X 1. If a posting should replace the current entry it is the moderator's
X responsibility to Supersedes: any invalid postings. rkive should
X! be able to handle Supersedes. Currently it does not.
X
X 2. Add Support For Multiple Archive Formats.
X Have rkive link the files into a different archiving format.
X--- 5,12 ----
X
X 1. If a posting should replace the current entry it is the moderator's
X responsibility to Supersedes: any invalid postings. rkive should
X! be able to handle Supersedes. Currently it does not. Usually used in
X! a reposting.
X
X 2. Add Support For Multiple Archive Formats.
X Have rkive link the files into a different archiving format.
X***************
X*** 12,31 ****
X All articles should be storable in *as many* of the user-requested
X formats as possible.
X
X! 3. Add internal method of numbering the articles. A *new* method of archiving.
X! If the archive is moved to a different machine running news or if the
X! news subsystem is restarted from scratch on the same machine, it could
X! conflict with previously archived articles in archives that use
X! Article-Number, thus producing massive amounts of duplicate archive
X! files in which the only problem is the file names.
X!
X! 4. Add a Configure.sh to handle configuration of default parameters
X and to setup the software.
X
X! 5. Better and more extensive documentation as well as documentation
X that explains archiving in general.
X
X! 6. Remote archive BASEDIRs. This would allow the archive to be scattered
X over multiple machines connected via a LAN. With the use of rsh, rcp,
X etc., this should not be too hard. It would require the configuration
X file usage to be expanded so that the admin could specify the method
X--- 13,25 ----
X All articles should be storable in *as many* of the user-requested
X formats as possible.
X
X! 3. Add a Configure.sh to handle configuration of default parameters
X and to setup the software.
X
X! 4. Better and more extensive documentation as well as documentation
X that explains archiving in general.
X
X! 5. Remote archive BASEDIRs. This would allow the archive to be scattered
X over multiple machines connected via a LAN. With the use of rsh, rcp,
X etc., this should not be too hard. It would require the configuration
X file usage to be expanded so that the admin could specify the method
X***************
X*** 35,49 ****
X concerns here.... :-( A generic hook to user-defined storage
X programs/libraries. I am wide open to ideas here... :-)
X
X! 7. An application that would allow retrieval requests from the archives
X by reading the rkive.cf file to determine the location of the
X newsgroup's archive and to retrieve packages by any of the archive
X methods. This may end up using software like narc to actually do
X the unpacking for the requester. This too is just an idea now...
X
X! 8. An application that would allow retrieval requests from the archives
X for patches or entire packages including all posted patches. This is
X! currently in progress... :-) The mythical "random downloader" :-)
X
X Well that's the direction I am heading... If you have *any* additional
X ideas that are constructive, positive or negative (flames to /nev/dull)
X--- 29,57 ----
X concerns here.... :-( A generic hook to user-defined storage
X programs/libraries. I am wide open to ideas here... :-)
X
X! 6. An application that would allow retrieval requests from the archives
X by reading the rkive.cf file to determine the location of the
X newsgroup's archive and to retrieve packages by any of the archive
X methods. This may end up using software like narc to actually do
X the unpacking for the requester. This too is just an idea now...
X
X! 7. An application that would allow retrieval requests from the archives
X for patches or entire packages including all posted patches. This is
X! still currently in progress... :-) The mythical "random downloader" :-)
X!
X! 8. Have rkive be able to accept articles from stdin as in the news sys
X! file. In way, rkive would run on a per-article basis instead of batch.
X!
X! 9. Have rkive be able to handle crosspostings intelligently instead of
X! making to copies of the article as it does now.
X!
X! 10. Have article be able to handle files with compression suffixes
X! automatically instead of having to "zcat filename | article".
X!
X! 10. Have rkive be able to take filename of articles to be archive from
X! a batch file created from the news system. This way there is no need
X! for the .archived file since rkive would always know that the file
X! that was to be archived had not been so before.
X
X Well that's the direction I am heading... If you have *any* additional
X ideas that are constructive, positive or negative (flames to /nev/dull)
X*** O.MANIFEST Fri Jul 14 21:29:08 1989
X--- MANIFEST Sun Jul 16 13:42:24 1989
X***************
X*** 1,5 ****
X--- 1,6 ----
X File Name Archive # Description
X -----------------------------------------------------------
X+ Changes 1 General description of changes in the Patch
X IDEAS 1 Contains future improvement ideas.
X MANIFEST 1 This shipping list
X Makefile 2 rkive make file for generating the software.
X***************
X*** 8,13 ****
X--- 9,15 ----
X article.c 2 Source containing article main routines.
X article.h 1 Include file for News article information.
X cfg.h 1 Include file for variable declarations.
X+ ck_name.c 2 Assure the archive-name is valid and safe.
X ckconfig.1 1 Manual page for ckconfig command.
X ckconfig.c 2 Source containing ckconfig main routine.
X disp_grp.c 1 Display newsrgoup configuration file info..
X***************
X*** 26,30 ****
X--- 28,34 ----
X rkive.h 2 Include file for rkive software.
X setup.c 3 Routines to read the rkive configuration file.
X str.c 1 String manipulation routines.
X+ suffix.c 1 Compression suffix addition/removal routines.
X+ suffix.h 1 Include for suffix structure and table.
X t.cf 1 Test archive config file. Not the template.
X version.c 1 Print the current version and patchlevel.
X*** O.Makefile Fri Jul 14 21:29:43 1989
X--- Makefile Sun Jul 16 13:42:27 1989
X***************
X*** 1,6 ****
X ##########################################################
X #
X! # @(#)Makefile 1.1 6/1/89 - USENET Source Archiver
X #
X #
X # This software is Copyright (c) 1989 by Kent Landfield.
X--- 1,6 ----
X ##########################################################
X #
X! # @(#)Makefile 1.2 7/15/89 - USENET Source Archiver
X #
X #
X # This software is Copyright (c) 1989 by Kent Landfield.
X***************
X*** 43,53 ****
X # create the directory itself.
X #
X #CFLAGS=-O -DUSE_SYSMKDIR
X! #CFLAGS=-O -DHAVE_MKDIR
X CFLAGS= -O
X #
X # Define your favorite C compiler here...
X #
X CC=gcc
X
X #
X--- 43,54 ----
X # create the directory itself.
X #
X #CFLAGS=-O -DUSE_SYSMKDIR
X! #CFLAGS=-O -DHAVE_MKDIR
X CFLAGS= -O
X #
X # Define your favorite C compiler here...
X #
X+ #CC=cc
X CC=gcc
X
X #
X***************
X*** 63,68 ****
X--- 64,75 ----
X #
X LDFLAGS=-lndir
X
X+ #
X+ # If your system requires additional libraries or if you wish to
X+ # use shared libraries, add the -llib declarations to LIBS below.
X+ #
X+ # LIBS = -lc_s
X+
X I = /usr/include
X LP = /usr/lbin/clist
X NROFF = /usr/bin/nroff
X***************
X*** 70,76 ****
X
X DOCS = article.1 rkive.1 ckconfig.1 rkive.5
X SUPPORT = rkive.cf Makefile README IDEAS MANIFEST
X! INCLUDES = rkive.h article.h cfg.h patchlevel.h
X
X ARTICLE_SRCS = article.c efopen.c format.c header.c str.c version.c
X ARTICLE_OBJS = article.o efopen.o format.o header.o str.o version.o
X--- 77,83 ----
X
X DOCS = article.1 rkive.1 ckconfig.1 rkive.5
X SUPPORT = rkive.cf Makefile README IDEAS MANIFEST
X! INCLUDES = rkive.h article.h cfg.h patchlevel.h suffix.h
X
X ARTICLE_SRCS = article.c efopen.c format.c header.c str.c version.c
X ARTICLE_OBJS = article.o efopen.o format.o header.o str.o version.o
X***************
X*** 78,93 ****
X CKCONFIG_SRCS = ckconfig.c disp_grp.c efopen.c setup.c str.c version.c
X CKCONFIG_OBJS = ckconfig.o disp_grp.o efopen.o setup.o str.o version.o
X
X! ARCHIVE_SRCS = disp_grp.c efopen.c format.c header.c \
X makedir.c news_arc.c record_arc.c rename.c \
X! rkive.c setup.c str.c version.c
X! ARCHIVE_OBJS = disp_grp.o efopen.o format.o header.o \
X makedir.o news_arc.o record_arc.o rename.o \
X! rkive.o setup.o str.o version.o
X
X! SRCS = article.c ckconfig.c disp_grp.c efopen.c format.c \
X! header.c news_arc.c rkive.c rename.c record_arc.c \
X! makedir.c setup.c str.c version.c
X
X PROGS = article ckconfig rkive
X
X--- 85,100 ----
X CKCONFIG_SRCS = ckconfig.c disp_grp.c efopen.c setup.c str.c version.c
X CKCONFIG_OBJS = ckconfig.o disp_grp.o efopen.o setup.o str.o version.o
X
X! ARCHIVE_SRCS = ck_name.c disp_grp.c efopen.c format.c header.c \
X makedir.c news_arc.c record_arc.c rename.c \
X! rkive.c setup.c str.c suffix.c version.c
X! ARCHIVE_OBJS = ck_name.o disp_grp.o efopen.o format.o header.o \
X makedir.o news_arc.o record_arc.o rename.o \
X! rkive.o setup.o str.o suffix.o version.o
X
X! SRCS = article.c ckconfig.c ck_name.c disp_grp.c efopen.c format.c \
X! header.c makedir.c news_arc.c rkive.c rename.c record_arc.c \
X! setup.c str.c suffix.c version.c
X
X PROGS = article ckconfig rkive
X
X***************
X*** 98,110 ****
X cp $(PROGS) $(BINDIR)
X
X ckconfig: $(CKCONFIG_OBJS)
X! $(CC) $(CFLAGS) -o ckconfig $(CKCONFIG_OBJS)
X
X article: $(ARTICLE_OBJS)
X! $(CC) $(CFLAGS) -o article $(ARTICLE_OBJS)
X
X rkive: $(ARCHIVE_OBJS)
X! $(CC) $(CFLAGS) -o rkive $(ARCHIVE_OBJS) $(LDFLAGS)
X
X man:
X $(NROFF) -man $(DOCS)
X--- 105,117 ----
X cp $(PROGS) $(BINDIR)
X
X ckconfig: $(CKCONFIG_OBJS)
X! $(CC) $(CFLAGS) -o ckconfig $(CKCONFIG_OBJS) $(LIBS)
X
X article: $(ARTICLE_OBJS)
X! $(CC) $(CFLAGS) -o article $(ARTICLE_OBJS) $(LIBS)
X
X rkive: $(ARCHIVE_OBJS)
X! $(CC) $(CFLAGS) -o rkive $(ARCHIVE_OBJS) $(LDFLAGS) $(LIBS)
X
X man:
X $(NROFF) -man $(DOCS)
X***************
X*** 113,131 ****
X # Dependencies
X ################################
X
X- rkive.o: $(I)/sys/types.h
X- rkive.o: $(I)/sys/stat.h
X- rkive.o: $(I)/dirent.h
X- rkive.o: $(I)/stdio.h
X- rkive.o: article.h
X- rkive.o: cfg.h
X- rkive.o: rkive.h
X-
X article.o: $(I)/stdio.h
X article.o: $(I)/ctype.h
X article.o: $(I)/sys/types.h
X article.o: article.h
X
X ckconfig.o: $(I)/sys/types.h
X ckconfig.o: $(I)/dirent.h
X ckconfig.o: $(I)/stdio.h
X--- 120,132 ----
X # Dependencies
X ################################
X
X article.o: $(I)/stdio.h
X article.o: $(I)/ctype.h
X article.o: $(I)/sys/types.h
X article.o: article.h
X
X+ ck_name.o: $(I)/stdio.h
X+
X ckconfig.o: $(I)/sys/types.h
X ckconfig.o: $(I)/dirent.h
X ckconfig.o: $(I)/stdio.h
X***************
X*** 163,168 ****
X--- 164,170 ----
X news_arc.o: $(I)/sys/stat.h
X news_arc.o: $(I)/dirent.h
X news_arc.o: $(I)/stdio.h
X+ news_arc.o: $(I)/time.h
X news_arc.o: $(I)/ctype.h
X news_arc.o: article.h
X news_arc.o: cfg.h
X***************
X*** 172,182 ****
X record_arc.o: $(I)/sys/stat.h
X record_arc.o: $(I)/dirent.h
X record_arc.o: $(I)/stdio.h
X- record_arc.o: cfg.h
X record_arc.o: rkive.h
X
X rename.o: $(I)/stdio.h
X
X setup.o: $(I)/sys/types.h
X setup.o: $(I)/sys/stat.h
X setup.o: $(I)/stdio.h
X--- 174,192 ----
X record_arc.o: $(I)/sys/stat.h
X record_arc.o: $(I)/dirent.h
X record_arc.o: $(I)/stdio.h
X record_arc.o: rkive.h
X+ record_arc.o: cfg.h
X
X rename.o: $(I)/stdio.h
X
X+ rkive.o: $(I)/sys/types.h
X+ rkive.o: $(I)/sys/stat.h
X+ rkive.o: $(I)/dirent.h
X+ rkive.o: $(I)/stdio.h
X+ rkive.o: article.h
X+ rkive.o: rkive.h
X+ rkive.o: cfg.h
X+
X setup.o: $(I)/sys/types.h
X setup.o: $(I)/sys/stat.h
X setup.o: $(I)/stdio.h
X***************
X*** 184,191 ****
X setup.o: $(I)/pwd.h
X setup.o: $(I)/grp.h
X setup.o: $(I)/dirent.h
X- setup.o: cfg.h
X setup.o: rkive.h
X
X version.o: $(I)/stdio.h
X version.o: patchlevel.h
X--- 194,207 ----
X setup.o: $(I)/pwd.h
X setup.o: $(I)/grp.h
X setup.o: $(I)/dirent.h
X setup.o: rkive.h
X+ setup.o: cfg.h
X+
X+ suffix.o: $(I)/stdio.h
X+ suffix.o: $(I)/sys/types.h
X+ suffix.o: $(I)/dirent.h
X+ suffix.o: rkive.h
X+ suffix.o: suffix.h
X
X version.o: $(I)/stdio.h
X version.o: patchlevel.h
X*** O.README Fri Jul 14 21:29:13 1989
X--- README Sun Jul 16 16:10:05 1989
X***************
X*** 1,7 ****
X
X USENET Sources Archiver
X
X! @(#)README 1.1 6/1/89
X
X Copyright (c) 1989, by Kent Landfield.
X
X--- 1,7 ----
X
X USENET Sources Archiver
X
X! @(#)README 1.4 7/16/89
X
X Copyright (c) 1989, by Kent Landfield.
X
X***************
X*** 81,87 ****
X Disk space is saved by removing header lines that have no
X further use after the article is stored in the archive.
X As currently defined, all headers *except* for From:, Newsgroups:,
X! Subject:, Message-ID: and Date are removed if this is defined.
X The list of headers to be saved can be added to or reduced by
X modifying the table "hdrs" in news_arc.c.
X
X--- 81,88 ----
X Disk space is saved by removing header lines that have no
X further use after the article is stored in the archive.
X As currently defined, all headers *except* for From:, Newsgroups:,
X! Subject:, Message-ID:, Approved:, and Date: are removed if this
X! is defined.
X The list of headers to be saved can be added to or reduced by
X modifying the table "hdrs" in news_arc.c.
X
X***************
X*** 110,118 ****
X specifying the disk path to the compression program as the value for
X COMPRESS in the rkive configuration file. It is important that *if* you
X use a compression program other that "compress" or "pack" that you add
X! a an entry to the compression routine table just above the function
X! suffix() in news_arc.c. Currently, this program recognizes just ".z" and
X! ".Z" suffixes.
X
X ----------------
X REPOST Handling:
X--- 111,118 ----
X specifying the disk path to the compression program as the value for
X COMPRESS in the rkive configuration file. It is important that *if* you
X use a compression program other that "compress" or "pack" that you add
X! an entry to the compression routine table in the file suffix.h.
X! Currently, this program recognizes just ".z" and ".Z" suffixes.
X
X ----------------
X REPOST Handling:
X***************
X*** 143,149 ****
X PATCHES Handling:
X -----------------
X rkive supports the new Auxiliary header "Patch-To:". The Patch-To: line
X! will exist for articles that are patches to previously posted software.
X The Patch-To: line only appears in articles that are posted, "Official",
X patches. The initial postings would not contain the Patch-To: auxiliary
X header line.
X--- 143,149 ----
X PATCHES Handling:
X -----------------
X rkive supports the new Auxiliary header "Patch-To:". The Patch-To: line
X! exists for articles that are patches to previously posted software.
X The Patch-To: line only appears in articles that are posted, "Official",
X patches. The initial postings would not contain the Patch-To: auxiliary
X header line.
X***************
X*** 150,160 ****
X
X Auxiliary Headers For Patch Postings:
X
X! Submitted-by: Kent Landfield <kent at ssbell.UUCP>
X Posting-number: Volume 23, Issue 14
X! -> Patch-To: Volume 22, Issue 122
X Archive-name: rkive/patch1
X
X There are two different types of handling with regards to patches.
X
X Package - This type of archiving of patches places the patches
X--- 150,181 ----
X
X Auxiliary Headers For Patch Postings:
X
X! Submitted-by: Kent Landfield <kent at ssbell>
X Posting-number: Volume 23, Issue 14
X! -> Patch-To: rkive: Volume 22, Issue 122
X Archive-name: rkive/patch1
X
X+ Patch-To: syntax
X+ Patch-To: package-name: Volume X, Issue x[-y,z]
X+
X+ Patch-To: examples. These are examples and do not reflect the
X+ accurate volume/issue numbering for rkive.
X+
X+ In the first example, the article that contains the following line
X+ is a patch to a single part posting.
X+ Patch-To: rkive: Volume 22, Issue 122
X+
X+ This example shows that the 122-124 indicates the patch applies to
X+ a multi-part posting. The '-' is used to mean "article A through article
X+ B, inclusive..
X+ Patch-To: rkive: Volume 22, Issue 122-124
X+
X+ If a patch applies to multiple part postings that are not consecutive, the
X+ ',' is used to separate the part issue numbers. It is possible to mix both
X+ ',' and '-' on a single Patch-To: line.
X+ Patch-To: rkive: Volume 22, Issue 122,125,126,127
X+ Patch-To: rkive: Volume 22, Issue 122,125-127
X+
X There are two different types of handling with regards to patches.
X
X Package - This type of archiving of patches places the patches
X***************
X*** 164,179 ****
X archiving.
X
X Historical - This type of archiving patches is done by sites that
X! want to place the the patches in the volume/issue in
X which the patch originally arrived.
X
X Archive recognizes that the Patch-To: line indicates the article is
X a patch. For Archive-Name archiving which has specified "Package"
X patches archiving in the configuration file, rkive puts the article
X! into the directory that contained the initial posting (volume22/rkive).
X For Archive-Name that has not specified Package archiving or for
X Volume/Issue archiving, the article would still be labeled as
X! volume23/rkive/patch01 or volume23/v23i014 respectively.
X
X rkive also writes a .patchlog file in the BASEDIR for the newsgroup
X that is used to track patches to originally posted software. The
X--- 185,200 ----
X archiving.
X
X Historical - This type of archiving patches is done by sites that
X! want to place the patches in the volume/issue in
X which the patch originally arrived.
X
X Archive recognizes that the Patch-To: line indicates the article is
X a patch. For Archive-Name archiving which has specified "Package"
X patches archiving in the configuration file, rkive puts the article
X! into the directory that contained the initial posting (volume19/rkive).
X For Archive-Name that has not specified Package archiving or for
X Volume/Issue archiving, the article would still be labeled as
X! volume23/rkive/patch1 or volume23/v23i014 respectively.
X
X rkive also writes a .patchlog file in the BASEDIR for the newsgroup
X that is used to track patches to originally posted software. The
X***************
X*** 181,195 ****
X so that complete software packages (sources and patches) can be requested
X from sites that do not use combined Archive-Name and Package archiving.
X The format of the .patchlog file is:
X #
X! # Patchlog for comp.sources.whoknows
X #
X! # Path To Initial Initial Current Current
X! # Patchfile Volume Issue Volume Issue
X #
X! bb/patch01 22 105 23 77
X or if volume issue format..
X! v47i022 22 105 23 77
X
X -------------------------
X Article Header Reduction:
X--- 202,217 ----
X so that complete software packages (sources and patches) can be requested
X from sites that do not use combined Archive-Name and Package archiving.
X The format of the .patchlog file is:
X+
X #
X! # Patch log for comp.sources.whoknows
X #
X! # Path To Patch Package Initial
X! # Patchfile Volume Issue Name Volume Issue
X #
X! volume6/bb/patch01 6 86 bb 3 70-73
X or if volume issue format..
X! volume6/v06i86 6 86 bb 3 70-73
X
X -------------------------
X Article Header Reduction:
X***************
X*** 200,206 ****
X when the file is archived, assure that REDUCE_HEADERS is defined. Currently
X all header lines that are *not* either;
X
X! From:, Newsgroups:, Subject:, Message-ID:, and Date:
X
X will be removed. This can produce a savings of as much as 200 to 500
X bytes per archived article.
X--- 222,228 ----
X when the file is archived, assure that REDUCE_HEADERS is defined. Currently
X all header lines that are *not* either;
X
X! From:, Newsgroups:, Subject:, Message-ID: Approved:, and Date:
X
X will be removed. This can produce a savings of as much as 200 to 500
X bytes per archived article.
X***************
X*** 268,280 ****
X dealing with the article headers. The code I have written is not the same
X but most of the concepts and some of the flow control resulted from reviewing
X how it was "suppose to be done". (rfcs only go so far.. :-)) For that I
X! thank rick adams and the authors of news for the excellent code to study
X from.. :-)
X
X I would also like to thank my beta testers for the headaches of dealing
X with me, with forcing different ideas on me at a time when I was "almost"
X willing to listen :-) and for the many different "full redistribution of
X! sources" everytime I had a new version. Specifically I want to thank
X eric at amperif (Eric Johnson) and denny at mcmi (Dennis Page) for putting up
X with me.. :-)
X ------------------------------------------------------------------------
X--- 290,302 ----
X dealing with the article headers. The code I have written is not the same
X but most of the concepts and some of the flow control resulted from reviewing
X how it was "suppose to be done". (rfcs only go so far.. :-)) For that I
X! thank Rick Adams and the authors of news for the excellent code to study
X from.. :-)
X
X I would also like to thank my beta testers for the headaches of dealing
X with me, with forcing different ideas on me at a time when I was "almost"
X willing to listen :-) and for the many different "full redistribution of
X! sources" every time I had a new version. Specifically I want to thank
X eric at amperif (Eric Johnson) and denny at mcmi (Dennis Page) for putting up
X with me.. :-)
X ------------------------------------------------------------------------
X*** O.article.c Fri Jul 14 21:29:49 1989
X--- article.c Sun Jul 16 13:42:33 1989
X***************
X*** 30,38 ****
X **
X ** History:
X ** Creation: Tue Feb 21 08:52:35 CST 1989 due to necessity.
X **
X */
X! char sccsid[] = "@(#)article.c 1.1 6/1/89";
X
X #include <stdio.h>
X #include <ctype.h>
X--- 30,42 ----
X **
X ** History:
X ** Creation: Tue Feb 21 08:52:35 CST 1989 due to necessity.
X+ **
X+ ** Patch #1:
X+ ** Added more forgiveness for multiple blank lines
X+ ** between the News header and the Auxiliary headers.
X **
X */
X! char sccsid[] = "@(#)article.c 1.3 7/16/89";
X
X #include <stdio.h>
X #include <ctype.h>
X***************
X*** 110,117 ****
X char *flname;
X {
X char *dp;
X- int header_ok = 0;
X char *strcpy();
X FILE *file, *efopen();
X
X int default_format = ARTICLE;
X--- 114,122 ----
X char *flname;
X {
X char *dp;
X char *strcpy();
X+ int header_ok = 0;
X+ int last = TEXT;
X FILE *file, *efopen();
X
X int default_format = ARTICLE;
X***************
X*** 131,137 ****
X */
X if (!isalpha(*s) || (strchr(s,':') == NULL)) {
X ++header_ok;
X! if (header_ok == 2) {
X /*
X ** Has the user requested to produce
X ** only an archive listing ?
X--- 136,151 ----
X */
X if (!isalpha(*s) || (strchr(s,':') == NULL)) {
X ++header_ok;
X! if (header_ok >= 2) {
X! /*
X! ** If the second line is another blank line,
X! ** keep searching. It may just be that the moderator
X! ** placed and extra blank line in the article by mistake.
X! ** Thanks to /r$ for the unique way of submitting bug
X! ** reports.. :-) :-)
X! */
X! if (*s == '\n' && last == BLANK)
X! continue;
X /*
X ** Has the user requested to produce
X ** only an archive listing ?
X***************
X*** 157,165 ****
X--- 171,184 ----
X format_output(logfp, format_ptr, flname, default_format);
X break;
X }
X+ if (*s == '\n')
X+ last = BLANK;
X+ else
X+ last = TEXT;
X continue;
X }
X
X+ last = TEXT;
X dp = s;
X while (*++dp)
X if (*dp == '\n')
X*** O.article.h Fri Jul 14 21:29:15 1989
X--- article.h Sun Jul 16 13:42:34 1989
X***************
X*** 1,5 ****
X /*
X! ** @(#)article.h 1.1 6/1/89
X **
X */
X
X--- 1,5 ----
X /*
X! ** @(#)article.h 1.2 7/15/89
X **
X */
X
X***************
X*** 11,16 ****
X--- 11,22 ----
X #define FALSE 0
X
X /*
X+ ** Line content defines
X+ */
X+ #define BLANK 0
X+ #define TEXT 1
X+
X+ /*
X ** Format output called from defines
X */
X #define ARCHIVE 1
X***************
X*** 104,111 ****
X int repost; /* REPOST'ed article ? */
X int patch_volume; /* Initially posted */
X /* storage volume */
X! int patch_issue; /* Initially posted */
X! /* article issue number*/
X char description[BUFLEN]; /* information */
X char author_name[BUFLEN]; /* author full name */
X char author_signon[BUFLEN]; /* author sign on */
X--- 110,118 ----
X int repost; /* REPOST'ed article ? */
X int patch_volume; /* Initially posted */
X /* storage volume */
X! char package_name[BUFLEN]; /* Initially posted */
X! char patch_issue[BUFLEN]; /* Initially posted */
X! /* article issue numbers */
X char description[BUFLEN]; /* information */
X char author_name[BUFLEN]; /* author full name */
X char author_signon[BUFLEN]; /* author sign on */
X*** O.cfg.h Fri Jul 14 21:29:17 1989
X--- cfg.h Sun Jul 16 13:42:34 1989
X***************
X*** 1,5 ****
X /*
X! ** @(#)cfg.h 1.1 6/1/89
X */
X #include "rkive.h"
X
X--- 1,5 ----
X /*
X! ** @(#)cfg.h 1.2 7/15/89
X */
X #include "rkive.h"
X
X***************
X*** 17,23 ****
X extern char compress[];
X extern char log[];
X extern char log_format[];
X! extern char index[];
X extern char index_format[];
X extern char mail[];
X extern int default_type;
X--- 17,23 ----
X extern char compress[];
X extern char log[];
X extern char log_format[];
X! extern char mindex[];
X extern char index_format[];
X extern char mail[];
X extern int default_type;
X*** O.ck_name.c Sat Jul 15 00:40:45 1989
X--- ck_name.c Sun Jul 16 13:42:35 1989
X***************
X*** 0 ****
X--- 1,69 ----
X+ /*
X+ **
X+ ** This software is Copyright (c) 1989 by Kent Landfield.
X+ **
X+ ** Permission is hereby granted to copy, distribute or otherwise
X+ ** use any part of this package as long as you do not try to make
X+ ** money from it or pretend that you wrote it. This copyright
X+ ** notice must be maintained in any copy made.
X+ **
X+ ** History:
X+ ** Creation: Thu Jun 22 19:12:35 CST 1989 due to necessity.
X+ **
X+ */
X+ #ifndef lint
X+ static char SID[] = "@(#)ck_name.c 1.1 7/15/89";
X+ #endif
X+
X+ #include <stdio.h>
X+ /*
X+ ** check_archive_name
X+ **
X+ ** Assure the path specified is within the base directory
X+ ** specified by the archive administrator by assuring that
X+ ** a prankster could not have an article archived at a
X+ ** basedir/../../../etc/passwd
X+ ** location.
X+ **
X+ ** If an absoulte path is specified in the Archive-name, it
X+ ** is of no concern since a "checked" base directory and
X+ ** volume directory are prefixed.
X+ */
X+
X+ check_archive_name(argstr)
X+ char *argstr;
X+ {
X+ char *substr();
X+ register char *rp;
X+ register char *dp;
X+
X+ /*
X+ ** check to assure that the path specified
X+ ** does not contain the '..' sequence.
X+ */
X+
X+ while ((rp = substr(argstr, "..")) != NULL) {
X+ dp = rp+2;
X+ while(*dp)
X+ *rp++ = *dp++;
X+ *rp = '\0';
X+ }
X+
X+ /* I know this is not necessary but what the heck.. */
X+
X+ while ((rp = substr(argstr, "//")) != NULL) {
X+ dp = rp+2;
X+ ++rp;
X+ while(*dp)
X+ *rp++ = *dp++;
X+ *rp = '\0';
X+ }
X+
X+ /*
X+ ** strip the string of trailing '/'s
X+ */
X+
X+ dp = argstr+(strlen(argstr)-1);
X+ while(*dp == '/' && dp > argstr)
X+ *dp = '\0';
X+ }
X*** O.ckconfig.1 Fri Jul 14 21:29:19 1989
X--- ckconfig.1 Sun Jul 16 13:42:36 1989
X***************
X*** 1,10 ****
X! 'br "@(#)ckconfig.1 1.1 6/1/89"
X .TH CKCONFIG 1
X .SH NAME
X ckconfig \- check the rkive configuration file setup
X .SH SYNOPSIS
X .B ckconfig
X! [ -V ] [ -f config_file ]
X .SH DESCRIPTION
X .I ckconfig
X is used to verify a new or modified USENET archiver configuration file.
X--- 1,10 ----
X! 'br "@(#)ckconfig.1 1.2 7/15/89"
X .TH CKCONFIG 1
X .SH NAME
X ckconfig \- check the rkive configuration file setup
X .SH SYNOPSIS
X .B ckconfig
X! [ -V ] [ -f config_file ] [ -n newsgroup ]
X .SH DESCRIPTION
X .I ckconfig
X is used to verify a new or modified USENET archiver configuration file.
X***************
X*** 99,104 ****
X--- 99,108 ----
X Compression: NO COMPRESSION (*NO* DEFAULT)
X
X .nr
X+ .IP "-n newsgroup"
X+ This option allows a newsgroup to be specified on the command line.
X+ Only one newsgroup can be specified in this manner. If only global
X+ information is requested, specify "-n none" on the command line.
X .LP
X .SH FILES
X /usr/local/lib/rkive.cf
X*** O.ckconfig.c Fri Jul 14 21:29:51 1989
X--- ckconfig.c Sun Jul 16 13:42:39 1989
X***************
X*** 3,9 ****
X ** Subsystem: USENET Sources Archiver
X ** File Name: ckconfig.c
X **
X! ** usage: config [ -gV ] [ -f config_file ]
X **
X **
X ** This software is Copyright (c) 1989 by Kent Landfield.
X--- 3,9 ----
X ** Subsystem: USENET Sources Archiver
X ** File Name: ckconfig.c
X **
X! ** usage: config [ -gV ] [ -f config_file ] [ -n newsgroup ]
X **
X **
X ** This software is Copyright (c) 1989 by Kent Landfield.
X***************
X*** 25,38 ****
X ** all ideas to me. This software is going to be maintained and
X ** enhanced as deemed necessary by the community.
X **
X- ** Kent Landfield
X- ** uunet!ssbell!kent
X **
X ** History:
X ** Creation: Tue Feb 21 08:52:35 CST 1989 due to necessity.
X **
X */
X! char sccsid[] = "@(#)ckconfig.c 1.1 6/1/89";
X
X #include <sys/types.h>
X #include <dirent.h>
X--- 25,41 ----
X ** all ideas to me. This software is going to be maintained and
X ** enhanced as deemed necessary by the community.
X **
X **
X ** History:
X ** Creation: Tue Feb 21 08:52:35 CST 1989 due to necessity.
X **
X+ ** Patch #1:
X+ ** Added the ability have ckconfig display information on
X+ ** a per-newsgroup basis. Added Chronological archiving
X+ ** support. Changed index to mindex so as to make the BSD
X+ ** getopt() happy.
X */
X! char sccsid[] = "@(#)ckconfig.c 1.3 7/16/89";
X
X #include <sys/types.h>
X #include <dirent.h>
X***************
X*** 43,49 ****
X
X #define M1 "The following values are used if the administrator has"
X #define M2 "not set a value for a necessary configuration item(s)."
X! #define USAGE "usage: %s [ -gV ] [ -f config_file ]\n"
X
X extern struct passwd *pw;
X extern struct group *gr;
X--- 46,52 ----
X
X #define M1 "The following values are used if the administrator has"
X #define M2 "not set a value for a necessary configuration item(s)."
X! #define USAGE "usage: %s [ -gV ] [ -f config_file ] [ -n newsgroup ]\n"
X
X extern struct passwd *pw;
X extern struct group *gr;
X***************
X*** 51,56 ****
X--- 54,61 ----
X struct passwd *getpwuid();
X struct group *getgrgid();
X
X+ char *nwsg = NULL;
X+
X main(argc,argv)
X int argc;
X char **argv;
X***************
X*** 66,72 ****
X config_file = LOCATION;
X
X if (argc > 1) {
X! while ((c = getopt(argc, argv, "gVf:")) != EOF) {
X switch (c) {
X case 'f':
X config_file = optarg;
X--- 71,77 ----
X config_file = LOCATION;
X
X if (argc > 1) {
X! while ((c = getopt(argc, argv, "gVf:n:")) != EOF) {
X switch (c) {
X case 'f':
X config_file = optarg;
X***************
X*** 74,79 ****
X--- 79,87 ----
X case 'g':
X fill_in_defaults++;
X break;
X+ case 'n':
X+ nwsg = optarg;
X+ break;
X case 'V':
X version();
X default:
X***************
X*** 92,97 ****
X--- 100,107 ----
X display_config()
X {
X register int i;
X+ struct group_archive *g;
X+ int first = 1;
X
X (void) fprintf(logfp,"\n\t\tConfiguration Check for %s\n",
X config_file);
X***************
X*** 103,109 ****
X (void) fprintf(logfp,"Global Logfile: %s\n",
X *log ? log : "NO LOGGING");
X (void) fprintf(logfp,"Global Index: %s\n",
X! *index ? index:"NO INDEXING");
X (void) fprintf(logfp,"Logfile Format: %s\n",
X *log_format ? log_format : "NOT SPECIFIED");
X (void) fprintf(logfp,"Index Format: %s\n",
X--- 113,119 ----
X (void) fprintf(logfp,"Global Logfile: %s\n",
X *log ? log : "NO LOGGING");
X (void) fprintf(logfp,"Global Index: %s\n",
X! *mindex ? mindex:"NO INDEXING");
X (void) fprintf(logfp,"Logfile Format: %s\n",
X *log_format ? log_format : "NOT SPECIFIED");
X (void) fprintf(logfp,"Index Format: %s\n",
X***************
X*** 114,119 ****
X--- 124,130 ----
X (void) fprintf(logfp,"Archive Type: %s\n",
X default_type == ARCHIVE_NAME ? "Archive-Name":
X default_type == VOLUME_ISSUE ? "Volume-Issue":
X+ default_type == CHRONOLOGICAL ? "Chronological":
X "Article-Number");
X (void) fprintf(logfp,"Patches Type: %s\n",
X default_patch_type == PACKAGE ? "Package" :
X***************
X*** 136,144 ****
X (void) fprintf(logfp," used with Archive-Name archiving.\n\n");
X }
X
X- (void) fprintf(logfp,"\t\tNewsgroup Archive Configuration\n\n\n");
X for (i = 0; i <= num; i++) {
X! display_group_info(&group[i]);
X (void) fprintf(logfp,"\n\n");
X }
X return;
X--- 147,163 ----
X (void) fprintf(logfp," used with Archive-Name archiving.\n\n");
X }
X
X for (i = 0; i <= num; i++) {
X! g = &group[i];
X! if (nwsg != NULL) {
X! if (strcmp(nwsg,g->ng_name) != 0)
X! continue;
X! }
X! if (first) {
X! (void) fprintf(logfp,"\t\tNewsgroup Archive Configuration\n\n\n");
X! first = 0;
X! }
X! display_group_info(g);
X (void) fprintf(logfp,"\n\n");
X }
X return;
X*** O.disp_grp.c Fri Jul 14 21:29:21 1989
X--- disp_grp.c Sun Jul 16 13:42:40 1989
X***************
X*** 11,19 ****
X ** History:
X ** Creation: Tue Feb 21 08:52:35 CST 1989 due to necessity.
X **
X */
X #ifndef lint
X! static char SID[] = "@(#)disp_grp.c 1.1 6/1/89";
X #endif
X
X #include <sys/types.h>
X--- 11,22 ----
X ** History:
X ** Creation: Tue Feb 21 08:52:35 CST 1989 due to necessity.
X **
X+ ** Patch #1:
X+ ** Added Chronological archiving support. Changed index
X+ ** to mindex so as to make the BSD getopt() happy.
X */
X #ifndef lint
X! static char SID[] = "@(#)disp_grp.c 1.3 7/16/89";
X #endif
X
X #include <sys/types.h>
X***************
X*** 80,85 ****
X--- 83,89 ----
X (void) fprintf(logfp,"\tArchive Type: %s\n",
X ng->type == ARCHIVE_NAME ? "Archive-Name" :
X ng->type == VOLUME_ISSUE ? "Volume-Issue" :
X+ ng->type == CHRONOLOGICAL ? "Chronological" :
X "Article-Number");
X (void) fprintf(logfp,"\tPatches Type: %s\n",
X ng->patch_type == PACKAGE ? "Package" : "Historical");
X***************
X*** 101,107 ****
X (void) fprintf(logfp,"\tLogfile: %s\n",
X what_to_print(ng->logfile, log, "NO LOGGING"));
X (void) fprintf(logfp,"\tIndex File: %s\n",
X! what_to_print(ng->index, index, "NO INDEXING"));
X (void) fprintf(logfp,"\tLogfile Format: %s\n",
X what_to_print(ng->logformat, log_format, "NOT SPECIFIED"));
X (void) fprintf(logfp,"\tIndex Format: %s\n",
X--- 105,111 ----
X (void) fprintf(logfp,"\tLogfile: %s\n",
X what_to_print(ng->logfile, log, "NO LOGGING"));
X (void) fprintf(logfp,"\tIndex File: %s\n",
X! what_to_print(ng->index, mindex, "NO INDEXING"));
X (void) fprintf(logfp,"\tLogfile Format: %s\n",
X what_to_print(ng->logformat, log_format, "NOT SPECIFIED"));
X (void) fprintf(logfp,"\tIndex Format: %s\n",
X*** O.header.c Fri Jul 14 21:30:16 1989
X--- header.c Sun Jul 16 13:42:47 1989
X***************
X*** 9,18 ****
X **
X ** History:
X ** Creation: Tue Feb 21 08:52:35 CST 1989 due to necessity.
X! **
X */
X #ifndef lint
X! static char SID[] = "@(#)header.c 1.1 6/1/89";
X #endif
X
X #include <stdio.h>
X--- 9,23 ----
X **
X ** History:
X ** Creation: Tue Feb 21 08:52:35 CST 1989 due to necessity.
X! **
X! ** Patch #1:
X! ** Changed the storage type of article.patch_issue to string.
X! ** Modified the code to store the patch_issue as a string.
X! ** Modified the code to support the changed format of the
X! ** Patch-To: line.
X */
X #ifndef lint
X! static char SID[] = "@(#)header.c 1.3 7/16/89";
X #endif
X
X #include <stdio.h>
X***************
X*** 91,96 ****
X--- 96,103 ----
X
X if (its("Patch-To: "))
X return PATCH_TO;
X+ if (its("Patch-to: "))
X+ return PATCH_TO;
X
X /* Archive header lines for historical purposes */
X /* once used in mod.sources articles. */
X***************
X*** 178,184 ****
X (void) fprintf(logfp," record type: [%s]\n", type_str);
X if (article.rectype == PATCH) {
X (void) fprintf(logfp," patch volume: [%d]\n",article.patch_volume);
X! (void) fprintf(logfp," patch issue: [%d]\n",article.patch_issue);
X }
X (void) fprintf(logfp," reposted: [%s]\n",
X article.repost ? "YES": "NO");
X--- 185,191 ----
X (void) fprintf(logfp," record type: [%s]\n", type_str);
X if (article.rectype == PATCH) {
X (void) fprintf(logfp," patch volume: [%d]\n",article.patch_volume);
X! (void) fprintf(logfp," patch issue: [%s]\n",article.patch_issue);
X }
X (void) fprintf(logfp," reposted: [%s]\n",
X article.repost ? "YES": "NO");
X***************
X*** 197,203 ****
X article.rectype = NORMAL;
X article.repost = FALSE;
X article.patch_volume = -1;
X! article.patch_issue = -1;
X article.description[0] = '\0';
X article.author_name[0] = '\0';
X article.author_signon[0] = '\0';
X--- 204,211 ----
X article.rectype = NORMAL;
X article.repost = FALSE;
X article.patch_volume = -1;
X! article.package_name[0] = '\0';
X! article.patch_issue[0] = '\0';
X article.description[0] = '\0';
X article.author_name[0] = '\0';
X article.author_signon[0] = '\0';
X***************
X*** 454,473 ****
X article.rectype = PATCH; /* set the article type */
X
X /*
X! ** Parse the initially posted article's volume and issue.
X! ** The format of the auxiliary header is
X **
X! ** Patch-To: Volume 5, Issue 110
X **
X! ** In the case of multipart initial postings, the Patch-To:
X! ** line points to the first issue.
X */
X
X /*
X! ** First get the volume number.
X */
X
X! dp = s;
X while (*dp && (!isdigit(*dp)))
X ++dp;
X sp = dp;
X--- 462,500 ----
X article.rectype = PATCH; /* set the article type */
X
X /*
X! ** Parse the initially posted article's package-name, volume
X! ** and issue. The format of the auxiliary header is:
X **
X! ** Patch-To: rkive: Volume 5, Issue 110
X! ** Or in the case of multipart initial postings,
X! ** Patch-To: rkive: Volume 5, Issue 110-120
X! ** Or in the case of multipart non-sequential initial postings,
X! ** Patch-To: rkive: Volume 5, Issue 110, 115, 116-120
X **
X! */
X!
X! /*
X! ** First get the package-name
X */
X
X+ dp = strchr(s,':'); /* This exists or we would not be here */
X+ while ((*++dp == ' ') || *dp == '\t'); /* skip spaces, tabs */
X+
X+ sp = dp;
X+ if ((dp = strchr(sp,':')) != NULL) {
X+ *dp = '\0';
X+ (void) strcpy(article.package_name,sp);
X+ }
X+ else {
X+ dp = s; /* reset to start of sting if no package-name */
X+ (void) strcpy(article.package_name,"Unknown");
X+ }
X+
X /*
X! ** Next, get the volume number.
X */
X
X! ++dp;
X while (*dp && (!isdigit(*dp)))
X ++dp;
X sp = dp;
X***************
X*** 478,493 ****
X
X /*
X ** Now get the issue number.
X */
X
X ++dp;
X while (*dp && (!isdigit(*dp)))
X ++dp;
X! sp = dp;
X! while (*dp && (isdigit(*dp)))
X ++dp;
X! *dp = '\0';
X! article.patch_issue = atoi(sp);
X break;
X }
X return;
X--- 505,526 ----
X
X /*
X ** Now get the issue number.
X+ ** It is stored as a string but error check that
X+ ** just numbers, '-' and ',' are in the string.
X */
X
X ++dp;
X while (*dp && (!isdigit(*dp)))
X ++dp;
X!
X! sp = article.patch_issue;
X! while (*dp && (isdigit(*dp) || *dp == '-' ||
X! *dp == ',' || *dp == ' ')) {
X! if (*dp != ' ')
X! *sp++ = *dp;
X ++dp;
X! }
X! *sp = '\0';
X break;
X }
X return;
X*** O.makedir.c Fri Jul 14 21:29:25 1989
X--- makedir.c Sun Jul 16 13:42:48 1989
X***************
X*** 11,19 ****
X ** History:
X ** Creation: Tue Feb 21 08:52:35 CST 1989 due to necessity.
X **
X */
X #ifndef lint
X! static char SID[] = "@(#)makedir.c 1.1 6/1/89";
X #endif
X
X #include <sys/types.h>
X--- 11,23 ----
X ** History:
X ** Creation: Tue Feb 21 08:52:35 CST 1989 due to necessity.
X **
X+ ** Patch #1:
X+ ** Reversed the order of the chown/chmod calls for the
X+ ** system version so that you don't have to be root to
X+ ** use it... Corrected dirpath check.
X */
X #ifndef lint
X! static char SID[] = "@(#)makedir.c 1.3 7/16/89";
X #endif
X
X #include <sys/types.h>
X***************
X*** 54,60 ****
X
X #endif /* HAVE_MKDIR */
X
X! if ((strlen(dirpath) == 0) || (dirpath[0] == NULL)) {
X (void) fprintf(errfp,"%s: cannot make %s\n", progname,dirpath);
X return(-1);
X }
X--- 58,64 ----
X
X #endif /* HAVE_MKDIR */
X
X! if ((strlen(dirpath) == 0) || (dirpath[0] == '\0')) {
X (void) fprintf(errfp,"%s: cannot make %s\n", progname,dirpath);
X return(-1);
X }
X***************
X*** 90,97 ****
X if (system(crnt_dir) != 0)
X return(-1);
X
X- (void) chown(dirpath, owner_id, group_id);
X (void) chmod(dirpath, mode);
X
X # else
X
X--- 94,101 ----
X if (system(crnt_dir) != 0)
X return(-1);
X
X (void) chmod(dirpath, mode);
X+ (void) chown(dirpath, owner_id, group_id);
X
X # else
X
END_OF_FILE
if test 49821 -ne `wc -c <'Patch1-p1of2'`; then
echo shar: \"'Patch1-p1of2'\" unpacked with wrong size!
fi
# end of 'Patch1-p1of2'
fi
echo shar: End of archive 2 \(of 2\).
cp /dev/null ark2isdone
MISSING=""
for I in 1 2 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked both archives.
rm -f ark[1-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0
More information about the Comp.sources.bugs
mailing list