From: Andy Spencer Date: Thu, 7 Jul 2011 02:53:18 +0000 (+0000) Subject: Update RSL patches X-Git-Tag: v0.5.1~5 X-Git-Url: http://pileus.org/git/?p=aweather;a=commitdiff_plain;h=93257548e273ce3cf8d57d0705f585e0b16023af Update RSL patches --- diff --git a/opt/rsl/rsl-automake.patch b/opt/rsl/rsl-automake.patch index 1d1b308..270873a 100644 --- a/opt/rsl/rsl-automake.patch +++ b/opt/rsl/rsl-automake.patch @@ -1,6 +1,7 @@ -diff -ru rsl-v1.40/colors/Makefile.am rsl-v1.40.new/colors/Makefile.am ---- rsl-v1.40/colors/Makefile.am 1999-12-10 03:28:38.000000000 +0000 -+++ rsl-v1.40.new/colors/Makefile.am 2008-12-27 11:26:01.000000000 +0000 +diff --git a/colors/Makefile.am b/colors/Makefile.am +index 709a367..b043f7f 100644 +--- a/colors/Makefile.am ++++ b/colors/Makefile.am @@ -1,6 +1,6 @@ AUTOMAKE_OPTIONS = foreign @@ -9,21 +10,10 @@ diff -ru rsl-v1.40/colors/Makefile.am rsl-v1.40.new/colors/Makefile.am color_DATA = *.??? EXTRA_DIST = $(color_DATA) -diff -ru rsl-v1.40/colors/Makefile.in rsl-v1.40.new/colors/Makefile.in ---- rsl-v1.40/colors/Makefile.in 2008-12-27 11:30:45.000000000 +0000 -+++ rsl-v1.40.new/colors/Makefile.in 2008-12-27 11:26:07.000000000 +0000 -@@ -166,7 +166,7 @@ - sysconfdir = @sysconfdir@ - target_alias = @target_alias@ - AUTOMAKE_OPTIONS = foreign --colordir = $(prefix)/lib/colors -+colordir = $(datadir)/rsl/colors - color_DATA = *.??? - EXTRA_DIST = $(color_DATA) - all: all-am -diff -ru rsl-v1.40/Makefile.am rsl-v1.40.new/Makefile.am ---- rsl-v1.40/Makefile.am 2008-10-10 20:06:57.000000000 +0000 -+++ rsl-v1.40.new/Makefile.am 2008-12-27 11:25:59.000000000 +0000 +diff --git a/Makefile.am b/Makefile.am +index 3c106a8..6aca2ec 100644 +--- a/Makefile.am ++++ b/Makefile.am @@ -1,73 +1,49 @@ ## Process w/ automake. Or, autoreconf; make ## +AM_CFLAGS = -DDATADIR="\"$(datadir)/rsl\"" @@ -36,7 +26,7 @@ diff -ru rsl-v1.40/Makefile.am rsl-v1.40.new/Makefile.am - lib_LTLIBRARIES = librsl.la --librsl_la_LDFLAGS = -version-info 1:40 +-librsl_la_LDFLAGS = -version-info 1:41 -librsl_la_SOURCES = \ -$(rapic_c) $(radtec_c)\ -dorade.c dorade_print.c dorade_to_radar.c\ @@ -67,7 +57,7 @@ diff -ru rsl-v1.40/Makefile.am rsl-v1.40.new/Makefile.am + wsr88d.h \ + $(include_HEADERS) + -+librsl_la_LDFLAGS = -version-info 1:40 ++librsl_la_LDFLAGS = -version-info 1:41 +librsl_la_SOURCES = \ + $(rapic_c) $(radtec_c) \ + dorade.c dorade_print.c dorade_to_radar.c \ @@ -119,12 +109,13 @@ diff -ru rsl-v1.40/Makefile.am rsl-v1.40.new/Makefile.am - $(INSTALL) -m 644 toolkit_1BC-51_appl.h $(includedir) - $(INSTALL) -m 644 wsr88d_locations.dat $(libdir) - - EXTRA_DIST = CHANGES CHECK_LIST Copyright GPL LGPL wsr88d_locations.dat rapic.h + EXTRA_DIST = CHANGES Copyright GPL LGPL wsr88d_locations.dat rapic.h DISTCLEANFILES = rapic.c rapic-lex.c -diff -ru rsl-v1.40/radar.c rsl-v1.40.new/radar.c ---- rsl-v1.40/radar.c 2006-08-09 19:35:53.000000000 +0000 -+++ rsl-v1.40.new/radar.c 2008-12-27 11:13:43.000000000 +0000 +diff --git a/radar.c b/radar.c +index 4078f17..7c07d01 100644 +--- a/radar.c ++++ b/radar.c @@ -60,7 +60,7 @@ void RSL_print_version() @@ -134,22 +125,24 @@ diff -ru rsl-v1.40/radar.c rsl-v1.40.new/radar.c } /* Debug printing global variable: radar_verbose_flag */ -diff -ru rsl-v1.40/radar_to_uf.c rsl-v1.40.new/radar_to_uf.c ---- rsl-v1.40/radar_to_uf.c 2008-04-16 19:34:41.000000000 +0000 -+++ rsl-v1.40.new/radar_to_uf.c 2008-12-27 11:13:58.000000000 +0000 -@@ -316,7 +316,7 @@ - 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; -diff -ru rsl-v1.40/read_write.c rsl-v1.40.new/read_write.c ---- rsl-v1.40/read_write.c 2008-10-07 22:30:06.000000000 +0000 -+++ rsl-v1.40.new/read_write.c 2008-12-27 11:14:05.000000000 +0000 -@@ -314,7 +314,7 @@ +diff --git a/radar_to_uf.c b/radar_to_uf.c +index 0d3af56..53d2d8d 100644 +--- a/radar_to_uf.c ++++ b/radar_to_uf.c +@@ -321,7 +321,7 @@ void RSL_radar_to_uf_fp(Radar *r, FILE *fp) + 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; +diff --git a/read_write.c b/read_write.c +index 644a7b2..1e5f319 100644 +--- a/read_write.c ++++ b/read_write.c +@@ -314,7 +314,7 @@ int RSL_write_radar_fp(Radar *radar, FILE *fp) if (radar == NULL) return 0; memset(title, 0, sizeof(title)); @@ -158,14 +151,15 @@ diff -ru rsl-v1.40/read_write.c rsl-v1.40.new/read_write.c n += fwrite(title, sizeof(char), sizeof(title), fp); memset(header_buf, 0, sizeof(header_buf)); -diff -ru rsl-v1.40/rsl.h rsl-v1.40.new/rsl.h ---- rsl-v1.40/rsl.h 2008-10-10 20:09:36.000000000 +0000 -+++ rsl-v1.40.new/rsl.h 2008-12-27 11:15:24.000000000 +0000 +diff --git a/rsl.h b/rsl.h +index a821765..597069c 100644 +--- a/rsl.h ++++ b/rsl.h @@ -27,8 +27,6 @@ #include "config.h" #endif --#define RSL_VERSION_STR "v1.40" +-#define RSL_VERSION_STR "v1.41" - /**********************************************************************/ /* Configure: Define USE_TWO_BYTE_PRECISION to have RSL store internal*/ @@ -210,9 +204,10 @@ diff -ru rsl-v1.40/rsl.h rsl-v1.40.new/rsl.h #define RAINFALL_RED_FILE COLORDIR "/red_rainfall.clr" #define RAINFALL_GREEN_FILE COLORDIR "/grn_rainfall.clr" #define RAINFALL_BLUE_FILE COLORDIR "/blu_rainfall.clr" -diff -ru rsl-v1.40/wsr88d.h rsl-v1.40.new/wsr88d.h ---- rsl-v1.40/wsr88d.h 2004-03-12 17:12:09.000000000 +0000 -+++ rsl-v1.40.new/wsr88d.h 2008-12-27 11:16:01.000000000 +0000 +diff --git a/wsr88d.h b/wsr88d.h +index ecad620..7d22427 100644 +--- a/wsr88d.h ++++ b/wsr88d.h @@ -7,7 +7,7 @@ * The directory should be the same as the LIBDIR in the makefile. */ @@ -222,3 +217,24 @@ diff -ru rsl-v1.40/wsr88d.h rsl-v1.40.new/wsr88d.h #endif /*===============================================================*/ typedef struct { +diff --git a/doc/Makefile.am b/doc/Makefile.am +index 6acc059..d4fc3fd 100644 +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -1,12 +1,3 @@ + AUTOMAKE_OPTIONS = foreign + +-docdir = $(prefix)/doc/$(PACKAGE) +-doc_DATA = *.html *.gif *.jpg +- +-EXTRA_DIST = $(doc_DATA) *.fig +- +-install-exec-hook: +- -mkdir $(prefix)/doc +- -mkdir $(docdir) +- $(INSTALL) -m 444 ../README $(docdir) +- $(INSTALL) -m 444 ../CHANGES $(docdir) ++dist_doc_DATA = *.html *.gif *.jpg *.fig ../README ../CHANGES +-- +1.7.3.4 + diff --git a/opt/rsl/rsl-gzip.patch b/opt/rsl/rsl-gzip.patch deleted file mode 100644 index 9b5f8a5..0000000 --- a/opt/rsl/rsl-gzip.patch +++ /dev/null @@ -1,270 +0,0 @@ -diff -ru rsl-v1.40.pre/africa_to_radar.c rsl-v1.40/africa_to_radar.c ---- rsl-v1.40.pre/africa_to_radar.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/africa_to_radar.c 2009-05-14 10:27:13.000000000 +0000 -@@ -73,7 +73,7 @@ - } else { - fp = fopen(infile, "r"); - } -- fp = uncompress_pipe(fp); -+ fp = gunzip_pipe(fp); - n = 0; - - radar = RSL_new_radar(MAX_RADAR_VOLUMES); -diff -ru rsl-v1.40.pre/anyformat_to_radar.c rsl-v1.40/anyformat_to_radar.c ---- rsl-v1.40.pre/anyformat_to_radar.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/anyformat_to_radar.c 2009-05-14 10:27:13.000000000 +0000 -@@ -65,7 +65,7 @@ - } - - /* Read the magic bytes. */ -- fp = uncompress_pipe(fp); /* If gzip available. */ -+ fp = gunzip_pipe(fp); /* If gzip available. */ - if (fread(magic, sizeof(magic), 1, fp) != 1) { - char *magic_str = (char *)calloc(sizeof(magic)+1, sizeof(char)); - memcpy(magic_str, magic, sizeof(magic)); -diff -ru rsl-v1.40.pre/dorade_to_radar.c rsl-v1.40/dorade_to_radar.c ---- rsl-v1.40.pre/dorade_to_radar.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/dorade_to_radar.c 2009-05-14 10:27:13.000000000 +0000 -@@ -97,7 +97,7 @@ - return radar; - } - -- fp = uncompress_pipe(fp); /* Transparently, use gunzip. */ -+ fp = gunzip_pipe(fp); /* Transparently, use gunzip. */ - - /**********************************************************************/ - -diff -ru rsl-v1.40.pre/gzip.c rsl-v1.40/gzip.c ---- rsl-v1.40.pre/gzip.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/gzip.c 2009-05-14 10:28:40.000000000 +0000 -@@ -32,8 +32,8 @@ - - /* Prototype definitions within this file. */ - int no_command (char *cmd); --FILE *uncompress_pipe (FILE *fp); --FILE *compress_pipe (FILE *fp); -+FILE *gunzip_pipe (FILE *fp); -+FILE *gzip_pipe (FILE *fp); - - - /* Avoids the 'Broken pipe' message by reading the rest of the stream. */ -@@ -67,7 +67,7 @@ - else return !0; - } - --FILE *uncompress_pipe (FILE *fp) -+FILE *gunzip_pipe (FILE *fp) - { - /* Pass the file pointed to by 'fp' through the gzip pipe. */ - -@@ -80,13 +80,13 @@ - dup(fileno(fp)); - - fpipe = popen("gzip -q -d -f --stdout", "r"); -- if (fpipe == NULL) perror("uncompress_pipe"); -+ if (fpipe == NULL) perror("gunzip_pipe"); - close(0); - dup(save_fd); - return fpipe; - } - --FILE *compress_pipe (FILE *fp) -+FILE *gzip_pipe (FILE *fp) - { - /* Pass the file pointed to by 'fp' through the gzip pipe. */ - -@@ -100,7 +100,7 @@ - dup(fileno(fp)); - - fpipe = popen("gzip -q -1 -c", "w"); -- if (fpipe == NULL) perror("compress_pipe"); -+ if (fpipe == NULL) perror("gzip_pipe"); - close(1); - dup(save_fd); - return fpipe; -diff -ru rsl-v1.40.pre/lassen_to_radar.c rsl-v1.40/lassen_to_radar.c ---- rsl-v1.40.pre/lassen_to_radar.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/lassen_to_radar.c 2009-05-14 10:27:13.000000000 +0000 -@@ -285,7 +285,7 @@ - perror(infile); - return NULL; - } -- f = uncompress_pipe(f); /* Transparently, use gunzip. */ -+ f = gunzip_pipe(f); /* Transparently, use gunzip. */ - #define NEW_BUFSIZ 16384 - setvbuf(f,NULL,_IOFBF,(size_t)NEW_BUFSIZ); /* Faster i/o? */ - -diff -ru rsl-v1.40.pre/mcgill.c rsl-v1.40/mcgill.c ---- rsl-v1.40.pre/mcgill.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/mcgill.c 2009-05-14 10:27:13.000000000 +0000 -@@ -97,7 +97,7 @@ - 120, 120, 120, 120 - }; - --FILE *uncompress_pipe (FILE *fp); -+FILE *gunzip_pipe (FILE *fp); - - /**********************************************************************/ - mcgFile_t *mcgFileOpen(int *code, char *filename) -@@ -131,7 +131,7 @@ - *code = MCG_OPEN_FILE_ERR; - return(NULL); - } -- file->fp = uncompress_pipe(file->fp); /* Transparently, use gunzip. */ -+ file->fp = gunzip_pipe(file->fp); /* Transparently, use gunzip. */ - /* Read first (header) record from data file into buffer */ - if (fread(buffer, sizeof(char), MCG_RECORD, file->fp) < MCG_RECORD) - { -diff -ru rsl-v1.40.pre/nsig.c rsl-v1.40/nsig.c ---- rsl-v1.40.pre/nsig.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/nsig.c 2009-05-14 10:27:13.000000000 +0000 -@@ -52,7 +52,7 @@ - - #include "nsig.h" - --FILE *uncompress_pipe(FILE *fp); -+FILE *gunzip_pipe(FILE *fp); - int big_endian(void); - int little_endian(void); - void swap_4_bytes(void *word); -@@ -76,7 +76,7 @@ - return fp; - } - -- fp = uncompress_pipe(fp); /* Transparently gunzip. */ -+ fp = gunzip_pipe(fp); /* Transparently gunzip. */ - return fp; - } - -diff -ru rsl-v1.40.pre/radar_to_uf.c rsl-v1.40/radar_to_uf.c ---- rsl-v1.40.pre/radar_to_uf.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/radar_to_uf.c 2009-05-14 10:27:13.000000000 +0000 -@@ -533,7 +533,7 @@ - return; - } - -- fp = compress_pipe(fp); -+ fp = gzip_pipe(fp); - RSL_radar_to_uf_fp(r, fp); - rsl_pclose(fp); - } -diff -ru rsl-v1.40.pre/rainbow_to_radar.c rsl-v1.40/rainbow_to_radar.c ---- rsl-v1.40.pre/rainbow_to_radar.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/rainbow_to_radar.c 2009-05-14 10:27:13.000000000 +0000 -@@ -88,7 +88,7 @@ - perror(infile); - return NULL; - } -- fp = uncompress_pipe(fp); /* Transparently gunzip. */ -+ fp = gunzip_pipe(fp); /* Transparently gunzip. */ - - /* Read first character and verify file format. */ - -diff -ru rsl-v1.40.pre/rapic_to_radar.c rsl-v1.40/rapic_to_radar.c ---- rsl-v1.40.pre/rapic_to_radar.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/rapic_to_radar.c 2009-05-14 10:27:13.000000000 +0000 -@@ -22,7 +22,7 @@ - return radar; - } - } -- fp = uncompress_pipe(fp); /* Transparently gunzip. */ -+ fp = gunzip_pipe(fp); /* Transparently gunzip. */ - close(0); dup(fileno(fp)); /* Redirect stdin. */ - - rapicparse(); -diff -ru rsl-v1.40.pre/read_write.c rsl-v1.40/read_write.c ---- rsl-v1.40.pre/read_write.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/read_write.c 2009-05-14 10:27:13.000000000 +0000 -@@ -189,7 +189,7 @@ - perror(infile); - return NULL; - } -- fp = uncompress_pipe(fp); -+ fp = gunzip_pipe(fp); - (void)fread(title, sizeof(char), sizeof(title), fp); - if (strncmp(title, "RSL", 3) != 0) return NULL; - -@@ -372,7 +372,7 @@ - perror(outfile); - return -1; - } -- fp = compress_pipe(fp); -+ fp = gzip_pipe(fp); - n = RSL_write_radar_fp(radar, fp); - - rsl_pclose(fp); -diff -ru rsl-v1.40.pre/rsl.h rsl-v1.40/rsl.h ---- rsl-v1.40.pre/rsl.h 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/rsl.h 2009-05-14 10:27:13.000000000 +0000 -@@ -697,8 +697,10 @@ - Histogram *RSL_read_histogram(char *infile); - - int no_command (char *cmd); --FILE *uncompress_pipe (FILE *fp); --FILE *compress_pipe (FILE *fp); -+FILE *gunzip_pipe (FILE *fp); -+FILE *gzip_pipe (FILE *fp); -+FILE *bunzip2_pipe (FILE *fp); -+FILE *bzip2_pipe (FILE *fp); - int rsl_pclose(FILE *fp); - - /* Carpi image generation functions. These are modified clones of the -diff -ru rsl-v1.40.pre/toga.c rsl-v1.40/toga.c ---- rsl-v1.40.pre/toga.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/toga.c 2009-05-14 10:27:13.000000000 +0000 -@@ -84,7 +84,7 @@ - int tg_read_ray(tg_file_str *); - void tg_prt_head(tg_map_head_str *,int); - --FILE *uncompress_pipe (FILE *fp); -+FILE *gunzip_pipe (FILE *fp); - - - int tg_open(char *filename,tg_file_str *tg_file) -@@ -102,7 +102,7 @@ - /* Unfortunately, there is no tg_close to modularize the following - * pipe close. Shouldn't be any problems anyway. - */ -- (void) uncompress_pipe(fdopen(tg_file->fd, "r")); /* Redirect through gunzip. */ -+ (void) gunzip_pipe(fdopen(tg_file->fd, "r")); /* Redirect through gunzip. */ - /* initialize buffer pointers, flags */ - tg_file->buf_ind = 32769; - tg_file->buf_end = 32769; -diff -ru rsl-v1.40.pre/uf_to_radar.c rsl-v1.40/uf_to_radar.c ---- rsl-v1.40.pre/uf_to_radar.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/uf_to_radar.c 2009-05-14 10:27:13.000000000 +0000 -@@ -625,7 +625,7 @@ - perror(infile); - return radar; - } -- fp = uncompress_pipe(fp); /* Transparently gunzip. */ -+ fp = gunzip_pipe(fp); /* Transparently gunzip. */ - radar = RSL_uf_to_radar_fp(fp); - rsl_pclose(fp); - -diff -ru rsl-v1.40.pre/wsr88d.c rsl-v1.40/wsr88d.c ---- rsl-v1.40.pre/wsr88d.c 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/wsr88d.c 2009-05-14 10:27:13.000000000 +0000 -@@ -246,7 +246,7 @@ - } - - if (wf->fptr == NULL) return NULL; -- wf->fptr = uncompress_pipe(wf->fptr); -+ wf->fptr = gunzip_pipe(wf->fptr); - #define NEW_BUFSIZ 16384 - setvbuf(wf->fptr,NULL,_IOFBF,(size_t)NEW_BUFSIZ); /* Faster i/o? */ - return wf; -diff -ru rsl-v1.40.pre/wsr88d.h rsl-v1.40/wsr88d.h ---- rsl-v1.40.pre/wsr88d.h 2009-05-14 10:26:55.000000000 +0000 -+++ rsl-v1.40/wsr88d.h 2009-05-14 10:27:13.000000000 +0000 -@@ -212,8 +212,8 @@ - float wsr88d_get_frequency(Wsr88d_ray *ray); - - int no_command (char *cmd); --FILE *uncompress_pipe (FILE *fp); --FILE *compress_pipe (FILE *fp); -+FILE *gunzip_pipe (FILE *fp); -+FILE *gzip_pipe (FILE *fp); - int rsl_pclose(FILE *fp); - - #endif diff --git a/opt/rsl/rsl-type_str.patch b/opt/rsl/rsl-type_str.patch deleted file mode 100644 index 444d819..0000000 --- a/opt/rsl/rsl-type_str.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- rsl-v1.40/wsr88d_m31.c 2008-10-08 23:43:03.000000000 +0000 -+++ rsl-mine/wsr88d_m31.c 2009-05-10 12:58:17.000000000 +0000 -@@ -546,6 +548,7 @@ - Range (*invf)(float x); - float (*f)(Range x); - int vol_index, waveform; -+ char *type_str; - - enum waveforms {surveillance=1, doppler_ambres, doppler_no_ambres, batch}; - -@@ -572,10 +575,10 @@ - if (wsr88d_ray.ray_hdr.dbptr_ref > 0) { - vol_index = wsr88d_get_vol_index(wsr88d_ray.ref->data_hdr.dataname); - switch (vol_index) { -- case DZ_INDEX: f = DZ_F; invf = DZ_INVF; break; -- case VR_INDEX: f = VR_F; invf = VR_INVF; break; -- case SW_INDEX: f = SW_F; invf = SW_INVF; break; -- default: f = DZ_F; invf = DZ_INVF; break; -+ case DZ_INDEX: f = DZ_F; invf = DZ_INVF; type_str = "Reflectivity"; break; -+ case VR_INDEX: f = VR_F; invf = VR_INVF; type_str = "Velocity"; break; -+ case SW_INDEX: f = SW_F; invf = SW_INVF; type_str = "Spectrum width"; break; -+ default: f = DZ_F; invf = DZ_INVF; type_str = "Unknown"; break; - } - /* If this is reflectivity, check the waveform type to make sure - * it isn't from a Doppler split cut. -@@ -591,6 +594,7 @@ - radar->v[vol_index] = RSL_new_volume(MAXSWEEPS); - radar->v[vol_index]->h.f = f; - radar->v[vol_index]->h.invf = invf; -+ radar->v[vol_index]->h.type_str = type_str; - } - if (radar->v[vol_index]->sweep[isweep] == NULL) { - radar->v[vol_index]->sweep[isweep] = RSL_new_sweep(MAXRAYS_M31); -@@ -608,15 +612,16 @@ - if (wsr88d_ray.ray_hdr.dbptr_vel > 0) { - vol_index = wsr88d_get_vol_index(wsr88d_ray.vel->data_hdr.dataname); - switch (vol_index) { -- case DZ_INDEX: f = DZ_F; invf = DZ_INVF; break; -- case VR_INDEX: f = VR_F; invf = VR_INVF; break; -- case SW_INDEX: f = SW_F; invf = SW_INVF; break; -- default: f = DZ_F; invf = DZ_INVF; break; -+ case DZ_INDEX: f = DZ_F; invf = DZ_INVF; type_str = "Reflectivity"; break; -+ case VR_INDEX: f = VR_F; invf = VR_INVF; type_str = "Velocity"; break; -+ case SW_INDEX: f = SW_F; invf = SW_INVF; type_str = "Spectrum width"; break; -+ default: f = DZ_F; invf = DZ_INVF; type_str = "Unknown"; break; - } - if (radar->v[vol_index] == NULL) { - radar->v[vol_index] = RSL_new_volume(MAXSWEEPS); - radar->v[vol_index]->h.f = f; - radar->v[vol_index]->h.invf = invf; -+ radar->v[vol_index]->h.type_str = type_str; - } - if (radar->v[vol_index]->sweep[isweep] == NULL) { - radar->v[vol_index]->sweep[isweep] = RSL_new_sweep(MAXRAYS_M31); -@@ -633,15 +638,16 @@ - if (wsr88d_ray.ray_hdr.dbptr_sw > 0) { - vol_index = wsr88d_get_vol_index(wsr88d_ray.sw->data_hdr.dataname); - switch (vol_index) { -- case DZ_INDEX: f = DZ_F; invf = DZ_INVF; break; -- case VR_INDEX: f = VR_F; invf = VR_INVF; break; -- case SW_INDEX: f = SW_F; invf = SW_INVF; break; -- default: f = DZ_F; invf = DZ_INVF; break; -+ case DZ_INDEX: f = DZ_F; invf = DZ_INVF; type_str = "Reflectivity"; break; -+ case VR_INDEX: f = VR_F; invf = VR_INVF; type_str = "Velocity"; break; -+ case SW_INDEX: f = SW_F; invf = SW_INVF; type_str = "Spectrum width"; break; -+ default: f = DZ_F; invf = DZ_INVF; type_str = "Unknown"; break; - } - if (radar->v[vol_index] == NULL) { - radar->v[vol_index] = RSL_new_volume(MAXSWEEPS); - radar->v[vol_index]->h.f = f; - radar->v[vol_index]->h.invf = invf; -+ radar->v[vol_index]->h.type_str = type_str; - } - if (radar->v[vol_index]->sweep[isweep] == NULL) { - radar->v[vol_index]->sweep[isweep] = RSL_new_sweep(MAXRAYS_M31); diff --git a/opt/rsl/rsl-valgrind.patch b/opt/rsl/rsl-valgrind.patch deleted file mode 100644 index bf8016b..0000000 --- a/opt/rsl/rsl-valgrind.patch +++ /dev/null @@ -1,135 +0,0 @@ -diff -w -ru rsl-v1.40/wsr88d_m31.c rsl-v1.40.test/wsr88d_m31.c ---- rsl-v1.40/wsr88d_m31.c 2008-10-08 23:43:03.000000000 +0000 -+++ rsl-v1.40.test/wsr88d_m31.c 2009-05-14 10:06:23.000000000 +0000 -@@ -515,6 +515,7 @@ - m1_ray.vol_cpat = vcp_data.vcp; - m1_ray.elev_num = ray_hdr.elev_num; - m1_ray.unam_rng = wsr88d_ray.unamb_rng; -+ m1_ray.nyq_vel = wsr88d_ray.nyq_vel; // TODO: is this correct? - if (ray_hdr.azm_res != 1) - ray->h.beam_width = 1.0; - else ray->h.beam_width = 0.5; -@@ -603,6 +604,8 @@ - radar->v[vol_index]->sweep[isweep]->ray[iray] = ray; - radar->v[vol_index]->sweep[isweep]->h.nrays = iray+1; - } -+ free(wsr88d_ray.ref->data); -+ free(wsr88d_ray.ref); - } - - if (wsr88d_ray.ray_hdr.dbptr_vel > 0) { -@@ -628,6 +631,8 @@ - wsr88d_load_ray_hdr(wsr88d_ray, ray); - radar->v[vol_index]->sweep[isweep]->ray[iray] = ray; - radar->v[vol_index]->sweep[isweep]->h.nrays = iray+1; -+ free(wsr88d_ray.vel->data); -+ free(wsr88d_ray.vel); - } - - if (wsr88d_ray.ray_hdr.dbptr_sw > 0) { -@@ -653,6 +658,8 @@ - wsr88d_load_ray_hdr(wsr88d_ray, ray); - radar->v[vol_index]->sweep[isweep]->ray[iray] = ray; - radar->v[vol_index]->sweep[isweep]->h.nrays = iray+1; -+ free(wsr88d_ray.sw->data); -+ free(wsr88d_ray.sw); - } - - } -@@ -706,15 +713,27 @@ - * at the WSR-88D Radar Operations Center web site. - */ - -- n = fread(&msghdr, sizeof(Wsr88d_msg_hdr), 1, wf->fptr); -- -- /* printf("msgtype = %d\n", msghdr.msg_type); */ -- msg_hdr_size = sizeof(Wsr88d_msg_hdr) - sizeof(msghdr.rpg); - - - radar = RSL_new_radar(MAX_RADAR_VOLUMES); - - while (! end_of_vos) { -+ /* Read current header */ -+ n = fread(&msghdr, sizeof(Wsr88d_msg_hdr), 1, wf->fptr); -+ if (n < 1) { -+ fprintf(stderr,"Warning: load_wsr88d_m31_into_radar: "); -+ if (feof(wf->fptr) != 0) fprintf(stderr, -+ "Unexpected end of file.\n"); -+ else fprintf(stderr,"Failed reading msghdr.\n"); -+ fprintf(stderr,"Current sweep number: %d\n" -+ "Last ray read: %d\n", isweep+1, iray); -+ wsr88d_load_sweep_header(radar, isweep, wsr88d_ray); -+ return radar; -+ } -+ -+ /* printf("msgtype = %d\n", msghdr.msg_type); */ -+ msg_hdr_size = sizeof(Wsr88d_msg_hdr) - sizeof(msghdr.rpg); -+ - if (msghdr.msg_type == 31) { - if (little_endian()) wsr88d_swap_m31_hdr(&msghdr); - -@@ -729,6 +748,18 @@ - /* Load this ray into radar structure ray. */ - wsr88d_load_ray_into_radar(wsr88d_ray, isweep, iray, radar); - iray++; -+ -+ /* Check for end of sweep */ -+ if (wsr88d_ray.ray_hdr.radial_status == END_OF_ELEV) { -+ wsr88d_load_sweep_header(radar, isweep, wsr88d_ray); -+ isweep++; -+ iray = 0; -+ } -+ -+ if (wsr88d_ray.ray_hdr.radial_status == END_VOS) { -+ //wsr88d_load_sweep_header(radar, isweep, wsr88d_ray); -+ end_of_vos = 1; -+ } - } - else { /* msg_type not 31 */ - n = fread(&non31_seg_remainder, sizeof(non31_seg_remainder), 1, -@@ -748,33 +779,11 @@ - radar->h.vcp = vcp_data.vcp; - /* printf("VCP = %d\n", vcp_data.vcp); */ - } -+ /* TODO: check for end of sweep/volume */ - } - -- /* Check for end of sweep */ -- if (wsr88d_ray.ray_hdr.radial_status == END_OF_ELEV) { -- wsr88d_load_sweep_header(radar, isweep, wsr88d_ray); -- isweep++; -- iray = 0; -- } -- -- if (wsr88d_ray.ray_hdr.radial_status != END_VOS) { -- n = fread(&msghdr, sizeof(Wsr88d_msg_hdr), 1, wf->fptr); -- if (n < 1) { -- fprintf(stderr,"Warning: load_wsr88d_m31_into_radar: "); -- if (feof(wf->fptr) != 0) fprintf(stderr, -- "Unexpected end of file.\n"); -- else fprintf(stderr,"Failed reading msghdr.\n"); -- fprintf(stderr,"Current sweep number: %d\n" -- "Last ray read: %d\n", isweep+1, iray); -- wsr88d_load_sweep_header(radar, isweep, wsr88d_ray); -- return radar; -- } -- } -- else { -+ if (feof(wf->fptr) != 0) - end_of_vos = 1; -- wsr88d_load_sweep_header(radar, isweep, wsr88d_ray); -- } -- if (feof(wf->fptr) != 0) end_of_vos = 1; - } - - return radar; -diff -w -ru rsl-v1.40/wsr88d_to_radar.c rsl-v1.40.test/wsr88d_to_radar.c ---- rsl-v1.40/wsr88d_to_radar.c 2008-07-30 22:41:20.000000000 +0000 -+++ rsl-v1.40.test/wsr88d_to_radar.c 2009-05-14 10:07:09.000000000 +0000 -@@ -429,5 +429,6 @@ - radar->h.lpulse = sitep->lpulse; - - radar = RSL_prune_radar(radar); -+ free(sitep); - return radar; - } diff --git a/opt/rsl/rsl-warnings.patch b/opt/rsl/rsl-warnings.patch deleted file mode 100644 index ece00f3..0000000 --- a/opt/rsl/rsl-warnings.patch +++ /dev/null @@ -1,205 +0,0 @@ -diff -ru rsl-v1.40/africa.c warnings/africa.c ---- rsl-v1.40/africa.c 1999-12-01 03:48:29.000000000 +0000 -+++ warnings/africa.c 2008-12-27 11:53:44.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - #include - #include -+#include - #include "africa.h" - - int africa_read_buffer(FILE *fp, Africa_buffer *buffer) -diff -ru rsl-v1.40/dorade_to_radar.c warnings/dorade_to_radar.c ---- rsl-v1.40/dorade_to_radar.c 1999-12-01 03:48:29.000000000 +0000 -+++ warnings/dorade_to_radar.c 2008-12-27 11:53:44.000000000 +0000 -@@ -24,7 +24,7 @@ - #include - #include - #include --#include -+#include - #define USE_RSL_VARS - #include "rsl.h" - #include "dorade.h" -diff -ru rsl-v1.40/examples/any_to_gif.c warnings/examples/any_to_gif.c ---- rsl-v1.40/examples/any_to_gif.c 1999-01-26 16:20:25.000000000 +0000 -+++ warnings/examples/any_to_gif.c 2008-12-27 11:53:44.000000000 +0000 -@@ -73,7 +73,7 @@ - } - - --void main(int argc, char **argv) -+int main(int argc, char **argv) - { - Radar *radar; - Sweep *sweep; -diff -ru rsl-v1.40/examples/any_to_ppm.c warnings/examples/any_to_ppm.c ---- rsl-v1.40/examples/any_to_ppm.c 1998-09-16 18:35:56.000000000 +0000 -+++ warnings/examples/any_to_ppm.c 2008-12-27 11:53:44.000000000 +0000 -@@ -9,11 +9,12 @@ - * the RSL. - * - */ -+#include - - #define USE_RSL_VARS - #include "rsl.h" - --void main(int argc, char **argv) -+int main(int argc, char **argv) - { - Radar *radar; - Sweep *sweep; -diff -ru rsl-v1.40/examples/cappi_image.c warnings/examples/cappi_image.c ---- rsl-v1.40/examples/cappi_image.c 1998-09-16 18:35:56.000000000 +0000 -+++ warnings/examples/cappi_image.c 2008-12-27 11:53:44.000000000 +0000 -@@ -7,6 +7,7 @@ - */ - - #include -+#include - #include - #include "rsl.h" - -diff -ru rsl-v1.40/examples/dorade_main.c warnings/examples/dorade_main.c ---- rsl-v1.40/examples/dorade_main.c 1999-08-12 20:44:30.000000000 +0000 -+++ warnings/examples/dorade_main.c 2008-12-27 11:53:44.000000000 +0000 -@@ -1,4 +1,5 @@ - #include -+#include - #include "rsl.h" - - int main(int argc, char **argv) -diff -ru rsl-v1.40/examples/killer_sweep.c warnings/examples/killer_sweep.c ---- rsl-v1.40/examples/killer_sweep.c 1998-09-16 18:35:56.000000000 +0000 -+++ warnings/examples/killer_sweep.c 2008-12-27 11:53:44.000000000 +0000 -@@ -146,7 +146,7 @@ - } - } - --void main(int argc, char **argv) -+int main(int argc, char **argv) - { - Radar *radar; - Sweep *sweep; -diff -ru rsl-v1.40/examples/kwaj_subtract_one_day.c warnings/examples/kwaj_subtract_one_day.c ---- rsl-v1.40/examples/kwaj_subtract_one_day.c 1999-08-13 14:26:40.000000000 +0000 -+++ warnings/examples/kwaj_subtract_one_day.c 2008-12-27 11:53:44.000000000 +0000 -@@ -1,3 +1,4 @@ -+#include - #include "rsl.h" - - /**********************************************************************/ -diff -ru rsl-v1.40/examples/lassen_to_gif.c warnings/examples/lassen_to_gif.c ---- rsl-v1.40/examples/lassen_to_gif.c 1998-09-16 18:35:56.000000000 +0000 -+++ warnings/examples/lassen_to_gif.c 2008-12-27 11:53:44.000000000 +0000 -@@ -4,9 +4,10 @@ - * This program can read the file from stdin. - */ - -+#include - #include "rsl.h" - --void main(int argc, char **argv) -+int main(int argc, char **argv) - { - Radar *radar; - -diff -ru rsl-v1.40/examples/print_hash_table.c warnings/examples/print_hash_table.c ---- rsl-v1.40/examples/print_hash_table.c 1998-09-16 18:35:56.000000000 +0000 -+++ warnings/examples/print_hash_table.c 2008-12-27 11:53:44.000000000 +0000 -@@ -9,6 +9,7 @@ - * - */ - -+#include - #include "rsl.h" - - void print_link_list(Azimuth_hash *list) -@@ -87,7 +88,7 @@ - } - - --void main(int argc, char **argv) -+int main(int argc, char **argv) - { - Radar *radar; - Sweep *sweep; -diff -ru rsl-v1.40/examples/sector.c warnings/examples/sector.c ---- rsl-v1.40/examples/sector.c 1998-09-16 18:35:57.000000000 +0000 -+++ warnings/examples/sector.c 2008-12-27 11:53:44.000000000 +0000 -@@ -1,4 +1,5 @@ - #include -+#include - #include "rsl.h" - - /* -@@ -84,7 +85,7 @@ - } - - --void main(int argc, char **argv) -+int main(int argc, char **argv) - { - Radar *radar; - Sweep *sector; -diff -ru rsl-v1.40/examples/wsr88d_to_gif.c warnings/examples/wsr88d_to_gif.c ---- rsl-v1.40/examples/wsr88d_to_gif.c 1998-09-16 18:35:57.000000000 +0000 -+++ warnings/examples/wsr88d_to_gif.c 2008-12-27 11:53:44.000000000 +0000 -@@ -14,9 +14,10 @@ - * wsr88d_to_gif file [tape_header_file] - */ - -+#include - #include "rsl.h" - --void main(int argc, char **argv) -+int main(int argc, char **argv) - { - Radar *radar; - -diff -ru rsl-v1.40/lassen_to_radar.c warnings/lassen_to_radar.c ---- rsl-v1.40/lassen_to_radar.c 2008-07-24 13:40:50.000000000 +0000 -+++ warnings/lassen_to_radar.c 2008-12-27 11:53:44.000000000 +0000 -@@ -31,6 +31,7 @@ - - */ - #include -+#include - #include - #include - #include -diff -ru rsl-v1.40/rainbow.c warnings/rainbow.c ---- rsl-v1.40/rainbow.c 2004-02-10 17:10:28.000000000 +0000 -+++ warnings/rainbow.c 2008-12-27 11:53:44.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - #include -+#include - #include - #include "rsl.h" - #include "rainbow.h" -diff -ru rsl-v1.40/rainbow_to_radar.c warnings/rainbow_to_radar.c ---- rsl-v1.40/rainbow_to_radar.c 2004-02-11 16:54:37.000000000 +0000 -+++ warnings/rainbow_to_radar.c 2008-12-27 11:53:44.000000000 +0000 -@@ -22,6 +22,7 @@ - */ - - #include -+#include - #include - #include "rsl.h" - #include "rainbow.h" -diff -ru rsl-v1.40/wsr88d_m31.c warnings/wsr88d_m31.c ---- rsl-v1.40/wsr88d_m31.c 2008-10-08 23:43:03.000000000 +0000 -+++ warnings/wsr88d_m31.c 2008-12-27 11:53:44.000000000 +0000 -@@ -25,6 +25,8 @@ - * This file contains routines for processing Message Type 31, the digital - * radar message type introduced in WSR-88D Level II Build 10. - */ -+#include -+#include - - #include "rsl.h" - #include "wsr88d.h"