pike.git / src / modules / Image / image_module.c

version» Context lines:

pike.git/src/modules/Image/image_module.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.   */    - #include "global.h" - #include "stralloc.h" - #include "global.h" +    #include "module.h"   #include "pike_macros.h"   #include "interpret.h"   #include "program.h" -  + #include "pike_compiler.h"   #include "program_id.h" - #include "object.h" +    #include "operators.h"   #include "module_support.h"      #include "image.h"   #include "assembly.h"   #include "image_machine.h"      #include "encodings/encodings.h"      #define sp Pike_sp
pike.git/src/modules/Image/image_module.c:81:    struct object *o;   } submagic[]=   {   #undef IMAGE_SUBMODULE   #undef IMAGE_SUBMODMAG   #define IMAGE_SUBMODULE(a,b,c)   #define IMAGE_SUBMODMAG(name,init,exit) { name,init,exit,NULL,NULL },   #include "initstuff.h"   };    - /* Avoid loss of precision warnings. */ - #ifdef __ECL - static inline long TO_LONG(ptrdiff_t x) - { -  return DO_NOT_WARN((long)x); - } - #else /* !__ECL */ - #define TO_LONG(x) ((long)(x)) - #endif /* __ECL */ -  +    #ifdef PIKE_DEBUG   #define IMAGE_CHECK_STACK(X) do { \    if (save_sp != sp) { \    Pike_fatal("%s:%d: %ld droppings on stack! previous init: %s\n", \ -  __FILE__, __LINE__, TO_LONG(sp - save_sp), X); \ +  __FILE__, __LINE__, (long)(sp - save_sp), X); \    } \    } while(0)   #else   #define IMAGE_CHECK_STACK(X)   #endif /* PIKE_DEBUG */         static void image_magic_index(INT32 args)   {    int i;
pike.git/src/modules/Image/image_module.c:175:    stack_swap();    pop_stack();   }      int image_cpuid;   #ifdef ASSEMBLY_OK   static void init_cpuidflags( )   {    unsigned int a, b, c, d;    char *data = alloca(20); -  MEMSET( data, 0, 20 ); +  memset( data, 0, 20 );       image_get_cpuid( 0, &a, &b, &c, &d );       ((int *)data)[0] = a;    ((int *)data)[1] = b;    ((int *)data)[2] = c;       if( strncmp( data, "GenuineIntel", 12 ) )    {    if( strncmp( data, "AuthenticAMD", 12 ) )