diff options
Diffstat (limited to 'fluid')
| -rw-r--r-- | fluid/Fluid_Image.cxx | 15 | ||||
| -rw-r--r-- | fluid/gif.cxx | 6 |
2 files changed, 10 insertions, 11 deletions
diff --git a/fluid/Fluid_Image.cxx b/fluid/Fluid_Image.cxx index 6f28b8d9b..f0ccedc93 100644 --- a/fluid/Fluid_Image.cxx +++ b/fluid/Fluid_Image.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fluid_Image.cxx,v 1.7.2.5 2000/06/29 07:23:56 spitzak Exp $" +// "$Id: Fluid_Image.cxx,v 1.7.2.6 2000/07/07 08:38:58 spitzak Exp $" // // Pixmap label support for the Fast Light Tool Kit (FLTK). // @@ -74,7 +74,7 @@ void pixmap_image::write_static() { write_c("static char *%s[] = {\n", unique_id(this, "image", filename_name(name()), 0)); int l; - for (l = 0; l < numlines && p->data[l]; l++) { + for (l = 0; l < numlines; l++) { if (l) write_c(",\n"); write_cstring(p->data[l],linelength[l]); } @@ -101,7 +101,7 @@ static int hexdigit(int x) { #define INITIALLINES 1024 pixmap_image::pixmap_image(const char *name, FILE *f) : Fluid_Image(name) { - if (!f) {numlines = 0x7ffffff; return;} // for subclasses + if (!f) return; // for subclasses // read all the c-strings out of the file: char* local_data[INITIALLINES]; char** data = local_data; @@ -212,10 +212,9 @@ int gif2xpm( gif_image::gif_image(const char *name, FILE *f) : pixmap_image(name,0) { char** datap; - if (gif2xpm(name,f,&datap,&linelength,0)) { - p = new Fl_Pixmap(datap); - } else - p = 0; + numlines = gif2xpm(name,f,&datap,&linelength,0); + if (numlines) p = new Fl_Pixmap(datap); + else p = 0; } gif_image::~gif_image() { @@ -437,5 +436,5 @@ Fluid_Image *ui_find_image(const char *oldname) { } // -// End of "$Id: Fluid_Image.cxx,v 1.7.2.5 2000/06/29 07:23:56 spitzak Exp $". +// End of "$Id: Fluid_Image.cxx,v 1.7.2.6 2000/07/07 08:38:58 spitzak Exp $". // diff --git a/fluid/gif.cxx b/fluid/gif.cxx index e008365e8..f09bc6a82 100644 --- a/fluid/gif.cxx +++ b/fluid/gif.cxx @@ -1,5 +1,5 @@ // -// "$Id: gif.cxx,v 1.3.2.2 2000/06/05 21:20:43 mike Exp $" +// "$Id: gif.cxx,v 1.3.2.3 2000/07/07 08:38:58 spitzak Exp $" // // GIF support for the Fast Light Tool Kit (FLTK). // @@ -355,9 +355,9 @@ int gif2xpm( } data[Height+2] = 0; // null to end string array - return 1; + return Height+1; } // -// End of "$Id: gif.cxx,v 1.3.2.2 2000/06/05 21:20:43 mike Exp $". +// End of "$Id: gif.cxx,v 1.3.2.3 2000/07/07 08:38:58 spitzak Exp $". // |
