Branch: Tag:


2018-01-17 15:12:02 by Henrik Grubbström (Grubba) <>

Cpp: Minor code simplification.


2018-01-15 14:56:05 by Henrik Grubbström (Grubba) <>

Cpp: Use directive_* functions for #error and #warning.

Replace the hard-coded special cases for #error and #warning
with use of the new generic directive_* API. This should make
the code easier to read, and reduces code-duplication somewhat.


2018-01-14 22:11:14 by Henrik Grubbström (Grubba) <>

Cpp: Fixed circular reference issue.

Adding the directive_* functions in the CPP object to the
directives mapping causes circular references. Switch to
looking up the directive functions directly instead.


2018-01-13 12:45:12 by Henrik Grubbström (Grubba) <>

Cpp: Run the preprocessor with the state as current object.


2018-01-12 18:55:45 by Stephen R. van den Berg <>

Restore part of AmigaOS support.

2018-01-12 16:52:01 by Henrik Grubbström (Grubba) <>

Cpp: Added tentative API for custom directives.

Adding a function directive_name() to the CPP class now causes
it to be called by the preprocessor when it encounters the
directive #prefix_name. Most current directives should be possible
to implement using this API, reducing the complexity of low_cpp().

2018-01-12 12:42:47 by Stephen R. van den Berg <>

Rip out final remains of OS2 and AmigaOS.

2018-01-12 12:09:30 by Stephen R. van den Berg <>

Equvivalent and equivalent are not equivalent.

2018-01-12 09:59:40 by Martin Nilsson <>

Small string_builder optimizations.


2018-01-11 23:28:13 by Martin Nilsson <>

We do not support OS/2

2018-01-11 23:24:05 by Martin Nilsson <>

Removed unused variable.

2018-01-11 23:22:03 by Martin Nilsson <>

Trim stack after create.

2018-01-11 13:58:19 by Henrik Grubbström (Grubba) <>

Cpp: Inline preprocessor.h in cpp.cmod.

There's no need for a separate preprocessor template file anymore, as
the template is only included once, so inline it instead to make the
code somewhat easier to follow.


2018-01-10 11:40:34 by Henrik Grubbström (Grubba) <>

Documentation: Added doc for Builtin._take_over_initial_predefines().


2018-01-09 14:41:17 by Henrik Grubbström (Grubba) <>

Cpp: Moved default macro initialization to separate functions.


2018-01-07 11:11:18 by Henrik Grubbström (Grubba) <>

Cpp: Moved initialization of cpp state to create().


2018-01-06 12:29:05 by Henrik Grubbström (Grubba) <>

Cpp: Moved auto_convert flag from argument to state.

This option was passed unmodified through low_cpp() and
apply_define(), and only used in a single place. Moving
it to the cpp state should reduce the overhead somewhat.


2018-01-05 10:19:47 by Henrik Grubbström (Grubba) <>

Cpp: Moved preprocessor state to a proper object.

Cleans up memory and error handling somewhat.


2018-01-04 12:04:50 by Henrik Grubbström (Grubba) <>

Cpp: Fixed potential memory leak on OOM.

add_predefine() would leak the macro name if it failed to
allocate space for the macro value.


2017-11-07 10:48:38 by Martin Nilsson <>

Use wide_isidchar also for non-wide strings.


2017-06-25 01:38:13 by Martin Nilsson <>

A first draft of reduction of object C initializers.


2017-04-08 20:30:39 by Martin Nilsson <>

Use Pike_sp instead of sp


2017-02-08 17:03:29 by Henrik Grubbström (Grubba) <>

Compiler: Moved {null,placeholder}_program to pikecompiler.cmod.

Use the CMOD preprocessor for these programs.


2017-01-25 15:22:32 by Henrik Grubbström (Grubba) <>

Break out sprintf-related stuff from stralloc.h to sprintf.h.

Minor header file cleanup.


2017-01-16 13:34:53 by Henrik Grubbström (Grubba) <>

Compiler: Make #pragma disassemble available --without-debug.


2017-01-10 16:02:00 by Martin Nilsson <>

