home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / utils / sercli.shr / sercli / src / fifo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-16  |  1.9 KB  |  82 lines

  1. /*
  2. **  $Source: WB_2.1:homes/rkr/prog/sercli/src/RCS/fifo.h,v $
  3. **  $Author: rkr $
  4. **  $Revision: 1.5 $
  5. **  $Locker: rkr $
  6. **  $State: Exp $
  7. **  $Date: 1993/06/16 23:33:55 $
  8. **
  9. */
  10.  
  11.  
  12. /*
  13.  *  FIFO.H
  14.  *
  15.  *  PUBLIC FIFO STRUCTURES AND DEFINES
  16.  */
  17.  
  18. #ifndef LIBRARIES_FIFO_H
  19. #define LIBRARIES_FIFO_H
  20.  
  21. #define FIFONAME    "fifo.library"
  22.  
  23. #define FIFOF_READ      0x00000100L      /*  intend to read from fifo      */
  24. #define FIFOF_WRITE      0x00000200L      /*  intend to write to fifo      */
  25. #define FIFOF_RESERVED      0xFFFF0000L      /*  reserved for internal use   */
  26. #define FIFOF_NORMAL      0x00000400L      /*  request blocking/sig support*/
  27. #define FIFOF_NBIO      0x00000800L      /*  non-blocking IO          */
  28.  
  29. #define FIFOF_KEEPIFD      0x00002000L      /*  keep fifo alive if data pending */
  30. #define FIFOF_EOF      0x00004000L      /*  EOF on close              */
  31.  
  32. #define FREQ_RPEND    1
  33. #define FREQ_WAVAIL    2
  34. #define FREQ_ABORT    3
  35.  
  36. typedef void *FifoHan;              /*  returned by OpenFifo()  */
  37.  
  38.  
  39.  
  40. /*
  41. **  Need some protos so that I can use Manx/Aztec #pragmas...
  42. **
  43. **    ---rkr.
  44. **
  45. */
  46. FifoHan OpenFifo  (char *name, long bufsize, long flags);
  47. void    CloseFifo (FifoHan fifo, long flags);
  48. long    ReadFifo  (FifoHan fifo, char **pptr, long skip);
  49. long    WriteFifo (FifoHan fifo, void *buf, long max);
  50. void    RequestFifo (FifoHan fifo, struct Message *msg, long req);
  51. long    BufSizeFifo (FifoHan fifo);
  52.  
  53.  
  54.  
  55. /*
  56. **  Define __USE_LIBRARY_PRAGMAS if you want to get to "fifo_pragmas.h" (or
  57. **  else manually #include "fifo_pragmas.h").  (Except for Aztec users...
  58. **  you automatically get the #pragmas...)
  59. **
  60. **  The #pragmas were generated by the mapfd that came with Aztec; they are
  61. **  in Lattice form, so should work with either Aztec or Lattice/SAS.
  62. **
  63. **  You will need at least Aztec v5.0a.
  64. **
  65. **    ---rkr.
  66. **
  67. */
  68. #ifdef AZTEC_C
  69. #ifndef __USE_LIBRARY_PRAGMAS
  70.  
  71. #define __USE_LIBRARY_PRAGMAS 1
  72.  
  73. #endif    /*** __USE_LIBRARY_PRAGMAS ***/
  74. #endif    /*** AZTEC_C ***/
  75.  
  76.  
  77. #ifdef __USE_LIBRARY_PRAGMAS
  78. #include "fifo_pragmas.h"
  79. #endif    /*** __USE_LIBRARY_PRAGMAS ***/
  80.  
  81. #endif
  82.