diff --git a/Makefile b/Makefile index 824ef7d..c656a19 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ FSUTIL = tools/fsutil/fsutil TOPSRC = $(shell pwd) CONFIG = $(TOPSRC)/tools/configsys/config -all: .profile +all: $(MAKE) -C tools $(MAKE) -C lib $(MAKE) -C src install @@ -89,6 +89,3 @@ installflash: # TODO: make it relative to Target installboot: sudo pic32prog sys/pic32/fubarino/bootloader.hex - -.profile: etc/root/dot.profile - cp etc/root/dot.profile .profile diff --git a/etc/MAKEDEV b/etc/MAKEDEV index e6aaae7..e4b60d8 100755 --- a/etc/MAKEDEV +++ b/etc/MAKEDEV @@ -4,46 +4,14 @@ # All rights reserved. The Berkeley software License Agreement # specifies the terms and conditions for redistribution. # -# @(#)MAKEDEV 4.27.6 (2.11BSD) 1999/2/19 -# # Device "make" file. Valid arguments: -# std standard devices -# local configuration specific devices -# fd file descriptor driver -# Tapes: -# ht* unibus tu77 & te16 -# tm* unibus tm11 & te10 emulations (e.g. Emulex tc-11) -# ts* unibus ts11 -# tu* tmscp (tk50/tu81) +# std standard devices +# local configuration specific devices +# fd file descriptor driver # Disks: -# br* unibus Eaton br1538 or br1711 -# hk* unibus rk06 and rk07 -# ra* unibus uda50 w/ ra?? -# rk* unibus rk05 -# rl* unibus rl01/rl02 -# rx* unibus rx02 -# si* unibus cdc 9766 w/ si 9500 -# xp* unibus rm02/03/05, rp04/05/06, diva, eagle, cdc9766, fuji 160. -# Terminal multiplexors: -# dl* dl-11 units other than the console -# dz* unibus dz11 and dz32 -# dh* unibus dh11 and emulations (e.g. Able dmax, Emulex cs-11) -# dmf* unibus dmf32 -# dhu* unibus dhu11 -# dmz* unibus dmz32 -# dhv* qbus dhv11 +# sd* flash cards SecureDigital # Pseudo terminals: -# pty* set of 16 master and slave pseudo terminals -# Printers: -# lp* unibus lp11 parallel interface -# va* unibus varian parallel interface -# vp* unibus versatec parallel interface -# Call units: -# Special purpose devices: -# dr* unibus dr11 -# ram* memory disk -# dn* dn11 dialer -# ingreslock Ingres lock driver. +# pty* set of 16 master and slave pseudo terminals PATH=/etc:/sbin:/usr/sbin:/bin:/usr/bin umask 77 diff --git a/etc/Makefile b/etc/Makefile index 40dcc59..f5445ee 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -11,7 +11,6 @@ DESTDIR = /foobar OWN = root GRP = wheel -SUBDIR = root FILES = crontab fstab gettytab group motd passwd \ rc rc.local shells syslog.conf ttys @@ -19,8 +18,6 @@ all install depend lint tags: clean: rm -f *~ - -for i in ${SUBDIR}; do \ - (cd $$i; make DESTDIR=${DESTDIR} $@); done distribution: -@mkdir -p ${DESTDIR}/dev @@ -75,5 +72,3 @@ distribution: ${DESTDIR}/usr/adm/savacct install -c -o uucp -g daemon -m 600 /dev/null \ ${DESTDIR}/usr/adm/aculog - -for i in ${SUBDIR}; do \ - (cd $$i; make DESTDIR=${DESTDIR} distribution); done diff --git a/etc/passwd b/etc/passwd index 78feefb..383c2e7 100644 --- a/etc/passwd +++ b/etc/passwd @@ -1,8 +1,7 @@ -root:5:0:1:The Man:/:/bin/sh -daemon:*:1:1:The devil himself:/:/bin/sh +root:5:0:1:The Man:/root:/bin/sh +daemon:*:1:1:The devil himself:/root:/bin/sh sys:*:4:2:Operating System:/tmp:nologin -operator:*:2:5:System &:/usr/guest/operator:/bin/csh -bin:*:3:20:Binaries Commands and Source:/:/bin/csh +operator:*:2:5:System &:/u/operator:/bin/sh +bin:*:3:20:Binaries Commands and Source:/root:/bin/sh nobody:*:32767:31:Nobody:/nonexistent:/bin/sh -uucp:*:66:1:UNIX-to-UNIX Copy:/usr/spool/uucppublic:/usr/sbin/uucico -ingres:*:39:74:INGRES Owner:/usr/ingres:/bin/csh +uucp:*:66:1:UNIX-to-UNIX Copy:/spool/uucppublic:/sbin/uucico diff --git a/etc/root/Makefile b/etc/root/Makefile deleted file mode 100644 index 01769c3..0000000 --- a/etc/root/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# -# DESTDIR is defined here to be something which does *NOT* exist - it must be -# specified on the command line when doing a "make DESTDIR=/mnt distribution". -# This is aimed at avoiding overwriting the system disk's /etc files. - -DESTDIR = /foobar -OWN = root -GRP = wheel - -all install depend lint tags: - -distribution: - install -c -o ${OWN} -g ${GRP} -m 644 dot.cshrc ${DESTDIR}/.cshrc - install -c -o ${OWN} -g ${GRP} -m 644 dot.login ${DESTDIR}/.login - install -c -o ${OWN} -g ${GRP} -m 644 dot.profile ${DESTDIR}/.profile - -clean: - rm -f *~ diff --git a/etc/root/dot.cshrc b/etc/root/dot.cshrc deleted file mode 100644 index 48788b6..0000000 --- a/etc/root/dot.cshrc +++ /dev/null @@ -1,14 +0,0 @@ -set history=30 -set path=(/bin /sbin /etc /usr/sbin /usr/ucb /usr/bin /usr/new /usr/local) -if ($?prompt) then - set prompt="\!% " -endif - -set filec -set mail=( 0 /usr/spool/mail/$USER ) -set cdpath=( ~ /usr/spool/mqueue) -set prompt="\!% root--> " -alias mail /usr/ucb/Mail -alias pwd 'echo $cwd' -alias h history -alias q5 'tail -5 /usr/spool/mqueue/syslog' diff --git a/etc/root/dot.login b/etc/root/dot.login deleted file mode 100644 index 6efc4fc..0000000 --- a/etc/root/dot.login +++ /dev/null @@ -1,14 +0,0 @@ -unset noglob -set path=(/bin /etc /sbin /usr/sbin /usr/ucb /usr/bin /usr/local /usr/new) -umask 26 -stty dec erase ^H kill ^U eof ^D -set prompt="[\!] root--> " - -if ( "$TERM" == dialup || "$TERM" == network) then - setenv TERM vt100 - echo -n "Terminal ($TERM)? " - set argv = "$<" - if ( "$argv" != '' ) setenv TERM "$argv" -endif - -biff y diff --git a/etc/root/dot.profile b/etc/root/dot.profile deleted file mode 100644 index b08cb22..0000000 --- a/etc/root/dot.profile +++ /dev/null @@ -1,8 +0,0 @@ -echo 'erase, kill ^U, intr ^C' -stty dec -stty erase -PATH=/bin:/sbin:/usr/sbin:/etc:/usr/ucb:/usr/bin:/usr/new -export PATH -HOME=/ -export HOME -export TERM diff --git a/etc/shadow b/etc/shadow index 7276907..9039f56 100644 --- a/etc/shadow +++ b/etc/shadow @@ -1,8 +1,7 @@ -root:ro46DZg1ViGBs:0:1:The Man:/:/bin/sh -daemon:*:1:1:The devil himself:/:/bin/sh +root:ro46DZg1ViGBs:0:1:The Man:/root:/bin/sh +daemon:*:1:1:The devil himself:/root:/bin/sh sys:*:4:2:Operating System:/tmp:nologin -operator:*:2:5:System &:/usr/guest/operator:/bin/csh -bin:*:3:20:Binaries Commands and Source:/:/bin/csh +operator:*:2:5:System &:/u/operator:/bin/sh +bin:*:3:20:Binaries Commands and Source:/root:/bin/sh nobody:*:32767:31:Nobody:/nonexistent:/bin/sh -uucp:*:66:1:UNIX-to-UNIX Copy:/usr/spool/uucppublic:/usr/sbin/uucico -ingres:*:39:74:INGRES Owner:/usr/ingres:/bin/csh +uucp:*:66:1:UNIX-to-UNIX Copy:/spool/uucppublic:/sbin/uucico diff --git a/.profile b/root/.profile similarity index 100% rename from .profile rename to root/.profile diff --git a/rootfs.manifest b/rootfs.manifest index 8f934b2..e5efb3e 100644 --- a/rootfs.manifest +++ b/rootfs.manifest @@ -375,9 +375,10 @@ major 17 minor 4 # -# Files: / +# Files: /root # -file /.profile +dir /root +file /root/.profile # # Files: /etc diff --git a/src/cmd/Makefile b/src/cmd/Makefile index 4412991..77c5b25 100644 --- a/src/cmd/Makefile +++ b/src/cmd/Makefile @@ -17,7 +17,7 @@ SUBDIR = adb adc-demo aout ar as awk basic calendar cc chflags \ ranlib re renice retroforth scm sed setty sh sl smallc \ smlrc smux stty sysctl test uname wiznet xargs \ zmodem gtest msec unixbench cron compress date2 tip \ - talloc uucp uudecode uuencode + talloc uucp # /sbin SUBDIR += chown chroot disktool fsck getty init \ diff --git a/src/cmd/fold/fold.c b/src/cmd/fold/fold.c index 983a492..cf7722e 100644 --- a/src/cmd/fold/fold.c +++ b/src/cmd/fold/fold.c @@ -33,18 +33,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ - -#ifndef lint -static char copyright[] = -"@(#) Copyright (c) 1990, 1993\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ - -#ifndef lint -static char sccsid[] = "@(#)fold.c 8.1 (Berkeley) 6/6/93"; -#endif /* not lint */ - #include +#include #include #define DEFLINEWIDTH 80 diff --git a/src/cmd/md5/md5c.c b/src/cmd/md5/md5c.c index ab4e60e..5740f41 100644 --- a/src/cmd/md5/md5c.c +++ b/src/cmd/md5/md5c.c @@ -25,6 +25,7 @@ documentation and/or software. */ #include "md5.h" +#include typedef unsigned char *POINTER; typedef unsigned short int UINT2; @@ -75,236 +76,227 @@ static unsigned char PADDING[64] = { #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n)))) /* FF, GG, HH, and II transformations for rounds 1, 2, 3, and 4. -Rotation is separate from addition to prevent recomputation. + * Rotation is separate from addition to prevent recomputation. */ #define FF(a, b, c, d, x, s, ac) { \ - (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ + (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ } #define GG(a, b, c, d, x, s, ac) { \ - (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ + (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ } #define HH(a, b, c, d, x, s, ac) { \ - (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ + (a) += H ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ } #define II(a, b, c, d, x, s, ac) { \ - (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ - (a) = ROTATE_LEFT ((a), (s)); \ - (a) += (b); \ + (a) += I ((b), (c), (d)) + (x) + (UINT4)(ac); \ + (a) = ROTATE_LEFT ((a), (s)); \ + (a) += (b); \ } /* MD5 initialization. Begins an MD5 operation, writing a new context. */ void MD5Init (context) -MD5_CTX *context; /* context */ + MD5_CTX *context; /* context */ { - context->count[0] = context->count[1] = 0; - /* Load magic initialization constants. -*/ - context->state[0] = 0x67452301; - context->state[1] = 0xefcdab89; - context->state[2] = 0x98badcfe; - context->state[3] = 0x10325476; + context->count[0] = context->count[1] = 0; + /* Load magic initialization constants. */ + context->state[0] = 0x67452301; + context->state[1] = 0xefcdab89; + context->state[2] = 0x98badcfe; + context->state[3] = 0x10325476; } /* MD5 block update operation. Continues an MD5 message-digest - operation, processing another message block, and updating the - context. + * operation, processing another message block, and updating the + * context. */ void MD5Update (context, input, inputLen) -MD5_CTX *context; /* context */ -const unsigned char *input; /* input block */ -unsigned int inputLen; /* length of input block */ + MD5_CTX *context; /* context */ + const unsigned char *input; /* input block */ + unsigned int inputLen; /* length of input block */ { - unsigned int i, index, partLen; + unsigned int i, index, partLen; - /* Compute number of bytes mod 64 */ - index = (unsigned int)((context->count[0] >> 3) & 0x3F); + /* Compute number of bytes mod 64 */ + index = (unsigned int)((context->count[0] >> 3) & 0x3F); - /* Update number of bits */ - if ((context->count[0] += ((UINT4)inputLen << 3)) - < ((UINT4)inputLen << 3)) - context->count[1]++; - context->count[1] += ((UINT4)inputLen >> 29); + /* Update number of bits */ + if ((context->count[0] += ((UINT4)inputLen << 3)) + < ((UINT4)inputLen << 3)) + context->count[1]++; + context->count[1] += ((UINT4)inputLen >> 29); - partLen = 64 - index; + partLen = 64 - index; - /* Transform as many times as possible. -*/ - if (inputLen >= partLen) { - memcpy - ((POINTER)&context->buffer[index], (POINTER)input, partLen); - MD5Transform (context->state, context->buffer); + /* Transform as many times as possible. */ + if (inputLen >= partLen) { + memcpy((POINTER)&context->buffer[index], (POINTER)input, partLen); + MD5Transform (context->state, context->buffer); - for (i = partLen; i + 63 < inputLen; i += 64) - MD5Transform (context->state, &input[i]); + for (i = partLen; i + 63 < inputLen; i += 64) + MD5Transform (context->state, &input[i]); - index = 0; - } - else - i = 0; + index = 0; + } else + i = 0; - /* Buffer remaining input */ - memcpy - ((POINTER)&context->buffer[index], (POINTER)&input[i], - inputLen-i); + /* Buffer remaining input */ + memcpy((POINTER)&context->buffer[index], (POINTER)&input[i], inputLen-i); } /* MD5 finalization. Ends an MD5 message-digest operation, writing the - the message digest and zeroizing the context. + * the message digest and zeroizing the context. */ void MD5Final (digest, context) -unsigned char digest[16]; /* message digest */ -MD5_CTX *context; /* context */ + unsigned char digest[16]; /* message digest */ + MD5_CTX *context; /* context */ { - unsigned char bits[8]; - unsigned int index, padLen; + unsigned char bits[8]; + unsigned int index, padLen; - /* Save number of bits */ - Encode (bits, context->count, 8); + /* Save number of bits */ + Encode (bits, context->count, 8); - /* Pad out to 56 mod 64. -*/ - index = (unsigned int)((context->count[0] >> 3) & 0x3f); - padLen = (index < 56) ? (56 - index) : (120 - index); - MD5Update (context, PADDING, padLen); + /* Pad out to 56 mod 64. */ + index = (unsigned int)((context->count[0] >> 3) & 0x3f); + padLen = (index < 56) ? (56 - index) : (120 - index); + MD5Update (context, PADDING, padLen); - /* Append length (before padding) */ - MD5Update (context, bits, 8); - /* Store state in digest */ - Encode (digest, context->state, 16); + /* Append length (before padding) */ + MD5Update (context, bits, 8); + /* Store state in digest */ + Encode (digest, context->state, 16); - /* Zeroize sensitive information. -*/ - memset ((POINTER)context, 0, sizeof (*context)); + /* Zeroize sensitive information. */ + memset ((POINTER)context, 0, sizeof (*context)); } /* MD5 basic transformation. Transforms state based on block. */ static void MD5Transform (state, block) -UINT4 state[4]; -const unsigned char block[64]; + UINT4 state[4]; + const unsigned char block[64]; { - UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; + UINT4 a = state[0], b = state[1], c = state[2], d = state[3], x[16]; - Decode (x, block, 64); + Decode (x, block, 64); - /* Round 1 */ - FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ - FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ - FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ - FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ - FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ - FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ - FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ - FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ - FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ - FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ - FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ - FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ - FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ - FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ - FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ - FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ + /* Round 1 */ + FF (a, b, c, d, x[ 0], S11, 0xd76aa478); /* 1 */ + FF (d, a, b, c, x[ 1], S12, 0xe8c7b756); /* 2 */ + FF (c, d, a, b, x[ 2], S13, 0x242070db); /* 3 */ + FF (b, c, d, a, x[ 3], S14, 0xc1bdceee); /* 4 */ + FF (a, b, c, d, x[ 4], S11, 0xf57c0faf); /* 5 */ + FF (d, a, b, c, x[ 5], S12, 0x4787c62a); /* 6 */ + FF (c, d, a, b, x[ 6], S13, 0xa8304613); /* 7 */ + FF (b, c, d, a, x[ 7], S14, 0xfd469501); /* 8 */ + FF (a, b, c, d, x[ 8], S11, 0x698098d8); /* 9 */ + FF (d, a, b, c, x[ 9], S12, 0x8b44f7af); /* 10 */ + FF (c, d, a, b, x[10], S13, 0xffff5bb1); /* 11 */ + FF (b, c, d, a, x[11], S14, 0x895cd7be); /* 12 */ + FF (a, b, c, d, x[12], S11, 0x6b901122); /* 13 */ + FF (d, a, b, c, x[13], S12, 0xfd987193); /* 14 */ + FF (c, d, a, b, x[14], S13, 0xa679438e); /* 15 */ + FF (b, c, d, a, x[15], S14, 0x49b40821); /* 16 */ - /* Round 2 */ - GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ - GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ - GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ - GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ - GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ - GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */ - GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ - GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ - GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ - GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ - GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ - GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ - GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ - GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ - GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ - GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ + /* Round 2 */ + GG (a, b, c, d, x[ 1], S21, 0xf61e2562); /* 17 */ + GG (d, a, b, c, x[ 6], S22, 0xc040b340); /* 18 */ + GG (c, d, a, b, x[11], S23, 0x265e5a51); /* 19 */ + GG (b, c, d, a, x[ 0], S24, 0xe9b6c7aa); /* 20 */ + GG (a, b, c, d, x[ 5], S21, 0xd62f105d); /* 21 */ + GG (d, a, b, c, x[10], S22, 0x2441453); /* 22 */ + GG (c, d, a, b, x[15], S23, 0xd8a1e681); /* 23 */ + GG (b, c, d, a, x[ 4], S24, 0xe7d3fbc8); /* 24 */ + GG (a, b, c, d, x[ 9], S21, 0x21e1cde6); /* 25 */ + GG (d, a, b, c, x[14], S22, 0xc33707d6); /* 26 */ + GG (c, d, a, b, x[ 3], S23, 0xf4d50d87); /* 27 */ + GG (b, c, d, a, x[ 8], S24, 0x455a14ed); /* 28 */ + GG (a, b, c, d, x[13], S21, 0xa9e3e905); /* 29 */ + GG (d, a, b, c, x[ 2], S22, 0xfcefa3f8); /* 30 */ + GG (c, d, a, b, x[ 7], S23, 0x676f02d9); /* 31 */ + GG (b, c, d, a, x[12], S24, 0x8d2a4c8a); /* 32 */ - /* Round 3 */ - HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ - HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ - HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ - HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ - HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ - HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ - HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ - HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ - HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ - HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ - HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ - HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ - HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ - HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ - HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ - HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ + /* Round 3 */ + HH (a, b, c, d, x[ 5], S31, 0xfffa3942); /* 33 */ + HH (d, a, b, c, x[ 8], S32, 0x8771f681); /* 34 */ + HH (c, d, a, b, x[11], S33, 0x6d9d6122); /* 35 */ + HH (b, c, d, a, x[14], S34, 0xfde5380c); /* 36 */ + HH (a, b, c, d, x[ 1], S31, 0xa4beea44); /* 37 */ + HH (d, a, b, c, x[ 4], S32, 0x4bdecfa9); /* 38 */ + HH (c, d, a, b, x[ 7], S33, 0xf6bb4b60); /* 39 */ + HH (b, c, d, a, x[10], S34, 0xbebfbc70); /* 40 */ + HH (a, b, c, d, x[13], S31, 0x289b7ec6); /* 41 */ + HH (d, a, b, c, x[ 0], S32, 0xeaa127fa); /* 42 */ + HH (c, d, a, b, x[ 3], S33, 0xd4ef3085); /* 43 */ + HH (b, c, d, a, x[ 6], S34, 0x4881d05); /* 44 */ + HH (a, b, c, d, x[ 9], S31, 0xd9d4d039); /* 45 */ + HH (d, a, b, c, x[12], S32, 0xe6db99e5); /* 46 */ + HH (c, d, a, b, x[15], S33, 0x1fa27cf8); /* 47 */ + HH (b, c, d, a, x[ 2], S34, 0xc4ac5665); /* 48 */ - /* Round 4 */ - II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ - II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ - II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ - II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ - II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ - II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ - II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ - II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ - II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ - II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ - II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ - II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ - II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ - II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ - II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ - II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ + /* Round 4 */ + II (a, b, c, d, x[ 0], S41, 0xf4292244); /* 49 */ + II (d, a, b, c, x[ 7], S42, 0x432aff97); /* 50 */ + II (c, d, a, b, x[14], S43, 0xab9423a7); /* 51 */ + II (b, c, d, a, x[ 5], S44, 0xfc93a039); /* 52 */ + II (a, b, c, d, x[12], S41, 0x655b59c3); /* 53 */ + II (d, a, b, c, x[ 3], S42, 0x8f0ccc92); /* 54 */ + II (c, d, a, b, x[10], S43, 0xffeff47d); /* 55 */ + II (b, c, d, a, x[ 1], S44, 0x85845dd1); /* 56 */ + II (a, b, c, d, x[ 8], S41, 0x6fa87e4f); /* 57 */ + II (d, a, b, c, x[15], S42, 0xfe2ce6e0); /* 58 */ + II (c, d, a, b, x[ 6], S43, 0xa3014314); /* 59 */ + II (b, c, d, a, x[13], S44, 0x4e0811a1); /* 60 */ + II (a, b, c, d, x[ 4], S41, 0xf7537e82); /* 61 */ + II (d, a, b, c, x[11], S42, 0xbd3af235); /* 62 */ + II (c, d, a, b, x[ 2], S43, 0x2ad7d2bb); /* 63 */ + II (b, c, d, a, x[ 9], S44, 0xeb86d391); /* 64 */ - state[0] += a; - state[1] += b; - state[2] += c; - state[3] += d; + state[0] += a; + state[1] += b; + state[2] += c; + state[3] += d; - /* Zeroize sensitive information. -*/ - memset ((POINTER)x, 0, sizeof (x)); + /* Zeroize sensitive information. */ + memset ((POINTER)x, 0, sizeof (x)); } /* Encodes input (UINT4) into output (unsigned char). Assumes len is - a multiple of 4. + * a multiple of 4. */ static void Encode (output, input, len) -unsigned char *output; -UINT4 *input; -unsigned int len; + unsigned char *output; + UINT4 *input; + unsigned int len; { - unsigned int i, j; + unsigned int i, j; - for (i = 0, j = 0; j < len; i++, j += 4) { - output[j] = (unsigned char)(input[i] & 0xff); - output[j+1] = (unsigned char)((input[i] >> 8) & 0xff); - output[j+2] = (unsigned char)((input[i] >> 16) & 0xff); - output[j+3] = (unsigned char)((input[i] >> 24) & 0xff); - } + for (i = 0, j = 0; j < len; i++, j += 4) { + output[j] = (unsigned char)(input[i] & 0xff); + output[j+1] = (unsigned char)((input[i] >> 8) & 0xff); + output[j+2] = (unsigned char)((input[i] >> 16) & 0xff); + output[j+3] = (unsigned char)((input[i] >> 24) & 0xff); + } } /* Decodes input (unsigned char) into output (UINT4). Assumes len is - a multiple of 4. + * a multiple of 4. */ static void Decode (output, input, len) -UINT4 *output; -const unsigned char *input; -unsigned int len; + UINT4 *output; + const unsigned char *input; + unsigned int len; { - unsigned int i, j; + unsigned int i, j; - for (i = 0, j = 0; j < len; i++, j += 4) - output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | - (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); + for (i = 0, j = 0; j < len; i++, j += 4) + output[i] = ((UINT4)input[j]) | (((UINT4)input[j+1]) << 8) | + (((UINT4)input[j+2]) << 16) | (((UINT4)input[j+3]) << 24); } diff --git a/src/cmd/uudecode/.gitignore b/src/cmd/uudecode/.gitignore deleted file mode 100644 index 9f74f16..0000000 --- a/src/cmd/uudecode/.gitignore +++ /dev/null @@ -1 +0,0 @@ -uudecode diff --git a/src/cmd/uudecode/Makefile b/src/cmd/uudecode/Makefile deleted file mode 100644 index 2a21ea4..0000000 --- a/src/cmd/uudecode/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -TOPSRC = $(shell cd ../../..; pwd) -include $(TOPSRC)/target.mk - -CFLAGS = -O -SRCS = uudecode.c -OBJS = uudecode.o - -all: uudecode - -uudecode: ${OBJS} - ${CC} ${LDFLAGS} -o uudecode.elf ${OBJS} ${LIBS} - ${OBJDUMP} -S uudecode.elf > uudecode.dis - ${SIZE} uudecode.elf - ${ELF2AOUT} uudecode.elf $@ && rm uudecode.elf - -clean: - rm -f *.o uudecode uudecode.elf uudecode.dis tags *~ uudecode.0 - -depend: ${SRCS} - mkdep ${CFLAGS} ${SRCS} - -install: all - install uudecode ${DESTDIR}/bin/uudecode - -lint: ${SRCS} - lint -hax ${SRCS} - -tags: ${SRCS} - ctags ${SRCS} - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. diff --git a/src/cmd/uudecode/uudecode.c b/src/cmd/uudecode/uudecode.c deleted file mode 100644 index af87847..0000000 --- a/src/cmd/uudecode/uudecode.c +++ /dev/null @@ -1,187 +0,0 @@ -/*- - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef lint -char copyright[] = -"@(#) Copyright (c) 1983, 1993\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ - -#ifndef lint -static char sccsid[] = "@(#)uudecode.c 8.2 (Berkeley) 4/2/94"; -#endif /* not lint */ - -/* - * uudecode [file ...] - * - * create the specified file, decoding as you go. - * used with uuencode. - */ -#include -#include - -#include -#include -#include - -char *filename; - -int -main(argc, argv) - int argc; - char *argv[]; -{ - extern int errno; - int rval; - - if (*++argv) { - rval = 0; - do { - if (!freopen(filename = *argv, "r", stdin)) { - (void)fprintf(stderr, "uudecode: %s: %s\n", - *argv, strerror(errno)); - rval = 1; - continue; - } - rval |= decode(); - } while (*++argv); - } else { - filename = "stdin"; - rval = decode(); - } - exit(rval); -} - -decode() -{ - extern int errno; - struct passwd *pw; - register int n; - register char ch, *p; - int mode, n1; - char buf[MAXPATHLEN]; - - /* search for header line */ - do { - if (!fgets(buf, sizeof(buf), stdin)) { - (void)fprintf(stderr, - "uudecode: %s: no \"begin\" line\n", filename); - return(1); - } - } while (strncmp(buf, "begin ", 6)); - (void)sscanf(buf, "begin %o %s", &mode, buf); - - /* handle ~user/file format */ - if (buf[0] == '~') { - if (!(p = index(buf, '/'))) { - (void)fprintf(stderr, "uudecode: %s: illegal ~user.\n", - filename); - return(1); - } - *p++ = NULL; - if (!(pw = getpwnam(buf + 1))) { - (void)fprintf(stderr, "uudecode: %s: no user %s.\n", - filename, buf); - return(1); - } - n = strlen(pw->pw_dir); - n1 = strlen(p); - if (n + n1 + 2 > MAXPATHLEN) { - (void)fprintf(stderr, "uudecode: %s: path too long.\n", - filename); - return(1); - } - bcopy(p, buf + n + 1, n1 + 1); - bcopy(pw->pw_dir, buf, n); - buf[n] = '/'; - } - - /* create output file, set mode */ - if (!freopen(buf, "w", stdout) || - fchmod(fileno(stdout), mode&0666)) { - (void)fprintf(stderr, "uudecode: %s: %s: %s\n", buf, - filename, strerror(errno)); - return(1); - } - - /* for each input line */ - for (;;) { - if (!fgets(p = buf, sizeof(buf), stdin)) { - (void)fprintf(stderr, "uudecode: %s: short file.\n", - filename); - return(1); - } -#define DEC(c) (((c) - ' ') & 077) /* single character decode */ - /* - * `n' is used to avoid writing out all the characters - * at the end of the file. - */ - if ((n = DEC(*p)) <= 0) - break; - for (++p; n > 0; p += 4, n -= 3) - if (n >= 3) { - ch = DEC(p[0]) << 2 | DEC(p[1]) >> 4; - putchar(ch); - ch = DEC(p[1]) << 4 | DEC(p[2]) >> 2; - putchar(ch); - ch = DEC(p[2]) << 6 | DEC(p[3]); - putchar(ch); - } - else { - if (n >= 1) { - ch = DEC(p[0]) << 2 | DEC(p[1]) >> 4; - putchar(ch); - } - if (n >= 2) { - ch = DEC(p[1]) << 4 | DEC(p[2]) >> 2; - putchar(ch); - } - if (n >= 3) { - ch = DEC(p[2]) << 6 | DEC(p[3]); - putchar(ch); - } - } - } - if (!fgets(buf, sizeof(buf), stdin) || strcmp(buf, "end\n")) { - (void)fprintf(stderr, "uudecode: %s: no \"end\" line.\n", - filename); - return(1); - } - return(0); -} - -usage() -{ - (void)fprintf(stderr, "usage: uudecode [file ...]\n"); - exit(1); -} diff --git a/src/cmd/uuencode/.gitignore b/src/cmd/uuencode/.gitignore deleted file mode 100644 index bc78d7c..0000000 --- a/src/cmd/uuencode/.gitignore +++ /dev/null @@ -1 +0,0 @@ -uuencode diff --git a/src/cmd/uuencode/Makefile b/src/cmd/uuencode/Makefile deleted file mode 100644 index d3c5431..0000000 --- a/src/cmd/uuencode/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -TOPSRC = $(shell cd ../../..; pwd) -include $(TOPSRC)/target.mk - -CFLAGS = -O -SRCS = uuencode.c -OBJS = uuencode.o -MAN = uuencode.0 -MANSRC = uuencode.1 - -all: uuencode $(MAN) - -uuencode: ${OBJS} - ${CC} ${LDFLAGS} -o uuencode.elf ${OBJS} ${LIBS} - ${OBJDUMP} -S uuencode.elf > uuencode.dis - ${SIZE} uuencode.elf - ${ELF2AOUT} uuencode.elf $@ && rm uuencode.elf - -$(MAN): ${MANSRC} - ${MANROFF} $< > $@ - -clean: - rm -f *.o uuencode uuencode.elf uuencode.dis tags *~ uuencode.0 - -depend: ${SRCS} - mkdep ${CFLAGS} ${SRCS} - -install: all - install uuencode ${DESTDIR}/bin/uuencode - cp ${MAN} ${DESTDIR}/share/man/cat1/ - -lint: ${SRCS} - lint -hax ${SRCS} - -tags: ${SRCS} - ctags ${SRCS} - -# DO NOT DELETE THIS LINE -- mkdep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. diff --git a/src/cmd/uuencode/uuencode.1 b/src/cmd/uuencode/uuencode.1 deleted file mode 100644 index df1ebf2..0000000 --- a/src/cmd/uuencode/uuencode.1 +++ /dev/null @@ -1,105 +0,0 @@ -.\" Copyright (c) 1980, 1990, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)uuencode.1 8.1 (Berkeley) 6/6/93 -.\" -.Dd June 6, 1993 -.Dt UUENCODE 1 -.Os BSD 4 -.Sh NAME -.Nm uuencode , -.Nm uudecode -.Nd encode/decode a binary file -.Sh SYNOPSIS -.Nm uuencode -.Op Ar file -.Ar name -.Nm uudecode -.Op Ar file ... -.Sh DESCRIPTION -.Nm Uuencode -and -.Nm uudecode -are used to transmit binary files over transmission mediums -that do not support other than simple -.Tn ASCII -data. -.Pp -.Nm Uuencode -reads -.Ar file -(or by default the standard input) and writes an encoded version -to the standard output. -The encoding uses only printing -.Tn ASCII -characters and includes the -mode of the file and the operand -.Ar name -for use by -.Nm uudecode . -.Pp -.Nm Uudecode -transforms -.Em uuencoded -files (or by default, the standard input) into the original form. -The resulting file is named -.Ar name -and will have the mode of the original file except that setuid -and execute bits are not retained. -.Nm Uudecode -ignores any leading and trailing lines. -.Sh EXAMPLES -The following example packages up a source tree, compresses it, -uuencodes it and mails it to a user on another system. -When -.Nm uudecode -is run on the target system, the file ``src_tree.tar.Z'' will be -created which may then be uncompressed and extracted into the original -tree. -.Pp -.Bd -literal -offset indent -compact -tar cf \- src_tree \&| compress \&| -uuencode src_tree.tar.Z \&| mail sys1!sys2!user -.Ed -.Sh SEE ALSO -.Xr compress 1 , -.Xr mail 1 , -.Xr uucp 1 , -.Xr uuencode 5 , -.Xr format 5 -.Sh BUGS -The encoded form of the file is expanded by 35% (3 bytes become 4 plus -control information). -.Sh HISTORY -The -.Nm -command appeared in -.Bx 4.0 . diff --git a/src/cmd/uuencode/uuencode.c b/src/cmd/uuencode/uuencode.c deleted file mode 100644 index 774cee9..0000000 --- a/src/cmd/uuencode/uuencode.c +++ /dev/null @@ -1,150 +0,0 @@ -/*- - * Copyright (c) 1983, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef lint -char copyright[] = -"@(#) Copyright (c) 1983, 1993\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ - -#ifndef lint -static char sccsid[] = "@(#)uuencode.c 8.2 (Berkeley) 4/2/94"; -#endif /* not lint */ - -/* - * uuencode [input] output - * - * Encode a file so it can be mailed to a remote system. - */ -#include -#include - -#include - -int -main(argc, argv) - int argc; - char *argv[]; -{ - extern int optind; - extern int errno; - struct stat sb; - int mode; - char *strerror(); - - while (getopt(argc, argv, "") != EOF) - usage(); - argv += optind; - argc -= optind; - - switch(argc) { - case 2: /* optional first argument is input file */ - if (!freopen(*argv, "r", stdin) || fstat(fileno(stdin), &sb)) { - (void)fprintf(stderr, "uuencode: %s: %s.\n", - *argv, strerror(errno)); - exit(1); - } -#define RWX (S_IRWXU|S_IRWXG|S_IRWXO) - mode = sb.st_mode & RWX; - ++argv; - break; - case 1: -#define RW (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) - mode = RW & ~umask(RW); - break; - case 0: - default: - usage(); - } - - (void)printf("begin %o %s\n", mode, *argv); - encode(); - (void)printf("end\n"); - if (ferror(stdout)) { - (void)fprintf(stderr, "uuencode: write error.\n"); - exit(1); - } - exit(0); -} - -/* ENC is the basic 1 character encoding function to make a char printing */ -#define ENC(c) ((c) ? ((c) & 077) + ' ': '`') - -/* - * copy from in to out, encoding as you go along. - */ -encode() -{ - register int ch, n; - register char *p; - char buf[80]; - - while (n = fread(buf, 1, 45, stdin)) { - ch = ENC(n); - if (putchar(ch) == EOF) - break; - for (p = buf; n > 0; n -= 3, p += 3) { - ch = *p >> 2; - ch = ENC(ch); - if (putchar(ch) == EOF) - break; - ch = (*p << 4) & 060 | (p[1] >> 4) & 017; - ch = ENC(ch); - if (putchar(ch) == EOF) - break; - ch = (p[1] << 2) & 074 | (p[2] >> 6) & 03; - ch = ENC(ch); - if (putchar(ch) == EOF) - break; - ch = p[2] & 077; - ch = ENC(ch); - if (putchar(ch) == EOF) - break; - } - if (putchar('\n') == EOF) - break; - } - if (ferror(stdin)) { - (void)fprintf(stderr, "uuencode: read error.\n"); - exit(1); - } - ch = ENC('\0'); - (void)putchar(ch); - (void)putchar('\n'); -} - -usage() -{ - (void)fprintf(stderr,"usage: uuencode [infile] remotefile\n"); - exit(1); -} diff --git a/src/cmd/uuencode/uuencode.format.5 b/src/cmd/uuencode/uuencode.format.5 deleted file mode 100644 index 81591b8..0000000 --- a/src/cmd/uuencode/uuencode.format.5 +++ /dev/null @@ -1,102 +0,0 @@ -.\" Copyright (c) 1989, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)uuencode.format.5 8.2 (Berkeley) 1/12/94 -.\" -.Dd January 12, 1994 -.Dt UUENCODE 5 -.Os BSD 4 -.Sh NAME -.Nm uuencode -.Nd format of an encoded uuencode file -.Sh DESCRIPTION -Files output by -.Xr uuencode 1 -consist of a header line, -followed by a number of body lines, -and a trailer line. -The -.Xr uudecode 1 -command -will ignore any lines preceding the header or -following the trailer. -Lines preceding a header must not, of course, -look like a header. -.Pp -The header line is distinguished by having the first -6 characters -.Dq begin\ \& -(note the trailing space). -The word -.Em begin -is followed by a mode (in octal), -and a string which names the remote file. -A space separates the three items in the header line. -.Pp -The body consists of a number of lines, each at most 62 characters -long (including the trailing newline). -These consist of a character count, -followed by encoded characters, -followed by a newline. -The character count is a single printing character, -and represents an integer, the number of bytes -the rest of the line represents. -Such integers are always in the range from 0 to 63 and can -be determined by subtracting the character space (octal 40) -from the character. -.Pp -Groups of 3 bytes are stored in 4 characters, 6 bits per character. -All are offset by a space to make the characters printing. -The last line may be shorter than the normal 45 bytes. -If the size is not a multiple of 3, this fact can be determined -by the value of the count on the last line. -Extra garbage will be included to make the character count a multiple -of 4. -The body is terminated by a line with a count of zero. -This line consists of one -.Tn ASCII -space. -.Pp -The trailer line consists of -.Dq end -on a line by itself. -.Sh SEE ALSO -.Xr uuencode 1 , -.Xr uudecode 1 , -.Xr uusend 1 , -.Xr uucp 1 , -.Xr mail 1 -.Sh HISTORY -The -.Nm uuencode -file format appeared in -.Bx 4.0 . -.\" It was named uuencode.5 prior to 4.3 diff --git a/src/games/caesar/caesar.c b/src/games/caesar/caesar.c index b002786..b54e641 100644 --- a/src/games/caesar/caesar.c +++ b/src/games/caesar/caesar.c @@ -38,19 +38,9 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ - -#ifndef lint -static char copyright[] = -"@(#) Copyright (c) 1989, 1993\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ - -#ifndef lint -static char sccsid[] = "@(#)caesar.c 8.1 (Berkeley) 5/31/93"; -#endif /* not lint */ - #include #include +#include #include #include @@ -77,7 +67,6 @@ main(argc, argv) register int ch, dot, i, nread, winnerdot; register char *inbuf; int obs[26], try, winner; - char *malloc(), *strerror(); if (argc > 1) printit(argv[1]); diff --git a/src/games/pom/pom.c b/src/games/pom/pom.c index 01fcf7d..36816e3 100644 --- a/src/games/pom/pom.c +++ b/src/games/pom/pom.c @@ -33,16 +33,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static char copyright[] = -"@(#) Copyright (c) 1989, 1993\n\ - The Regents of the University of California. All rights reserved.\n"; -#endif /* not lint */ - -#ifndef lint -static char sccsid[] = "@(#)pom.c 8.1 (Berkeley) 5/31/93"; -#endif /* not lint */ - /* * Phase of the Moon. Calculates the current phase of the moon. * Based on routines from `Practical Astronomy with Your Calculator', @@ -55,6 +45,7 @@ static char sccsid[] = "@(#)pom.c 8.1 (Berkeley) 5/31/93"; #include #include +#include #include #include diff --git a/sys/pic32/MAKEDEV.sh b/sys/pic32/MAKEDEV.sh deleted file mode 100644 index 0d4e40c..0000000 --- a/sys/pic32/MAKEDEV.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh - -# -# Copyright (c) 1980 Regents of the University of California. -# All rights reserved. The Berkeley software License Agreement -# specifies the terms and conditions for redistribution. -# -# Device "make" file. Valid arguments: -# std standard devices -# local configuration specific devices -# fd file descriptor driver -# Disks: -# sd* flash cards SecureDigital -# Pseudo terminals: -# pty* set of 16 master and slave pseudo terminals - -PATH=/etc:/sbin:/usr/sbin:/bin:/usr/bin -umask 77 -for i -do -case $i in - -std) - mknod console c 0 0 - mknod mem c 1 0 ; chmod 640 mem ; chgrp kmem mem - mknod kmem c 1 1 ; chmod 640 kmem ; chgrp kmem kmem - mknod null c 1 2 ; chmod 666 null - mknod zero c 1 3 ; chmod 444 zero - mknod tty c 2 0 ; chmod 666 tty - mknod klog c 4 0 ; chmod 600 klog - mknod errlog c 4 1 ; chmod 600 errlog - mknod acctlog c 4 2 ; chmod 600 acctlog - ;; - -fd) - umask 0 - rm -rf fd - rm -f stdin stdout stderr - mkdir fd - chmod 755 fd - mknod stdin c 5 0 - mknod stdout c 5 1 - mknod stderr c 5 2 - eval `echo "" | awk '{ for (i = 0; i < 32; i++) - printf("mknod fd/%d c 5 %d; ",i,i); }'` - ;; - -sd*) - # The 2.11BSD sd driver doesn't support partitions. We create - # a single block and character inode pair for each unit and - # call it sdNh. - umask 2 - unit=`expr $i : '..\(.*\)'` - mknod sd${unit}h b 0 ${unit} - mknod rsd${unit}h c 3 ${unit} - chgrp operator sd${unit}h rsd${unit}h - chmod 640 sd${unit}h rsd${unit}h - ;; - -local) - sh MAKEDEV.local - ;; -esac -done