From 9ca8f429304ea4fd1e956661ac92fb7e1f3d5191 Mon Sep 17 00:00:00 2001 From: carl Date: Wed, 20 Feb 2019 00:32:19 +0800 Subject: [PATCH] + Add missing files. --- lang/cem/cpp.ansi/ch3bin.h | 15 ++++++++++++ lang/cem/cpp.ansi/ch3mon.h | 15 ++++++++++++ lang/cem/cpp.ansi/domacro.h | 27 ++++++++++++++++++++++ lang/cem/cpp.ansi/error.h | 42 ++++++++++++++++++++++++++++++++++ lang/cem/cpp.ansi/expr.h | 14 ++++++++++++ lang/cem/cpp.ansi/init.h | 13 +++++++++++ lang/cem/cpp.ansi/options.h | 13 +++++++++++ lang/cem/cpp.ansi/preprocess.h | 14 ++++++++++++ lang/cem/cpp.ansi/skip.h | 18 +++++++++++++++ 9 files changed, 171 insertions(+) create mode 100644 lang/cem/cpp.ansi/ch3bin.h create mode 100644 lang/cem/cpp.ansi/ch3mon.h create mode 100644 lang/cem/cpp.ansi/domacro.h create mode 100644 lang/cem/cpp.ansi/error.h create mode 100644 lang/cem/cpp.ansi/expr.h create mode 100644 lang/cem/cpp.ansi/init.h create mode 100644 lang/cem/cpp.ansi/options.h create mode 100644 lang/cem/cpp.ansi/preprocess.h create mode 100644 lang/cem/cpp.ansi/skip.h diff --git a/lang/cem/cpp.ansi/ch3bin.h b/lang/cem/cpp.ansi/ch3bin.h new file mode 100644 index 000000000..ba84e0937 --- /dev/null +++ b/lang/cem/cpp.ansi/ch3bin.h @@ -0,0 +1,15 @@ +/* Copyright (c) 2019 ACK Project. + * See the copyright notice in the ACK home directory, + * in the file "Copyright". + * + * Created on: 2019-02-09 + * + */ +#ifndef CH3BIN_H_ +#define CH3BIN_H_ + +#include "arith.h" + +void ch3bin(register arith *pval, int *pis_uns, int oper, register arith val, int is_uns); + +#endif /* CH3BIN_H_ */ diff --git a/lang/cem/cpp.ansi/ch3mon.h b/lang/cem/cpp.ansi/ch3mon.h new file mode 100644 index 000000000..fd715c4a3 --- /dev/null +++ b/lang/cem/cpp.ansi/ch3mon.h @@ -0,0 +1,15 @@ +/* Copyright (c) 2019 ACK Project. + * See the copyright notice in the ACK home directory, + * in the file "Copyright". + * + * Created on: 2019-02-09 + * + */ +#ifndef CH3MON_H_ +#define CH3MON_H_ + +#include "arith.h" + +void ch3mon(int oper, register arith *pval, int *puns); + +#endif /* CH3MON_H_ */ diff --git a/lang/cem/cpp.ansi/domacro.h b/lang/cem/cpp.ansi/domacro.h new file mode 100644 index 000000000..7bdc7a465 --- /dev/null +++ b/lang/cem/cpp.ansi/domacro.h @@ -0,0 +1,27 @@ +/* Copyright (c) 2019 ACK Project. + * See the copyright notice in the ACK home directory, + * in the file "Copyright". + * + * Created on: 2019-02-09 + * + */ +#ifndef DOMACRO_H_ +#define DOMACRO_H_ + +struct idf; + +void macro_def(register struct idf* id, char* text, int nformals, int length, int flags); +void do_undef(char* argstr); +/* Control line interpreter. The '#' has already + been read by the lexical analyzer by which this function is called. + The token appearing directly after the '#' is obtained by calling + the basic lexical analyzing function GetToken() and is interpreted + to perform the action belonging to that token. + An error message is produced when the token is not recognized. + Pragma's are handled by do_pragma(). They are passed on to the + compiler. +*/ +void domacro(void); +char* GetIdentifier(int skiponerr); + +#endif /* DOMACRO_H_ */ diff --git a/lang/cem/cpp.ansi/error.h b/lang/cem/cpp.ansi/error.h new file mode 100644 index 000000000..4a8275274 --- /dev/null +++ b/lang/cem/cpp.ansi/error.h @@ -0,0 +1,42 @@ +/* Copyright (c) 2019 ACK Project. + * See the copyright notice in the ACK home directory, + * in the file "Copyright". + * + * Created on: 2019-02-09 + * + */ +#ifndef ERROR_H_ +#define ERROR_H_ + +#if __STDC__ +/*VARARGS*/ +void error(char *fmt, ...); +/*VARARGS*/ +void warning(char *fmt, ...); +/*VARARGS*/ +void strict(char *fmt, ...); +/*VARARGS*/ +void crash(char *fmt, ...); +/*VARARGS*/ +void fatal(char *fmt, ...); +#else +/*VARARGS*/ +void error(va_alist); + va_dcl + +/*VARARGS*/ +void warning(va_alist); + va_dcl + +/*VARARGS*/ +void strict(va_alist); + va_dcl +/*VARARGS*/ +void crash(va_alist); + va_dcl +/*VARARGS*/ +void fatal(va_alist); + va_dcl +#endif + +#endif /* ERROR_H_ */ diff --git a/lang/cem/cpp.ansi/expr.h b/lang/cem/cpp.ansi/expr.h new file mode 100644 index 000000000..b4c7d9b75 --- /dev/null +++ b/lang/cem/cpp.ansi/expr.h @@ -0,0 +1,14 @@ +/* Copyright (c) 2019 ACK Project. + * See the copyright notice in the ACK home directory, + * in the file "Copyright". + * + * Created on: 2019-02-09 + * + */ +#ifndef EXPR_H_ +#define EXPR_H_ + +/* The rank of the operator oper is returned. */ +int rank_of(int oper); + +#endif /* EXPR_H_ */ diff --git a/lang/cem/cpp.ansi/init.h b/lang/cem/cpp.ansi/init.h new file mode 100644 index 000000000..134c9d34e --- /dev/null +++ b/lang/cem/cpp.ansi/init.h @@ -0,0 +1,13 @@ +/* Copyright (c) 2019 ACK Project. + * See the copyright notice in the ACK home directory, + * in the file "Copyright". + * + * Created on: 2019-02-09 + * + */ +#ifndef INIT_H_ +#define INIT_H_ + +void init_pp(void); + +#endif /* INIT_H_ */ diff --git a/lang/cem/cpp.ansi/options.h b/lang/cem/cpp.ansi/options.h new file mode 100644 index 000000000..4149da026 --- /dev/null +++ b/lang/cem/cpp.ansi/options.h @@ -0,0 +1,13 @@ +/* Copyright (c) 2019 ACK Project. + * See the copyright notice in the ACK home directory, + * in the file "Copyright". + * + * Created on: 2019-02-09 + * + */ +#ifndef OPTIONS_H_ +#define OPTIONS_H_ + +void do_option(char *text); + +#endif /* OPTIONS_H_ */ diff --git a/lang/cem/cpp.ansi/preprocess.h b/lang/cem/cpp.ansi/preprocess.h new file mode 100644 index 000000000..97dea03b3 --- /dev/null +++ b/lang/cem/cpp.ansi/preprocess.h @@ -0,0 +1,14 @@ +/* Copyright (c) 2019 ACK Project. + * See the copyright notice in the ACK home directory, + * in the file "Copyright". + * + * Created on: 2019-02-09 + * + */ +#ifndef PREPROCESS_H_ +#define PREPROCESS_H_ + +void do_pragma(void); +void preprocess(char *fn); + +#endif /* PREPROCESS_H_ */ diff --git a/lang/cem/cpp.ansi/skip.h b/lang/cem/cpp.ansi/skip.h new file mode 100644 index 000000000..d32a7be96 --- /dev/null +++ b/lang/cem/cpp.ansi/skip.h @@ -0,0 +1,18 @@ +/* Copyright (c) 2019 ACK Project. + * See the copyright notice in the ACK home directory, + * in the file "Copyright". + * + * Created on: 2019-02-09 + * + */ +#ifndef SKIP_H_ +#define SKIP_H_ + +int SkipToNewLine(void); +/* Skips skips any white space and returns the first + non-space character. + */ +int skipspaces(register int ch, int skipnl); + + +#endif /* SKIP_H_ */ -- 2.34.1