home *** CD-ROM | disk | FTP | other *** search
/ Internet File Formats / InternetFileFormatsCD.bin / graphics / tiff / unix / archive.z / archive / text0028.txt < prev    next >
Encoding:
Text File  |  1995-09-20  |  2.8 KB  |  105 lines

  1.  
  2. #---------------------------------- cut here ----------------------------------
  3. # This is a shell archive.  Remove anything before this line,
  4. # then unpack it by saving it in a file and typing "sh file".
  5. #
  6. # Wrapped by Peder Langlo <pederl@hpubgon> on Wed Dec 14 18:17:26 1994
  7. #
  8. # This archive contains:
  9. #    Star_21x20.tiff    
  10. #
  11. # Existing files will not be overwritten.
  12.  
  13. LANG=""; export LANG
  14. PATH=/bin:/usr/bin:$PATH; export PATH
  15.  
  16. if test -f Star_21x20.tiff
  17. then
  18.     echo Ok to overwrite existing file Star_21x20.tiff\?
  19.     read answer
  20.     case "$answer" in
  21.     [yY]*)    echo Proceeding;;
  22.     *)    echo Aborting; exit 1;;
  23.     esac
  24.     rm -f Star_21x20.tiff
  25.     if test -f Star_21x20.tiff
  26.     then
  27.         echo Error: could not remove Star_21x20.tiff, aborting
  28.         exit 1
  29.     fi
  30. fi
  31.  
  32. rm -f /tmp/uud$$
  33. (echo "begin 666 /tmp/uud$$\n#;VL*n#6%@x\n \nend" | uudecode) >/dev/null 2>&1
  34. if [ X"`cat /tmp/uud$$ 2>&1`" = Xok ]
  35. then
  36.     unpacker=uudecode
  37. else
  38.     echo Compiling unpacker for non-ascii files
  39.     pwd=`pwd`; cd /tmp
  40.     cat >unpack$$.c <<'EOF'
  41. #include <stdio.h>
  42. #define C (*p++ - ' ' & 077)
  43. main()
  44. {
  45.     int n;
  46.     char buf[128], *p, a,b;
  47.  
  48.     scanf("begin %o ", &n);
  49.     gets(buf);
  50.  
  51.     if (freopen(buf, "w", stdout) == NULL) {
  52.         perror(buf);
  53.         exit(1);
  54.     }
  55.  
  56.     while (gets(p=buf) && (n=C)) {
  57.         while (n>0) {
  58.             a = C;
  59.             if (n-- > 0) putchar(a << 2 | (b=C) >> 4);
  60.             if (n-- > 0) putchar(b << 4 | (a=C) >> 2);
  61.             if (n-- > 0) putchar(a << 6 | C);
  62.         }
  63.     }
  64.     exit(0);
  65. }
  66. EOF
  67.     cc -o unpack$$ unpack$$.c
  68.     rm unpack$$.c
  69.     cd $pwd
  70.     unpacker=/tmp/unpack$$
  71. fi
  72. rm -f /tmp/uud$$
  73.  
  74. echo x - Star_21x20.tiff '[non-ascii]'
  75. $unpacker <<'@eof'
  76. begin 644 Star_21x20.tiff
  77. M34T *@   HC_________________________________________\/______X
  78. M____________ / /___________________P__________________\ \ __X
  79. M__________________#________________P#P#P#P#_________________X
  80. M\/________________ /\/ / /_________________P________________X
  81. M\ [P\ \ \ ________________#______________P#P#O#P#P#P#_______X
  82. M________\/______________ /\.\/\/ / / /_____________P\ \ \ \ X
  83. M\ \ \ \ [P_P[P\ \ \ \ \ \ \ \ \ __#__P#P#O#_#O#_#O#_#O#_#O#_X
  84. M#O#_#O#P#P#P#___\/____ / / .\.\/\.\.\.\/\.\.\/ / / / /_____PX
  85. M______\ \ \ _P[P_P[P_P[P_P\ \ \ \ ________#__________P#P#O#OX
  86. M#_#O#O#P#P#P#P#_________\/__________ / .\/\.\/\.\/ / / /____X
  87. M_______P__________\ [P_P[P\ [P_P[P\ \ ____________#________PX
  88. M#P#_#O#P#P#P#O#_#P#P#P#_________\/________ /\.\/ / / / / .\/X
  89. M\/ / /_________P________\ [P\ \ \ ____\ \ [P\ \ \ ________#_X
  90. M_____P#P#P#P#P#________P#P#P#P#P#_______\/______ / / /______X
  91. M__________ / / /_______P  P!   #     0 5   ! 0 #     0 4   !X
  92. M @ #     P   QX! P #     0 !   !!@ #     0 "   !$0 $     0  X
  93. M  @!%0 #     0 #   !%P $     0   H !&@ %     0   R0!&P %    X
  94. M 0   RP!'  #     0 !   !*  #     0 "          0 !  $  K\@   X
  95. *)Q  "OR    G$                                               X
  96.                                                              X
  97. end
  98. @eof
  99.  
  100. chmod 644 Star_21x20.tiff
  101.  
  102. rm -f /tmp/unpack$$
  103. exit 0
  104.  
  105.