home *** CD-ROM | disk | FTP | other *** search
/ PC Press 1997 July / Sezamfile97_1.iso / msdos / c / cbase11.a03 / CBASE11.ZIP / LSEQ / LSGETR.C < prev    next >
C/C++ Source or Header  |  1993-01-01  |  1KB  |  60 lines

  1. /*
  2.  *    Copyright (c) 1989-1992 Citadel Software, Inc.
  3.  *    All Rights Reserved
  4.  */
  5.  
  6. /* #ident    "@(#)lsgetr.c    1.7 - 93/01/01" */
  7.  
  8. #include <port.h>
  9.  
  10. /* standard headers */
  11. #ifdef AC_STDDEF
  12. #include <stddef.h>
  13. #endif
  14.  
  15. /* local headers */
  16. #include "lseq_.h"
  17.  
  18. /*man---------------------------------------------------------------------------
  19. NAME
  20.      lsgetr - get current lseq record
  21.  
  22. SYNOPSIS
  23.      #include <lseq.h>
  24.  
  25.      int lsgetr(lsp, buf)
  26.      lseq_t *lsp;
  27.      void *buf;
  28.  
  29. DESCRIPTION
  30.      The lsgetr function reads the record from the current cursor
  31.      position in lseq lsp into buf.  buf must point to a storage area
  32.      as large as the record size for lsp.
  33.  
  34.      lsgetr will fail if one or more of the following is true:
  35.  
  36.      [EINVAL]       lsp is not a valid lseq pointer.
  37.      [EINVAL]       buf is the NULL pointer.
  38.      [LSELOCK]      lsp is not read locked.
  39.      [LSENOPEN]     lsp is not open.
  40.      [LSENREC]      The cursor is null.
  41.  
  42. SEE ALSO
  43.      lscursor, lsgetrf, lsputr.
  44.  
  45. DIAGNOSTICS
  46.      Upon successful completion, a value of 0 is returned.  Otherwise,
  47.      a value of -1 is returned, and errno set to indicate the error.
  48.  
  49. ------------------------------------------------------------------------------*/
  50. #ifdef AC_PROTO
  51. int lsgetr(lseq_t *lsp, void *buf)
  52. #else
  53. int lsgetr(lsp, buf)
  54. lseq_t *lsp;
  55. void *buf;
  56. #endif
  57. {
  58.     return lsgetrf(lsp, (size_t)0, buf, lsp->lshdr.recsize);
  59. }
  60.