mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-12 15:45:21 +08:00
Addressed UNIX API issues reported by clang.
This commit is contained in:
parent
b1cd5268d9
commit
66dc490e8a
@ -185,7 +185,7 @@ NCConstant constant;
|
|||||||
_ENDIANNESS
|
_ENDIANNESS
|
||||||
_NOFILL
|
_NOFILL
|
||||||
_FLETCHER32
|
_FLETCHER32
|
||||||
DATASETID
|
DATASETID
|
||||||
|
|
||||||
%type <sym> ident typename primtype dimd varspec
|
%type <sym> ident typename primtype dimd varspec
|
||||||
attrdecl enumid path dimref fielddim fieldspec
|
attrdecl enumid path dimref fielddim fieldspec
|
||||||
@ -233,7 +233,7 @@ namedgroup: GROUP ident '{'
|
|||||||
{
|
{
|
||||||
Symbol* id = $2;
|
Symbol* id = $2;
|
||||||
markcdf4("Group specification");
|
markcdf4("Group specification");
|
||||||
if(creategroup(id) == NULL)
|
if(creategroup(id) == NULL)
|
||||||
yyerror("duplicate group declaration within parent group for %s",
|
yyerror("duplicate group declaration within parent group for %s",
|
||||||
id->name);
|
id->name);
|
||||||
}
|
}
|
||||||
@ -243,7 +243,7 @@ namedgroup: GROUP ident '{'
|
|||||||
'}'
|
'}'
|
||||||
attrdecllist
|
attrdecllist
|
||||||
;
|
;
|
||||||
|
|
||||||
typesection: /* empty */
|
typesection: /* empty */
|
||||||
| TYPES {}
|
| TYPES {}
|
||||||
| TYPES typedecls
|
| TYPES typedecls
|
||||||
@ -299,7 +299,7 @@ enumdecl: primtype ENUM typename
|
|||||||
listpush($3->subnodes,(void*)eid);
|
listpush($3->subnodes,(void*)eid);
|
||||||
eid->container = $3;
|
eid->container = $3;
|
||||||
eid->typ.basetype = $3->typ.basetype;
|
eid->typ.basetype = $3->typ.basetype;
|
||||||
}
|
}
|
||||||
listsetlength(stack,stackbase);/* remove stack nodes*/
|
listsetlength(stack,stackbase);/* remove stack nodes*/
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -318,7 +318,7 @@ enumidlist: enumid
|
|||||||
if(strcmp($3->name,elem->name)==0)
|
if(strcmp($3->name,elem->name)==0)
|
||||||
yyerror("duplicate enum declaration for %s",
|
yyerror("duplicate enum declaration for %s",
|
||||||
elem->name);
|
elem->name);
|
||||||
}
|
}
|
||||||
listpush(stack,(void*)$3);
|
listpush(stack,(void*)$3);
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -385,7 +385,7 @@ compounddecl: COMPOUND typename '{' fields '}'
|
|||||||
Symbol* fsym = (Symbol*)listget(stack,i);
|
Symbol* fsym = (Symbol*)listget(stack,i);
|
||||||
fsym->container = $2;
|
fsym->container = $2;
|
||||||
listpush($2->subnodes,(void*)fsym);
|
listpush($2->subnodes,(void*)fsym);
|
||||||
}
|
}
|
||||||
listsetlength(stack,stackbase);/* remove stack nodes*/
|
listsetlength(stack,stackbase);/* remove stack nodes*/
|
||||||
}
|
}
|
||||||
;
|
;
|
||||||
@ -480,7 +480,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",$1->name);
|
|||||||
;
|
;
|
||||||
|
|
||||||
dimd: ident
|
dimd: ident
|
||||||
{
|
{
|
||||||
$1->objectclass=NC_DIM;
|
$1->objectclass=NC_DIM;
|
||||||
if(dupobjectcheck(NC_DIM,$1))
|
if(dupobjectcheck(NC_DIM,$1))
|
||||||
yyerror( "Duplicate dimension declaration for %s",
|
yyerror( "Duplicate dimension declaration for %s",
|
||||||
@ -672,7 +672,7 @@ varref:
|
|||||||
;
|
;
|
||||||
|
|
||||||
typeref:
|
typeref:
|
||||||
type_var_ref
|
type_var_ref
|
||||||
{Symbol* tsym = $1;
|
{Symbol* tsym = $1;
|
||||||
if(tsym->objectclass != NC_TYPE) {
|
if(tsym->objectclass != NC_TYPE) {
|
||||||
derror("Undefined or forward referenced type: %s",tsym->name);
|
derror("Undefined or forward referenced type: %s",tsym->name);
|
||||||
@ -682,8 +682,8 @@ typeref:
|
|||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
type_var_ref:
|
type_var_ref:
|
||||||
path
|
path
|
||||||
{Symbol* tvsym = $1; Symbol* sym;
|
{Symbol* tvsym = $1; Symbol* sym;
|
||||||
/* disambiguate*/
|
/* disambiguate*/
|
||||||
tvsym->objectclass = NC_VAR;
|
tvsym->objectclass = NC_VAR;
|
||||||
@ -956,7 +956,7 @@ install(const char *sname)
|
|||||||
{
|
{
|
||||||
Symbol* sp;
|
Symbol* sp;
|
||||||
sp = (Symbol*) emalloc (sizeof (struct Symbol));
|
sp = (Symbol*) emalloc (sizeof (struct Symbol));
|
||||||
memset((void*)sp,0,sizeof(struct Symbol));
|
memset((void*)sp,0,sizeof(struct Symbol));
|
||||||
sp->name = nulldup(sname);
|
sp->name = nulldup(sname);
|
||||||
sp->next = symlist;
|
sp->next = symlist;
|
||||||
sp->lineno = lineno;
|
sp->lineno = lineno;
|
||||||
@ -1028,7 +1028,7 @@ makeconstdata(nc_type nctype)
|
|||||||
len = bbLength(lextext);
|
len = bbLength(lextext);
|
||||||
con.value.stringv.len = len;
|
con.value.stringv.len = len;
|
||||||
con.value.stringv.stringv = bbDup(lextext);
|
con.value.stringv.stringv = bbDup(lextext);
|
||||||
bbClear(lextext);
|
bbClear(lextext);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1061,7 +1061,7 @@ makeconstdata(nc_type nctype)
|
|||||||
default:
|
default:
|
||||||
yyerror("Data constant: unexpected NC type: %s",
|
yyerror("Data constant: unexpected NC type: %s",
|
||||||
nctypename(nctype));
|
nctypename(nctype));
|
||||||
con.value.stringv.stringv = NULL;
|
con.value.stringv.stringv = NULL;
|
||||||
con.value.stringv.len = 0;
|
con.value.stringv.len = 0;
|
||||||
}
|
}
|
||||||
return con;
|
return con;
|
||||||
@ -1233,7 +1233,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
|
|||||||
break;
|
break;
|
||||||
default: PANIC1("unexpected special tag: %d",tag);
|
default: PANIC1("unexpected special tag: %d",tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tag == _FORMAT_FLAG) {
|
if(tag == _FORMAT_FLAG) {
|
||||||
/* Watch out: this is a global attribute */
|
/* Watch out: this is a global attribute */
|
||||||
struct Kvalues* kvalue;
|
struct Kvalues* kvalue;
|
||||||
@ -1241,11 +1241,13 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
|
|||||||
|
|
||||||
/* Use the table in main.c */
|
/* Use the table in main.c */
|
||||||
for(kvalue = legalkinds; kvalue->name; kvalue++) {
|
for(kvalue = legalkinds; kvalue->name; kvalue++) {
|
||||||
if(strcmp(sdata, kvalue->name) == 0) {
|
if(sdata) {
|
||||||
/*Main.*/format_flag = kvalue->k_flag;
|
if(strcmp(sdata, kvalue->name) == 0) {
|
||||||
found = 1;
|
/*Main.*/format_flag = kvalue->k_flag;
|
||||||
break;
|
found = 1;
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(!found)
|
if(!found)
|
||||||
derror("_Format: illegal value: %s",sdata);
|
derror("_Format: illegal value: %s",sdata);
|
||||||
@ -1278,15 +1280,17 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
|
|||||||
} else switch (tag) {
|
} else switch (tag) {
|
||||||
// These will be output as attributes later
|
// These will be output as attributes later
|
||||||
case _STORAGE_FLAG:
|
case _STORAGE_FLAG:
|
||||||
if(strcmp(sdata,"contiguous") == 0)
|
if(!sdata)
|
||||||
special->_Storage = NC_CONTIGUOUS;
|
derror("_Storage: illegal NULL value");
|
||||||
else if(strcmp(sdata,"chunked") == 0)
|
else if(strcmp(sdata,"contiguous") == 0)
|
||||||
special->_Storage = NC_CHUNKED;
|
special->_Storage = NC_CONTIGUOUS;
|
||||||
else
|
else if(strcmp(sdata,"chunked") == 0)
|
||||||
derror("_Storage: illegal value: %s",sdata);
|
special->_Storage = NC_CHUNKED;
|
||||||
special->flags |= _STORAGE_FLAG;
|
else
|
||||||
break;
|
derror("_Storage: illegal value: %s",sdata);
|
||||||
case _FLETCHER32_FLAG:
|
special->flags |= _STORAGE_FLAG;
|
||||||
|
break;
|
||||||
|
case _FLETCHER32_FLAG:
|
||||||
special->_Fletcher32 = tf;
|
special->_Fletcher32 = tf;
|
||||||
special->flags |= _FLETCHER32_FLAG;
|
special->flags |= _FLETCHER32_FLAG;
|
||||||
break;
|
break;
|
||||||
@ -1299,15 +1303,17 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
|
|||||||
special->flags |= _SHUFFLE_FLAG;
|
special->flags |= _SHUFFLE_FLAG;
|
||||||
break;
|
break;
|
||||||
case _ENDIAN_FLAG:
|
case _ENDIAN_FLAG:
|
||||||
if(strcmp(sdata,"little") == 0)
|
if(!sdata)
|
||||||
special->_Endianness = 1;
|
derror("_Endianness: illegal NULL value");
|
||||||
else if(strcmp(sdata,"big") == 0)
|
else if(strcmp(sdata,"little") == 0)
|
||||||
special->_Endianness = 2;
|
special->_Endianness = 1;
|
||||||
else
|
else if(strcmp(sdata,"big") == 0)
|
||||||
derror("_Endianness: illegal value: %s",sdata);
|
special->_Endianness = 2;
|
||||||
special->flags |= _ENDIAN_FLAG;
|
else
|
||||||
break;
|
derror("_Endianness: illegal value: %s",sdata);
|
||||||
case _NOFILL_FLAG:
|
special->flags |= _ENDIAN_FLAG;
|
||||||
|
break;
|
||||||
|
case _NOFILL_FLAG:
|
||||||
special->_Fill = (1 - tf); /* negate */
|
special->_Fill = (1 - tf); /* negate */
|
||||||
special->flags |= _NOFILL_FLAG;
|
special->flags |= _NOFILL_FLAG;
|
||||||
break;
|
break;
|
||||||
@ -1374,8 +1380,8 @@ containsfills(Datalist* list)
|
|||||||
NCConstant* con = list->data;
|
NCConstant* con = list->data;
|
||||||
for(i=0;i<list->length;i++,con++) {
|
for(i=0;i<list->length;i++,con++) {
|
||||||
if(con->nctype == NC_COMPOUND) {
|
if(con->nctype == NC_COMPOUND) {
|
||||||
if(containsfills(con->value.compoundv)) return 1;
|
if(containsfills(con->value.compoundv)) return 1;
|
||||||
} else if(con->nctype == NC_FILLVALUE) return 1;
|
} else if(con->nctype == NC_FILLVALUE) return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -1443,7 +1449,7 @@ evaluate(Symbol* fcn, Datalist* arglist)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
derror("Expected function signature: time([string,]string)");
|
derror("Expected function signature: time([string,]string)");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -1458,9 +1464,9 @@ evaluate(Symbol* fcn, Datalist* arglist)
|
|||||||
cdCalenType timetype = cdStandard;
|
cdCalenType timetype = cdStandard;
|
||||||
cdChar2Comp(timetype,timevalue,&comptime);
|
cdChar2Comp(timetype,timevalue,&comptime);
|
||||||
/* convert comptime to cdTime */
|
/* convert comptime to cdTime */
|
||||||
cdtime.year = comptime.year;
|
cdtime.year = comptime.year;
|
||||||
cdtime.month = comptime.month;
|
cdtime.month = comptime.month;
|
||||||
cdtime.day = comptime.day;
|
cdtime.day = comptime.day;
|
||||||
cdtime.hour = comptime.hour;
|
cdtime.hour = comptime.hour;
|
||||||
cdtime.baseYear = 1970;
|
cdtime.baseYear = 1970;
|
||||||
cdtime.timeType = CdChron;
|
cdtime.timeType = CdChron;
|
||||||
@ -1478,4 +1484,3 @@ evaluate(Symbol* fcn, Datalist* arglist)
|
|||||||
done:
|
done:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1598,7 +1598,7 @@ yyreduce:
|
|||||||
{
|
{
|
||||||
Symbol* id = (yyvsp[-1].sym);
|
Symbol* id = (yyvsp[-1].sym);
|
||||||
markcdf4("Group specification");
|
markcdf4("Group specification");
|
||||||
if(creategroup(id) == NULL)
|
if(creategroup(id) == NULL)
|
||||||
yyerror("duplicate group declaration within parent group for %s",
|
yyerror("duplicate group declaration within parent group for %s",
|
||||||
id->name);
|
id->name);
|
||||||
}
|
}
|
||||||
@ -1672,7 +1672,7 @@ yyreduce:
|
|||||||
listpush((yyvsp[-3].sym)->subnodes,(void*)eid);
|
listpush((yyvsp[-3].sym)->subnodes,(void*)eid);
|
||||||
eid->container = (yyvsp[-3].sym);
|
eid->container = (yyvsp[-3].sym);
|
||||||
eid->typ.basetype = (yyvsp[-3].sym)->typ.basetype;
|
eid->typ.basetype = (yyvsp[-3].sym)->typ.basetype;
|
||||||
}
|
}
|
||||||
listsetlength(stack,stackbase);/* remove stack nodes*/
|
listsetlength(stack,stackbase);/* remove stack nodes*/
|
||||||
}
|
}
|
||||||
#line 1679 "ncgentab.c" /* yacc.c:1646 */
|
#line 1679 "ncgentab.c" /* yacc.c:1646 */
|
||||||
@ -1697,7 +1697,7 @@ yyreduce:
|
|||||||
if(strcmp((yyvsp[0].sym)->name,elem->name)==0)
|
if(strcmp((yyvsp[0].sym)->name,elem->name)==0)
|
||||||
yyerror("duplicate enum declaration for %s",
|
yyerror("duplicate enum declaration for %s",
|
||||||
elem->name);
|
elem->name);
|
||||||
}
|
}
|
||||||
listpush(stack,(void*)(yyvsp[0].sym));
|
listpush(stack,(void*)(yyvsp[0].sym));
|
||||||
}
|
}
|
||||||
#line 1704 "ncgentab.c" /* yacc.c:1646 */
|
#line 1704 "ncgentab.c" /* yacc.c:1646 */
|
||||||
@ -1772,7 +1772,7 @@ yyreduce:
|
|||||||
Symbol* fsym = (Symbol*)listget(stack,i);
|
Symbol* fsym = (Symbol*)listget(stack,i);
|
||||||
fsym->container = (yyvsp[-3].sym);
|
fsym->container = (yyvsp[-3].sym);
|
||||||
listpush((yyvsp[-3].sym)->subnodes,(void*)fsym);
|
listpush((yyvsp[-3].sym)->subnodes,(void*)fsym);
|
||||||
}
|
}
|
||||||
listsetlength(stack,stackbase);/* remove stack nodes*/
|
listsetlength(stack,stackbase);/* remove stack nodes*/
|
||||||
}
|
}
|
||||||
#line 1779 "ncgentab.c" /* yacc.c:1646 */
|
#line 1779 "ncgentab.c" /* yacc.c:1646 */
|
||||||
@ -1953,7 +1953,7 @@ fprintf(stderr,"dimension: %s = UNLIMITED\n",(yyvsp[-2].sym)->name);
|
|||||||
|
|
||||||
case 59:
|
case 59:
|
||||||
#line 483 "ncgen.y" /* yacc.c:1646 */
|
#line 483 "ncgen.y" /* yacc.c:1646 */
|
||||||
{
|
{
|
||||||
(yyvsp[0].sym)->objectclass=NC_DIM;
|
(yyvsp[0].sym)->objectclass=NC_DIM;
|
||||||
if(dupobjectcheck(NC_DIM,(yyvsp[0].sym)))
|
if(dupobjectcheck(NC_DIM,(yyvsp[0].sym)))
|
||||||
yyerror( "Duplicate dimension declaration for %s",
|
yyerror( "Duplicate dimension declaration for %s",
|
||||||
@ -2934,7 +2934,7 @@ install(const char *sname)
|
|||||||
{
|
{
|
||||||
Symbol* sp;
|
Symbol* sp;
|
||||||
sp = (Symbol*) emalloc (sizeof (struct Symbol));
|
sp = (Symbol*) emalloc (sizeof (struct Symbol));
|
||||||
memset((void*)sp,0,sizeof(struct Symbol));
|
memset((void*)sp,0,sizeof(struct Symbol));
|
||||||
sp->name = nulldup(sname);
|
sp->name = nulldup(sname);
|
||||||
sp->next = symlist;
|
sp->next = symlist;
|
||||||
sp->lineno = lineno;
|
sp->lineno = lineno;
|
||||||
@ -3006,7 +3006,7 @@ makeconstdata(nc_type nctype)
|
|||||||
len = bbLength(lextext);
|
len = bbLength(lextext);
|
||||||
con.value.stringv.len = len;
|
con.value.stringv.len = len;
|
||||||
con.value.stringv.stringv = bbDup(lextext);
|
con.value.stringv.stringv = bbDup(lextext);
|
||||||
bbClear(lextext);
|
bbClear(lextext);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3039,7 +3039,7 @@ makeconstdata(nc_type nctype)
|
|||||||
default:
|
default:
|
||||||
yyerror("Data constant: unexpected NC type: %s",
|
yyerror("Data constant: unexpected NC type: %s",
|
||||||
nctypename(nctype));
|
nctypename(nctype));
|
||||||
con.value.stringv.stringv = NULL;
|
con.value.stringv.stringv = NULL;
|
||||||
con.value.stringv.len = 0;
|
con.value.stringv.len = 0;
|
||||||
}
|
}
|
||||||
return con;
|
return con;
|
||||||
@ -3211,7 +3211,7 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
|
|||||||
break;
|
break;
|
||||||
default: PANIC1("unexpected special tag: %d",tag);
|
default: PANIC1("unexpected special tag: %d",tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tag == _FORMAT_FLAG) {
|
if(tag == _FORMAT_FLAG) {
|
||||||
/* Watch out: this is a global attribute */
|
/* Watch out: this is a global attribute */
|
||||||
struct Kvalues* kvalue;
|
struct Kvalues* kvalue;
|
||||||
@ -3219,11 +3219,13 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
|
|||||||
|
|
||||||
/* Use the table in main.c */
|
/* Use the table in main.c */
|
||||||
for(kvalue = legalkinds; kvalue->name; kvalue++) {
|
for(kvalue = legalkinds; kvalue->name; kvalue++) {
|
||||||
if(strcmp(sdata, kvalue->name) == 0) {
|
if(sdata) {
|
||||||
/*Main.*/format_flag = kvalue->k_flag;
|
if(strcmp(sdata, kvalue->name) == 0) {
|
||||||
found = 1;
|
/*Main.*/format_flag = kvalue->k_flag;
|
||||||
break;
|
found = 1;
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(!found)
|
if(!found)
|
||||||
derror("_Format: illegal value: %s",sdata);
|
derror("_Format: illegal value: %s",sdata);
|
||||||
@ -3254,16 +3256,18 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
|
|||||||
}
|
}
|
||||||
attr = makeattribute(install("_FillValue"),vsym,tsym,list,ATTRVAR);
|
attr = makeattribute(install("_FillValue"),vsym,tsym,list,ATTRVAR);
|
||||||
} else switch (tag) {
|
} else switch (tag) {
|
||||||
// These will be output as attributes later
|
// These will be output as attributes later
|
||||||
case _STORAGE_FLAG:
|
case _STORAGE_FLAG:
|
||||||
if(strcmp(sdata,"contiguous") == 0)
|
if(!sdata)
|
||||||
special->_Storage = NC_CONTIGUOUS;
|
derror("_Storage: illegal NULL value");
|
||||||
else if(strcmp(sdata,"chunked") == 0)
|
else if(strcmp(sdata,"contiguous") == 0)
|
||||||
special->_Storage = NC_CHUNKED;
|
special->_Storage = NC_CONTIGUOUS;
|
||||||
else
|
else if(strcmp(sdata,"chunked") == 0)
|
||||||
derror("_Storage: illegal value: %s",sdata);
|
special->_Storage = NC_CHUNKED;
|
||||||
special->flags |= _STORAGE_FLAG;
|
else
|
||||||
break;
|
derror("_Storage: illegal value: %s",sdata);
|
||||||
|
special->flags |= _STORAGE_FLAG;
|
||||||
|
break;
|
||||||
case _FLETCHER32_FLAG:
|
case _FLETCHER32_FLAG:
|
||||||
special->_Fletcher32 = tf;
|
special->_Fletcher32 = tf;
|
||||||
special->flags |= _FLETCHER32_FLAG;
|
special->flags |= _FLETCHER32_FLAG;
|
||||||
@ -3277,15 +3281,17 @@ makespecial(int tag, Symbol* vsym, Symbol* tsym, void* data, int isconst)
|
|||||||
special->flags |= _SHUFFLE_FLAG;
|
special->flags |= _SHUFFLE_FLAG;
|
||||||
break;
|
break;
|
||||||
case _ENDIAN_FLAG:
|
case _ENDIAN_FLAG:
|
||||||
if(strcmp(sdata,"little") == 0)
|
if(!sdata)
|
||||||
special->_Endianness = 1;
|
derror("_Endianness: NULL value.");
|
||||||
else if(strcmp(sdata,"big") == 0)
|
else if(strcmp(sdata,"little") == 0)
|
||||||
special->_Endianness = 2;
|
special->_Endianness = 1;
|
||||||
else
|
else if(strcmp(sdata,"big") == 0)
|
||||||
derror("_Endianness: illegal value: %s",sdata);
|
special->_Endianness = 2;
|
||||||
special->flags |= _ENDIAN_FLAG;
|
else
|
||||||
break;
|
derror("_Endianness: illegal value: %s",sdata);
|
||||||
case _NOFILL_FLAG:
|
special->flags |= _ENDIAN_FLAG;
|
||||||
|
break;
|
||||||
|
case _NOFILL_FLAG:
|
||||||
special->_Fill = (1 - tf); /* negate */
|
special->_Fill = (1 - tf); /* negate */
|
||||||
special->flags |= _NOFILL_FLAG;
|
special->flags |= _NOFILL_FLAG;
|
||||||
break;
|
break;
|
||||||
@ -3352,8 +3358,8 @@ containsfills(Datalist* list)
|
|||||||
NCConstant* con = list->data;
|
NCConstant* con = list->data;
|
||||||
for(i=0;i<list->length;i++,con++) {
|
for(i=0;i<list->length;i++,con++) {
|
||||||
if(con->nctype == NC_COMPOUND) {
|
if(con->nctype == NC_COMPOUND) {
|
||||||
if(containsfills(con->value.compoundv)) return 1;
|
if(containsfills(con->value.compoundv)) return 1;
|
||||||
} else if(con->nctype == NC_FILLVALUE) return 1;
|
} else if(con->nctype == NC_FILLVALUE) return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -3421,7 +3427,7 @@ evaluate(Symbol* fcn, Datalist* arglist)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
derror("Expected function signature: time([string,]string)");
|
derror("Expected function signature: time([string,]string)");
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -3436,9 +3442,9 @@ evaluate(Symbol* fcn, Datalist* arglist)
|
|||||||
cdCalenType timetype = cdStandard;
|
cdCalenType timetype = cdStandard;
|
||||||
cdChar2Comp(timetype,timevalue,&comptime);
|
cdChar2Comp(timetype,timevalue,&comptime);
|
||||||
/* convert comptime to cdTime */
|
/* convert comptime to cdTime */
|
||||||
cdtime.year = comptime.year;
|
cdtime.year = comptime.year;
|
||||||
cdtime.month = comptime.month;
|
cdtime.month = comptime.month;
|
||||||
cdtime.day = comptime.day;
|
cdtime.day = comptime.day;
|
||||||
cdtime.hour = comptime.hour;
|
cdtime.hour = comptime.hour;
|
||||||
cdtime.baseYear = 1970;
|
cdtime.baseYear = 1970;
|
||||||
cdtime.timeType = CdChron;
|
cdtime.timeType = CdChron;
|
||||||
@ -3456,4 +3462,3 @@ evaluate(Symbol* fcn, Datalist* arglist)
|
|||||||
done:
|
done:
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user