add LCC - a better C-Compiler for WEGA

This commit is contained in:
Oliver Lehmann 1990-03-13 19:37:36 +00:00
parent f1e9e43d53
commit 38cfa4bc74
7 changed files with 92 additions and 0 deletions

View File

@ -0,0 +1,6 @@
#ifdef NDEBUG
#define assert(EX)
#else
extern void _assert();
#define assert(EX) if (EX) ; else _assert("EX", __FILE__, __LINE__)
#endif

View File

@ -0,0 +1,17 @@
#include "setjmp.h"
extern int Fflags;
extern char *Ffile;
extern int Fvalue;
extern int (*Ffunc)();
extern jmp_buf Fjmp;
# define FTLMSG 0100000
# define FTLCLN 040000
# define FTLFUNC 020000
# define FTLACT 077
# define FTLJMP 02
# define FTLEXIT 01
# define FTLRET 0
# define FSAVE(val) SAVE(Fflags,old_Fflags); Fflags = val;
# define FRSTR() RSTR(Fflags,old_Fflags);

9
WEGA/contrib/lcc/h/ftw.h Normal file
View File

@ -0,0 +1,9 @@
/*
* Codes for the third argument to the user-supplied function
* which is passed as the second argument to ftw
*/
#define FTW_F 0 /* file */
#define FTW_D 1 /* directory */
#define FTW_DNR 2 /* directory without read permission */
#define FTW_NS 3 /* unknown type, stat failed */

View File

@ -0,0 +1,5 @@
extern char
*memccpy(),
*memchr(),
*memcpy(),
*memset();

View File

@ -0,0 +1,6 @@
/* HSEARCH(3C) */
typedef struct entry { char *key, *data; } ENTRY;
typedef enum { FIND, ENTER } ACTION;
/* TSEARCH(3C) */
typedef enum { preorder, postorder, endorder, leaf } VISIT;

View File

@ -0,0 +1,38 @@
/*
* STORAGE CLASSES
*/
#define C_EFCN -1 /* physical end of function */
#define C_NULL 0
#define C_AUTO 1 /* automatic variable */
#define C_EXT 2 /* external symbol */
#define C_STAT 3 /* static */
#define C_REG 4 /* register variable */
#define C_EXTDEF 5 /* external definition */
#define C_LABEL 6 /* label */
#define C_ULABEL 7 /* undefined label */
#define C_MOS 8 /* member of structure */
#define C_ARG 9 /* function argument */
#define C_STRTAG 10 /* structure tag */
#define C_MOU 11 /* member of union */
#define C_UNTAG 12 /* union tag */
#define C_TPDEF 13 /* type definition */
#define C_USTATIC 14 /* undefined static */
#define C_ENTAG 15 /* enumeration tag */
#define C_MOE 16 /* member of enumeration */
#define C_REGPARM 17 /* register parameter */
#define C_FIELD 18 /* bit field */
#define C_BLOCK 100 /* ".bb" or ".eb" */
#define C_FCN 101 /* ".bf" or ".ef" */
#define C_EOS 102 /* end of structure */
#define C_FILE 103 /* file name */
/*
* The following storage class is a "dummy" used only by STS
* for line number entries reformatted as symbol table entries
*/
#define C_LINE 104
#define C_ALIAS 105 /* duplicate tag */
#define C_HIDDEN 106 /* special storage class for external */
/* symbols in dmert public libraries */

View File

@ -0,0 +1,11 @@
extern char
*strcpy(),
*strncpy(),
*strcat(),
*strncat(),
*strchr(),
*strrchr(),
*strpbrk(),
*strtok();
extern long
strtol();