mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
6934aa2e8b
re: https://github.com/Unidata/netcdf-c/issues/1373 (partial) * Mark some global constants be const to indicate to make them easier to track. * Hide direct access to the ncrc_globalstate behind a function call. * Convert dispatch tables to constants (except the user defined ones) This has some consequences in terms of function arguments needing to be marked as const also. * Remove some no longer needed global fields * Aggregate all the globals in nclog.c * Uniformly replace nc_sizevector{0,1} with NC_coord_{zero,one} * Uniformly replace nc_ptrdffvector1 with NC_stride_one * Remove some obsolete code
41 lines
1.0 KiB
C
41 lines
1.0 KiB
C
/*********************************************************************
|
|
* Copyright 2018, UCAR/Unidata
|
|
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
|
|
* $Header$
|
|
*********************************************************************/
|
|
|
|
#ifndef NCLOG_H
|
|
#define NCLOG_H
|
|
|
|
#include <stdarg.h>
|
|
#include "ncexternl.h"
|
|
|
|
#define NCENVFLAG "NCLOGFILE"
|
|
|
|
/* Suggested tag values */
|
|
#define NCLOGNOTE 0
|
|
#define NCLOGWARN 1
|
|
#define NCLOGERR 2
|
|
#define NCLOGDBG 3
|
|
|
|
#if defined(_CPLUSPLUS_) || defined(__CPLUSPLUS__)
|
|
extern "C" {
|
|
#endif
|
|
|
|
EXTERNL void ncloginit(void);
|
|
EXTERNL int ncsetlogging(int tf);
|
|
EXTERNL int nclogopen(const char* file);
|
|
EXTERNL void nclogclose(void);
|
|
|
|
/* The tag value is an arbitrary integer */
|
|
EXTERNL void nclog(int tag, const char* fmt, ...);
|
|
EXTERNL void ncvlog(int tag, const char* fmt, va_list ap);
|
|
EXTERNL void nclogtext(int tag, const char* text);
|
|
EXTERNL void nclogtextn(int tag, const char* text, size_t count);
|
|
|
|
#if defined(_CPLUSPLUS_) || defined(__CPLUSPLUS__)
|
|
}
|
|
#endif
|
|
|
|
#endif /*NCLOG_H*/
|