hi!
This commit is contained in:
@@ -45,7 +45,7 @@ int DlogRead(DlogSet *dset, int idx, void *data) {
|
||||
return(-1);
|
||||
}
|
||||
|
||||
int DlogOpen(DlogSet *dset, char *name, int write) {
|
||||
int DlogOpenOld(DlogSet *dset, char *name, int write) {
|
||||
int i, p, np, fd, flags;
|
||||
time_t tim;
|
||||
struct tm *timp;
|
||||
@@ -79,11 +79,22 @@ int DlogOpen(DlogSet *dset, char *name, int write) {
|
||||
return(-1);
|
||||
}
|
||||
|
||||
int DlogCreate(DlogSet *dset, char *name, time_t start, int nset, int nlen, int period, float undef) {
|
||||
int fd, i, j, p;
|
||||
int DlogOpen(DlogSet *dset, char *name) {
|
||||
return(DlogOpenOld(dset, name, 0));
|
||||
}
|
||||
|
||||
int DlogOpenWrt(DlogSet *dset, char *name, time_t start, int nset, int nlen, int period, float undef) {
|
||||
int fd, i, j, p, iret;
|
||||
va_list ap;
|
||||
float f[DLOG_MAX_SET];
|
||||
|
||||
iret=DlogOpenOld(dset, name, 1);
|
||||
if (iret>=0 && dset->nset==nset
|
||||
&& dset->nlen==nlen
|
||||
&& dset->last+nlen*period>start
|
||||
&& dset->undef == undef) {
|
||||
return(1); /* take old file only if it matches */
|
||||
}
|
||||
fd=0;
|
||||
if (nset>DLOG_MAX_SET) ERR_MSG("nset too large");
|
||||
dset->nset=nset;
|
||||
@@ -208,7 +219,7 @@ int dlog_get_(char *name, int *nset, int *nmax, double *starttime, float x[], fl
|
||||
int ntot;
|
||||
/* for compaq unix */
|
||||
str_trim(buf, name, namlen);
|
||||
ERR_I(DlogOpen(&dset, buf, 0));
|
||||
ERR_I(DlogOpen(&dset, buf));
|
||||
ERR_I(ntot=DlogGetMany(&dset, *nset, *nmax, starttime, x, y, index));
|
||||
DlogClose(&dset);
|
||||
return(ntot);
|
||||
@@ -228,7 +239,7 @@ int DlogUpd(DlogSet *dset) {
|
||||
dset->pos=sizeof(int);
|
||||
#ifdef __VMS
|
||||
close(dset->fd);
|
||||
DlogOpen(dset, dset->name, 1);
|
||||
ERR_I(DlogOpenOld(dset, dset->name, 1));
|
||||
#endif
|
||||
return(0);
|
||||
OnError:
|
||||
|
||||
Reference in New Issue
Block a user