home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / emacs-19.28-src.tgz / tar.out / fsf / emacs / unixlib / src / fifofd.c < prev    next >
C/C++ Source or Header  |  1996-09-28  |  511b  |  26 lines

  1. #include "amiga.h"
  2. #include "files.h"
  3. #include "fifofd.h"
  4. #include <time.h>
  5.  
  6. struct Library *_FifoBase;
  7. int _fifo_sig = -1;
  8. long _fifo_base;
  9. long _fifo_offset;
  10. int _fifo_ok;
  11.  
  12. void _init_fifo(void)
  13. {
  14.   _fifo_base = (int)_us ^ _startup_time * 65537;
  15.   _fifo_offset = 0;
  16.   _FifoBase = OpenLibrary("fifo.library", 0);
  17.   _fifo_sig = AllocSignal(-1);
  18.   _fifo_ok = _FifoBase != 0 && _fifo_sig >= 0;
  19. }
  20.  
  21. void _cleanup_fifo(void)
  22. {
  23.   if (_fifo_sig >= 0) FreeSignal(_fifo_sig);
  24.   if (_FifoBase) CloseLibrary(_FifoBase);
  25. }
  26.