ray_num = 0;
if (radar_verbose_flag)
fprintf(stderr,"Processing sweep %d for %d rays.", i, nrays);
- if (radar_verbose_flag)
+ if (radar_verbose_flag) {
if (little_endian()) fprintf(stderr," ... On Little endian.\n");
else fprintf(stderr,"\n");
+ }
/* Now LOOP for all rays within this particular sweep (i).
uf_ma[37] = tm->tm_year % 100; /* Same format as data year */
uf_ma[38] = tm->tm_mon+1;
uf_ma[39] = tm->tm_mday;
- memcpy(&uf_ma[40], "RSL" RSL_VERSION_STR, 8);
+ memcpy(&uf_ma[40], "RSL" VERSION, 8);
if (little_endian()) swap2(&uf_ma[40], 8/2);
uf_ma[44] = (signed short)UF_NO_DATA;
len_ma = 45;
rec_len =(int)uf_ma[1]*2;
save_rec_len = rec_len; /* We destroy 'rec_len' when making it
big endian on a little endian machine. */
- if (little_endian()) swap_4_bytes(&rec_len);
- (void)fwrite(&rec_len, sizeof(int), 1, fp);
- if (little_endian()) swap_uf_buffer(uf);
- (void)fwrite(uf, sizeof(char), save_rec_len, fp);
- (void)fwrite(&rec_len, sizeof(int), 1, fp);
+ if (little_endian())
+ swap_4_bytes(&rec_len);
+ if (fwrite(&rec_len, sizeof(int), 1, fp) != 1)
+ perror("RSL_radar_to_uf_fp: short write");
+ if (little_endian())
+ swap_uf_buffer(uf);
+ if (fwrite(uf, sizeof(char), save_rec_len, fp) != 1)
+ perror("RSL_radar_to_uf_fp: short write");
+ if (fwrite(&rec_len, sizeof(int), 1, fp) != 1)
+ perror("RSL_radar_to_uf_fp: short write");
} /* if (ray) */
}
}