home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Source Code 1992 March
/
Source_Code_CD-ROM_Walnut_Creek_March_1992.iso
/
usenet
/
altsrcs
/
2
/
2862
/
Patch
next >
Wrap
Text File
|
1991-02-27
|
18KB
|
585 lines
*** ../../usenet-mkid/src/MANIFEST Tue Feb 26 10:40:46 1991
--- MANIFEST Tue Feb 26 10:07:10 1991
***************
*** 1,52 ****
File Name Archive # Description
-----------------------------------------------------------
MANIFEST 1 This shipping list
! Makefile 5
! Status 2
TODO 1
! TUTORIAL 8
basename.c 1
bitcount.c 1
bitops.c 1
bitops.h 1
! bitsvec.c 2
bool.h 1
bsearch.c 1
bzero.c 1
! cannoname.c 3
document.c 1
extern.h 1
fid.1 1
! fid.c 2
gets0.c 1
getsFF.c 1
! getscan.c 6
gid.el 1
! hash.c 2
! id.h 2
idx.c 1
! iid.1 4
! iid.help 3
! iid.y 7
! iiddef.h 5
! iidfun.c 9
init.c 1
! kshgetwd.c 2
! lid.1 4
! lid.c 11
! mkid.1 4
! mkid.c 10
numtst.c 1
! opensrc.c 2
patchlevel.h 1
! paths.c 3
radix.h 1
! scan-asm.c 5
! scan-c.c 6
! scan-text.c 3
! stoi.c 2
string.h 1
! symfunc.el 3
tty.c 1
uerror.c 1
unsymlink.c 2
--- 1,54 ----
File Name Archive # Description
-----------------------------------------------------------
MANIFEST 1 This shipping list
! Makefile 3
! README 1
! Status 1
TODO 1
! TUTORIAL 4
basename.c 1
bitcount.c 1
bitops.c 1
bitops.h 1
! bitsvec.c 1
bool.h 1
bsearch.c 1
bzero.c 1
! cannoname.c 2
document.c 1
extern.h 1
fid.1 1
! fid.c 1
gets0.c 1
getsFF.c 1
! getscan.c 3
gid.el 1
! hash.c 1
! id.h 1
! id.texinfo 7
idx.c 1
! iid.1 2
! iid.help 2
! iid.y 4
! iiddef.h 3
! iidfun.c 5
init.c 1
! kshgetwd.c 1
! lid.1 3
! lid.c 6
! mkid.1 2
! mkid.c 5
numtst.c 1
! opensrc.c 1
patchlevel.h 1
! paths.c 2
radix.h 1
! scan-asm.c 3
! scan-c.c 4
! scan-text.c 2
! stoi.c 1
string.h 1
! symfunc.el 2
tty.c 1
uerror.c 1
unsymlink.c 2
*** ../../usenet-mkid/src/Makefile Tue Feb 26 10:41:33 1991
--- Makefile Tue Feb 26 10:08:09 1991
***************
*** 30,35 ****
--- 30,43 ----
#
# * If you have ranlib(1), define `RANLIB' as such. If you don't have
# it, set `RANLIB' to something harmless like `@:', or `echo'
+ #
+ # * If you want lists of file names compressed with csh {} notation by
+ # default, set -DCRUNCH_DEFAULT=1. If you want files printed with no
+ # "crunching", set -DCRUNCH_DEFAULT=0. (The -k and -g options allow
+ # runtime control regardless of the builtin default).
+ #
+ # * If your system supports the alloca() function for allocating space
+ # on the stack, defined -DUSE_ALLOCA
# --------------------------------------------------------------------
DEFS = -Dvoid=int -DREGEX -DTERMIO # typical System-V defs
***************
*** 45,50 ****
--- 53,64 ----
RANLIB = @: # system doesn't have ranlib (Sys-V)
# RANLIB = ranlib # system has ranlib (typically V7 & BSD)
+ CRUNCH = -DCRUNCH_DEFAULT=1 # Original default - crunch file names
+ #CRUNCH = -DCRUNCH_DEFAULT=0 # Don't crunch names by default
+
+ ALLOCA = -DUSE_ALLOCA # alloca support exists on system
+ #ALLOCA = # system has no alloca() function
+
# --------------------------------------------------------------------
# Compilation / Loading options:
# Choose options to generate a system as an installed product,
***************
*** 70,76 ****
MANDIR = /usr/catman/local_man/man1
LIDLINKS = gid aid eid pid
! CFLAGS = $(CCFLG) -I. $(DEFS)
LDFLAGS = $(LDFLG) libid.a $(LIBS)
OFILES = init.o getscan.o scan-c.o scan-asm.o bsearch.o hash.o \
--- 84,90 ----
MANDIR = /usr/catman/local_man/man1
LIDLINKS = gid aid eid pid
! CFLAGS = $(CCFLG) -I. $(DEFS) $(CRUNCH) $(ALLOCA)
LDFLAGS = $(LDFLG) libid.a $(LIBS)
OFILES = init.o getscan.o scan-c.o scan-asm.o bsearch.o hash.o \
***************
*** 78,83 ****
--- 92,100 ----
stoi.o uerror.o document.o bitcount.o wmatch.o bitsvec.o \
tty.o bzero.o scan-text.o cannoname.o kshgetwd.o unsymlink.o
+ TEXJUNK=id.aux id.cp id.cps id.dvi id.fn id.fns id.ky id.kys id.log id.pg \
+ id.pgs id.toc id.tp id.tps id.vr id.vrs id-info
+
# --------------------------------------------------------------------
all: $(TARGETS)
***************
*** 153,159 ****
ln $(DESTINATION_DIR)/lid $(DESTINATION_DIR)/pid
clean:
! rm -f $(TARGETS) *.o iid.c core a.out
id.tar:
cd ..; tar cvbf 20 id/id.tar id/*.[ch1-8] id/makefile id/TODO id/TUTORIAL
--- 170,176 ----
ln $(DESTINATION_DIR)/lid $(DESTINATION_DIR)/pid
clean:
! rm -f $(TARGETS) *.o iid.c core a.out $(TEXJUNK)
id.tar:
cd ..; tar cvbf 20 id/id.tar id/*.[ch1-8] id/makefile id/TODO id/TUTORIAL
***************
*** 175,188 ****
debug:
make CCFLG='-g -DDEBUG' LDFLG='-g'
! ID:
! rm -f ../TOOLS/ID ../EXEC/ID ../SRC/ID
! cd ../TOOLS ; find ../SRC -name '*.[ch]' -print | mkid -v -
! ln ../TOOLS/ID ../EXEC/ID
! ln ../TOOLS/ID ../SRC/ID
! TAGS:
! rm -f ../TOOLS/TAGS ../EXEC/TAGS ../SRC/TAGS
! cd ../TOOLS ; find ../SRC -name '*.[ch]' -print | etags -twS
! ln ../TOOLS/TAGS ../EXEC/TAGS
! ln ../TOOLS/TAGS ../SRC/TAGS
--- 192,233 ----
debug:
make CCFLG='-g -DDEBUG' LDFLG='-g'
! ID::
! /bin/rm -f ID
! mkid *.[chy]
! TAGS::
! /bin/rm -f TAGS
! etags -tw *.[chy]
!
! # TeX stuff - these actions count on several things being installed on
! # your system:
! #
! # tex - the document processor
! # texinfo.tex - the texinfo macro package used to format the document
! # texindex - the index sorting program used to generate the index
! # makeinfo - the program to turn texinfo files into online documentation
! #
! # A tex distribution tape can be obtained from the University of Washington.
! # send email to: elisabet@max.u.washington.edu for more info.
! #
! # The other texinfo tools are part of the Gnuemacs distribution and can
! # be obtained via FTP from prep.ai.mit.edu
!
! # Make the online info file by running makeinfo - texinfo-format-buffer from
! # within emacs probably will not work very well.
! id-info: id.texinfo
! makeinfo id.texinfo
!
! # If you are running TeX from a clean directory, need to run once to get
! # the initial .aux file with the cross reference info in it.
! id.aux: id.texinfo
! tex id.texinfo
! texindex id.??
!
! # Running TeX twice here is probably overkill, but it makes absolutely sure
! # the index agrees with the actual location of text.
! id.dvi: id.aux
! tex id.texinfo
! texindex id.??
! tex id.texinfo
*** ../../usenet-mkid/src/Status Tue Feb 26 10:41:11 1991
--- Status Tue Feb 26 10:07:12 1991
***************
*** 1,30 ****
! This is the mkid package originally posted to the net around September of
! 1987 by Greg McGary (who then vanished from the net). Since then I have been
! extensively hacking it, and so have others. In an effort to have all of us
! benefit from the modifications and improvements we all have made, I have
! (probably foolishly :-) volunteered to "take over" mkid.
! To get the ball rolling, I am posting this version to alt.sources, and I
! expect people to send me their patches. I will merge them all and eventually
! post an "official" version to comp.sources.unix.
! I know there are probably portability problems with this version of the
! source, I have some stuff in here that references functions you only have if
! your system supports symbolic links, etc, so it will need to have some
! config parameters and ifdef code added for sure.
! Anyway, keep those patches rolling in...
! ======================================================================
! domain: tahorsley@csd.harris.com USMail: Tom Horsley
! uucp: ...!uunet!hcx1!tahorsley 511 Kingbird Circle
! Delray Beach, FL 33444
! +==== Censorship is the only form of Obscenity ======================+
! | (Wait, I forgot government tobacco subsidies...) |
! +====================================================================+
! P.S.
! The TUTORIAL has not been changed since 1987, so a lot of stuff is not
! well documented. This situation also need to improve prior to the
! official release.
--- 1,31 ----
! In the original alt.sources posting, this file started off:
! This is the mkid package originally posted to the net around September of
! 1987 by Greg McGary (who then vanished from the net). Since then I have been
! extensively hacking it, and so have others. In an effort to have all of us
! benefit from the modifications and improvements we all have made, I have
! (probably foolishly :-) volunteered to "take over" mkid.
! Since then, Greg has revealed that he is still alive and on the net, and
! he apparently has lots of plans for mkid revisions (but not much time to
! do them -- a situation we are probably all familiar with).
! Anyway, after I post this version to comp.sources.unix, I will probably
! let Greg take over as the official maintainer.
! This version contains some cleanup work done since the alt.sources posting
! (but no major changes). It also comes with a brand new id.texinfo file
! containing the latest and greatest documentation for the tools (Note: I have
! no plans to upgrade the man pages, the texinfo doc is the only place where
! the latest and greatest options are documented right now).
! This is the final posting to alt.sources. It contains the patches to upgrade
! the original alt.sources posting to what I now have. If a few days go past
! with no additional bugs cropping up, I will send it all off to
! comp.sources.unix.
! You can reach me (Tom Horsley) at:
! tahorsley@csd.harris.com or ...!uunet!hcx1!tahorsley
!
! The email address I have for Greg McGary is:
! gm@blip.wsrcc.com or ...!uunet!wsrcc!blip!gm
*** ../../usenet-mkid/src/cannoname.c Tue Feb 26 10:41:20 1991
--- cannoname.c Tue Feb 26 10:07:55 1991
***************
*** 106,112 ****
}
*cad++ = NULL ;
! /* find multiple // and use last slash as root */
s = NULL ;
cap = &components[0] ;
cad = cap ;
--- 106,115 ----
}
*cad++ = NULL ;
! /* find multiple // and use last slash as root, except on apollo which
! * apparently actually uses // in real file names (don't ask me why).
! */
! #ifndef apollo
s = NULL ;
cap = &components[0] ;
cad = cap ;
***************
*** 118,123 ****
--- 121,127 ----
*cad++ = s;
}
*cad = NULL ;
+ #endif
/* if this is absolute name get rid of any /.. at beginning */
if ((components[0] == &slash[0]) && (components[1] == &dotdot[0])) {
*** ../../usenet-mkid/src/iidfun.c Tue Feb 26 10:41:56 1991
--- iidfun.c Tue Feb 26 10:08:34 1991
***************
*** 2,8 ****
--- 2,29 ----
*/
#include "iiddef.h"
+ #ifdef USE_ALLOCA
+ /* Apparently Sun's need the following to work correctly */
+ #ifdef sun
+ #include <alloca.h>
+ #endif /* sun */
+
+ /* Define TEMP_ALLOC to call alloca, and TEMP_FREE to do nothing */
+
+ #define TEMP_ALLOC(s) alloca(s)
+ #define TEMP_FREE(s)
+
+ #else
+
+ /* Not using alloca() (not everyone has it) - define TEMP_ALLOC to call
+ * malloc() and TEMP_FREE to call free().
+ */
+ #define TEMP_ALLOC(s) malloc(s)
+ #define TEMP_FREE(s) free(s)
+
+ #endif /* USE_ALLOCA */
+
/* ArgListSize - count the size of an arg list so can alloca() enough
* space for the command.
*/
***************
*** 358,367 ****
char * pp ;
set_type * sp ;
{
! char * cmd = (char *)alloca(SetListSize(sp) + strlen(pp) + 2);
int i ;
id_type * idep ;
strcpy(cmd, pp) ;
for (i = 0; i < NextFileNum; ++i) {
if (FileList[i]->mask_word < sp->set_size) {
--- 379,389 ----
char * pp ;
set_type * sp ;
{
! char * cmd ;
int i ;
id_type * idep ;
+ cmd = (char *)TEMP_ALLOC(SetListSize(sp) + strlen(pp) + 2);
strcpy(cmd, pp) ;
for (i = 0; i < NextFileNum; ++i) {
if (FileList[i]->mask_word < sp->set_size) {
***************
*** 372,377 ****
--- 394,400 ----
}
}
system(cmd) ;
+ TEMP_FREE(cmd) ;
}
/* AddSet - add a new set to the universal list of sets. Assign
***************
*** 409,415 ****
id_list_type * idlp ;
{
int c ;
! char * cmd = (char *)alloca(ArgListSize(idlp) + strlen(pp) + 2);
char * dp ;
char file [ MAXCMD ] ;
int i ;
--- 432,438 ----
id_list_type * idlp ;
{
int c ;
! char * cmd ;
char * dp ;
char file [ MAXCMD ] ;
int i ;
***************
*** 418,423 ****
--- 441,447 ----
FILE * prog ;
set_type * sp ;
+ cmd = (char *)TEMP_ALLOC(ArgListSize(idlp) + strlen(pp) + 2);
FlushFiles() ;
strcpy(cmd, pp) ;
idep = idlp->id_list ;
***************
*** 473,478 ****
--- 497,503 ----
sp->set_data[i] = TheFiles[i] ;
}
AddSet(sp) ;
+ TEMP_FREE(cmd);
return(sp) ;
}
***************
*** 640,649 ****
char * pp ;
id_list_type * idlp ;
{
! char * cmd = (char *)alloca(ArgListSize(idlp) + strlen(pp) + 2);
id_type * idep ;
id_type * next_id ;
strcpy(cmd, pp) ;
idep = idlp->id_list ;
while (idep != NULL) {
--- 665,675 ----
char * pp ;
id_list_type * idlp ;
{
! char * cmd ;
id_type * idep ;
id_type * next_id ;
+ cmd = (char *)TEMP_ALLOC(ArgListSize(idlp) + strlen(pp) + 2);
strcpy(cmd, pp) ;
idep = idlp->id_list ;
while (idep != NULL) {
***************
*** 655,658 ****
--- 681,685 ----
}
free(idlp) ;
system(cmd) ;
+ TEMP_FREE(cmd);
}
*** ../../usenet-mkid/src/lid.c Tue Feb 26 10:42:02 1991
--- lid.c Tue Feb 26 10:08:40 1991
***************
*** 47,52 ****
--- 47,56 ----
#define TOLOWER(c) (isupper(c) ? tolower(c) : (c))
#endif
+ #ifndef CRUNCH_DEFAULT
+ #define CRUNCH_DEFAULT TRUE
+ #endif
+
/*
* Sorry about all the globals, but it's really cleaner this way.
*/
***************
*** 54,60 ****
bool Merging;
bool Radix;
bool EchoOn = TRUE;
! bool CrunchOn = TRUE;
bool pathRegExp = FALSE;
bool matchBase = FALSE;
char IdDir[BUFSIZ];
--- 58,64 ----
bool Merging;
bool Radix;
bool EchoOn = TRUE;
! bool CrunchOn = CRUNCH_DEFAULT;
bool pathRegExp = FALSE;
bool matchBase = FALSE;
char IdDir[BUFSIZ];
***************
*** 122,127 ****
--- 126,132 ----
case 'a': Radix |= RADIX_ALL; break;
case 's': Solo = op; break;
case 'k': CrunchOn = FALSE; break;
+ case 'g': CrunchOn = TRUE; break;
case 'n': EchoOn = FALSE; break;
case 'c': useIDpath = FALSE; usePWDpath = TRUE; break;
case 'b': matchBase = TRUE; break;
***************
*** 870,877 ****
if (!BITTST(bitArray, i))
continue;
if (idArgs->ida_flags & IDA_BLANK) {
! printf("BOTCH: blank index!\n");
! abort();
}
if (!(idArgs->ida_flags & IDA_ADJUST)) {
absname = spanPath(IdDir, idArgs->ida_arg);
--- 875,881 ----
if (!BITTST(bitArray, i))
continue;
if (idArgs->ida_flags & IDA_BLANK) {
! continue;
}
if (!(idArgs->ida_flags & IDA_ADJUST)) {
absname = spanPath(IdDir, idArgs->ida_arg);
*** ../../usenet-mkid/src/mkid.c Tue Feb 26 10:42:00 1991
--- mkid.c Tue Feb 26 10:08:35 1991
***************
*** 11,16 ****
--- 11,17 ----
#include <bitops.h>
#include <errno.h>
#include <extern.h>
+ #include "patchlevel.h"
int idnHashCmp();
int idnQsortCmp();
***************
*** 251,258 ****
if (HashFill == 0)
exit(0);
! if (Verbose)
fprintf(stderr, "Compressing Hash Table...\n");
hashCompress(HashTable, HashSize);
if (Verbose)
fprintf(stderr, "Sorting Hash Table...\n");
--- 252,261 ----
if (HashFill == 0)
exit(0);
! if (Verbose) {
! fprintf(stderr, "mkid patchlevel %d:\n", PATCHLEVEL);
fprintf(stderr, "Compressing Hash Table...\n");
+ }
hashCompress(HashTable, HashSize);
if (Verbose)
fprintf(stderr, "Sorting Hash Table...\n");
*** ../../usenet-mkid/src/patchlevel.h Tue Feb 26 10:41:04 1991
--- patchlevel.h Tue Feb 26 10:07:47 1991
***************
*** 1 ****
! #define PATCHLEVEL 1
--- 1 ----
! #define PATCHLEVEL 2