|
|
1.1 ! root 1: # include <ingres.h> ! 2: # include <access.h> ! 3: # include <sccs.h> ! 4: ! 5: SCCSID(@(#)closer.c 7.1 2/5/81) ! 6: ! 7: /* ! 8: ** closer - close a relation ! 9: ** ! 10: ** CLOSER is used to close a relation which was opened by OPENR. ! 11: ** CLOSER should always be called once for each OPENR. ! 12: ** ! 13: ** function values: ! 14: ** ! 15: ** <0 fatal error ! 16: ** 0 success ! 17: ** 1 relation was not open ! 18: */ ! 19: ! 20: closer(d) ! 21: DESC *d; ! 22: { ! 23: register DESC *dx; ! 24: register int i; ! 25: ! 26: dx = d; ! 27: # ifdef xATR1 ! 28: if (tTf(21, 8)) ! 29: printf("closer: %.14s,%ld\n", dx->reldum.relid, dx->reladds); ! 30: # endif ! 31: ! 32: if (i = noclose(dx)) ! 33: return (i); ! 34: ! 35: flush_rel(dx, TRUE); /* No error is possible since noclose() ! 36: ** has already flushed any pages ! 37: */ ! 38: ! 39: if (close(dx->relfp)) /*close the relation*/ ! 40: i = acc_err(AMCLOSE_ERR); ! 41: ! 42: dx->relopn = 0; ! 43: return (i); ! 44: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.