From 9b822a1d39db1160ca004fcb3e8626654fd54afd Mon Sep 17 00:00:00 2001
From: "Mirar (Pontus Hagland)" <pike@sort.mirar.org>
Date: Thu, 11 Mar 1999 09:29:37 +0100
Subject: [PATCH] bugfix

Rev: src/modules/Image/encodings/any.c:1.4
Rev: src/modules/Image/encodings/gif.c:1.46
Rev: src/modules/Image/encodings/pnm.c:1.17
---
 src/modules/Image/encodings/any.c | 10 +++++++---
 src/modules/Image/encodings/gif.c | 20 ++++++++++----------
 src/modules/Image/encodings/pnm.c | 16 ++++++++--------
 3 files changed, 25 insertions(+), 21 deletions(-)

diff --git a/src/modules/Image/encodings/any.c b/src/modules/Image/encodings/any.c
index 21b8640982..d5293e563f 100644
--- a/src/modules/Image/encodings/any.c
+++ b/src/modules/Image/encodings/any.c
@@ -1,9 +1,9 @@
-/* $Id: any.c,v 1.3 1999/03/04 03:00:40 grubba Exp $ */
+/* $Id: any.c,v 1.4 1999/03/11 08:29:32 mirar Exp $ */
 
 /*
 **! module Image
 **! note
-**!	$Id: any.c,v 1.3 1999/03/04 03:00:40 grubba Exp $
+**!	$Id: any.c,v 1.4 1999/03/11 08:29:32 mirar Exp $
 **! submodule ANY
 **!
 **!	This method calls the other decoding methods
@@ -23,7 +23,7 @@
 #include <ctype.h>
 
 #include "stralloc.h"
-RCSID("$Id: any.c,v 1.3 1999/03/04 03:00:40 grubba Exp $");
+RCSID("$Id: any.c,v 1.4 1999/03/11 08:29:32 mirar Exp $");
 #include "pike_macros.h"
 #include "operators.h"
 #include "builtin_functions.h"
@@ -36,6 +36,10 @@ RCSID("$Id: any.c,v 1.3 1999/03/04 03:00:40 grubba Exp $");
 #include "error.h"
 #include "threads.h"
 
+void image_gif__decode(INT32 args);
+void image_pnm_decode(INT32 args);
+void image_xwd__decode(INT32 args);
+
 void image_any__decode(INT32 args)
 {
    if (args!=1 || sp[-args].type!=T_STRING)
diff --git a/src/modules/Image/encodings/gif.c b/src/modules/Image/encodings/gif.c
index 65a2914bd9..b0841b05a5 100644
--- a/src/modules/Image/encodings/gif.c
+++ b/src/modules/Image/encodings/gif.c
@@ -1,9 +1,9 @@
-/* $Id: gif.c,v 1.45 1998/05/02 01:24:23 mirar Exp $ */
+/* $Id: gif.c,v 1.46 1999/03/11 08:29:33 mirar Exp $ */
 
 /*
 **! module Image
 **! note
-**!	$Id: gif.c,v 1.45 1998/05/02 01:24:23 mirar Exp $
+**!	$Id: gif.c,v 1.46 1999/03/11 08:29:33 mirar Exp $
 **! submodule GIF
 **!
 **!	This submodule keep the GIF encode/decode capabilities
@@ -31,7 +31,7 @@
 #include <ctype.h>
 
 #include "stralloc.h"
-RCSID("$Id: gif.c,v 1.45 1998/05/02 01:24:23 mirar Exp $");
+RCSID("$Id: gif.c,v 1.46 1999/03/11 08:29:33 mirar Exp $");
 #include "pike_macros.h"
 #include "object.h"
 #include "constants.h"
@@ -144,8 +144,8 @@ void image_gif_header_block(INT32 args)
 {
    int xs,ys,bkgi=0,aspect=0,gif87a=0;
    struct neo_colortable *nct=NULL;
-   int globalpalette;
-   int numcolors;
+   int globalpalette=0;
+   int numcolors=0;
    int bpp=1;
    char buf[20];
    struct pike_string *ps;
@@ -663,15 +663,15 @@ CHRONO("gif _render_block end");
 
 void image_gif_render_block(INT32 args)
 {
-   struct image *img,*alpha=NULL;
-   struct neo_colortable *nct;
+   struct image *img=NULL,*alpha=NULL;
+   struct neo_colortable *nct=NULL;
    int numcolors;
    int localpalette,xpos,ypos;
    int alphaidx=-1;
    rgb_group alphacolor;
    int alphaentry=0;
    int transparency;
-   int n;
+   int n=0;
    int delay=0;
    int user_input=0;
    int disposal=0;
@@ -1777,9 +1777,9 @@ static void gif_deinterlace(rgb_group *s,
    free(tmp);
 }
 	
-static void image_gif__decode(INT32 args)
+void image_gif__decode(INT32 args)
 {
-   struct array *a,*b;
+   struct array *a,*b=NULL;
    int n,i;
    struct object *o,*o2,*cto,*lcto;
    int transparency_index=0,transparency=0,
diff --git a/src/modules/Image/encodings/pnm.c b/src/modules/Image/encodings/pnm.c
index 1ed200541d..8600fd3008 100644
--- a/src/modules/Image/encodings/pnm.c
+++ b/src/modules/Image/encodings/pnm.c
@@ -1,9 +1,9 @@
-/* $Id: pnm.c,v 1.16 1998/04/20 18:53:36 grubba Exp $ */
+/* $Id: pnm.c,v 1.17 1999/03/11 08:29:37 mirar Exp $ */
 
 /*
 **! module Image
 **! note
-**!	$Id: pnm.c,v 1.16 1998/04/20 18:53:36 grubba Exp $
+**!	$Id: pnm.c,v 1.17 1999/03/11 08:29:37 mirar Exp $
 **! submodule PNM
 **!
 **!	This submodule keeps the PNM encode/decode capabilities
@@ -49,7 +49,7 @@
 #include <ctype.h>
 
 #include "stralloc.h"
-RCSID("$Id: pnm.c,v 1.16 1998/04/20 18:53:36 grubba Exp $");
+RCSID("$Id: pnm.c,v 1.17 1999/03/11 08:29:37 mirar Exp $");
 #include "pike_macros.h"
 #include "object.h"
 #include "constants.h"
@@ -393,7 +393,7 @@ void img_pnm_encode_P4(INT32 args) /* binary PBM */
 {
    char buf[80];
    struct pike_string *a,*b;
-   struct image *img;
+   struct image *img=NULL;
    unsigned char *c;
    int y,x,bit;
    rgb_group *s;
@@ -439,7 +439,7 @@ void img_pnm_encode_P5(INT32 args) /* binary PGM */
 {
    char buf[80];
    struct pike_string *a,*b;
-   struct image *img;
+   struct image *img=NULL;
    unsigned char *c;
    int n;
    rgb_group *s;
@@ -474,7 +474,7 @@ void img_pnm_encode_P6(INT32 args)
 {
    char buf[80];
    struct pike_string *a,*b;
-   struct image *img;
+   struct image *img=NULL;
 
    if (args<1 ||
        sp[-args].type!=T_OBJECT ||
@@ -512,7 +512,7 @@ void img_pnm_encode_P6(INT32 args)
 
 void img_pnm_encode_ascii(INT32 args)
 {
-   struct image *img;
+   struct image *img=NULL;
    rgb_group *s;
    int n;
    void (*func)(INT32);
@@ -546,7 +546,7 @@ void img_pnm_encode_ascii(INT32 args)
 
 void img_pnm_encode_binary(INT32 args)
 {
-   struct image *img;
+   struct image *img=NULL;
    rgb_group *s;
    int n;
    void (*func)(INT32);
-- 
GitLab