This is s.fflushfloat.c in view mode; [Download] [Up]
h10965 s 00000/00000/00044 d D 1.2 85/11/26 23:00:37 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 00044/00000/00000 d D 1.1 85/11/25 09:56:36 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/carl.h> #include <carl/procom.h> /* fflushfloat - force out remaining floatsams */ fflushfloat(iop) FILE *iop; { fflushf(iop); } /* fflushshort - force out remaining shortsams */ fflushshort(iop) FILE *iop; { fflushf(iop); } fflushf(iop) FILE *iop; { register struct fltbuf *fbp; fbp = &fb[fileno(iop)]; if (fbp->gpflt == 0) { /* first time? */ set_sample_size(sizeof(float)); if (pinit(iop)) /* make sure everything is set up */ return(-1); } if (fbp->pos > 0) { fbp->n = write(fileno(iop), fbp->fbuf, fbp->pos*fbp->ssize); fbp->pos = fbp->cpos = 0; } free(fbp->fbuf); if (fbp->n <= 0) return(fbp->n); else return(fbp->ssize); } E 1
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.