Skip to content

Commit

Permalink
Reversing 388 due to unforseen consequences. See #458 for more inform…
Browse files Browse the repository at this point in the history
…ation.
  • Loading branch information
WardF committed Aug 15, 2017
1 parent e006ea5 commit c02ff5c
Showing 1 changed file with 3 additions and 51 deletions.
54 changes: 3 additions & 51 deletions libdispatch/dattput.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ apply.
\param value Pointer to one or more values.
\returns ::NC_NOERR No error.
\returns ::NC_EINVAL More than one value for _FillValue.
\returns ::NC_EGLOBAL Trying to set global _FillValue.
\returns ::NC_EINVAL More than one value for _FillValue or trying to set global _FillValue.
\returns ::NC_ENOTVAR Couldn't find varid.
\returns ::NC_EBADTYPE Fill value and var must be same type.
\returns ::NC_ENOMEM Out of memory
Expand All @@ -54,9 +53,6 @@ nc_put_att_string(int ncid, int varid, const char *name,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, NC_STRING,
len, (void*)value, NC_STRING);
}
Expand Down Expand Up @@ -91,8 +87,7 @@ apply.
\param value Pointer to one or more values.
\returns ::NC_NOERR No error.
\returns ::NC_EINVAL More than one value for _FillValue.
\returns ::NC_EGLOBAL Trying to set global _FillValue.
\returns ::NC_EINVAL More than one value for _FillValue or trying to set global _FillValue.
\returns ::NC_ENOTVAR Couldn't find varid.
\returns ::NC_EBADTYPE Fill value and var must be same type.
\returns ::NC_ENOMEM Out of memory
Expand Down Expand Up @@ -146,9 +141,6 @@ int nc_put_att_text(int ncid, int varid, const char *name,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, NC_CHAR, len,
(void *)value, NC_CHAR);
}
Expand Down Expand Up @@ -190,8 +182,7 @@ apply.
\param value Pointer to one or more values.
\returns ::NC_NOERR No error.
\returns ::NC_EINVAL More than one value for _FillValue.
\returns ::NC_EGLOBAL Trying to set global _FillValue.
\returns ::NC_EINVAL More than one value for _FillValue or trying to set global _FillValue.
\returns ::NC_ENOTVAR Couldn't find varid.
\returns ::NC_EBADTYPE Fill value and var must be same type.
\returns ::NC_ENOMEM Out of memory
Expand Down Expand Up @@ -241,9 +232,6 @@ nc_put_att(int ncid, int varid, const char *name, nc_type xtype,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
value, xtype);
}
Expand All @@ -255,9 +243,6 @@ nc_put_att_schar(int ncid, int varid, const char *name,
NC *ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
(void *)value, NC_BYTE);
}
Expand All @@ -269,9 +254,6 @@ nc_put_att_uchar(int ncid, int varid, const char *name,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
(void *)value, NC_UBYTE);
}
Expand All @@ -283,9 +265,6 @@ nc_put_att_short(int ncid, int varid, const char *name,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
(void *)value, NC_SHORT);
}
Expand All @@ -297,9 +276,6 @@ nc_put_att_int(int ncid, int varid, const char *name,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
(void *)value, NC_INT);
}
Expand All @@ -311,9 +287,6 @@ nc_put_att_long(int ncid, int varid, const char *name,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
(void *)value, longtype);
}
Expand All @@ -325,9 +298,6 @@ nc_put_att_float(int ncid, int varid, const char *name,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
(void *)value, NC_FLOAT);
}
Expand All @@ -339,9 +309,6 @@ nc_put_att_double(int ncid, int varid, const char *name,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
(void *)value, NC_DOUBLE);
}
Expand All @@ -353,9 +320,6 @@ nc_put_att_ubyte(int ncid, int varid, const char *name,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
(void *)value, NC_UBYTE);
}
Expand All @@ -367,9 +331,6 @@ nc_put_att_ushort(int ncid, int varid, const char *name,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
(void *)value, NC_USHORT);
}
Expand All @@ -381,9 +342,6 @@ nc_put_att_uint(int ncid, int varid, const char *name,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
(void *)value, NC_UINT);
}
Expand All @@ -396,9 +354,6 @@ nc_put_att_longlong(int ncid, int varid, const char *name,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
(void *)value, NC_INT64);
}
Expand All @@ -411,9 +366,6 @@ nc_put_att_ulonglong(int ncid, int varid, const char *name,
NC* ncp;
int stat = NC_check_id(ncid, &ncp);
if(stat != NC_NOERR) return stat;
/* set global _FillValue is not allowed */
if (varid == NC_GLOBAL && name != NULL && !strcmp(name, _FillValue))
return NC_EGLOBAL;
return ncp->dispatch->put_att(ncid, varid, name, xtype, len,
(void *)value, NC_UINT64);
}

0 comments on commit c02ff5c

Please sign in to comment.