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

  1. /*
  2. **  $Source: WB_2.1:ho/rcs/misc.h,v $
  3. **  $Author: rkr $
  4. **  $Revision: 1.4 $
  5. **  $Locker:  $
  6. **  $State: Exp $
  7. **  $Date: 1991/12/20 09:44:07 $
  8. **
  9. */
  10.  
  11. #include <exec/memory.h>
  12. #include <clib/exec_protos.h>
  13.  
  14. #include <stdio.h>
  15. #include <stdlib.h>
  16. #include <string.h>
  17.  
  18. #include "defs.h"
  19.  
  20. #define CSI            "\x9b"
  21.  
  22. #define RAW_EVENTS        "1;2;3;4;6;7;8;9;10;11;12;13;14;15;16"
  23. #define SET_RAW_EVENTS        CSI RAW_EVENTS "{"
  24. #define RESET_RAW_EVENTS    CSI RAW_EVENTS "}"
  25.  
  26. #define HIDE_CURSOR        CSI "0 p"
  27. #define SHOW_CURSOR        CSI " p"
  28.  
  29.  
  30.  
  31. /*
  32. **  NEWN(), NEW(), FREEN(), and FREE() are used for simplifying memory
  33. **  allocation.
  34. **
  35. */
  36. #define NEWN(x,n)   ( (x) = AllocMem ( (n) * (sizeof (*(x) ) ), MEMF_PUBLIC) )
  37. #define NEW(x)      NEWN (x, 1)
  38. #define FREEN(x,n)  FreeMem ( (x), n * (sizeof (*(x) ) ) )
  39. #define FREE(x)     FREEN (x, 1)
  40.  
  41. #define MAX(x,y) ( (x) > (y) ? (x) : (y) )
  42. #define MIN(x,y) ( (x) < (y) ? (x) : (y) )
  43.  
  44. char *get_line (FILE *file);
  45.  
  46. int do_nothing (void);
  47.  
  48. void SafeAbortIO (IO_Request *ior);
  49. void WaitMsg (Message *);
  50. void SafeAbortIO (IO_Request *ior);
  51.  
  52.