quick warning hunt

SVN revision: 3500
This commit is contained in:
Tom Gilbert 2000-09-17 03:07:45 +00:00
parent 6c80c342a7
commit b9f5dca00f
14 changed files with 759 additions and 766 deletions

View File

@ -227,7 +227,7 @@ bump_map_point(Imlib_Image im, pIFunctionParam par)
return im;
}
void
static void
init(struct imlib_filter_info *info)
{
char *filters[] = { "bump_map_point", "bump_map" };
@ -243,13 +243,13 @@ init(struct imlib_filter_info *info)
}
void
static void
deinit()
{
return;
}
void *
static void *
exec(char *filter, void *im, pIFunctionParam par)
{
if (!strcmp(filter, "bump_map"))

View File

@ -63,7 +63,7 @@ colormod(Imlib_Image im, pIFunctionParam par)
DATA8 a_b[256], r_b[256], g_b[256], b_b[256];
pIFunctionParam ptr;
int x = 0, y = 0, h, w, i;
double v;
double v=0.0;
imlib_context_set_image(im);
w = imlib_image_get_width();
@ -168,7 +168,7 @@ colormod(Imlib_Image im, pIFunctionParam par)
return im;
}
void
static void
init(struct imlib_filter_info *info)
{
char *filters[] = { "colormod" };
@ -184,13 +184,13 @@ init(struct imlib_filter_info *info)
}
void
static void
deinit()
{
return;
}
void *
static void *
exec(char *filter, void *im, pIFunctionParam par)
{
if (!strcmp(filter, "colormod"))

View File

@ -12,7 +12,7 @@
#include "dynamic_filters.h"
void init( struct imlib_filter_info *info );
void deinit();
void deinit(void);
void *exec( char *filter, void *im, pIFunctionParam params );
void init( struct imlib_filter_info *info )
@ -30,7 +30,7 @@ void init( struct imlib_filter_info *info )
}
void deinit()
void deinit(void)
{
return;
}

View File

