1: # include <ingres.h> 2: # include <symbol.h> 3: # include <access.h> 4: # include <sccs.h> 5: 6: SCCSID(@(#)clr_tuple.c 8.1 12/31/84) 7: 8: 9: /* 10: ** Clr_tuple initializes all character domains 11: ** to blank and all numeric domains to zero. 12: */ 13: 14: clr_tuple(desc, tuple) 15: struct descriptor *desc; 16: char *tuple; 17: { 18: register struct descriptor *d; 19: register char *tup; 20: register int i; 21: int j, pad; 22: 23: d = desc; 24: 25: for (i = 1; i <= d->reldum.relatts; i++) 26: { 27: if (d->relfrmt[i] == CHAR) 28: pad = ' '; 29: else 30: pad = 0; 31: 32: tup = &tuple[d->reloff[i]]; 33: j = d->relfrml[i] & I1MASK; 34: 35: while (j--) 36: *tup++ = pad; 37: } 38: }