home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / sci / geo / meteorol / 3674 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.4 KB  |  92 lines

  1. Newsgroups: sci.geo.meteorology
  2. Path: sparky!uunet!spsgate!mogate!newsgate!melton.sps.mot.com!rhca80
  3. From: rhca80@melton.sps.mot.com (Henry Melton)
  4. Subject: removing the map from the weather gifs
  5. Message-ID: <1993Jan26.220928.9525@newsgate.sps.mot.com>
  6. Sender: usenet@newsgate.sps.mot.com
  7. Nntp-Posting-Host: 222.1.248.94
  8. Organization: SPS
  9. Date: Tue, 26 Jan 1993 22:09:28 GMT
  10. Lines: 80
  11.  
  12. I have been meaning to post this for some time, it has been working
  13. nicely at my location for about a month to provide a weather photo
  14. backdrop to my screen without that irritating political map.  giftoppm
  15. and ppmtogif are from the pbmplus utilities of course.
  16.  
  17.  
  18. #!/bin/sh
  19. # This is a shell archive (produced by shar 3.49)
  20. # To extract the files from this archive, save it to a file, remove
  21. # everything above the "!/bin/sh" line above, and type "sh file_name".
  22. #
  23. # made 01/26/1993 22:09 UTC by ???@melton
  24. # Source directory /y
  25. #
  26. # existing files will NOT be overwritten unless -c is specified
  27. #
  28. # This shar contains:
  29. # length  mode       name
  30. # ------ ---------- ------------------------------------------
  31. #     55 -rwxr-xr-x remove_map
  32. #    258 -rw-r--r-- nomap.c
  33. #
  34. # ============= remove_map ==============
  35. if test -f 'remove_map' -a X"$1" != X"-c"; then
  36.     echo 'x - skipping remove_map (File already exists)'
  37. else
  38. echo 'x - extracting remove_map (Text)'
  39. sed 's/^X//' << 'SHAR_EOF' > 'remove_map' &&
  40. #!/bin/sh
  41. giftoppm CVIS.GIF |nomap|ppmtogif > NVIS.GIF
  42. SHAR_EOF
  43. chmod 0755 remove_map ||
  44. echo 'restore of remove_map failed'
  45. Wc_c="`wc -c < 'remove_map'`"
  46. test 55 -eq "$Wc_c" ||
  47.     echo 'remove_map: original size 55, current size' "$Wc_c"
  48. fi
  49. # ============= nomap.c ==============
  50. if test -f 'nomap.c' -a X"$1" != X"-c"; then
  51.     echo 'x - skipping nomap.c (File already exists)'
  52. else
  53. echo 'x - extracting nomap.c (Text)'
  54. sed 's/^X//' << 'SHAR_EOF' > 'nomap.c' &&
  55. #include <stdio.h>
  56. X
  57. main()
  58. {
  59. X    FILE *fp,*fopen();
  60. X
  61. X    filecopy(stdin);
  62. }
  63. X    
  64. filecopy(fp)
  65. FILE *fp;
  66. {
  67. X        int     c;
  68. X    int    good;
  69. X
  70. X        while ((c = getc(fp)) != EOF)
  71. X    {
  72. X        if (c < 254)
  73. X            good = c;
  74. X        else
  75. X            c = good;
  76. X        
  77. X                putc(c,stdout);
  78. X    }
  79. }
  80. X
  81. SHAR_EOF
  82. chmod 0644 nomap.c ||
  83. echo 'restore of nomap.c failed'
  84. Wc_c="`wc -c < 'nomap.c'`"
  85. test 258 -eq "$Wc_c" ||
  86.     echo 'nomap.c: original size 258, current size' "$Wc_c"
  87. fi
  88. exit 0
  89. -- 
  90. Henry Melton rhca80@melton.sps.mot.com or henry@hutto.cactus.org    
  91. Read my story "The Christmas Count" in CHRISTMAS STARS  TOR books 
  92.