@ -35,7 +35,7 @@ RGBQUAD;
#define BI_RLE4 2
#define BI_BITFIELDS 3
int ReadleShort(FILE *file, unsigned short *ret)
static int ReadleShort(FILE *file, unsigned short *ret)
{
unsigned char b[2];
@ -46,7 +46,7 @@ int ReadleShort(FILE *file, unsigned short *ret)
return 1;
}
int ReadleLong(FILE *file, unsigned long *ret)
static int ReadleLong(FILE *file, unsigned long *ret)
{
unsigned char b[4];
@ -63,7 +63,7 @@ load (ImlibImage *im, ImlibProgressFunction progress,
{
FILE *f;
char pper = 0;
int pl = 0, alpha = 0;
int pl = 0;
char type[2];
unsigned long size, offset, headSize, comp, imgsize, j, k, l;
unsigned short tmpShort, planes, bitcount, ncols, skip;

View File

@ -231,9 +231,9 @@ save (ImlibImage *im, ImlibProgressFunction progress,
int alpha = 0;
char file[4096], key[4096], *cp;
DATA32 *header;
DATA32 *buf, *buf2;
DATA32 *buf;
E_DB_File *db;
int compression = 0, size;
int compression = 0, size = 0;
DATA32 *ret;
@ -330,7 +330,6 @@ save (ImlibImage *im, ImlibProgressFunction progress,
}
if (compression == 0)
{
int y;
memcpy(&(buf[8]), im->data, im->w * im->h * sizeof(DATA32));
header[4] = compression;
#ifdef WORDS_BIGENDIAN

File diff suppressed because it is too large Load Diff

View File

@ -102,7 +102,6 @@ load(ImlibImage *im, ImlibProgressFunction progress, char progress_granularity,
int pc, c, i, j, k, w, h, ncolors, cpp, comment, transp, quote,
context, len, done, r, g, b;
char *line, s[256], tok[128], col[256];
XColor xcol;
int lsz = 256;
struct _cmap
{
@ -112,7 +111,7 @@ load(ImlibImage *im, ImlibProgressFunction progress, char progress_granularity,
} *cmap;
short lookup[128 - 32][128 - 32];
float per = 0.0, per_inc;
float per = 0.0, per_inc = 0.0;
int last_per = 0, last_y = 0;
done = 0;

View File

@ -1741,7 +1741,6 @@ int
imlib_get_text_inset(const char *text)
{
ImlibFont *fn;
int w, h;
CHECK_PARAM_POINTER_RETURN("imlib_get_text_advance", "font", ctxt_font, 0);
CHECK_PARAM_POINTER_RETURN("imlib_get_text_advance", "text", text, 0);

View File

@ -31,7 +31,6 @@ pImlibExternalFilter __imlib_LoadFilter( char *file )
{
ImlibExternalFilter *ptr;
struct imlib_filter_info *info;
int i = 0;
printf( "Loading filter %s\n", file );
MALLOCSHOW;
@ -78,7 +77,7 @@ pImlibExternalFilter __imlib_LoadFilter( char *file )
return ptr;
}
void __imlib_dynamic_filters_init()
static void __imlib_dynamic_filters_init()
{
char **list;
int num_filters, i = 0;
@ -118,7 +117,7 @@ void __imlib_dynamic_filters_init()
}
}
void __imlib_dynamic_filters_deinit()
static void __imlib_dynamic_filters_deinit()
{
}

View File

@ -168,7 +168,6 @@ void
__imlib_FilterImage(ImlibImage *im, ImlibFilter *fil)
{
int x, y, a, r, g, b, ad, rd, gd, bd;
ImlibFilterPixel *pix;
DATA32 *data, *p1, *p2;
data = malloc(im->w * im->h * sizeof(DATA32));

View File

@ -17,6 +17,10 @@
/* size of the lines per segment we scale / render at a time */
#define LINESIZE 16
void
__imlib_generic_render(DATA32 *src, int jump, int w, int h, int dx, int dy,
XImage *xim, Visual *v, Context *ct);
void
__imlib_generic_render(DATA32 *src, int jump, int w, int h, int dx, int dy,
XImage *xim, Visual *v, Context *ct)
@ -132,7 +136,7 @@ __imlib_RenderImage(Display *d, ImlibImage *im,
int psx, psy, psw, psh;
int actual_depth = 0;
char shm = 0;
ImlibRGBAFunction rgbaer, masker;
ImlibRGBAFunction rgbaer, masker = NULL;
ImlibBlendFunction blender = NULL;
int do_mmx;

View File

@ -137,7 +137,7 @@ __imlib_CalcXPoints(int sw, int dw, int b1, int b2)
static int *
__imlib_CalcApoints(int s, int d, int b1, int b2, int up)
{
int *p, i, v, j = 0, rv = 0;
int *p, i, j = 0, rv = 0;
if (d < 0) {
rv = 1;
@ -303,7 +303,7 @@ __imlib_ScaleAARGBA(ImlibScaleInfo *isi, DATA32 *dest, int dxx, int dyy,
int dx, int dy, int dw, int dh, int dow, int sow)
{
DATA32 *sptr, *dptr;
int x, y, i, j, end;
int x, y, end;
DATA32 **ypoints = isi->ypoints;
int *xpoints = isi->xpoints;
int *xapoints = isi->xapoints;
@ -380,7 +380,6 @@ __imlib_ScaleAARGBA(ImlibScaleInfo *isi, DATA32 *dest, int dxx, int dyy,
for (x = dxx; x < end; x++)
{
int r, g, b, a;
int rr, gg, bb, aa;
DATA32 *pix;
if (XAP > 0)
@ -948,7 +947,7 @@ __imlib_ScaleAARGB(ImlibScaleInfo *isi, DATA32 *dest, int dxx, int dyy,
int dx, int dy, int dw, int dh, int dow, int sow)
{
DATA32 *sptr, *dptr;
int x, y, i, j, end;
int x, y, end;
DATA32 **ypoints = isi->ypoints;
int *xpoints = isi->xpoints;
int *xapoints = isi->xapoints;
@ -1017,7 +1016,6 @@ __imlib_ScaleAARGB(ImlibScaleInfo *isi, DATA32 *dest, int dxx, int dyy,
for (x = dxx; x < end; x++)
{
int r = 0, g = 0, b = 0;
int rr = 0, gg = 0, bb = 0;
DATA32 *pix;
if (XAP > 0)

View File

@ -30,14 +30,14 @@
IVariable *vars, *current_var, *curtail;
int __imlib_find_string( char *haystack, char *needle )
static int __imlib_find_string( char *haystack, char *needle )
{
if( strstr( haystack, needle ) != NULL )
return ( strstr( haystack, needle ) - haystack );
return 0;
}
char *__imlib_stripwhitespace( char *str )
static char *__imlib_stripwhitespace( char *str )
{
int i, strt = 0, in_quote = 0;
char *tmpstr = calloc( strlen(str)+1, sizeof(char) );
@ -53,7 +53,7 @@ char *__imlib_stripwhitespace( char *str )
return str;
}
char *__imlib_copystr( char *str, int start, int end )
static char *__imlib_copystr( char *str, int start, int end )
{
int i = 0;
char *rstr = calloc( 1024, sizeof( char ) );
@ -66,7 +66,7 @@ char *__imlib_copystr( char *str, int start, int end )
return NULL;
}
void __imlib_script_tidyup_params( IFunctionParam *param )
static void __imlib_script_tidyup_params( IFunctionParam *param )
{
if( param->next ){
__imlib_script_tidyup_params( param->next );
@ -77,10 +77,40 @@ void __imlib_script_tidyup_params( IFunctionParam *param )
free( param );
}
static void __imlib_script_delete_variable( IVariable *var )
{
if( var->next != NULL )
__imlib_script_delete_variable( var->next );
free( var );
}
void __imlib_script_tidyup(void)
{
__imlib_script_delete_variable( vars );
}
void *__imlib_script_get_next_var(void)
{
if( current_var != NULL )
current_var = current_var->next;
if( current_var != NULL )
return current_var->ptr;
else
return NULL;
}
void __imlib_script_add_var( void *ptr )
{
curtail->next = malloc( sizeof( IVariable ) );
curtail = curtail->next;
curtail->ptr = ptr;
curtail->next = NULL;
}
IFunctionParam *__imlib_script_parse_parameters( Imlib_Image im, char *parameters )
{
int i = 0, in_quote = 0, depth=0, start=0, value_start=0;
char *key = NULL, *value = NULL;
char *value = NULL;
IFunctionParam *rootptr, *ptr;
D( "(--) ===> Entering __imlib_script_parse_parameters()" );
@ -181,9 +211,7 @@ Imlib_Image __imlib_script_parse_function( Imlib_Image im, char *function )
Imlib_Image __imlib_script_parse( Imlib_Image im, char *script, va_list param_list )
{
int i = 0, in_quote = 0, start = 0, depth = 0;
char *scriptbuf = NULL, *function, *paramstr;
IFunction *func = NULL;
IFunctionParam *params = NULL;
char *scriptbuf = NULL, *function;
D( "(--) Script Parser Start." );
if( script != NULL && strlen(script) > 0 )
@ -237,32 +265,3 @@ Imlib_Image __imlib_script_parse( Imlib_Image im, char *script, va_list param_li
}
}
void __imlib_script_delete_variable( IVariable *var )
{
if( var->next != NULL )
__imlib_script_delete_variable( var->next );
free( var );
}
void __imlib_script_tidyup()
{
__imlib_script_delete_variable( vars );
}
void *__imlib_script_get_next_var()
{
if( current_var != NULL )
current_var = current_var->next;
if( current_var != NULL )
return current_var->ptr;
else
return NULL;
}
void __imlib_script_add_var( void *ptr )
{
curtail->next = malloc( sizeof( IVariable ) );
curtail = curtail->next;
curtail->ptr = ptr;
curtail->next = NULL;
}

View File

@ -57,8 +57,8 @@ typedef struct _imlib_variable
Imlib_Image __imlib_script_parse( Imlib_Image im, char *script, va_list );
IFunctionParam *__imlib_script_parse_parameters( Imlib_Image im, char *parameters );
Imlib_Image __imlib_script_parse_function( Imlib_Image im, char *function );
void __imlib_script_tidyup();
void *__imlib_script_get_next_var();
void __imlib_script_tidyup(void);
void *__imlib_script_get_next_var(void);
void __imlib_script_add_var( void *ptr );
#endif /* _FUNCTION_H_ */