home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $Source: WB_2.1:ho/rcs/misc.h,v $
- ** $Author: rkr $
- ** $Revision: 1.4 $
- ** $Locker: $
- ** $State: Exp $
- ** $Date: 1991/12/20 09:44:07 $
- **
- */
-
- #include <exec/memory.h>
- #include <clib/exec_protos.h>
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-
- #include "defs.h"
-
- #define CSI "\x9b"
-
- #define RAW_EVENTS "1;2;3;4;6;7;8;9;10;11;12;13;14;15;16"
- #define SET_RAW_EVENTS CSI RAW_EVENTS "{"
- #define RESET_RAW_EVENTS CSI RAW_EVENTS "}"
-
- #define HIDE_CURSOR CSI "0 p"
- #define SHOW_CURSOR CSI " p"
-
-
-
- /*
- ** NEWN(), NEW(), FREEN(), and FREE() are used for simplifying memory
- ** allocation.
- **
- */
- #define NEWN(x,n) ( (x) = AllocMem ( (n) * (sizeof (*(x) ) ), MEMF_PUBLIC) )
- #define NEW(x) NEWN (x, 1)
- #define FREEN(x,n) FreeMem ( (x), n * (sizeof (*(x) ) ) )
- #define FREE(x) FREEN (x, 1)
-
- #define MAX(x,y) ( (x) > (y) ? (x) : (y) )
- #define MIN(x,y) ( (x) < (y) ? (x) : (y) )
-
- char *get_line (FILE *file);
-
- int do_nothing (void);
-
- void SafeAbortIO (IO_Request *ior);
- void WaitMsg (Message *);
- void SafeAbortIO (IO_Request *ior);
-
-