1Makefile 2======== 3 4# makefile for shar 5# 6# $Header: /tmp/bonefish/open-beos/current/src/apps/bin/sharutils-4.2.1/ChangeLog.OLD,v 1.1 2004/03/02 02:51:51 michaelphipps Exp $ 7# 8#+:EDITS: 9#:09-17-1990-12:25-rhg@cps.com-added -DMAXNAMLEN=MAX_NAME to CFLAGS for RT AIX 10#:09-17-1990-11:28-rhg@cps.com-replaced NO_DIRENT with USE_DIR and USE_NDIR 11#:09-12-1990-21:58-rhg@cps.com-moved strip from before to after cp to ${BINDIR} 12#:09-09-1990-20:12-rhg@cps.com-added CLOSEDIR_VOID 13#:09-09-1990-11:31-bill@netagw.com-add SHELL variable/-ldir for XENIX/UNIX 386 14#:08-07-1990-21:25-rhg@cps.com-compress man pages if MANEXT ends with .Z 15#:08-05-1990-23:50-rhg@cps.com-add post and compressed. 16#:08-05-1990-12:19-rhg@cps.com-add LIBS and -ldirent 17#:08-04-1990-18:51-rhg@cps.com-add CC, LD; move strip; reorder chgrp/chown. 18#:05-14-1990-17:33-wht@n4hgf-add -F 5000 for XENIX 286 19#:05-14-1990-17:32-bill@netagw.com-expanded Makefile 20#:03-28-1990-14:54-wht@n4hgf-for 3.10, add who@where.c 21 22shar.c 23====== 24 25char RCS_ID[] = "$Header: /tmp/bonefish/open-beos/current/src/apps/bin/sharutils-4.2.1/ChangeLog.OLD,v 1.1 2004/03/02 02:51:51 michaelphipps Exp $"; 26 27/*+:EDITS: */ 28/*:09-27-1990-23:40-rhg@cps.com-added check for '.' to the OptPREFIX check */ 29/*:09-27-1990-17:10-rhg@cps.com-added USE_GETCWD and getcwd */ 30/*:09-27-1990-17:10-rhg@cps.com-added Delim_len to fix PREFIX (yes, again) */ 31/*:09-17-1990-11:28-rhg@cps.com-replaced NO_DIRENT with USE_DIR and USE_NDIR */ 32/*:09-12-1990-21:55-rhg@cps.com-added check for isgraph undefined (old BSD) */ 33/*:09-12-1990-14:24-rhg@cps.com-added missing return(0) to walkdown */ 34/*:09-12-1990-14:13-rhg@cps.com-deleted some redundant, unused, code */ 35/*:09-12-1990-00:28-rhg@cps.com-added more directions to the shar header */ 36/*:09-09-1990-20:12-rhg@cps.com-added CLOSEDIR_VOID */ 37/*:09-09-1990-18:42-rhg@cps.com-added check for "From" under OptPREFIX */ 38/*:09-09-1990-11:55-rhg@cps.com-modified code under NOT STR(N)CMP_IS_FAST */ 39/*:09-08-1990-21:20-rhg@cps.com-added NO_DIRENT for SunOS 3 sys/dir.h */ 40/*:09-08-1990-21:04-rhg@cps.com-fixed bug in PREFIX check: strcmp(line,Delim) */ 41/*:08-06-1990-00:40-rhg@cps.com-revised Cut message to be more explanatory */ 42/*:08-05-1990-14:04-rhg@cps.com-merged Rname into walktree */ 43/*:08-05-1990-12:11-rhg@cps.com-added walktree & support for sharing dirs */ 44/*:08-05-1990-09:05-rhg@cps.com-change -Bn, -t, and -b to -bn, -T, and -B */ 45/*:08-04-1990-15:31-rhg@cps.com-added -Bn to set compress -bn (default 12) */ 46/*:08-04-1990-15:31-rhg@cps.com-changed shar3_???_.tmp to _shar_???_.tmp */ 47/*:08-04-1990-15:22-rhg@cps.com-added check for "exit 0" under OptPREFIX */ 48/*:08-04-1990-14:32-rhg@cps.com-added -m to generate TOUCH (default off) */ 49/*:08-04-1990-14:18-rhg@cps.com-reversed the meaning of -x and deleted -O */ 50/*:06-14-1990-14:48-rhg@cps.com-made Split and eXists compatible. 51/*:06-14-1990-14:18-rhg@cps.com-made -x the default and added -O 52/*:06-14-1990-12:44-rhg@cps.com-always terminate the && and report failures 53/*:06-14-1990-12:28-rhg@cps.com-clear mkdir_already between -l files 54/*:06-14-1990-12:14-rhg@cps.com-change PREFIX from a #define to an int variable. 55/*:04-19-1990-22:49-rhg@cps.com-get rid of "set" so "sh sharfil -c" will work */ 56/*:04-19-1990-21:52-rhg@cps.com-add -F to clear OptPREFIX */ 57/*:04-18-1990-08:49-rhg@cps.com-add OptPREFIX (for now, always on) */ 58/*:07-09-1990-19:24-wht@n4hgf-back to fgrep amc -- fits more -m touches */ 59/*:07-01-1990-18:37-wht@n4hgf-wait() needed after fork() */ 60/*:05-19-1990-02:47-wht@n4hgf-change fgrep amc to mmdd */ 61/*:05-16-1990-01:53-wht@n4hgf-Archive-name had extra period sometimes */ 62/*:05-10-1990-20:39-wht@n4hgf-altos does not not like at-sign in filenames */ 63/*:05-10-1990-13:38-wht@n4hgf-add -V Vanilla mode */ 64/*:05-07-1990-00:06-wht@n4hgf-test all mallocs for Purity Of Essence */ 65/*:05-07-1990-00:06-wht@n4hgf-add -S switch */ 66/*:05-05-1990-01:37-relay.EU.net!rivm!a3-dont assume vax is running BSD */ 67/*:04-18-1990-02:01-wht@n4hgf-3.20 rhg@cps.com did all the NICE work */ 68/*:04-17-1990-14:30-rhg@cps.com-pretty up if-then-else-fi in shar file */ 69/*:04-17-1990-12:13-rhg@cps.com-add Split and renamed old -l to -L */ 70/*:04-17-1990-12:13-rhg@cps.com-add -c option to shar file execution */ 71/*:04-17-1990-11:20-rhg@cps.com-simplify TOUCH logic in shar file */ 72/*:04-17-1990-10:27-rhg@cps.com-create setTOUCH to avoid duplicate code */ 73/*:04-17-1990-04:43-rhg@cps.com-add missing && to commands in shar file(s) */ 74/*:04-17-1990-02:03-rhg@cps.com-add Compress */ 75/*:04-16-1990-17:08-rhg@cps.com-add AvoidPipes as well as code to use pipes */ 76/*:04-03-1990-20:09-wht@n4hgf-3.11 */ 77/*:04-01-1990-13:20-pat@rwing-correct case on M option in getopt() call */ 78/*:04-01-1990-13:50-pat@rwing-change defaults on -v, -w to be on */ 79/*:03-29-1990-18:23-wht@n4hgf-add automatic sequent support */ 80/*:03-28-1990-15:56-wht@n4hgf-add mode and length net.bandwidth chrome */ 81/*:03-28-1990-14:23-wht@n4hgf-correct some runtime diagnostics */ 82/*:11-14-1989-02:21-wht-SHAR_EOF was botched if last file char not newline */ 83/*:11-02-1989-14:11-wht-add touch -am */ 84 85/* 86 Shar puts readable text files together in a package 87 from which they are easy to extract. 88 earlier attribution wht@n4hgf has: decvax!microsof!uw-beave!jim 89 (James Gosling at CMU) 90 */ 91/* 92 * I have made several mods to this program: 93 * 94 * 1) the -----Cut Here-----... now preceds the script. 95 * 2) the cat has been changed to a sed which removes a prefix 96 * character from the beginning of each line of the extracted 97 * file, this prefix character is added to each line of the archived 98 * files and is not the same as the first character of the 99 * file delimeter. 100 * 3) added several options: 101 * -c - add the -----Cut Here-----... line. 102 * -d'del' - change the file delimeter to del. 103 * -s - cause the resulting script to print the wc of 104 * the orignal file and the wc of the extracted 105 * file. 106 * 107 * Michael A. Thompson 108 * Dalhousie University 109 * Halifax, N.S., Canada. 110 */ 111 112/* 113 * I, too, have been hacking this code. This is the version on sixhub 114 * bill davidsen (davidsen@sixhub.uucp) 115 * 116 * - added support for binary files 117 * - automatic creation of limited size multiple file archives, 118 * each of which may be unpacked separately, and with sequence 119 * checking. 120 * - support for mixed text and binary files 121 * - preserve file permissions 122 * - restore to filename rather than pathname 123 * 124 */ 125/* 126 * One good hack deserves another ... this version generates shell 127 * code which attempts to create missing directories 128 * handle deviants sun, vax, pyr (pyramid), SCO XENIX/UNIX automatically 129 * for sequent, add -DBSD42 130 * force Verbose on 131 * if unsharing system's touch Sys V compatible (allows touch -m), 132 * restore file dates 133 * -n switch puts an alpha "name" in header 134 * -a (if also -n) puts "Submitted-by:" & "Archive-name: <name>/part## 135 * use getopt 136 * as well as some other chrome-plated junque 137 * ...!gatech!emory!tridom!wht (wht%n4hgf@gatech.edu) Warren Tucker 138 * 139 * 3.11 - Fri Apr 6 14:21:51 EDT 1990 140 * With due deference to davidsen@sixhub, more changes..... copies 141 * of this, like 3.10, were mailed to him: 142 * From wht Fri Apr 6 15:14:30 1990 remote from n4hgf 143 * Received: by n4hgf.UUCP (smail2.5-UNIX/386 5.3.2) 144 * id AA01781; 6 Apr 90 15:14:30 EDT (Fri) 145 * Date: Fri, 6 Apr 90 15:14:30 EDT 146 * X-Mailer: Mail User's Shell (6.5 4/17/89) 147 * From: wht@n4hgf (Warren Tucker) 148 * To: davidsen@sixhub 149 * Subject: shar 3.11 150 * X-Bang-Reply-to: gatech!n4hgf!wht -or- emory!tridom!n4hgf!wht 151 * Reply-to: wht%n4hgf@gatech.edu 152 * Message-Id: <9004061514.AA01781@n4hgf.UUCP> 153 * 154 * 1. changes suggested by pat@rwing (Pat Myrto) and silvert@cs.dal.ca 155 * (Bill Silvert) 156 * 2. fixes to who_am_i code in who@where.c 157 * 158 * 3.20 - Wed Apr 18 01:58:32 EDT 1990 159 * changes were made per edit notes by 160 From: gatech!mailrus!uunet!cpsolv.CPS.COM!rhg (Richard H. Gumpertz) 161 * ...!gatech!n4hgf!wht (wht%n4hgf@gatech.edu) Warren Tucker 162 * 163 */ 164 165unshar.c 166======== 167 168char RCS_ID[] = "$Header: /tmp/bonefish/open-beos/current/src/apps/bin/sharutils-4.2.1/ChangeLog.OLD,v 1.1 2004/03/02 02:51:51 michaelphipps Exp $"; 169 170/* HISTORY 171 * 27-Sep-90 Richard H. Gumpertz (rhg@cps.com) 172 * add check for EXTERNAL_GETOPT to suppress the built-in getopt. (The 173 * builtin getopt is nice because it makes unshar more easily portable.) 174 * 12-Sep-90 Richard H. Gumpertz (rhg@cps.com) 175 * use fprintf instead of printf when printing error return from getwd. 176 * deleted unused initialization of more_to_read in process. 177 * changed ch from char to int in process so the EOF check would work. 178 * 4-Aug-90 Richard H. Gumpertz (rhg@cps.com) 179 * renamed -c and -C to -e and -E and added -c flag (passed through to sh) 180 * 24-Apr-90 Richard H. Gumpertz (rhg@cps.com) 181 * rewrote ENC() to use a more efficient formula 182 * 19-Apr-90 Colas Nahaboo (colas@mirsa.inria.fr) 183 * added -c and -C flags to read from concatenated archives 184 * 1-Feb-85 Guido van Rossum (guido@mcvax) at CWI, Amsterdam 185 * Added missing 'quit' routine; 186 * added -d flag to change to directory first; 187 * added filter mode (read stdin when no arguments); 188 * added 'getopt' to get flags (makes it self-contained). 189 * 29-Jan-85 Michael Mauldin (mlm) at Carnegie-Mellon University 190 * Created. 191 ****************************************************************/ 192/*+:EDITS: */ 193/*:08-04-1990-15:54-rhg@cps.com-changes listed above (-c/-C => -e/-E, new -c) */ 194/*:05-05-1990-01:37-relay.EU.net!rivm!a3-dont assume vax is running BSD */ 195/*:04-19-1990-15:20-wht@n4hgf-fix so -d doesnt make argv files unreachable */ 196/*:04-19-1990-15:06-wht@n4hgf-colas@mirsa patches had expanded tabs */ 197/*:04-10-1990-22:02-wht@n4hgf-stdin failed sometimes-can not seek on pipe */ 198 199And for stlmatch: 200 201 * HISTORY 202 * 18-May-82 Michael Mauldin (mlm) at Carnegie-Mellon University 203 * Ripped out of CMU lib for Rog-O-Matic portability 204 * 20-Nov-79 Steven Shafer (sas) at Carnegie-Mellon University 205 * Rewritten for VAX from Ken Greer's routine. 206 * 207 * Originally from klg (Ken Greer) on IUS/SUS UNIX 208 209uushar.c 210======== 211 212/* $Header: /tmp/bonefish/open-beos/current/src/apps/bin/sharutils-4.2.1/ChangeLog.OLD,v 1.1 2004/03/02 02:51:51 michaelphipps Exp $ */ 213 214who@where.c 215=========== 216 217/* $Header: /tmp/bonefish/open-beos/current/src/apps/bin/sharutils-4.2.1/ChangeLog.OLD,v 1.1 2004/03/02 02:51:51 michaelphipps Exp $ */ 218 219 ...!gatech!kd4nc!n4hgf!wht (wht%n4hgf@gatech.edu) 220 221/*+:EDITS: */ 222/*:09-12-1990-01:04-rhg@cps.com-added declarations of strcpy and strcat */ 223/*:09-09-1990-19:49-rhg@cps.com-added explicit return statement to who_where */ 224/*:04-03-1990-19:55-wht@n4hgf-get rid of complicated who_am_i */ 225/*:04-01-1990-13:30-pat@rwing-use utsname.nodename instead of sysname */ 226/*:04-02-1990-12:12-wht@n4hgf-sigh... some pwd.h dont declare functions */ 227/*:03-29-1990-18:23-wht@n4hgf-add automatic sequent support */ 228/*:03-28-1990-15:24-wht@n4hgf-creation */ 229