diff --git a/fortran/grib_fortran.c b/fortran/grib_fortran.c index 520b15a4e..5e3f68cd0 100644 --- a/fortran/grib_fortran.c +++ b/fortran/grib_fortran.c @@ -2779,6 +2779,16 @@ int grib_f_get_string_array(int* gid, char* key, char* val,int* nvals,int* slen, /*****************************************************************************/ +/* Strip whitespace from the end of a string */ +static void rtrim(char* s) +{ + Assert(s); + size_t len = strlen(s); + while (len > 0 && isspace((unsigned char)s[len - 1])) + len--; + s[len] = '\0'; +} + int grib_f_set_string_array_(int* gid, char* key, char* val,int* nvals,int* slen,int len) { grib_handle *h = get_handle(*gid); @@ -2796,6 +2806,7 @@ int grib_f_set_string_array_(int* gid, char* key, char* val,int* nvals,int* slen for (i=0;i/dev/null 2>&1; then if [ -f "$PKGCONFIG_FILE" ]; then + # Work out the Fortran compiler and flags from pkgconfig COMPILER=`pkg-config --variable=FC $PKGCONFIG_FILE` FLAGS_COMPILER=`pkg-config --cflags $PKGCONFIG_FILE` FLAGS_LINKER=`pkg-config --libs $PKGCONFIG_FILE` @@ -53,6 +50,9 @@ fi for file in ${bufr_files} do + tempSrc=$label.$file.f90 + tempExe=$label.$file.exe + # Generate F90 code from BUFR file ${tools_dir}bufr_dump -Efortran ${data_dir}/bufr/$file > $tempSrc @@ -68,9 +68,9 @@ do TEMP_JSON2=${label}.$tempBufr.json ${tools_dir}bufr_dump ${data_dir}/bufr/$file > $TEMP_JSON1 ${tools_dir}bufr_dump $tempBufr > $TEMP_JSON2 - diff -w $TEMP_JSON1 $TEMP_JSON2 + diff $TEMP_JSON1 $TEMP_JSON2 rm -f $TEMP_JSON1 $TEMP_JSON2 fi -done -rm -f $tempSrc $tempExe $tempBufr + rm -f $tempExe $tempSrc $tempBufr +done