pike.git / src / post_modules / GTK2 / output / split.pike

version» Context lines:

pike.git/src/post_modules/GTK2/output/split.pike:1:   // Output one file per class as C, more or less.   inherit "util";   string head = "", sfhead="", dir, sdir;   string debug = "";   object parent;    - static string filename( Class c ) + protected string filename( Class c )   {    if( sizeof( c->c_name() ) )    return "p"+c->c_name()+".c";    return "pgtk_globals.c";   }      array files = ({}); - static void output_class( Class cls, int lvl ) + protected void output_class( Class cls, int lvl )   {    string current_data = "";       if( !cls->functions["_sprintf"] )    cls->create_default_sprintf();       cls->create_init_exit();       /* Start output */    current_data += "#define EXTPRG extern\n"+sfhead;
pike.git/src/post_modules/GTK2/output/split.pike:42:    foreach( sort( indices( cls->members ) ), string mem )    output_thing( cls->members[ mem ] );       // Processing done. Actually write the file.    write_file( dir + filename( cls ), current_data );    files += ({ filename( cls ) });   }      string protos = "";    - static void build_protos( Class cls, int lvl ) + protected void build_protos( Class cls, int lvl )   {    if( cls->name != "global" )    protos+=(" "*lvl)+"EXTPRG struct program *"+glue_c_name(cls->c_name())+"_program;\n";    foreach( sort( indices( cls->functions ) ), string f )    protos += (" "*lvl)+ " extern "+cls->functions[ f ]->c_prototype();    foreach( sort( indices( cls->members ) ), string f )    protos += (" "*lvl)+ " extern "+cls->members[ f ]->c_prototype();   }      int init_n;   string initfun = "", exitfun="", type_switch="", toplevel =""; - static void build_pike_fadds( Class cls, int lvl ) + protected void build_pike_fadds( Class cls, int lvl )   {    string res = "";    init_n++;       if( mixed e = catch    {    void output_thing( mixed thing )    {    if( mixed err=catch( res += thing->pike_add() ) )    werror(thing->file+":"+thing->line+": Error: "+