home *** CD-ROM | disk | FTP | other *** search
- --- usermem.orig Fri Dec 30 13:20:51 1994
- +++ usermem Fri Dec 30 13:25:11 1994
- @@ -12,13 +12,9 @@
- CLICKSIZE=512
- eval $*
-
- -SIZE=0
- -if test -r /usr/adm/messages # probably the most transportable
- -then
- - SIZE=`grep avail /usr/adm/messages | sed -n '$s/.*[ ]//p'`
- -fi
- +SIZE=`cat /proc/meminfo | head -2 | tail -1 | cut -b24-32`
-
- -if test 0$SIZE -le 0 # no SIZE in /usr/adm/messages
- +if test $SIZE -le 0 # no SIZE in /usr/adm/messages
- then
- if test -r $KMEM # Readable KMEM
- then
- @@ -40,11 +36,11 @@
- if test -n "$UNIX"
- then
- SIZE=`echo maxmem/D | adb $UNIX $KMEM | sed -n '$s/.*[ ]//p'`
- - if test 0$SIZE -le 0
- + if test $SIZE -le 0
- then
- SIZE=`echo physmem/D | adb $UNIX $KMEM | sed -n '$s/.*[ ]//p'`
- fi
- - SIZE=`expr 0$SIZE '*' $CLICKSIZE`
- + SIZE=`expr $SIZE '*' $CLICKSIZE`
- fi
- fi
- fi
- @@ -61,7 +57,7 @@
- ;;
- esac
-
- -if test 0$SIZE -le 0
- +if test $SIZE -le 0
- then
- echo 0;exit 1
- else
- --- Makefile.orig Fri Dec 30 13:26:31 1994
- +++ Makefile Fri Dec 30 13:27:28 1994
- @@ -1,5 +1,6 @@
- CC=cc
- -COMFLAGS=-O
- +COMFLAGS=-O2
- +LDFLAGS=-s
- BIN=/usr/bin
- MAN=/usr/man/man1
- #define to "l" if manuals go on /usr/man/manl
- @@ -8,7 +9,7 @@
- all : compress atob btoa
-
- compress : compress.c USERMEM
- - $(CC) $(COMFLAGS) -DUSERMEM=`cat USERMEM` -o compress compress.c
- + $(CC) $(LDFLAGS) $(COMFLAGS) -DUSERMEM=`cat USERMEM` -o compress compress.c
-
- # USERMEM may have to be set by hand. It should contain the amount of
- # available user memory in bytes. See the README file for more info.
- @@ -16,10 +17,10 @@
- sh usermem > USERMEM
-
- atob: atob.c
- - $(CC) $(COMFLAGS) -o atob atob.c
- + $(CC) $(LDFLAGS) $(COMFLAGS) -o atob atob.c
-
- btoa: btoa.c
- - $(CC) $(COMFLAGS) -o btoa btoa.c
- + $(CC) $(LDFLAGS) $(COMFLAGS) -o btoa btoa.c
-
- install: compress atob btoa zmore zcmp zdiff compressdir uncompressdir btoa.1 compress.1 compressdir.1 zmore.1 zcmp.1 tarmail untarmail
- cp compress $(BIN)
-