home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / c / syscall / Ioc_NumReadable.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-07-30  |  1.3 KB  |  50 lines

  1. /* 
  2.  * Ioc_NumReadable.c --
  3.  *
  4.  *    Source code for the Ioc_NumReadable library procedure.
  5.  *
  6.  * Copyright 1988 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  */
  15.  
  16. #ifndef lint
  17. static char rcsid[] = "$Header: Ioc_NumReadable.c,v 1.2 88/07/29 17:08:44 ouster Exp $ SPRITE (Berkeley)";
  18. #endif not lint
  19.  
  20. #include <sprite.h>
  21. #include <fs.h>
  22.  
  23.  
  24. /*
  25.  *----------------------------------------------------------------------
  26.  *
  27.  * Ioc_NumReadable --
  28.  *    Return the number of bytes available on the stream.
  29.  *
  30.  * Results:
  31.  *    The number of bytes available.
  32.  *
  33.  * Side effects:
  34.  *    None.
  35.  *
  36.  *----------------------------------------------------------------------
  37.  */
  38.  
  39. ReturnStatus
  40. Ioc_NumReadable(streamID, numPtr)
  41.     int streamID;
  42.     int *numPtr;
  43. {
  44.     register ReturnStatus status;
  45.  
  46.     status = Fs_IOControl(streamID, IOC_NUM_READABLE, 0,
  47.             (Address)NULL, sizeof(int), (Address) numPtr);
  48.     return(status);
  49. }
  50.