mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
changed macro STREQ to NCSTREQ to avoid name collusion with HDF4 library
This commit is contained in:
parent
605a5bfb0b
commit
0c0d066927
@ -99,7 +99,7 @@ bool_t
|
||||
is_bounds_var(char *varname, int *pargrpidp, int *parvaridp) {
|
||||
bounds_node_t *bp = bounds_list.first;
|
||||
for(; bp; bp = bp->next) {
|
||||
if(STREQ(bp->bounds_name, varname)) {
|
||||
if(NCSTREQ(bp->bounds_name, varname)) {
|
||||
*pargrpidp = bp->ncid;
|
||||
*parvaridp = bp->varid;
|
||||
return true;
|
||||
@ -160,11 +160,11 @@ is_valid_time_unit(const char *units) {
|
||||
/* Return true only if this is a "bounds" attribute */
|
||||
bool_t
|
||||
is_bounds_att(ncatt_t *attp) {
|
||||
if(attp->type == NC_CHAR && attp->valgp && STREQ((char *)attp->name, "bounds")) {
|
||||
if(attp->type == NC_CHAR && attp->valgp && NCSTREQ((char *)attp->name, "bounds")) {
|
||||
return true;
|
||||
}
|
||||
#ifdef USE_NETCDF4
|
||||
if(attp->type == NC_STRING && attp->valgp && STREQ((char *)attp->name, "bounds")) {
|
||||
if(attp->type == NC_STRING && attp->valgp && NCSTREQ((char *)attp->name, "bounds")) {
|
||||
return true;
|
||||
}
|
||||
#endif /* USE_NETCDF4 */
|
||||
|
@ -313,7 +313,7 @@ nc_inq_grpname_count(int ncid, int igrp, char **lgrps, idnode_t *grpids) {
|
||||
char *grpname = lgrps[igrp];
|
||||
|
||||
/* permit empty string to also designate root group */
|
||||
if(grpname[0] == '\0' || STREQ(grpname,"/")) {
|
||||
if(grpname[0] == '\0' || NCSTREQ(grpname,"/")) {
|
||||
count = 1;
|
||||
idadd(grpids, ncid);
|
||||
return count;
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef STREQ
|
||||
#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
|
||||
#ifndef NCSTREQ
|
||||
#define NCSTREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
|
||||
#endif
|
||||
|
||||
/* Delimiter for separating netCDF groups in absolute pathnames, same as for HDF5 */
|
||||
|
@ -473,7 +473,7 @@ print_rows(
|
||||
NC_CHECK(nc_get_vara(ncid, varid, cor, edg, (void *)valp));
|
||||
|
||||
/* Test if we should treat array of chars as strings along last dimension */
|
||||
if(vp->type == NC_CHAR && (vp->fmt == 0 || STREQ(vp->fmt,"%s") || STREQ(vp->fmt,""))) {
|
||||
if(vp->type == NC_CHAR && (vp->fmt == 0 || NCSTREQ(vp->fmt,"%s") || NCSTREQ(vp->fmt,""))) {
|
||||
pr_tvals(vp, ncols, vals, cor);
|
||||
} else { /* for non-text variables */
|
||||
for(i=0; i < d0 - 1; i++) {
|
||||
@ -766,7 +766,7 @@ vardatax(
|
||||
NC_CHECK(nc_get_vara(ncid, varid, cor, edg, vals) );
|
||||
/* Test if we should treat array of chars as a string */
|
||||
if(vp->type == NC_CHAR &&
|
||||
(vp->fmt == 0 || STREQ(vp->fmt,"%s") || STREQ(vp->fmt,""))) {
|
||||
(vp->fmt == 0 || NCSTREQ(vp->fmt,"%s") || NCSTREQ(vp->fmt,""))) {
|
||||
pr_tvalsx(vp, ncols, 0, lastrow, (char *) vals);
|
||||
} else {
|
||||
pr_any_valsx(vp, ncols, 0, lastrow, vals);
|
||||
|
@ -371,7 +371,7 @@ NIL|nil|Nil {
|
||||
id = bbContents(lextext);
|
||||
len = unescape(id,id,bbLength(lextext),ISIDENT);
|
||||
bbSetlength(lextext,len);
|
||||
if (STREQ(id, FILL_STRING)) return lexdebug(FILLMARKER);
|
||||
if (NCSTREQ(id, FILL_STRING)) return lexdebug(FILLMARKER);
|
||||
yylval.sym = install(id);
|
||||
return lexdebug(IDENT);
|
||||
}
|
||||
|
@ -30,8 +30,8 @@ static char SccsId[] = "$Id: ncgen.y,v 1.42 2010/05/18 21:32:46 dmh Exp $";
|
||||
#define YY_NO_INPUT 1
|
||||
|
||||
/* True if string a equals string b*/
|
||||
#ifndef STREQ
|
||||
#define STREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
|
||||
#ifndef NCSTREQ
|
||||
#define NCSTREQ(a, b) (*(a) == *(b) && strcmp((a), (b)) == 0)
|
||||
#endif
|
||||
#define VLENSIZE (sizeof(nc_vlen_t))
|
||||
#define MAXFLOATDIM 4294967295.0
|
||||
|
799
ncgen/ncgenl.c
799
ncgen/ncgenl.c
File diff suppressed because it is too large
Load Diff
554
ncgen/ncgeny.c
554
ncgen/ncgeny.c
File diff suppressed because it is too large
Load Diff
@ -106,7 +106,7 @@ extern int ncgdebug;
|
||||
|
||||
union YYSTYPE
|
||||
{
|
||||
#line 145 "ncgen.y" /* yacc.c:1909 */
|
||||
#line 147 "ncgen.y" /* yacc.c:1909 */
|
||||
|
||||
Symbol* sym;
|
||||
unsigned long size; /* allow for zero size to indicate e.g. UNLIMITED*/
|
||||
|
Loading…
Reference in New Issue
Block a user