mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-03 08:01:25 +08:00
3db4f013bf
Specific changes: 1. Add dap4 code: libdap4 and dap4_test. Note that until the d4ts server problem is solved, dap4 is turned off. 2. Modify various files to support dap4 flags: configure.ac, Makefile.am, CMakeLists.txt, etc. 3. Add nc_test/test_common.sh. This centralizes the handling of the locations of various things in the build tree: e.g. where is ncgen.exe located. See nc_test/test_common.sh for details. 4. Modify .sh files to use test_common.sh 5. Obsolete separate oc2 by moving it to be part of netcdf-c. This means replacing code with netcdf-c equivalents. 5. Add --with-testserver to configure.ac to allow override of the servers to be used for --enable-dap-remote-tests. 6. There were multiple versions of nctypealignment code. Try to centralize in libdispatch/doffset.c and include/ncoffsets.h 7. Add a unit test for the ncuri code because of its complexity. 8. Move the findserver code out of libdispatch and into a separate, self contained program in ncdap_test and dap4_test. 9. Move the dispatch header files (nc{3,4}dispatch.h) to .../include because they are now shared by modules. 10. Revamp the handling of TOPSRCDIR and TOPBUILDDIR for shell scripts. 11. Make use of MREMAP if available 12. Misc. minor changes e.g. - #include <config.h> -> #include "config.h" - Add some no-install headers to /include - extern -> EXTERNL and vice versa as needed - misc header cleanup - clean up checking for misc. unix vs microsoft functions 13. Change copyright decls in some files to point to LICENSE file. 14. Add notes to RELEASENOTES.md
92 lines
3.1 KiB
C
92 lines
3.1 KiB
C
#ifndef NC_GENLIB_H
|
|
#define NC_GENLIB_H
|
|
/*********************************************************************
|
|
* Copyright 1993, UCAR/Unidata
|
|
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
|
|
* $Header: /upc/share/CVS/netcdf-3/ncgen3/genlib.h,v 1.15 2009/12/29 18:42:35 dmh Exp $
|
|
*********************************************************************/
|
|
#include "config.h"
|
|
#include <stdlib.h>
|
|
#include <limits.h>
|
|
|
|
extern const char *progname; /* for error messages */
|
|
extern const char *cdlname; /* for error messages */
|
|
|
|
#define FORT_MAX_LINES 20 /* max lines in FORTRAN statement */
|
|
#define FORT_MAX_STMNT 66*FORT_MAX_LINES /* max chars in FORTRAN statement */
|
|
#define C_MAX_STMNT FORT_MAX_STMNT /* until we fix to break up C lines */
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
extern void cline ( const char* stmnt );
|
|
extern void fline ( const char* stmnt );
|
|
extern const char* nctype ( nc_type type );
|
|
extern const char* ncctype ( nc_type type );
|
|
extern const char* ncstype ( nc_type type );
|
|
extern const char* ncatype ( nc_type type );
|
|
extern const char* nfstype ( nc_type type );
|
|
extern const char* nfftype ( nc_type type );
|
|
extern char* fstring ( nc_type type, void* valp, int num );
|
|
extern char* cstrstr ( const char* valp, size_t len );
|
|
extern char* fstrstr ( const char* str, size_t ilen );
|
|
extern size_t nctypesize( nc_type type );
|
|
|
|
extern void derror ( const char *fmt, ... )
|
|
#ifdef _GNUC_
|
|
__attribute__ ((format (printf, 1, 2)))
|
|
#endif
|
|
;
|
|
extern void check_err ( int status );
|
|
extern void *emalloc ( size_t size );
|
|
extern void *ecalloc ( size_t size );
|
|
extern void *erealloc ( void *ptr, size_t size );
|
|
extern void expe2d ( char *ptr );
|
|
extern void grow_iarray ( int narray, int **array );
|
|
extern void grow_varray ( int narray, struct vars **array );
|
|
extern void grow_darray ( int narray, struct dims **array );
|
|
extern void grow_aarray ( int narray, struct atts **array );
|
|
extern char* decodify (const char *name);
|
|
extern void deescapify (char *name);
|
|
|
|
extern int put_variable ( void* rec_start );
|
|
|
|
/* initializes netcdf counts (e.g. nvars), defined in init.c */
|
|
extern void init_netcdf ( void );
|
|
|
|
/* generates all define mode stuff, defined in genlib.c */
|
|
extern void define_netcdf(const char *netcdfname);
|
|
|
|
/* generates variable puts, defined in load.c */
|
|
extern void load_netcdf ( void* rec_start );
|
|
|
|
/* generates close, defined in close.c */
|
|
extern void close_netcdf ( void );
|
|
|
|
/* defined in escapes.c */
|
|
extern void expand_escapes ( char* termstring, char* yytext, int yyleng );
|
|
|
|
/* to get fill value for various types, defined in getfill.c */
|
|
extern void nc_getfill ( nc_type type, union generic* gval );
|
|
|
|
/* to put fill value for various types, defined in getfill.c */
|
|
extern void nc_putfill ( nc_type type, void* val, union generic* gval );
|
|
|
|
/* fills a generic array with a value, defined in getfill.c */
|
|
extern void nc_fill ( nc_type type, size_t num, void* datp,
|
|
union generic fill_val );
|
|
|
|
/* reset symbol table to empty, defined in ncgen.y */
|
|
extern void clearout(void);
|
|
|
|
/* In case we are missing strlcat */
|
|
#ifndef HAVE_STRLCAT
|
|
extern size_t strlcat(char *dst, const char *src, size_t siz);
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif /*!NC_GENLIB_H*/
|