Branch: Tag:

2001-12-19

2001-12-19 23:54:54 by Martin Stjernholm <mast@lysator.liu.se>

Fixed the handler to use the cpp get_predefines callback. Added two
new user functions: add_predefine and remove_predefine.

Rev: lib/master.pike.in:1.185

1:   /* -*- Pike -*-    * -  * $Id: master.pike.in,v 1.184 2001/12/18 16:59:47 mast Exp $ +  * $Id: master.pike.in,v 1.185 2001/12/19 23:54:54 mast Exp $    *    * Master-file for Pike.    *
1183:    array(string) pike_include_path=({});    array(string) pike_module_path=({});    array(string) pike_program_path=({}); +  mapping(string:string) predefines = ([]);    int want_warnings = PIKE_WARNINGS;    string ver;   
1278:    pike_program_path-=({tmp});    }    +  //! Add a define (without arguments) which will be implicitly +  //! defined in @[cpp] calls. +  void add_predefine (string name, string value) +  { +  predefines[name] = value; +  } +  +  //! Remove a define from the set that are implicitly defined in +  //! @[cpp] calls. +  void remove_predefine (string name) +  { +  m_delete (predefines, name); +  } +     //! -  +  mapping get_predefines() +  { +  return predefines; +  } +  +  //!    mapping get_default_module()    {    /* This is an ugly kluge to avoid an infinite recursion.
1466:    string postparseaction=0;    mixed v;    +  predefines = _static_modules.Builtin._take_over_initial_predefines();    _pike_file_name = orig_argv[0];   #if constant(thread_create)    _backend_thread = this_thread();