/* * f r p u t . c */ /*)LIBRARY */ #ifdef DOCUMENTATION title frput Random Acess Put index random acess Put synopsis int frput(buffer,bufsiz,ioptr,number) char *buffer; /* pointer to output buffer */ unsigned bufsiz; /* size of buffer */ FILE *ioptr; /* output file pointer */ long number; /* record number to write */ description frput() puts a record to a fixed length file, at a specified record number. bugs author Machiavelli Systems #endif #define _production #include #include #include #include #define FDBOFF 024 /* where the fdb really is in FILE struct */ int frput(buffer,bufsiz,ioptr,number) /* random access put */ char *buffer; /* where to get it from*/ unsigned bufsiz; /* how much to get */ long number; /* which one to get */ { int r; /* how many actually read in */ /* point it at the record to be put */ recnum(ioptr,number); /* get the record */ r = fput(buffer,bufsiz,ioptr); /* return 0 if ok, $$ferr if we have an error */ return (r?0:$$ferr); }