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

  1. /* (C) Copyright 1984,85,86,87 Walter L. Peacock   All Rights Reserved   */
  2. /* get formatted patient record into args.   */
  3. /*----------------------------------------------------------------------------
  4.  * getfpat()is used by the demo program to read records from the patient file.
  5.  *---------------------------------------------------------------------------*/
  6.  
  7. #include <stdio.h>
  8. #include "cbtree.h"
  9. #include "patrec.str"
  10.  
  11. void getfpat(pr, fd, recnum)
  12. PATREC *pr;   /* patient record pointer */
  13. int   fd;
  14. long   recnum;      /* relative record number   */
  15. {
  16.    extern long  lseek();
  17.  
  18.    if (btseek(fd, recnum, SZ_PATREC) == -1L)   /* do arithmetic for us */
  19.       ckerror(- CK_SEEK, "getfpat.c");
  20.    if (read(fd, (char *)pr, SZ_PATREC) == ERR)
  21.       ckerror(- CK_READ, "getfpat.c: pr");
  22. }
  23.  
  24.