1 diff -ru rsl-v1.40.pre/africa_to_radar.c rsl-v1.40/africa_to_radar.c
2 --- rsl-v1.40.pre/africa_to_radar.c 2009-05-14 10:26:55.000000000 +0000
3 +++ rsl-v1.40/africa_to_radar.c 2009-05-14 10:27:13.000000000 +0000
6 fp = fopen(infile, "r");
8 - fp = uncompress_pipe(fp);
9 + fp = gunzip_pipe(fp);
12 radar = RSL_new_radar(MAX_RADAR_VOLUMES);
13 diff -ru rsl-v1.40.pre/anyformat_to_radar.c rsl-v1.40/anyformat_to_radar.c
14 --- rsl-v1.40.pre/anyformat_to_radar.c 2009-05-14 10:26:55.000000000 +0000
15 +++ rsl-v1.40/anyformat_to_radar.c 2009-05-14 10:27:13.000000000 +0000
19 /* Read the magic bytes. */
20 - fp = uncompress_pipe(fp); /* If gzip available. */
21 + fp = gunzip_pipe(fp); /* If gzip available. */
22 if (fread(magic, sizeof(magic), 1, fp) != 1) {
23 char *magic_str = (char *)calloc(sizeof(magic)+1, sizeof(char));
24 memcpy(magic_str, magic, sizeof(magic));
25 diff -ru rsl-v1.40.pre/dorade_to_radar.c rsl-v1.40/dorade_to_radar.c
26 --- rsl-v1.40.pre/dorade_to_radar.c 2009-05-14 10:26:55.000000000 +0000
27 +++ rsl-v1.40/dorade_to_radar.c 2009-05-14 10:27:13.000000000 +0000
32 - fp = uncompress_pipe(fp); /* Transparently, use gunzip. */
33 + fp = gunzip_pipe(fp); /* Transparently, use gunzip. */
35 /**********************************************************************/
37 diff -ru rsl-v1.40.pre/gzip.c rsl-v1.40/gzip.c
38 --- rsl-v1.40.pre/gzip.c 2009-05-14 10:26:55.000000000 +0000
39 +++ rsl-v1.40/gzip.c 2009-05-14 10:28:40.000000000 +0000
42 /* Prototype definitions within this file. */
43 int no_command (char *cmd);
44 -FILE *uncompress_pipe (FILE *fp);
45 -FILE *compress_pipe (FILE *fp);
46 +FILE *gunzip_pipe (FILE *fp);
47 +FILE *gzip_pipe (FILE *fp);
50 /* Avoids the 'Broken pipe' message by reading the rest of the stream. */
55 -FILE *uncompress_pipe (FILE *fp)
56 +FILE *gunzip_pipe (FILE *fp)
58 /* Pass the file pointed to by 'fp' through the gzip pipe. */
63 fpipe = popen("gzip -q -d -f --stdout", "r");
64 - if (fpipe == NULL) perror("uncompress_pipe");
65 + if (fpipe == NULL) perror("gunzip_pipe");
71 -FILE *compress_pipe (FILE *fp)
72 +FILE *gzip_pipe (FILE *fp)
74 /* Pass the file pointed to by 'fp' through the gzip pipe. */
79 fpipe = popen("gzip -q -1 -c", "w");
80 - if (fpipe == NULL) perror("compress_pipe");
81 + if (fpipe == NULL) perror("gzip_pipe");
85 diff -ru rsl-v1.40.pre/lassen_to_radar.c rsl-v1.40/lassen_to_radar.c
86 --- rsl-v1.40.pre/lassen_to_radar.c 2009-05-14 10:26:55.000000000 +0000
87 +++ rsl-v1.40/lassen_to_radar.c 2009-05-14 10:27:13.000000000 +0000
92 - f = uncompress_pipe(f); /* Transparently, use gunzip. */
93 + f = gunzip_pipe(f); /* Transparently, use gunzip. */
94 #define NEW_BUFSIZ 16384
95 setvbuf(f,NULL,_IOFBF,(size_t)NEW_BUFSIZ); /* Faster i/o? */
97 diff -ru rsl-v1.40.pre/mcgill.c rsl-v1.40/mcgill.c
98 --- rsl-v1.40.pre/mcgill.c 2009-05-14 10:26:55.000000000 +0000
99 +++ rsl-v1.40/mcgill.c 2009-05-14 10:27:13.000000000 +0000
104 -FILE *uncompress_pipe (FILE *fp);
105 +FILE *gunzip_pipe (FILE *fp);
107 /**********************************************************************/
108 mcgFile_t *mcgFileOpen(int *code, char *filename)
110 *code = MCG_OPEN_FILE_ERR;
113 - file->fp = uncompress_pipe(file->fp); /* Transparently, use gunzip. */
114 + file->fp = gunzip_pipe(file->fp); /* Transparently, use gunzip. */
115 /* Read first (header) record from data file into buffer */
116 if (fread(buffer, sizeof(char), MCG_RECORD, file->fp) < MCG_RECORD)
118 diff -ru rsl-v1.40.pre/nsig.c rsl-v1.40/nsig.c
119 --- rsl-v1.40.pre/nsig.c 2009-05-14 10:26:55.000000000 +0000
120 +++ rsl-v1.40/nsig.c 2009-05-14 10:27:13.000000000 +0000
125 -FILE *uncompress_pipe(FILE *fp);
126 +FILE *gunzip_pipe(FILE *fp);
127 int big_endian(void);
128 int little_endian(void);
129 void swap_4_bytes(void *word);
134 - fp = uncompress_pipe(fp); /* Transparently gunzip. */
135 + fp = gunzip_pipe(fp); /* Transparently gunzip. */
139 diff -ru rsl-v1.40.pre/radar_to_uf.c rsl-v1.40/radar_to_uf.c
140 --- rsl-v1.40.pre/radar_to_uf.c 2009-05-14 10:26:55.000000000 +0000
141 +++ rsl-v1.40/radar_to_uf.c 2009-05-14 10:27:13.000000000 +0000
146 - fp = compress_pipe(fp);
147 + fp = gzip_pipe(fp);
148 RSL_radar_to_uf_fp(r, fp);
151 diff -ru rsl-v1.40.pre/rainbow_to_radar.c rsl-v1.40/rainbow_to_radar.c
152 --- rsl-v1.40.pre/rainbow_to_radar.c 2009-05-14 10:26:55.000000000 +0000
153 +++ rsl-v1.40/rainbow_to_radar.c 2009-05-14 10:27:13.000000000 +0000
158 - fp = uncompress_pipe(fp); /* Transparently gunzip. */
159 + fp = gunzip_pipe(fp); /* Transparently gunzip. */
161 /* Read first character and verify file format. */
163 diff -ru rsl-v1.40.pre/rapic_to_radar.c rsl-v1.40/rapic_to_radar.c
164 --- rsl-v1.40.pre/rapic_to_radar.c 2009-05-14 10:26:55.000000000 +0000
165 +++ rsl-v1.40/rapic_to_radar.c 2009-05-14 10:27:13.000000000 +0000
170 - fp = uncompress_pipe(fp); /* Transparently gunzip. */
171 + fp = gunzip_pipe(fp); /* Transparently gunzip. */
172 close(0); dup(fileno(fp)); /* Redirect stdin. */
175 diff -ru rsl-v1.40.pre/read_write.c rsl-v1.40/read_write.c
176 --- rsl-v1.40.pre/read_write.c 2009-05-14 10:26:55.000000000 +0000
177 +++ rsl-v1.40/read_write.c 2009-05-14 10:27:13.000000000 +0000
182 - fp = uncompress_pipe(fp);
183 + fp = gunzip_pipe(fp);
184 (void)fread(title, sizeof(char), sizeof(title), fp);
185 if (strncmp(title, "RSL", 3) != 0) return NULL;
191 - fp = compress_pipe(fp);
192 + fp = gzip_pipe(fp);
193 n = RSL_write_radar_fp(radar, fp);
196 diff -ru rsl-v1.40.pre/rsl.h rsl-v1.40/rsl.h
197 --- rsl-v1.40.pre/rsl.h 2009-05-14 10:26:55.000000000 +0000
198 +++ rsl-v1.40/rsl.h 2009-05-14 10:27:13.000000000 +0000
200 Histogram *RSL_read_histogram(char *infile);
202 int no_command (char *cmd);
203 -FILE *uncompress_pipe (FILE *fp);
204 -FILE *compress_pipe (FILE *fp);
205 +FILE *gunzip_pipe (FILE *fp);
206 +FILE *gzip_pipe (FILE *fp);
207 +FILE *bunzip2_pipe (FILE *fp);
208 +FILE *bzip2_pipe (FILE *fp);
209 int rsl_pclose(FILE *fp);
211 /* Carpi image generation functions. These are modified clones of the
212 diff -ru rsl-v1.40.pre/toga.c rsl-v1.40/toga.c
213 --- rsl-v1.40.pre/toga.c 2009-05-14 10:26:55.000000000 +0000
214 +++ rsl-v1.40/toga.c 2009-05-14 10:27:13.000000000 +0000
216 int tg_read_ray(tg_file_str *);
217 void tg_prt_head(tg_map_head_str *,int);
219 -FILE *uncompress_pipe (FILE *fp);
220 +FILE *gunzip_pipe (FILE *fp);
223 int tg_open(char *filename,tg_file_str *tg_file)
225 /* Unfortunately, there is no tg_close to modularize the following
226 * pipe close. Shouldn't be any problems anyway.
228 - (void) uncompress_pipe(fdopen(tg_file->fd, "r")); /* Redirect through gunzip. */
229 + (void) gunzip_pipe(fdopen(tg_file->fd, "r")); /* Redirect through gunzip. */
230 /* initialize buffer pointers, flags */
231 tg_file->buf_ind = 32769;
232 tg_file->buf_end = 32769;
233 diff -ru rsl-v1.40.pre/uf_to_radar.c rsl-v1.40/uf_to_radar.c
234 --- rsl-v1.40.pre/uf_to_radar.c 2009-05-14 10:26:55.000000000 +0000
235 +++ rsl-v1.40/uf_to_radar.c 2009-05-14 10:27:13.000000000 +0000
240 - fp = uncompress_pipe(fp); /* Transparently gunzip. */
241 + fp = gunzip_pipe(fp); /* Transparently gunzip. */
242 radar = RSL_uf_to_radar_fp(fp);
245 diff -ru rsl-v1.40.pre/wsr88d.c rsl-v1.40/wsr88d.c
246 --- rsl-v1.40.pre/wsr88d.c 2009-05-14 10:26:55.000000000 +0000
247 +++ rsl-v1.40/wsr88d.c 2009-05-14 10:27:13.000000000 +0000
251 if (wf->fptr == NULL) return NULL;
252 - wf->fptr = uncompress_pipe(wf->fptr);
253 + wf->fptr = gunzip_pipe(wf->fptr);
254 #define NEW_BUFSIZ 16384
255 setvbuf(wf->fptr,NULL,_IOFBF,(size_t)NEW_BUFSIZ); /* Faster i/o? */
257 diff -ru rsl-v1.40.pre/wsr88d.h rsl-v1.40/wsr88d.h
258 --- rsl-v1.40.pre/wsr88d.h 2009-05-14 10:26:55.000000000 +0000
259 +++ rsl-v1.40/wsr88d.h 2009-05-14 10:27:13.000000000 +0000
261 float wsr88d_get_frequency(Wsr88d_ray *ray);
263 int no_command (char *cmd);
264 -FILE *uncompress_pipe (FILE *fp);
265 -FILE *compress_pipe (FILE *fp);
266 +FILE *gunzip_pipe (FILE *fp);
267 +FILE *gzip_pipe (FILE *fp);
268 int rsl_pclose(FILE *fp);