Changed name from is8bitalnum to isidchar as it contains non-alnum characters (e.g. underscore). Drop 8bit as the wide versions are prefixed as such.

2017-01-10 00:02:49 by Martin Nilsson <>

isalnum doesn't recognize characters in Latin-1 supplement, so replace with is8bitalnum. This only matters for CPP prefixes.


2017-01-08 14:20:37 by Henrik Grubbström (Grubba) <>

Compiler: __ARGS__ is now a macro expanding to __args__.

This ensures that the symbol was reserved in prior versions of Pike,
and also makes it possible to check support via #ifdef.


2016-12-17 13:56:45 by Martin Nilsson <>

Identifiers can no longer contain non-ascii whitespaces. wide_isidchar can now also easily be upgraded to disallow other special characters.

2016-12-17 13:05:44 by Martin Nilsson <>

Removed WC_ISSPACE macro indirection.

2016-12-17 01:53:25 by Martin Nilsson <>

Corrected WIDE_ISSPACE to actually work on all Unicode white spaces.


2016-10-21 10:17:59 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Fixed some memory leaks.


2016-10-01 11:07:53 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Reduced code duplication somewhat again.

Join find_end_of_string() and find_end_of_char() into


2016-09-30 13:12:49 by Martin Nilsson <>

Let's not have numbers on string-related defines for other stuff than string width.

2016-09-30 10:44:14 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Removed unused variable.


2016-09-29 14:11:23 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Reduced code duplication somewhat.

Add a flags argument to find_end_of_string() and join it
and find_end_of_string2().


2016-09-28 20:09:35 by Martin Nilsson <>

Small simplification.


2016-09-25 18:38:43 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: More code cleanup.

Adds string_builder_append_cpp_quoted_pcharp().


2016-09-24 11:24:23 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Removed some redundant tests.


2016-09-21 10:23:01 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Some code clean up.

Adds internal function apply_define().


2016-09-10 10:12:14 by Henrik Grubbström (Grubba) <>

Documentation [cpp]: Fixed warning generated by example.


2016-09-09 16:14:40 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Fixed refcount bug in simple_add_define().


2016-09-08 12:52:01 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Renamed field "inside" to "flags".

Also adds CPP_MACRO_* for the valid values.


2016-09-06 10:13:12 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Changed API for alloc_empty_defile() some more.

It now no longer steals a reference to the macro name.


2016-09-05 22:57:17 by Martin Nilsson <>

Removed some redundancy in adding defines.


2016-09-04 13:56:13 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Use a pike array to hold the macro parts.

Further preprocessor cleanup.


2016-09-03 09:58:38 by Henrik Grubbström (Grubba) <>

Build [hashtable]: hashtable.[ch] are no longer used.

2016-09-03 09:54:12 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Replace the struct hash_entry with a string.

The struct hash_entry is only used to hold a string, so get rid
of it and store the string directly instead.


2016-09-02 08:54:49 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Fixed indentation.

2016-09-02 08:52:08 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Use the precompiler for the define class.


2016-09-01 12:41:42 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Renamed struct define to struct define_struct.

This is in preparation to using the precompiler for the define program.


2016-08-31 10:12:43 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Wrap struct define in objects.

The preprocessor macro lookup table is now a standard mapping instead of
a custom hashtable. This is a step in cleaning up the preprocessor code.


2016-08-30 09:09:22 by Henrik Grubbström (Grubba) <>

Compiler [cpp]: Removed some redundant declarations.


2016-08-24 10:49:17 by Henrik Grubbström (Grubba) <>

Compiler [CPP]: Fixed missing reference.

Potential fix for precompiler failing on some platforms.


2016-08-21 01:29:58 by Martin Nilsson <>

Just use pike_string for args in define magic functions, and get rid of non-generic code.


2016-08-20 11:08:25 by Martin Nilsson <>

binary_findstring_pcharp had one user, so simplify the arguments for both sides.


2016-07-27 10:14:48 by Henrik Grubbström (Grubba) <>

CPP: Use the precompiler to build the preprocessor.

Converts cpp.c into cpp.cmod.

predef::cpp() now uses the precompilers argument checker.