1da2e3ebdSchinlibpp change history
3da2e3ebdSchin	 ----- minor sync release -----
4da2e3ebdSchin09/11/89 add extra sun style 1,2 arg to line syncs in ppline with pp:linetype
5da2e3ebdSchin	 add pp:oldc to convert __STDC__ void* and prototypes to old C
6da2e3ebdSchin08/11/89 fix <...> include dir bug
7da2e3ebdSchin08/08/89 add SYM_INIT for #define during INIT
8da2e3ebdSchin07/28/89 delete STRIPTOP, STRIP only T_STRING & T_CHARCONST at pp.level==1
9da2e3ebdSchin	 add ppcargs() compatibility command line argument parse
10da2e3ebdSchin07/17/89 dialect: ANSI (default) or (Reiser) compatibility
11da2e3ebdSchin	 style: extended (default) or strict
12da2e3ebdSchin	 use pathprobe(3) for dynamic ppdefault.h
13da2e3ebdSchin	 add PP_PROBE to specify pathprobe() processor
14da2e3ebdSchin	 add -[DI]+ to invert options in ppargs()
17da2e3ebdSchin	 add #pragma's for most ppargs() options
18da2e3ebdSchin	 add #option(pragma-option) predicate test
19da2e3ebdSchin	 PP_MACREF now called during initialization
20da2e3ebdSchin07/11/89 add PP_BUILTIN for external #(...) handler
21da2e3ebdSchin	 add line number to missing endif message
22da2e3ebdSchin	 ignore errors in skipped ppexpr() &&, || and ?: subexpressions
23da2e3ebdSchin	 add space before macro actual in replacement text
24da2e3ebdSchin07/04/89 fix PP_TRUNCATE interaction with PP_COMPILE
25da2e3ebdSchin06/30/89 #define x #; x was recognized as directive #
26da2e3ebdSchin06/27/89 don't pass comments during #if skip
27da2e3ebdSchin05/01/89 add L"..." and L'...' wide quoted constants
28da2e3ebdSchin	 mixed "..." and L"..." ok -- L"..." for COMPILE, first otherwise
29da2e3ebdSchin	 fix PASSCOMMENTS in directives
30da2e3ebdSchin	 allow #define f(a,) for COMPATIBILITY
31da2e3ebdSchin	 fix literal string concatenation bugs
32da2e3ebdSchin	 fix header parsing in non-active if-blocks
33da2e3ebdSchin	 #endmac now takes no arg
34da2e3ebdSchin04/11/89 tone down unknown directive diagnostic in conditional
35da2e3ebdSchin04/07/89 move macref call before arg processing
36da2e3ebdSchin03/27/89 fix pplex bug that bombed line sync for last line == #include
37da2e3ebdSchin03/15/89 fix PP_TRUNCATE macro id bit table checks
38da2e3ebdSchin	 remove compatibility option s from ppargs() -- belongs in cmds
39da2e3ebdSchin03/08/89 remove ``empty character constant'' warning for PASSTHROUGH
40da2e3ebdSchin02/28/89 fix variable n usage conflict for DEFINE: in ppcontrol
41da2e3ebdSchin02/22/89 fix -T conflict with __GNUC__ in ppargs
42da2e3ebdSchin02/01/89 add -T (PP_TRUNCATE) for old non-flexname compiler compatibility
43da2e3ebdSchin01/31/89 -I-M-<char><suffix> finds map file by mapping input file name
44da2e3ebdSchin	 -I-H[directory] allowed for fine hosted control
45da2e3ebdSchin01/24/89 fix #undef of SYM_READONLY macro message
46da2e3ebdSchin	 add PPCOMPATIBLE for compatibility installation in /lib/cpp
47da2e3ebdSchin	 add PP_MAP & -I-M to map include files for minimal including
48da2e3ebdSchin01/18/89 fix pp.token setting by noting with pp.state|=TOKENSET
49da2e3ebdSchin01/11/89 fix #if skip bug where quoted token set begin line state
50da2e3ebdSchin12/11/88 add error checking wrappers to *alloc()
51da2e3ebdSchin12/05/88 add PP_FILEDEPS (-M) and FILEDEPS mode for BSD compatibility
52da2e3ebdSchin12/01/88 add #macdef-#endmac and change actualsync() char to SYNC ('\r')
53da2e3ebdSchin11/30/88 TOKOUTBUF controls 11/28/88 STANDALONE speedup
54da2e3ebdSchin11/28/88 speed up STANDALONE by avoiding pp.token copy
55da2e3ebdSchin11/22/88 add comment removal to string_special
56da2e3ebdSchin11/11/88 LIBEXPR enables expr(3) in ppexpr() (12K extra text)
57da2e3ebdSchin10/11/88 move VARQUOTE to pp.mode
58da2e3ebdSchin10/01/88 allow checkpoint files for !STANDALONE
59da2e3ebdSchin08/31/88 add pp.undefsym for pp.macref's on undefined symbols
60da2e3ebdSchin08/23/88 0xe+N -> `0xe' `+' `N'
61da2e3ebdSchin08/16/88 fix ppckeys.c: T_DOUBLE->T_DOUBLE_T, T_FLOAT->T_FLOAT_T
62da2e3ebdSchin07/17/88 add \newline to string_special
63da2e3ebdSchin	 add line number arg to pp.comment call
64da2e3ebdSchin	 move private stuff from pp.h to pplib.h
65da2e3ebdSchin	 add ignored -v to ppargs() (GNU uses this)
66da2e3ebdSchin06/22/88 move pp.macref check; stack pp.state in ppcontrol()
67da2e3ebdSchin	 add PP_INCREF and (*pp.incref)(old-file, new-file, push|return)
68da2e3ebdSchin06/11/88 add pp.macref
69da2e3ebdSchin	 add ppckeys.h and C, C++ and pcc-based C keyword tables
70da2e3ebdSchin06/01/88 convert to new hash library interface
71da2e3ebdSchin05/31/88 pp:readonly in PP_INIT only for STRICT
72da2e3ebdSchin05/11/88 T_MOREARGS -> T_VARIADIC; add SYM_VARIADIC for ... last macro arg
73da2e3ebdSchin05/03/88 fix empty include file bug by omitting empty check
74da2e3ebdSchin04/27/88 ignore space in pragma % maps to accomodate SCCS %.% expansion
75da2e3ebdSchin04/19/88 change pp.h to check for old nmake cpp clash with ppsymbol
76da2e3ebdSchin04/11/88 fix flag check bug in ppload()
77da2e3ebdSchin02/29/88 add MAP_ECHO and %E for MAP_RESCAN + echo
78da2e3ebdSchin	 PP_INITDIR inserted before PP_STANDARD during initialization
79da2e3ebdSchin02/18/88 ignore malformed #'s in COMPATIBILITY macro definitions
80da2e3ebdSchin	 add pp.prefix, PP_PREFIX and -I-P for prefix dir "..." includes
81da2e3ebdSchin02/10/88 add NOQUOTE to disable ' and " and decouple from VARQUOTE
82da2e3ebdSchin	 add keyword and quote pragmas
83da2e3ebdSchin02/02/88 add strcmp builtin predicate for token string value comparison
84da2e3ebdSchin01/24/88 fix <backslash><newline> handling in #define on bsd
85da2e3ebdSchin01/20/88 add %T and fix %[...] pragma mapping formats
86da2e3ebdSchin01/11/88 complete 12/11/87 COMPATIBILITY macro arg /**/ pasting bug fix
87da2e3ebdSchin	 complete KEYWORD support
88da2e3ebdSchin01/08/88 add PP_KEYWORD, (pp.state & KEYWORD), -D-K and #if KEYARGS
89da2e3ebdSchin01/06/88 hex char constants are now variable length
90da2e3ebdSchin01/04/88 do not add terminator for COMPATIBILITY " and ' constants
91da2e3ebdSchin12/11/87 remove #multiple in lieu of #pragma multiple
92da2e3ebdSchin	 add %R MAP_RESCAN option to rescan pragma/directive mapping
93da2e3ebdSchin	 fix COMPATIBILITY macro arg /**/ pasting bug
94da2e3ebdSchin12/08/87 recode for updated hash library interface
95da2e3ebdSchin	 add T_PTRMEMREF ->* and T_DOTREF .* C++ operator tokens
96da2e3ebdSchin12/01/87 reorganize pp token numbers to span 0401..0477
97da2e3ebdSchin11/22/87 add operand error checks to ppexpr()
98da2e3ebdSchin	 add PP_DEFAULT and -I-Dfile for fine PPDEFAULT control
99da2e3ebdSchin11/11/87 pppragma() now omits space after # for primitive passes (uts)
100da2e3ebdSchin10/30/87 fix line count on `newline' in ['"] constant warning
101da2e3ebdSchin10/29/87 add MAP_PLUSCOMMENT and %P to pragma|directive mapping
102da2e3ebdSchin10/28/87 add head & tail args to ppcomment; pass // comments as is
103da2e3ebdSchin10/23/87 add warning for multiple ppop(PP_LOCAL) calls
104da2e3ebdSchin10/16/87 change PP_HOSTED to PP_HOSTDIR, add PP_HOSTED and PP_NONHOSTED
105da2e3ebdSchin	 add #(BASE) that expands to base name of #(FILE)
106da2e3ebdSchin10/15/87 for PASSTHROUGH each line of multi-line "..." or '...' is a token
107da2e3ebdSchin10/14/87 add ppmultiple() for multiple include test ops
108da2e3ebdSchin10/11/87 delete CONVERTASSIGN -> `=<op>' no longer recognized
109da2e3ebdSchin	 delete C++ := -> = conversion
110da2e3ebdSchin	 fix COMPATIBILITY macro recursion bug
111da2e3ebdSchin	 add `#pragma multiple' equivalent to `#multiple'
112da2e3ebdSchin10/06/87 split pplex.c adding ppdirective.c and ppbuiltin.c
113da2e3ebdSchin	 don't recognize obsolete assignments for PLUSPLUS
114da2e3ebdSchin10/05/87 fix PLUSPLUS PASSCOMMENTS bug `// */' -> `/* ***/'
115da2e3ebdSchin10/01/87 allow newlines in ' and " constants for PASSTHROUGH
116da2e3ebdSchin09/28/87 fix CONVERTCC STRICT bug that omitted octal character constants
117da2e3ebdSchin	 add CATLITERAL compile switch for adjacent string literal concatenation
118da2e3ebdSchin	 fix "\07" "3" -> "\073" string literal concatenation bug -> "\0073"
119da2e3ebdSchin09/18/87 complete ppdump() and ppload() checkpoint support
120da2e3ebdSchin09/17/87 fix macro formal bug that didn't update pointers after realloc()
121da2e3ebdSchin	 add PP_DONE complement op to PP_INIT
122da2e3ebdSchin	 add SYM_BUILTIN and #pragma pp:builtin to note builtin macros
123da2e3ebdSchin	 add PP_DUMP, -D-D and #pragma pp:load checkpoint support
124da2e3ebdSchin08/20/87 fix bug that omitted some actualsync() calls for '\n' in pp.in->actual
125da2e3ebdSchin08/19/87 fix pp.linesync==0 && PASSTHROUGH bug that omitted '\n' after "token"
126da2e3ebdSchin08/11/87 fix #($var) null pointer bug
127da2e3ebdSchin07/31/87 fix linesync bug for comment after #include in PASSCOMMENTS
128da2e3ebdSchin07/24/87 add PP_NOPASSTHROUGH
129da2e3ebdSchin07/16/87 fix predicate missing # ambiguity warning
130da2e3ebdSchin07/09/87 fix `macro("@*")' bug in expand_special()
131da2e3ebdSchin06/17/87 fix comment error message check that was off by one line
132da2e3ebdSchin06/16/87 remove #pragma pp:multiple; add #multiple; retain PP_MULTIPLE
133da2e3ebdSchin06/08/87 add # operator to disambiguate predicate tests
134da2e3ebdSchin	 inhibit more warnings on hosted files
135da2e3ebdSchin	 make diagnostics more consistent -- a little more work
136da2e3ebdSchin	 PP_READ files and their included files always marked hosted
137da2e3ebdSchin06/05/87 fix macro actual arg collection with imbedded #include, #line
138da2e3ebdSchin05/28/87 add `#pragma pp:multiple *' to mark all files multiple
139da2e3ebdSchin	 add -D-M for command line equivalent to `#pragma pp:multiple *'
140da2e3ebdSchin05/01/87 clarify HOSTED and SYM_PREDEFINED
141da2e3ebdSchin04/24/87 split pplex.c into smaller files -- too big for some compilers
142da2e3ebdSchin	 move common wrapper routines into the library
143da2e3ebdSchin	 fix ppargs() to cooperate with other option parsers
144da2e3ebdSchin04/22/87 remove getenv("PPSTANDARD") override of PP_STANDARD
145da2e3ebdSchin04/21/87 replace yacc parser with recursive expr() from library streval()
146da2e3ebdSchin04/20/87 add #((<expr>)) expression evaluation on (x)
147da2e3ebdSchin	 add #(<sym>=<expr>) to dynamically evaluate macro values
148da2e3ebdSchin04/11/87 home brew output buffering for PP_STANDALONE -- up to 10%
149da2e3ebdSchin	 cleanup
150da2e3ebdSchin04/10/87 change T_STRING concatenation in preparation for new output buffering
151da2e3ebdSchin04/09/87 fix character constant conversion warnings
152da2e3ebdSchin04/07/87 fix \\n and ??/\n bugs in comment scan
153da2e3ebdSchin04/06/87 add DIGIT, HEX, OCTAL and NONOCTAL case classes to ppdefs.h
154da2e3ebdSchin	 use GETCHR() and ISSPECIAL() in outer pplex() loop -- up to 10%
155da2e3ebdSchin	 fix macro actual arg count test
156da2e3ebdSchin04/03/87 add PP_TEST and TEST1, TEST2 to mode for internal tests
157da2e3ebdSchin04/02/87 delete PPDEFAULT and generalize with PP_READ
158da2e3ebdSchin	 note `# <line> "<file>"' as non-standard
159da2e3ebdSchin	 add check for malloc() out of space
160da2e3ebdSchin04/01/87 C specific error messages only if language="C"
161da2e3ebdSchin	 C++ specific error messages only if language="C++"
162da2e3ebdSchin03/31/87 delete command() predicate -- gateway for trojan horse
163da2e3ebdSchin03/30/87 add dialect() and language() builtin predicates
164da2e3ebdSchin	 change in->standard to in->hosted and STANDARD to HOSTED
165da2e3ebdSchin	 add PP_HOSTED and change PP_NOSTANDARD to PP_NOHOSTED
166da2e3ebdSchin	 ignore #pragma for non-hosted files in STRICT dialect
167da2e3ebdSchin03/27/87 add predop(); delete pp:plusplus
168da2e3ebdSchin	 pp:dialect and pp:language for verification only
169da2e3ebdSchin03/24/87 ----- first release -----
170da2e3ebdSchin03/24/87 ----- first release -----
171da2e3ebdSchin03/23/87 allow WARN to apply to all dialects
172da2e3ebdSchin	 fix pp:directive `...multiple...' warning
173da2e3ebdSchin	 add MAP_NEWLINE to separate multiple pragmas
174da2e3ebdSchin03/22/87 warn about null macro args for STRICT
175da2e3ebdSchin	 add PP_LANGUAGE, `#pragma language [language]'
176da2e3ebdSchin	 warn about newline in macro call arguments in directives
177da2e3ebdSchin	 warn about directives in macro call arguments for STRICT
178da2e3ebdSchin	 validate character constants in #if expressions
179da2e3ebdSchin03/20/87 add PP_DIRECTIVE and PP_LOCAL
180da2e3ebdSchin	 add %I (ignore) map format and allow %X for pragma args
181da2e3ebdSchin03/19/87 change PP_DEFAULT to PP_STANDARD, add PP_DIALECT
182da2e3ebdSchin	 add dialect arg to PP_COMPATIBILITY, PP_DIALECT and PP_STRICT
183da2e3ebdSchin	 add `#pragma pp:pragma pass:option format' mapping
184da2e3ebdSchin03/18/87 delete pp:obsolete; fix `#pragma version'
185da2e3ebdSchin	 fixed macro stack frame bug during recursive macro arg expansion
187da2e3ebdSchin	 add `#pragma dialect [dialect]' verification
188da2e3ebdSchin03/17/87 add PP_NOSTANDARD to disable any special handling of std files
189da2e3ebdSchin	 refine mkdefault.sh for sun workstations
190da2e3ebdSchin	 remove comma operator from pp.yacc since it implies side effects
191da2e3ebdSchin	 add argument type checking for pp:directive and pp:obsolete
192da2e3ebdSchin03/16/87 refine CONFORMING messages
193da2e3ebdSchin	 disambiguate most #assert/#define clashes
194da2e3ebdSchin	 add PASSCOMMENT and (*ppcomment)() for old lint fans
195da2e3ebdSchin03/14/87 #undef in pp:readonly marks id as readonly macro
196da2e3ebdSchin03/11/87 warn about macros that are predicates in #if expressions
197da2e3ebdSchin	 add mode to handle uncoupled flag bit overflow from state
198da2e3ebdSchin03/04/87 fix COMPATIBILITY to expand a macro in its definition
199da2e3ebdSchin02/24/87 add gentab.sh and mkdefault.sh to Makefile
200da2e3ebdSchin02/20/87 add IN_RECURSIVE for proper handling of #(...)
201da2e3ebdSchin02/16/87 add #unassert; PP_WARN & WARN to note obsolete usage
202da2e3ebdSchin	 only recognize directive if # is first char for (state&COMPATIBILITY)
203da2e3ebdSchin	 generalize gentab.sh and retrofit pp.tab
204da2e3ebdSchin	 change in->name.file to be the name of including file
205da2e3ebdSchin02/13/87 add pp.tab; PP_PRAGMA "x=y" -> "#pragma x y"
206da2e3ebdSchin	 add #(x y...) -> "#x y..." for recursive directive evaluation
207da2e3ebdSchin02/12/87 #pragma [pass:] [no]option [arg ...]
208da2e3ebdSchin	 #pragma pp:[no]directive [pass:]<new-directive>
209da2e3ebdSchin	 #pragma pp:id <identifier-character>
210da2e3ebdSchin02/11/87 distribute post-token switch in pplex() to individual cases (~5%)
211da2e3ebdSchin02/09/87 clarify invalid numeric token gobble
212da2e3ebdSchin	 add VARQUOTE & PP_VARQUOTE for `X...X vs. '...' & "..." constants
213da2e3ebdSchin02/06/87 change STRICT to CONFORMING; add PP_CONFORMING
214da2e3ebdSchin02/06/87 change PPBUILTIN to #(<id>)
215da2e3ebdSchin02/05/87 clarify /*...*/ concatenation for (state&COMPATIBILITY)
216da2e3ebdSchin	 add convertcc() to convert new char const to old style
217da2e3ebdSchin	 rework # op to work with convertcc()
218da2e3ebdSchin02/04/87 add =<op> obsolete operators for (state&COMPATIBILITY)
219da2e3ebdSchin02/02/87 fix expand() to save and restore (state&DISABLE)
220da2e3ebdSchin12/17/86 first code