]> Pileus Git - ~andy/rsl/commitdiff
Merge branch 'master' into aweather
authorAndy Spencer <andy753421@gmail.com>
Thu, 17 May 2012 07:22:35 +0000 (07:22 +0000)
committerAndy Spencer <andy753421@gmail.com>
Thu, 17 May 2012 07:34:17 +0000 (07:34 +0000)
Conflicts:
Makefile.am
configure.in
doc/users_guide.html
src/nsig.c
src/rsl.h
src/wsr88d.c
src/wsr88d.h

1  2 
configure.ac
src/Makefile.am
src/nsig.c
src/nsig_to_radar.c
src/radar_to_uf.c
src/rsl.h
src/wsr88d.c
src/wsr88d.h
src/wsr88d_m31.c
src/wsr88d_to_radar.c

diff --cc configure.ac
index 78431d3e1ed914b2bcd96586b612ac6f99dc37a0,0000000000000000000000000000000000000000..c8396beb910f3832ead25fb227df0064f1508b31
mode 100644,000000..100644
--- /dev/null
@@@ -1,75 -1,0 +1,75 @@@
- AC_INIT(rsl, 1.42)
 +# Process this file with autoconf to produce a configure script.
++AC_INIT(rsl, 1.43)
 +AM_INIT_AUTOMAKE([-Wall -Werror -Wno-portability foreign])
 +
 +AM_INIT_AUTOMAKE
 +AM_CONFIG_HEADER(config.h)
 +AC_CONFIG_MACRO_DIR([m4])
 +
 +# Checks for programs.
 +AC_PROG_CC
 +AM_PROG_LIBTOOL
 +AM_PROG_LEX
 +AC_PROG_YACC
 +AC_PROG_LN_S
 +
 +# Checks for header files.
 +AC_HEADER_STDC
 +AC_HEADER_SYS_WAIT
 +AC_CHECK_HEADERS(fcntl.h malloc.h strings.h unistd.h)
 +
 +# Checks for typedefs, structures, and compiler characteristics.
 +AC_C_CONST
 +AC_TYPE_SIZE_T
 +AC_STRUCT_TM
 +
 +# Checks for library functions.
 +# AC_FUNC_SETVBUF_REVERSED
 +AC_CHECK_FUNCS(mktime strdup strstr)
 +
 +# I would like lassen to be defined.  Override this in config.h.
 +AC_DEFINE(HAVE_LASSEN, 1,
 +    [For LASSEN capability.  Change this to '#undef HAVE_LASSEN', if you
 +     dont want LASSEN.])
 +
 +# Standard libraries
 +LIBS="-lz -lm"
 +
 +# The order of the libraries is important.
 +# This works:
 +#   -lrsl -limplode -ltsdistk -lmfhdf -ldf -ljpeg -lz -lm
 +#
 +# If mounting with shared libraries we may have to specify all possible libraries.
 +# First check with simple LIBS list, if it fails, then expand the list.
 +AC_SEARCH_LIBS(_implode,            implode)
 +AC_SEARCH_LIBS(jpeg_CreateCompress, jpeg   )
 +AC_SEARCH_LIBS(DFopen,              df     )
 +AC_SEARCH_LIBS(SDstart,             mfhdf  )
 +AC_SEARCH_LIBS(TKopen,              tsdistk)
 +
 +# Check if yywrap is defined in toolkit, and add $LEXLIB to LIBS if not.
 +YYWRAP=""
 +AC_SEARCH_LIBS(yywrap, tsdistk, YYWRAP="yes")
 +if test "$YYWRAP" = ""; then
 +      LIBS="$LIBS $LEXLIB"
 +fi
 +
 +# Test for Windows vs. Unix
 +case "${host}" in
 +      *mingw32*) SYS="WIN"  ;;
 +      *cygwin*)  SYS="WIN"  ;;
 +      *)         SYS="UNIX" ;;
 +esac
 +AC_SUBST([SYS])
 +AM_CONDITIONAL([SYS_WIN],  test "$SYS" = "WIN")
 +AM_CONDITIONAL([SYS_UNIX], test "$SYS" = "UNIX")
 +
 +# Check for relative build
 +AC_ARG_ENABLE(relative, [AS_HELP_STRING([--enable-relative],
 +      [enable runtime search paths @<:@default=no@:>@])],
 +      [DOTS=".."; ac_default_prefix="/"])
 +AC_SUBST([DOTS])
 +
 +AC_MSG_RESULT(LIBS = $LIBS)
 +AC_CONFIG_FILES([Makefile doc/Makefile data/Makefile examples/Makefile src/Makefile])
 +AC_OUTPUT
diff --cc src/Makefile.am
index 8542bf6c75112f12bfbb216655d7ca25552e5a26,0000000000000000000000000000000000000000..3a152dba2e617150c78fca41350226f59bacb790
mode 100644,000000..100644
--- /dev/null
@@@ -1,48 -1,0 +1,48 @@@
- librsl_la_LDFLAGS  = -version-info 1:42
 +M_CPPFLAGS = -I. -I..
 +AM_YFLAGS = -d
 +
 +lib_LTLIBRARIES = librsl.la
 +
 +include_HEADERS = rsl.h toolkit_1BC-51_appl.h
 +
 +headers = africa.h dorade.h lassen.h \
 +        mcgill.h nsig.h radtec.h rainbow.h \
 +        rapic_routines.h toga.h \
 +        wsr88d.h \
 +        $(include_HEADERS)
 +
