NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hi, This is a patch for the 10 October 1991 beta distribution of the Unidata netCDF version 2.0 package. A version incorporating these patches is available for anonymous FTP in pub/netcdf-2.0-beta.tar.Z on unidata.ucar.edu. These patches accomplish the following: BUG FIXES Ncdump is fixed so it won't attempt to free memory that was never allocated. For MSDOS, ncdump was fixed (again!) to correctly handle dimensions too large for a 16-bit integer. For MSDOS, the ncdump Makefile was cleared of some extraneous dependencies. ENHANCEMENTS For MSDOS, the INSTALL procedure of manually copying files from the fortran/msoft directory to the parent directory before building the Fortran interface has been incorporated in the msoft.mk Makefile instead. This patch-file is designed to be applied from the top-level netcdf *source* directory via Larry Wall's patch(1) utility, e.g. % cd /usr/local/src/netcdf % patch -p1 < this_file The "-p1" option is necessary. In addition to these patches, the file netcdf/fortran/msoft/msoft.mk should be moved up one level in the directory structure to netcdf/fortran/msoft.mk instead. Thanks to Rich Signell for helping to identify problems addressed by these patches in the original beta distribution. Please report additional problems to support@xxxxxxxxxxxxxxxx. --Russ diff -rc netcdf-2.0-beta/INSTALL netcdf-2.0/INSTALL *** netcdf-2.0-beta/INSTALL Wed Oct 9 15:41:20 1991 --- netcdf-2.0/INSTALL Wed Oct 16 10:01:56 1991 *************** *** 8,18 **** src, nctest, util, fortran/vms, ncdump, ncgen. For installation on a PCDOS, MSDOS or OS/2 system, use the msoft.mk files in ! each source directory in the following order: xdr, src, nctest, util, ! fortran/msoft, ncdump, ncgen. You may have to delete or rename the ! VMS-specific make.com files if your make utility is called "make". If you ! are making the Fortran interface, ignore the Fortran error messages about ! VALUE type and length mismatches. On a UNIX system: --- 8,18 ---- src, nctest, util, fortran/vms, ncdump, ncgen. For installation on a PCDOS, MSDOS or OS/2 system, use the msoft.mk files in ! each source directory in the following order: xdr, src, nctest, util, ! fortran, ncdump, ncgen. You may have to delete or rename the VMS-specific ! make.com files if your make utility is called "make". If you are making the ! Fortran interface, ignore the Fortran error messages about VALUE type and ! length mismatches. On a UNIX system: diff -rc netcdf-2.0-beta/fortran/msoft/NOTES netcdf-2.0/fortran/msoft/NOTES *** netcdf-2.0-beta/fortran/msoft/NOTES Wed Oct 9 15:41:59 1991 --- netcdf-2.0/fortran/msoft/NOTES Wed Oct 16 10:02:35 1991 *************** *** 1,13 **** This distribution and Makefiles have been tested on PCDOS 3.3, PCDOS 4.01, OS/2 1.2, OS/2 1.3, using Microsoft C 6.0 and Microsoft Fortran 5.0. ! Copy all these files up into the parent directory with - cp *.* .. - - before using the msoft.mk makefile in that directory. Expect and ignore - Fortran warnings and error messages such as - ftest.for(110) : warning F4999: NCTLEN : variable declared but not used ... ftest.for(185) : error F3606: NCAGT : formal argument VALUE : type mismatch --- 1,10 ---- This distribution and Makefiles have been tested on PCDOS 3.3, PCDOS 4.01, OS/2 1.2, OS/2 1.3, using Microsoft C 6.0 and Microsoft Fortran 5.0. ! Using the msoft.mk makefile in the parent of this directory. It will copy ! the needed files from this directory. Expect and ignore Fortran warnings ! and error messages such as ftest.for(110) : warning F4999: NCTLEN : variable declared but not used ... ftest.for(185) : error F3606: NCAGT : formal argument VALUE : type mismatch *************** *** 16,19 **** fslen.asm is an assembler routine needed to help find the length of FORTRAN character*(*) variables from a C routine they are passed into. - --- 13,15 ---- diff -rc netcdf-2.0-beta/ncdump/msoft.mk netcdf-2.0/ncdump/msoft.mk *** netcdf-2.0-beta/ncdump/msoft.mk Wed Oct 9 15:42:08 1991 --- netcdf-2.0/ncdump/msoft.mk Thu Oct 17 10:05:23 1991 *************** *** 77,83 **** # DO NOT DELETE THIS LINE -- make depend depends on it. - ncdump.obj: $(INCLUDE)\stdio.h $(INCLUDE)\string.h $(INCLUDE)\ctype.h ncdump.obj: $(INCDIR1)\netcdf.h - error.obj: $(INCLUDE)\stdio.h $(INCLUDE)\varargs.h vardata.obj: $(INCDIR1)\netcdf.h --- 77,81 ---- diff -rc netcdf-2.0-beta/ncdump/ncdump.c netcdf-2.0/ncdump/ncdump.c *** netcdf-2.0-beta/ncdump/ncdump.c Wed Oct 9 15:42:05 1991 --- netcdf-2.0/ncdump/ncdump.c Thu Oct 17 10:05:21 1991 *************** *** 1,7 **** /********************************************************************* * Copyright 1989, University Corporation for Atmospheric Research * See netcdf/README file for copying and redistribution conditions. ! * $Header: /usr/local/home/russ/sdmsrc/netcdf/ncdump/RCS/ncdump.c,v 1.19 1991/09/17 18:04:24 russ Exp $ *********************************************************************/ #include <stdio.h> --- 1,7 ---- /********************************************************************* * Copyright 1989, University Corporation for Atmospheric Research * See netcdf/README file for copying and redistribution conditions. ! * $Header: /usr/local/home/russ/sdmsrc/netcdf/ncdump/RCS/ncdump.c,v 1.20 1991/10/17 16:01:43 russ Exp $ *********************************************************************/ #include <stdio.h> *************** *** 312,318 **** int dimid; /* dimension id */ int varid; /* variable id */ struct ncdim dims[MAX_NC_DIMS]; /* dimensions */ ! int vdims[MAX_NC_DIMS]; /* dimension sizes for a single variable */ struct ncvar var; /* variable */ struct ncatt att; /* attribute */ int id; /* dimension number per variable */ --- 312,318 ---- int dimid; /* dimension id */ int varid; /* variable id */ struct ncdim dims[MAX_NC_DIMS]; /* dimensions */ ! long vdims[MAX_NC_DIMS]; /* dimension sizes for a single variable */ struct ncvar var; /* variable */ struct ncatt att; /* attribute */ int id; /* dimension number per variable */ *************** *** 351,357 **** Printf ("\t%s = %s ; // (%d currently)\n",dims[dimid].name, "UNLIMITED", dims[dimid].size); else ! Printf ("\t%s = %d ;\n",dims[dimid].name, dims[dimid].size); } Printf ("\nvariables:\n"); --- 351,357 ---- Printf ("\t%s = %s ; // (%d currently)\n",dims[dimid].name, "UNLIMITED", dims[dimid].size); else ! Printf ("\t%s = %ld ;\n",dims[dimid].name, dims[dimid].size); } Printf ("\nvariables:\n"); diff -rc netcdf-2.0-beta/ncdump/vardata.c netcdf-2.0/ncdump/vardata.c *** netcdf-2.0-beta/ncdump/vardata.c Wed Oct 9 15:42:07 1991 --- netcdf-2.0/ncdump/vardata.c Thu Oct 17 10:39:16 1991 *************** *** 1,7 **** /********************************************************************* * Copyright 1989, University Corporation for Atmospheric Research * See netcdf/README file for copying and redistribution conditions. ! * $Header: /usr/local/home/russ/sdmsrc/netcdf/ncdump/RCS/vardata.c,v 1.16 1991/10/07 22:37:53 russ Exp $ *********************************************************************/ #include <stdio.h> --- 1,7 ---- /********************************************************************* * Copyright 1989, University Corporation for Atmospheric Research * See netcdf/README file for copying and redistribution conditions. ! * $Header: /home/russ/sdmsrc/netcdf/ncdump/RCS/vardata.c,v 1.18 1991/10/17 16:37:24 russ Exp $ *********************************************************************/ #include <stdio.h> *************** *** 185,191 **** int vardata(vp, vdims, cdfid, varid) struct ncvar *vp; /* variable */ ! int vdims[]; /* variable dimension sizes */ int cdfid; /* netcdf id */ int varid; /* variable id */ { --- 185,191 ---- int vardata(vp, vdims, cdfid, varid) struct ncvar *vp; /* variable */ ! long vdims[]; /* variable dimension sizes */ int cdfid; /* netcdf id */ int varid; /* variable id */ { *************** *** 236,243 **** * the capacity of MSDOS platforms, for example), we break each row * into smaller chunks, if necessary. */ ! int corsav = cor[vrank-1]; ! int left = ncols; while (left > 0) { long toget = left < gulp ? left : gulp; edg[vrank-1] = toget; --- 236,243 ---- * the capacity of MSDOS platforms, for example), we break each row * into smaller chunks, if necessary. */ ! long corsav = cor[vrank-1]; ! long left = ncols; while (left > 0) { long toget = left < gulp ? left : gulp; edg[vrank-1] = toget; *************** *** 259,264 **** set_indent(2); } - free ((char *) vals); return 0; } --- 259,263 ----
netcdfgroup
archives: