MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / fieldwrite

Function fieldwrite

Libraries/snappy/testdata/fields.c:400–418  ·  view source on GitHub ↗
(file, fieldp, delim)

Source from the content-addressed store, hash-verified

398 }
399
400int fieldwrite (file, fieldp, delim)
401 FILE * file; /* File to write to */
402 register field_t * fieldp; /* Field structure to write */
403 int delim; /* Delimiter to place between fields */
404 {
405 int error; /* NZ if an error occurs */
406 register int fieldno; /* Number of field being written */
407
408 error = 0;
409 for (fieldno = 0; fieldno < fieldp->nfields; fieldno++)
410 {
411 if (fieldno != 0)
412 error |= putc (delim, file) == EOF;
413 error |= fputs (fieldp->fields[fieldno], file) == EOF;
414 }
415 if (fieldp->hadnl)
416 error |= putc ('\n', file) == EOF;
417 return error;
418 }
419
420void fieldfree (fieldp)
421 register field_t * fieldp; /* Field structure to free */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected