mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-12 15:45:21 +08:00
be329e7a23
extract info from libnetcdf.settings API is below. I have made this API public yet by adding it to netcdf.h. I will do that when everyone is agreed on the proper API. extern const char* nc_settings(const char* key); /*get value of a specific key */ extern const char** nc_settings_all(); /*get all settings in envv format */ extern void nc_settings_reclaim(); /* reclaim all space and clean up */ Envv format is {key,value}*,NULL Also added test: nc_test/tst_settings.c
15 lines
315 B
Plaintext
15 lines
315 B
Plaintext
# Test c output
|
|
T=tst_settings
|
|
#VG=valgrind --leak-check=full
|
|
|
|
CFLAGS=-g -O0 -I.. -I../include
|
|
LDFLAGS=../liblib/.libs/libnetcdf.a -L/usr/local/lib -lhdf5_hl -lhdf5 -lz -lm -lcurl
|
|
|
|
# cd .. ; ${MAKE} all
|
|
|
|
all::
|
|
export LD_RUN_PATH; export CFLAGS; export LDFLAGS; \
|
|
gcc -o t ${CFLAGS} ${T}.c ${LDFLAGS}
|
|
${VG} ./t
|
|
|