home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / A / BIN / COMPRESS.DIF / compress.diff
Encoding:
Text File  |  1994-12-30  |  1.9 KB  |  74 lines

  1. --- usermem.orig    Fri Dec 30 13:20:51 1994
  2. +++ usermem    Fri Dec 30 13:25:11 1994
  3. @@ -12,13 +12,9 @@
  4.  CLICKSIZE=512
  5.  eval $*
  6.  
  7. -SIZE=0
  8. -if test -r /usr/adm/messages    # probably the most transportable
  9. -then
  10. -    SIZE=`grep avail /usr/adm/messages | sed -n '$s/.*[     ]//p'`
  11. -fi
  12. +SIZE=`cat /proc/meminfo | head -2 | tail -1 | cut -b24-32`
  13.  
  14. -if test 0$SIZE -le 0        # no SIZE in /usr/adm/messages
  15. +if test $SIZE -le 0        # no SIZE in /usr/adm/messages
  16.  then
  17.      if test -r $KMEM        # Readable KMEM
  18.      then
  19. @@ -40,11 +36,11 @@
  20.      if test -n "$UNIX"
  21.      then
  22.          SIZE=`echo maxmem/D | adb $UNIX $KMEM | sed -n '$s/.*[     ]//p'`
  23. -        if test 0$SIZE -le 0
  24. +        if test $SIZE -le 0
  25.          then
  26.          SIZE=`echo physmem/D | adb $UNIX $KMEM | sed -n '$s/.*[     ]//p'`
  27.          fi
  28. -        SIZE=`expr 0$SIZE '*' $CLICKSIZE`
  29. +        SIZE=`expr $SIZE '*' $CLICKSIZE`
  30.      fi
  31.      fi
  32.  fi
  33. @@ -61,7 +57,7 @@
  34.      ;;
  35.  esac
  36.  
  37. -if test 0$SIZE -le 0
  38. +if test $SIZE -le 0
  39.  then
  40.      echo 0;exit 1
  41.  else
  42. --- Makefile.orig    Fri Dec 30 13:26:31 1994
  43. +++ Makefile    Fri Dec 30 13:27:28 1994
  44. @@ -1,5 +1,6 @@
  45.  CC=cc
  46. -COMFLAGS=-O
  47. +COMFLAGS=-O2
  48. +LDFLAGS=-s
  49.  BIN=/usr/bin
  50.  MAN=/usr/man/man1
  51.  #define to "l" if manuals go on /usr/man/manl
  52. @@ -8,7 +9,7 @@
  53.  all :    compress atob btoa
  54.  
  55.  compress : compress.c USERMEM
  56. -    $(CC) $(COMFLAGS) -DUSERMEM=`cat USERMEM` -o compress compress.c
  57. +    $(CC) $(LDFLAGS) $(COMFLAGS) -DUSERMEM=`cat USERMEM` -o compress compress.c
  58.  
  59.  # USERMEM may have to be set by hand.  It should contain the amount of
  60.  # available user memory in bytes.  See the README file for more info.
  61. @@ -16,10 +17,10 @@
  62.      sh usermem > USERMEM
  63.  
  64.  atob:    atob.c
  65. -    $(CC) $(COMFLAGS) -o atob atob.c
  66. +    $(CC) $(LDFLAGS) $(COMFLAGS) -o atob atob.c
  67.  
  68.  btoa:    btoa.c
  69. -    $(CC) $(COMFLAGS) -o btoa btoa.c
  70. +    $(CC) $(LDFLAGS) $(COMFLAGS) -o btoa btoa.c
  71.  
  72.  install: compress atob btoa zmore zcmp zdiff compressdir uncompressdir btoa.1 compress.1 compressdir.1 zmore.1 zcmp.1 tarmail untarmail
  73.      cp compress $(BIN)
  74.