This is s.finitbuf.c in view mode; [Download] [Up]
h07510 s 00000/00000/00040 d D 1.2 85/11/26 23:01:15 dgl 2 1 c eliminated LOOKED_ALREADY from getheader to cure bug c re. trying to add property to stdin if no header exists yet. e s 00040/00000/00000 d D 1.1 85/11/25 09:57:45 dgl 1 0 c original version e u U f i t T I 1 /* %M% %I% (CARL) %G% %U% */ #include <stdio.h> #include <carl/defaults.h> #include <carl/carl.h> #include <carl/procom.h> /* * finitbuf - initialize floatsam buffer */ extern short _samplesize; finitbuf(iop) FILE *iop; { extern char *malloc(); register struct fltbuf *fbp; fbp = &fb[fileno(iop)]; /* * once-only initialization of fbuf, pos, and n */ if (fbp->gpflt == 0) { if ((fbp->fbuf = (float *) malloc(P_BUFSIZE)) == NULL) return(-1); fbp->ssize = _samplesize; fbp->bufsiz = P_BUFSIZE / fbp->ssize; fbp->n = fbp->pos = fbp->cpos = 0; /* force first write */ fbp->gpflt = 1; } return(0); } set_sample_size(size) short size; { _samplesize = size; } E 1
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.