Make some things static that do not need to be externally visible

This commit is contained in:
Dennis Heimbigner 2013-03-24 17:33:17 +00:00
parent f26a4a559a
commit 9b4db7a039
16 changed files with 25 additions and 30 deletions

View File

@ -245,7 +245,7 @@ dcemergeprojections(DCEprojection* merged, DCEprojection* addition)
that can be used with the url
*/
char*
static char*
buildprojectionstring(NClist* projections)
{
char* pstring;
@ -256,7 +256,7 @@ buildprojectionstring(NClist* projections)
return pstring;
}
char*
static char*
buildselectionstring(NClist* selections)
{
NCbytes* buf = ncbytesnew();
@ -267,7 +267,7 @@ buildselectionstring(NClist* selections)
return sstring;
}
char*
static char*
buildconstraintstring(DCEconstraint* constraints)
{
NCbytes* buf = ncbytesnew();

View File

@ -695,7 +695,7 @@ findfield(CDFnode* node, CDFnode* field)
}
int
static int
nc3d_getvarmx(int ncid, int varid,
const size_t *start,
const size_t *edges,

View File

@ -42,7 +42,7 @@ static int NCD3_get_vars(int ncid, int varid,
const size_t *start, const size_t *edges, const ptrdiff_t* stride,
void *value, nc_type memtype);
NC_Dispatch NCD3_dispatch_base = {
static NC_Dispatch NCD3_dispatch_base = {
NC_DISPATCH_NC3 | NC_DISPATCH_NCD,
@ -133,7 +133,7 @@ NULL, /*get_var_chunk_cache*/
NC_Dispatch* NCD3_dispatch_table = NULL; /* moved here from ddispatch.c */
NC_Dispatch NCD3_dispatcher; /* overlay result */
static NC_Dispatch NCD3_dispatcher; /* overlay result */
int
NCD3_initialize(void)

View File

@ -32,7 +32,7 @@ static NCerror buildattribute3a(NCDAPCOMMON*, NCattribute*, nc_type, int);
static char* getdefinename(CDFnode* node);
int nc3dinitialized = 0;
static int ncd3initialized = 0;
size_t dap_one[NC_MAX_VAR_DIMS];
size_t dap_zero[NC_MAX_VAR_DIMS];
@ -46,8 +46,8 @@ int nc__opendap(void) {return 0;}
/**************************************************/
/* Do local initialization */
int
nc3dinitialize(void)
static int
ncd3initialize(void)
{
int i;
compute_nccalignments();
@ -55,7 +55,7 @@ nc3dinitialize(void)
dap_one[i] = 1;
dap_zero[i] = 0;
}
nc3dinitialized = 1;
ncd3initialized = 1;
#ifdef DEBUG
/* force logging to go to stderr */
nclogclose();
@ -79,7 +79,7 @@ NCD3_open(const char * path, int mode,
NCDAPCOMMON* dapcomm = NULL;
const char* value;
if(!nc3dinitialized) nc3dinitialize();
if(!ncd3initialized) ncd3initialize();
if(path == NULL)
return NC_EDAPURL;

View File

@ -130,7 +130,6 @@ extern size_t dap_zero[NC_MAX_VAR_DIMS];
extern NCerror nc3d_open(const char* path, int mode, int* ncidp);
extern int nc3d_close(int ncid);
extern int nc3dinitialize(void);
extern NCerror restruct3(CDFnode* ddsroot, CDFnode* template, NClist*);
extern void setvisible(CDFnode* root, int visible);
extern NCerror mapnodes3(CDFnode* dstroot, CDFnode* srcroot);

View File

@ -35,7 +35,7 @@ free_NC_string(NC_string *ncstrp)
}
int
static int
nextUTF8(const char* cp)
{
/* The goal here is to recognize the length of each

View File

@ -76,7 +76,7 @@ static int NC3_set_var_chunk_cache(int,int,size_t,size_t,float);
static int NC3_get_var_chunk_cache(int,int,size_t*,size_t*,float*);
#endif /*USE_NETCDF4*/
NC_Dispatch NC3_dispatcher = {
static NC_Dispatch NC3_dispatcher = {
NC_DISPATCH_NC3,

View File

@ -23,9 +23,6 @@
#endif
#include "nc3dispatch.h"
#if defined(_WIN32) || defined(_WIN64)
#include <malloc.h>
#endif
#undef MIN /* system may define MIN somewhere and complain */
#define MIN(mm,nn) (((mm) < (nn)) ? (mm) : (nn))

View File

@ -10,7 +10,7 @@
#include "ncdispatch.h"
#include "nc4dispatch.h"
NC_Dispatch NC4_dispatcher = {
static NC_Dispatch NC4_dispatcher = {
NC_DISPATCH_NC4,

View File

@ -668,7 +668,7 @@ nc4_dim_list_add(NC_DIM_INFO_T **list)
}
/* Add to the beginning of a dim list. */
int
static int
nc4_dim_list_add2(NC_DIM_INFO_T **list, NC_DIM_INFO_T **new_dim)
{
NC_DIM_INFO_T *dim;
@ -1012,7 +1012,7 @@ field_list_del(NC_FIELD_INFO_T **list, NC_FIELD_INFO_T *field)
}
/* Delete a type from a type list, and nc_free the memory. */
int
static int
type_list_del(NC_TYPE_INFO_T **list, NC_TYPE_INFO_T *type)
{
NC_FIELD_INFO_T *field, *f;
@ -1071,7 +1071,7 @@ type_list_del(NC_TYPE_INFO_T **list, NC_TYPE_INFO_T *type)
}
/* Delete a del from a var list, and nc_free the memory. */
int
static int
nc4_dim_list_del(NC_DIM_INFO_T **list, NC_DIM_INFO_T *dim)
{
/* Take this dimension out of the list. */

View File

@ -26,8 +26,8 @@ static int ocerrorstring(XXDR* xdrs);
static int istoplevel(OCnode* node);
/* Sequence tag constant */
const char StartOfSequence = '\x5A';
const char EndOfSequence = '\xA5';
static const char StartOfSequence = '\x5A';
static const char EndOfSequence = '\xA5';
/*
Provide an option that makes a single pass over

View File

@ -24,7 +24,7 @@ octhrow(int err)
#endif
int
xdrerror(void)
xxdrerror(void)
{
oclog(OCLOGERR,"xdr failure");
return OCTHROW(OC_EDATADDS);

View File

@ -122,7 +122,7 @@ ocnode_new(char* name, OCtype ptype, OCnode* root)
return cdf;
}
OCattribute*
static OCattribute*
makeattribute(char* name, OCtype ptype, OClist* values)
{
OCattribute* att = (OCattribute*)ocmalloc(sizeof(OCattribute)); /* ocmalloc zeros*/

View File

@ -46,7 +46,7 @@ ocstrncmp(const char* s1, const char* s2, size_t len)
}
void
static void
makedimlist(OClist* path, OClist* dims)
{
unsigned int i,j;
@ -94,7 +94,7 @@ freeAttributes(OClist* attset)
}
}
void
static void
freeOCnode(OCnode* cdf, int deep)
{
unsigned int i;
@ -516,7 +516,7 @@ oc_ispacked(OCnode* node)
/* Must be consistent with ocx.h.OCDT */
#define NMODES 6
#define MAXMODENAME 8 /*max (strlen(modestrings[i])) */
char* modestrings[NMODES+1] = {
static char* modestrings[NMODES+1] = {
"FIELD", /* ((OCDT)(1<<0)) field of a container */
"ELEMENT", /* ((OCDT)(1<<1)) element of a structure array */
"RECORD", /* ((OCDT)(1<<2)) record of a sequence */

View File

@ -38,7 +38,6 @@ extern void ocmakedimlist(OClist* path, OClist* dims);
extern int ocfindbod(OCbytes* buffer, size_t*, size_t*);
/* Reclaimers*/
extern void freeOCnode(OCnode*,int);
extern void ocfreeprojectionclause(OCprojectionclause* clause);
/* Misc. */

View File

@ -240,7 +240,7 @@ xxdr_skip_strings(XXDR* xdrs, off_t n)
}
unsigned int
xdr_roundup(unsigned int n)
xxdr_roundup(off_t n)
{
unsigned int rounded;
rounded = RNDUP(n);