home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c023 / 1.img / PROGRAMS / PUTFPAT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1987-11-05  |  1020 b   |  26 lines

  1. /* (C) Copyright 1984,85,86,87 Walter L. Peacock   All Rights Reserved   */
  2. /*   P U T F P A T . C  10/23/84                     */
  3. /*    put formatted patient args into record.         */
  4. /*----------------------------------------------------------------------------
  5.  * putfpat() is used by the demo programs to write records to the patient file
  6.  *---------------------------------------------------------------------------*/
  7.  
  8. #include "cbtree.h"
  9. #include "patrec.str"      /* patient record structure */
  10.  
  11.          /* putfpat will always be opened by the calling      */
  12.          /* function and not in this function.   12/10/84      */
  13. void putfpat(fd, recnum, pr)
  14. int   fd;
  15. long   recnum;      /* relative record number   */
  16. PATREC *pr;         /* pointer to patient record structure */
  17. {
  18.    extern long lseek();
  19.  
  20.    if (btseek(fd, recnum, SZ_PATREC) == -1L)
  21.       ckerror(- CK_SEEK, "PUTFPAT.c");
  22.    if (write(fd, (char *)pr, SZ_PATREC) == ERR)
  23.       ckerror(- CK_WRIT, "PUTFPAT.c: pr");
  24. }
  25.  
  26.