+2009-03-10 7:45 Christos Zoulas <christos@zoulas.com>
+
+ * avoid c99 syntax.
+
2009-02-23 15:45 Christos Zoulas <christos@zoulas.com>
* make the cdf code use the buffer first if available,
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: cdf.c,v 1.18 2009/02/23 20:44:47 christos Exp $")
+FILE_RCSID("@(#)$File: cdf.c,v 1.19 2009/02/23 20:51:55 christos Exp $")
#endif
#include <assert.h>
int
cdf_read_header(const cdf_info_t *info, cdf_header_t *h)
{
- (void)memcpy(cdf_bo.s, "\01\02\03\04", 4);
char buf[512];
+
+ (void)memcpy(cdf_bo.s, "\01\02\03\04", 4);
if (cdf_read(info, (off_t)0, buf, sizeof(buf)) == -1)
return -1;
cdf_unpack_header(h, buf);
return 0;
out:
free(scn->sst_tab);
- return (size_t)-1;
+ return -1;
}
int
return 0;
out:
free(scn->sst_tab);
- return (size_t)-1;
+ return -1;
}
int
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: cdf_time.c,v 1.4 2008/11/04 16:38:28 christos Exp $")
+FILE_RCSID("@(#)$File: cdf_time.c,v 1.5 2009/02/03 20:27:51 christos Exp $")
#endif
#include <time.h>
#ifdef HAVE_STRUCT_TM_TM_ZONE
static char UTC[] = "UTC";
#endif
+ int rdays;
/* Unit is 100's of nanoseconds */
ts->tv_nsec = (t % CDF_TIME_PREC) * 100;
// XXX: Approx
tm.tm_year = CDF_BASE_YEAR + (t / 365);
- int rdays = cdf_getdays(tm.tm_year);
+ rdays = cdf_getdays(tm.tm_year);
t -= rdays;
tm.tm_mday = cdf_getday(tm.tm_year, t);
tm.tm_mon = cdf_getmonth(tm.tm_year, t);