pike.git / src / modules / Parser / parser.c

version» Context lines:

pike.git/src/modules/Parser/parser.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: parser.c,v 1.16 2002/10/11 01:39:48 nilsson Exp $ + || $Id: parser.c,v 1.17 2002/10/21 17:06:21 marcus Exp $   */      #include "global.h"   #include "stralloc.h"   #include "global.h" - RCSID("$Id: parser.c,v 1.16 2002/10/11 01:39:48 nilsson Exp $"); + RCSID("$Id: parser.c,v 1.17 2002/10/21 17:06:21 marcus Exp $");   #include "pike_macros.h"   #include "interpret.h"   #include "program.h"   #include "program_id.h"   #include "object.h"   #include "operators.h" -  + #include "module.h"      #include "parser.h"    - /* must be included last */ - #include "module_magic.h" +       #define sp Pike_sp   #define fp Pike_fp      #define PARSER_INITER      /*#define DEBUG*/      #define PARSER_CLASS(name,init,exit,prog,id) \    void init(void); void exit(void); struct program *prog;
pike.git/src/modules/Parser/parser.c:166:    {    pop_stack();    }else{    f_index(2);    }    }    stack_swap();    pop_stack();   }    - void pike_module_init(void) + PIKE_MODULE_INIT   {   #ifdef PIKE_DEBUG    struct svalue *save_sp = sp;   #endif       int i;    for (i=0; i<(int)NELEM(initclass); i++)    {    start_new_program();    if (initclass[i].id) Pike_compiler->new_program->id = initclass[i].id;
pike.git/src/modules/Parser/parser.c:222:    submagic[i].ps=make_shared_string(submagic[i].name);      #undef PARSER_FUNCTION   #define PARSER_FUNCTION(name,func,def0,def1) ADD_FUNCTION(name,func,def0,def1);   #include "initstuff.h"       ADD_FUNCTION("`[]",parser_magic_index,    tFunc(tString,tMixed),0);   }    - void pike_module_exit(void) + PIKE_MODULE_EXIT   {    int i;    for (i=0; i<(int)NELEM(initclass); i++)    {    (initclass[i].exit)();    free_program(initclass[i].dest[0]);    }    for (i=0; i<(int)NELEM(initsubmodule)-1; i++)    (initsubmodule[i].exit)();    for (i=0; i<(int)NELEM(submagic)-1; i++)    if (submagic[i].o)    {    (submagic[i].exit)();    free_object(submagic[i].o);    }   }