home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / CPROG / CBASE101.ZIP / BLKIO112.ZIP / BPUTH.C < prev    next >
Text File  |  1990-06-20  |  1KB  |  48 lines

  1. /*    Copyright (c) 1989 Citadel    */
  2. /*       All Rights Reserved        */
  3.  
  4. /* #ident    "@(#)bputh.c    1.4 - 90/06/20" */
  5.  
  6. /* ansi headers */
  7. /*#include <stddef.h>*/
  8.  
  9. /* local headers */
  10. #include "blkio_.h"
  11.  
  12. /*man---------------------------------------------------------------------------
  13. NAME
  14.      bputh - put the header into a block file
  15.  
  16. SYNOPSIS
  17.      #include <blkio.h>
  18.  
  19.      int bputh(bp, buf)
  20.      BLKFILE *bp;
  21.      const void *buf;
  22.  
  23. DESCRIPTION
  24.      The bputh function writes the the contents of buf into the header
  25.      of block file bp.  buf must point to a storage area at least as
  26.      large as the header size for bp.
  27.  
  28.      bputh will fail if one or more of the following is true:
  29.  
  30.      [EINVAL]       bp is not a valid block file.
  31.      [EINVAL]       buf is the NULL pointer.
  32.      [BENOPEN]      bp is not open for writing.
  33.  
  34. SEE ALSO
  35.      bgeth, bputhf, bputb.
  36.  
  37. DIAGNOSTICS
  38.      Upon successful completion, a value of 0 is returned.  Otherwise,
  39.      a value of -1 is returned, and errno set to indicate the error.
  40.  
  41. ------------------------------------------------------------------------------*/
  42. int bputh(bp, buf)
  43. BLKFILE *bp;
  44. const void *buf;
  45. {
  46.     return bputhf(bp, (size_t)0, buf, bp->hdrsize);
  47. }
  48.