mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
conflict resolution
This commit is contained in:
commit
19d377e87a
3
cf
3
cf
@ -19,7 +19,10 @@ DAP=1
|
||||
CFLAGS=""
|
||||
#CFLAGS="-Wall -Wno-unused-variable -Wno-unused-parameter -Wconversion ${CFLAGS}"
|
||||
#CFLAGS="-Wall -Wno-unused-variable -Wno-unused-parameter ${CFLAGS}"
|
||||
<<<<<<< HEAD
|
||||
#CFLAGS="-Wconversion"
|
||||
=======
|
||||
>>>>>>> 513cb29ea4eb4e1087c9dbcdf3471e08c741fb2b
|
||||
|
||||
FORCE="-i"
|
||||
|
||||
|
@ -633,13 +633,15 @@ AC_ARG_ENABLE([diskless],
|
||||
[AS_HELP_STRING([--disable-diskless],
|
||||
[disable support for in-memory (NC_DISKLESS) files])])
|
||||
test "x$enable_diskless" = xno || enable_diskless=yes
|
||||
AC_MSG_RESULT($enable_diskless)
|
||||
|
||||
if test "x$enable_dap" = "xyes" -o "x$enable_cdmremote" = "xyes" -o "x$enable_rpc" = "xyes" ; then
|
||||
enable_diskless=yes
|
||||
AC_MSG_NOTICE([--enable-dap requires --enable-diskless])
|
||||
fi
|
||||
|
||||
AC_MSG_RESULT($enable_diskless)
|
||||
|
||||
|
||||
# check for useful, but not essential, memio support
|
||||
AC_CHECK_FUNCS([memmove getpagesize sysconf])
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
typedef struct NCbytes {
|
||||
int nonextendible; /* 1 => fail if an attempt is made to extend this buffer*/
|
||||
size_t alloc;
|
||||
size_t length;
|
||||
unsigned long alloc;
|
||||
unsigned long length;
|
||||
char* content;
|
||||
} NCbytes;
|
||||
|
||||
@ -19,8 +19,8 @@ typedef struct NCbytes {
|
||||
|
||||
EXTERNC NCbytes* ncbytesnew(void);
|
||||
EXTERNC void ncbytesfree(NCbytes*);
|
||||
EXTERNC int ncbytessetalloc(NCbytes*,size_t);
|
||||
EXTERNC int ncbytessetlength(NCbytes*,size_t);
|
||||
EXTERNC int ncbytessetalloc(NCbytes*,unsigned long);
|
||||
EXTERNC int ncbytessetlength(NCbytes*,unsigned long);
|
||||
EXTERNC int ncbytesfill(NCbytes*, char fill);
|
||||
|
||||
/* Produce a duplicate of the contents*/
|
||||
@ -29,14 +29,14 @@ EXTERNC char* ncbytesdup(NCbytes*);
|
||||
EXTERNC char* ncbytesextract(NCbytes*);
|
||||
|
||||
/* Return the ith byte; -1 if no such index */
|
||||
EXTERNC int ncbytesget(NCbytes*,size_t);
|
||||
EXTERNC int ncbytesget(NCbytes*,unsigned long);
|
||||
/* Set the ith byte */
|
||||
EXTERNC int ncbytesset(NCbytes*,size_t,char);
|
||||
EXTERNC int ncbytesset(NCbytes*,unsigned long,char);
|
||||
|
||||
/* Append one byte */
|
||||
EXTERNC int ncbytesappend(NCbytes*,int); /* Add at Tail */
|
||||
EXTERNC int ncbytesappend(NCbytes*,char); /* Add at Tail */
|
||||
/* Append n bytes */
|
||||
EXTERNC int ncbytesappendn(NCbytes*,const void*,size_t); /* Add at Tail */
|
||||
EXTERNC int ncbytesappendn(NCbytes*,const void*,unsigned long); /* Add at Tail */
|
||||
|
||||
/* Null terminate the byte string without extending its length (for debugging) */
|
||||
EXTERNC int ncbytesnull(NCbytes*);
|
||||
@ -45,7 +45,7 @@ EXTERNC int ncbytesnull(NCbytes*);
|
||||
EXTERNC int ncbytescat(NCbytes*,const char*);
|
||||
|
||||
/* Set the contents of the buffer; mark the buffer as non-extendible */
|
||||
EXTERNC int ncbytessetcontents(NCbytes*, char*, size_t);
|
||||
EXTERNC int ncbytessetcontents(NCbytes*, char*, unsigned long);
|
||||
|
||||
/* Following are always "in-lined"*/
|
||||
#define ncbyteslength(bb) ((bb)!=NULL?(bb)->length:0)
|
||||
|
@ -48,7 +48,7 @@ externC int nchashremove(NChashmap*, nchashid nchash);
|
||||
|
||||
/* Return the ith pair; order is completely arbitrary*/
|
||||
/* Can be expensive*/
|
||||
externC int nchashith(NChashmap*, size_t i, nchashid*, void**);
|
||||
externC int nchashith(NChashmap*, int i, nchashid*, void**);
|
||||
|
||||
externC int nchashkeys(NChashmap* hm, nchashid** keylist);
|
||||
|
||||
|
@ -547,7 +547,7 @@ ssize_t utf8proc_map(
|
||||
}
|
||||
{
|
||||
int32_t *newptr;
|
||||
newptr = realloc(buffer, (size_t)result+1);
|
||||
newptr = realloc(buffer, result+1);
|
||||
if (newptr) buffer = newptr;
|
||||
}
|
||||
*dstptr = (uint8_t *)buffer;
|
||||
|
@ -964,7 +964,7 @@ ncattput(
|
||||
const void* value
|
||||
)
|
||||
{
|
||||
const int status = nc_put_att(ncid, varid, name, datatype, (size_t)len, value);
|
||||
const int status = nc_put_att(ncid, varid, name, datatype, len, value);
|
||||
if(status != NC_NOERR)
|
||||
{
|
||||
nc_advise("ncattput", status, "ncid %d", ncid);
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* Copyright by The HDF Group. *
|
||||
* Copyright by the Board of Trustees of the University of Illinois. *
|
||||
@ -360,7 +359,7 @@ computefieldinfo(struct NCAUX_CMPD* cmpd)
|
||||
|
||||
for(offset=0,i=0;i<cmpd->nfields;i++) {
|
||||
struct NCAUX_FIELD* field = &cmpd->fields[i];
|
||||
size_t alignment = 0;
|
||||
int alignment = 0;
|
||||
nc_type firsttype = findfirstfield(cmpd->ncid,field->fieldtype);
|
||||
|
||||
/* only support 'c' alignment for now*/
|
||||
|
@ -42,7 +42,7 @@ ncbytesnew(void)
|
||||
}
|
||||
|
||||
int
|
||||
ncbytessetalloc(NCbytes* bb, size_t sz)
|
||||
ncbytessetalloc(NCbytes* bb, unsigned long sz)
|
||||
{
|
||||
char* newcontent;
|
||||
if(bb == NULL) return ncbytesfail();
|
||||
@ -69,7 +69,7 @@ ncbytesfree(NCbytes* bb)
|
||||
}
|
||||
|
||||
int
|
||||
ncbytessetlength(NCbytes* bb, size_t sz)
|
||||
ncbytessetlength(NCbytes* bb, unsigned long sz)
|
||||
{
|
||||
if(bb == NULL) return ncbytesfail();
|
||||
if(bb->length < sz) {
|
||||
@ -82,14 +82,14 @@ ncbytessetlength(NCbytes* bb, size_t sz)
|
||||
int
|
||||
ncbytesfill(NCbytes* bb, char fill)
|
||||
{
|
||||
size_t i;
|
||||
unsigned long i;
|
||||
if(bb == NULL) return ncbytesfail();
|
||||
for(i=0;i<bb->length;i++) bb->content[i] = fill;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int
|
||||
ncbytesget(NCbytes* bb, size_t index)
|
||||
ncbytesget(NCbytes* bb, unsigned long index)
|
||||
{
|
||||
if(bb == NULL) return -1;
|
||||
if(index >= bb->length) return -1;
|
||||
@ -97,7 +97,7 @@ ncbytesget(NCbytes* bb, size_t index)
|
||||
}
|
||||
|
||||
int
|
||||
ncbytesset(NCbytes* bb, size_t index, char elem)
|
||||
ncbytesset(NCbytes* bb, unsigned long index, char elem)
|
||||
{
|
||||
if(bb == NULL) return ncbytesfail();
|
||||
if(index >= bb->length) return ncbytesfail();
|
||||
@ -106,7 +106,7 @@ ncbytesset(NCbytes* bb, size_t index, char elem)
|
||||
}
|
||||
|
||||
int
|
||||
ncbytesappend(NCbytes* bb, int elem)
|
||||
ncbytesappend(NCbytes* bb, char elem)
|
||||
{
|
||||
if(bb == NULL) return ncbytesfail();
|
||||
/* We need space for the char + null */
|
||||
@ -134,7 +134,7 @@ ncbytescat(NCbytes* bb, const char* s)
|
||||
}
|
||||
|
||||
int
|
||||
ncbytesappendn(NCbytes* bb, const void* elem, size_t n)
|
||||
ncbytesappendn(NCbytes* bb, const void* elem, unsigned long n)
|
||||
{
|
||||
if(bb == NULL || elem == NULL) return ncbytesfail();
|
||||
if(n == 0) {n = strlen((char*)elem);}
|
||||
@ -180,7 +180,7 @@ ncbytesextract(NCbytes* bb)
|
||||
}
|
||||
|
||||
int
|
||||
ncbytessetcontents(NCbytes* bb, char* contents, size_t alloc)
|
||||
ncbytessetcontents(NCbytes* bb, char* contents, unsigned long alloc)
|
||||
{
|
||||
if(bb == NULL) return ncbytesfail();
|
||||
ncbytesclear(bb);
|
||||
@ -197,7 +197,7 @@ ncbytessetcontents(NCbytes* bb, char* contents, size_t alloc)
|
||||
int
|
||||
ncbytesnull(NCbytes* bb)
|
||||
{
|
||||
ncbytesappend(bb,(int)'\0');
|
||||
ncbytesappend(bb,'\0');
|
||||
bb->length--;
|
||||
return 1;
|
||||
}
|
||||
|
@ -162,13 +162,13 @@ nchashlookup(NChashmap* hm, nchashid hash, void** valuep)
|
||||
/* Return the ith pair; order is completely arbitrary*/
|
||||
/* Can be expensive*/
|
||||
int
|
||||
nchashith(NChashmap* hm, size_t index, nchashid* hashp, void** elemp)
|
||||
nchashith(NChashmap* hm, int index, nchashid* hashp, void** elemp)
|
||||
{
|
||||
size_t i;
|
||||
int i;
|
||||
if(hm == NULL) return FALSE;
|
||||
for(i=0;i<hm->alloc;i++) {
|
||||
NClist* seq = hm->table[i];
|
||||
size_t len = nclistlength(seq) / 2;
|
||||
int len = nclistlength(seq) / 2;
|
||||
if(len == 0) continue;
|
||||
if((index - len) < 0) {
|
||||
if(hashp) *hashp = (nchashid)nclistget(seq,index*2);
|
||||
@ -185,7 +185,7 @@ nchashith(NChashmap* hm, size_t index, nchashid* hashp, void** elemp)
|
||||
int
|
||||
nchashkeys(NChashmap* hm, nchashid** keylist)
|
||||
{
|
||||
size_t i,j,index;
|
||||
int i,j,index;
|
||||
nchashid* keys;
|
||||
if(hm == NULL) return FALSE;
|
||||
if(hm->size == 0) {
|
||||
|
@ -316,9 +316,9 @@ ncuriparse(const char* uri0, NCURI** durip)
|
||||
|
||||
/* concat suffix and prefix params */
|
||||
if(prefixparams != NULL || suffixparams != NULL) {
|
||||
size_t plen = prefixparams ? strlen(prefixparams) : 0;
|
||||
size_t slen = suffixparams ? strlen(suffixparams) : 0;
|
||||
size_t space = plen + slen + 1;
|
||||
int plen = prefixparams ? strlen(prefixparams) : 0;
|
||||
int slen = suffixparams ? strlen(suffixparams) : 0;
|
||||
int space = plen + slen + 1;
|
||||
/* add 1 for an extra ampersand if both are defined */
|
||||
space++;
|
||||
duri->params = (char*)malloc(space);
|
||||
@ -721,7 +721,7 @@ ncrshift1(char* p)
|
||||
static char* hexchars = "0123456789abcdefABCDEF";
|
||||
|
||||
static void
|
||||
toHex(int b, char hex[2])
|
||||
toHex(unsigned int b, char hex[2])
|
||||
{
|
||||
hex[0] = hexchars[(b >> 4) & 0xff];
|
||||
hex[1] = hexchars[(b) & 0xff];
|
||||
|
1333
ncdump/ctest.c
Normal file
1333
ncdump/ctest.c
Normal file
File diff suppressed because it is too large
Load Diff
1333
ncdump/ctest64.c
Normal file
1333
ncdump/ctest64.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user