pike.git
/
src
/
post_modules
/
GTK2
/
output
/
split.pike
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/post_modules/GTK2/output/split.pike:155:
if( sizeof(line) ) res += " "+line+"\n"; return res; } void post_class_build() { } array(string) output( mapping(string:Class) classes, mapping(string:Constant) constants,
-
array(Node) global_code )
+
array(Node) global_code
,
+
mapping(string:string
)
strings)
{ head = Stdio.read_bytes( combine_path( sdir, "../pgtk.c.head" ) ); if(!head) error("Failed to load ../pgtk.c.head\n"); sfhead = replace( head, "PROTOTYPES", "#include \"prototypes.h\"" ); traverse_class_tree( classes, output_class ); post_class_build(); traverse_class_tree( classes, build_protos ); write_file( dir + "prototypes.h", protos ); write_file( dir + "time_stamp", (string)time() );
pike.git/src/post_modules/GTK2/output/split.pike:198:
foreach( classes;; object c ) foreach( c->signals; string n; object s ) if( !done[n] ) done[n] = s; q = sort(indices( done )); sort(map(q,sizeof),q); foreach( reverse(q), string w ) S("s_"+w,1); foreach( sort(indices( done )), string w ) initfun += done[w]->pike_add();
+
+
foreach( strings; string name; string str )
+
{
+
pre += "struct pike_string *" + name + ";\n";
+
initfun += " " + name + " = make_shared_binary_string(" + S(str,0,2) +
+
"," + sizeof(str) + ");\n";
+
exitfun += " free_string(" + name + ");\n";
+
}
+
pre += get_string_data()+"\n\n"; files = ({ "pgtk.c" }) + files; write_file( dir+"pgtk.c", pre + toplevel + "PIKE_MODULE_INIT {\n"+make_initfun()+initfun+"}\n\n" "PIKE_MODULE_EXIT {\n"+exitfun+"}\n\n" "struct program *pgtk_type_to_program(GObject *widget)\n" "{\n" +type_switch+