++librsl_la_LDFLAGS  = -version-info 1:43
 +librsl_la_CPPFLAGS = -DDATADIRRSL="\"$(DOTS)$(datadir)/rsl1\""
 +librsl_la_SOURCES  = \
 +      rapic_parse.y rapic_scan.l rapic_to_radar.c rapic_routines.c \
 +      radtec.c radtec_to_radar.c \
 +      dorade.c dorade_print.c dorade_to_radar.c \
 +      lassen.c lassen_to_radar.c \
 +      radar.c volume.c image_gen.c cappi.c fraction.c read_write.c farea.c \
 +      range.c radar_to_uf.c uf_to_radar.c wsr88d_to_radar.c \
 +      carpi.c cube.c sort_rays.c toga_to_radar.c gts.c histogram.c \
 +      ray_indexes.c anyformat_to_radar.c get_win.c endian.c mcgill_to_radar.c \
 +      mcgill.c interp.c toga.c wsr88d.c wsr88d_get_site.c wsr88d_m31.c \
 +      prune.c reverse.c fix_headers.c \
 +      nsig_to_radar.c nsig.c nsig2_to_radar.c \
 +      africa_to_radar.c africa.c \
 +      radar_to_hdf_2.c hdf_to_radar.c toolkit_memory_mgt.c \
 +      radar_to_hdf_1.c rainbow.c rainbow_to_radar.c $(headers)
 +
 +if SYS_WIN
 +librsl_la_LDFLAGS += -mwindows -no-undefined
 +librsl_la_LIBADD   = -lws2_32
 +librsl_la_SOURCES += gzip_win32.c 
 +else
 +librsl_la_SOURCES += gzip.c 
 +endif
 +
 +# This should be speciifc to rapic,
 +# but I'm not sure how to do that with autofoo
 +AM_LFLAGS  = -P rapic
 +AM_YFLAGS += -p rapic
 +LEX_OUTPUT_ROOT = lex.rapic
 +
 +BUILT_SOURCES = rapic_parse.h
 +
 +DISTCLEANFILES = rapic_scan.c rapic_parse.c
diff --cc src/nsig.c
index bb07fc423e256f37167fb5f104f5740bea6a2df1,e7454cac866cf384a4e5d45a4dfe883425d3d15b..783b51f3020c91b9979cd2dd4e78d23150cf99ed
--- 2/nsig.c
@@@ -391,15 -391,12 +391,15 @@@ NSIG_Ray *nsig_read_ray(FILE *fp
  NSIG_Sweep **nsig_read_sweep(FILE *fp, NSIG_Product_file *prod_file)
  {
    NSIG_Sweep **s;
 -  int i, j, n;
 +  int i, n;
-   static NSIG_Ingest_data_header **idh = NULL;
-   static NSIG_Raw_prod_bhdr *bhdr = NULL;
+   NSIG_Ingest_data_header **idh = NULL;
+   NSIG_Raw_prod_bhdr *bhdr = NULL;
    NSIG_Ray *nsig_ray;
    int data_mask, iray, nrays[12], max_rays;
 +#ifdef NSIG_VER2
 +  int j;
    int masks[5];
 +#endif
    int nparams;
    int is_new_ray;
    int idtype[12];
Simple merge
Simple merge
diff --cc src/rsl.h
Simple merge
diff --cc src/wsr88d.c
index 5ab590dcaae6f90616137bac9a5c5ad96e5d47d1,dfa5d29eb8cb0f90d277e53bd39d49c6756b9849..6fe2a4ac964d1c2401900ee4b3a458a5e4fa16f7
@@@ -239,10 -239,10 +239,10 @@@ Wsr88d_file *wsr88d_open(char *filename
    int save_fd;
  
    if ( strcmp(filename, "stdin") == 0 ) {
-       save_fd = dup(0);
-       wf->fptr = fdopen(save_fd,"rb");
+     save_fd = dup(0);
 -    wf->fptr = fdopen(save_fd,"r");
++    wf->fptr = fdopen(save_fd,"rb");
    } else {
-       wf->fptr = fopen(filename, "rb");
 -    wf->fptr = fopen(filename, "r");
++    wf->fptr = fopen(filename, "rb");
    }
  
    if (wf->fptr == NULL) return NULL;
@@@ -324,9 -324,9 +324,9 @@@ int wsr88d_read_tape_header(char *first
    int n;
    char c;
  
 -  if ((fp = fopen(first_file, "r")) == NULL) {
 +  if ((fp = fopen(first_file, "rb")) == NULL) {
-       perror(first_file);
-       return 0;
+     perror(first_file);
+     return 0;
    }
    
    n = fread(wsr88d_tape_header, sizeof(Wsr88d_tape_header), 1, fp);
diff --cc src/wsr88d.h
Simple merge
index 4325407d6403f8dabc0b32eed73b992227097b07,3cd4f4cfb86418cbcc74a2065e3b2aabd3a391eb..1300166879d68132c9973371cbcb960f82aac0db
@@@ -388,13 -386,13 +386,13 @@@ void wsr88d_load_ray_into_radar(Wsr88d_
      unsigned short item;
      float value, scale, offset;
      unsigned char *data;
 -    Range (*invf)(float x);
 -    float (*f)(Range x);
      Ray *ray;
      int vol_index, waveform;
 -    char *type_str;
 +    Range (*invf)(float x) = DZ_INVF;
 +    float (*f)(Range x) = DZ_F;
 +    char *type_str = "Unknown type";
  
-     int keep_hi_prf_dz = 0; /* TODO: make this an argument. */
+     int keep_hi_prf_dz = 0; /* TODO: implement an interface for this. */
  
      enum waveforms {surveillance=1, doppler_w_amb_res, doppler_no_amb_res,
        batch};
Simple merge