home *** CD-ROM | disk | FTP | other *** search
- /* (C) Copyright 1984,85,86,87 Walter L. Peacock All Rights Reserved */
- /* get formatted patient record into args. */
- /*----------------------------------------------------------------------------
- * getfpat()is used by the demo program to read records from the patient file.
- *---------------------------------------------------------------------------*/
-
- #include <stdio.h>
- #include "cbtree.h"
- #include "patrec.str"
-
- void getfpat(pr, fd, recnum)
- PATREC *pr; /* patient record pointer */
- int fd;
- long recnum; /* relative record number */
- {
- extern long lseek();
-
- if (btseek(fd, recnum, SZ_PATREC) == -1L) /* do arithmetic for us */
- ckerror(- CK_SEEK, "getfpat.c");
- if (read(fd, (char *)pr, SZ_PATREC) == ERR)
- ckerror(- CK_READ, "getfpat.c: pr");
- }
-
-