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

version» Context lines:

pike.git/src/modules/Image/encodings/xcf.c:1:   #include "global.h" - RCSID("$Id: xcf.c,v 1.7 1999/04/15 04:08:39 hubbe Exp $"); + RCSID("$Id: xcf.c,v 1.8 1999/05/23 17:47:03 mirar Exp $");      #include "config.h"      #include "pike_macros.h"   #include "object.h"   #include "constants.h"   #include "module_support.h"   #include "interpret.h"   #include "object.h"   #include "svalue.h"
pike.git/src/modules/Image/encodings/xcf.c:1226:    if(colortable) free( colortable );       pop_n_elems(args);    push_int(0);   }         static struct program *image_encoding_xcf_program=NULL;   void init_image_xcf()   { -  start_new_program(); +     add_function( "___decode", image_xcf____decode,    "function(string:mapping)", 0);       add_function( "_decode_tiles", image_xcf_f__decode_tiles, "mixed", 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 );
pike.git/src/modules/Image/encodings/xcf.c:1303:    add_integer_constant( "Indexed", Indexed, 0 );    add_integer_constant( "Auxillary", Auxillary, 0 );       add_integer_constant( "RGB_GIMAGE", RGB_GIMAGE, 0 );    add_integer_constant( "RGBA_GIMAGE", RGBA_GIMAGE, 0 );    add_integer_constant( "GRAY_GIMAGE", GRAY_GIMAGE, 0 );    add_integer_constant( "GRAYA_GIMAGE", GRAYA_GIMAGE, 0 );    add_integer_constant( "INDEXED_GIMAGE", INDEXED_GIMAGE, 0 );    add_integer_constant( "INDEXEDA_GIMAGE", INDEXEDA_GIMAGE, 0 );    -  image_encoding_xcf_program=end_program(); -  -  -  push_object(clone_object(image_encoding_xcf_program,0)); -  -  { -  struct pike_string *s=make_shared_string("_XCF"); -  add_constant(s,sp-1,0); -  free_string(s); -  } -  pop_stack(); +    #define STRING(X) s_##X = make_shared_binary_string(#X,sizeof( #X )-sizeof(""));   #include "xcf_constant_strings.h"   #undef STRING   }         void exit_image_xcf()   { -  if(image_encoding_xcf_program) -  { -  free_program(image_encoding_xcf_program); -  image_encoding_xcf_program=0; +    #define STRING(X) free_string(s_##X)   #include "xcf_constant_strings.h"   #undef STRING   } - } +