mirror of
https://github.com/SEPPDROID/Digital-Research-Source-Code.git
synced 2025-10-27 02:14:19 +00:00
Upload
Digital Research
This commit is contained in:
46
ASSEMBLY & COMPILE TOOLS/PLM-2-C 2/plm2c/misc.h
Normal file
46
ASSEMBLY & COMPILE TOOLS/PLM-2-C 2/plm2c/misc.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Miscellaneous defines
|
||||
*/
|
||||
typedef unsigned char BYTE;
|
||||
typedef unsigned char BOOLEAN;
|
||||
|
||||
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* White space characters
|
||||
*/
|
||||
#define SPACE ' '
|
||||
#define TAB 9
|
||||
#define CR 13
|
||||
#define LF 10
|
||||
|
||||
/*
|
||||
* Useful defines
|
||||
*/
|
||||
#define is_a_uc_char(char) ((char >= 'A') && (char <= 'Z'))
|
||||
#define is_a_lc_char(char) ((char >= 'a') && (char <= 'z'))
|
||||
#define is_a_char(char) (((char & 0x5F) >= 'A') && ((char & 0x5F) <= 'Z'))
|
||||
#define is_a_digit(char) ((char >= '0') && (char <= '9'))
|
||||
|
||||
#define is_a_type(token) ((token->token_class == RESERVED) && \
|
||||
(token->token_type >= BYTE) && (token->token_type <= REAL))
|
||||
|
||||
#define is_white(ch) ((ch == ' ') || (ch == TAB))
|
||||
|
||||
#define NONE 0
|
||||
|
||||
char *strcat(), *strncat(), *strcpy(), *strncpy();
|
||||
#ifdef IBMPC
|
||||
int sprintf();
|
||||
#endif
|
||||
Reference in New Issue
Block a user