pike.git / src / modules / Image / encodings / xcf.c

version» Context lines:

pike.git/src/modules/Image/encodings/xcf.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: xcf.c,v 1.52 2004/11/14 13:02:37 nilsson Exp $ + || $Id: xcf.c,v 1.53 2005/01/23 13:30:05 nilsson Exp $   */      #include "global.h"   #include "image_machine.h"      #include "pike_macros.h"   #include "object.h"   #include "module_support.h"   #include "interpret.h"   #include "object.h"
pike.git/src/modules/Image/encodings/xcf.c:1411:    }       pop_n_elems(args);    push_int(0);   }         static struct program *image_encoding_xcf_program=NULL;   void init_image_xcf()   { -  add_function( "___decode", image_xcf____decode, -  "function(string:mapping)", 0); +  ADD_FUNCTION( "___decode", image_xcf____decode, tFunc(tStr,tMapping), 0);    -  add_function( "_decode_tiles", image_xcf_f__decode_tiles, "mixed", 0); +  ADD_FUNCTION( "_decode_tiles", image_xcf_f__decode_tiles, tFunction, 0);       add_integer_constant( "PROP_END", PROP_END,0 );    add_integer_constant( "PROP_COLORMAP", PROP_COLORMAP, 0 );    add_integer_constant( "PROP_ACTIVE_LAYER", PROP_ACTIVE_LAYER, 0 );    add_integer_constant( "PROP_ACTIVE_CHANNEL", PROP_ACTIVE_CHANNEL, 0 );    add_integer_constant( "PROP_SELECTION", PROP_SELECTION, 0 );    add_integer_constant( "PROP_FLOATING_SELECTION", PROP_FLOATING_SELECTION, 0 );    add_integer_constant( "PROP_OPACITY", PROP_OPACITY, 0 );    add_integer_constant( "PROP_MODE", PROP_MODE, 0 );    add_integer_constant( "PROP_VISIBLE", PROP_VISIBLE, 0 );
pike.git/src/modules/Image/encodings/xcf.c:1493:    add_integer_constant( "GRAYA_GIMAGE", GRAYA_GIMAGE, 0 );    add_integer_constant( "INDEXED_GIMAGE", INDEXED_GIMAGE, 0 );    add_integer_constant( "INDEXEDA_GIMAGE", INDEXEDA_GIMAGE, 0 );      #define STRING(X) s_##X = make_shared_binary_string(#X,sizeof( #X )-sizeof(""))   #include "xcf_constant_strings.h"   #undef STRING       start_new_program();    ADD_STORAGE( struct substring ); -  add_function("cast", f_substring_cast, "function(string:mixed)",0); -  add_function("`[]", f_substring_index, "function(int:int)",0); -  add_function("get_short", f_substring_get_short, "function(int:int)", 0 ); -  add_function("get_ushort", f_substring_get_ushort, "function(int:int)", 0 ); -  add_function("get_int", f_substring_get_int, "function(int:int)", 0 ); -  add_function("get_uint", f_substring_get_uint, "function(int:int)", 0 ); -  add_function("_sprintf",f_substring__sprintf, -  "function(int,mapping:mixed)", 0); +  ADD_FUNCTION("cast", f_substring_cast, tFunc(tStr,tMix), 0); +  ADD_FUNCTION("`[]", f_substring_index, tFunc(tInt,tInt), 0); +  ADD_FUNCTION("get_short", f_substring_get_short, tFunc(tInt,tInt), 0 ); +  ADD_FUNCTION("get_ushort", f_substring_get_ushort, tFunc(tInt,tInt), 0 ); +  ADD_FUNCTION("get_int", f_substring_get_int, tFunc(tInt,tInt), 0 ); +  ADD_FUNCTION("get_uint", f_substring_get_uint, tFunc(tInt,tInt), 0 ); +  ADD_FUNCTION("_sprintf",f_substring__sprintf, tFunc(tInt tMapping,tMix), 0); +    /* set_init_callback(init_substring); */    set_exit_callback(free_substring);    substring_program = end_program();   }         void exit_image_xcf()   {   #define STRING(X) free_string(s_##X)   #include "xcf_constant_strings.h"   #undef STRING    free_program( substring_program );   }