diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-01-12 14:49:33 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-01-12 14:49:33 +0000 |
| commit | 24455b9be53b712e6b1145612ebcbfb302ec1174 (patch) | |
| tree | c7ec1a8f198e9c65612908beacd36d2f45a39344 /src/Fl_GIF_Image.cxx | |
| parent | d43b146df3dc86053e111da818620f35873824bf (diff) | |
Fix use of free() for memory allocated using new.
Fix error messages to use Fl::error() instead of fprintf().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2898 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_GIF_Image.cxx')
| -rw-r--r-- | src/Fl_GIF_Image.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Fl_GIF_Image.cxx b/src/Fl_GIF_Image.cxx index 634aa2772..e139db57a 100644 --- a/src/Fl_GIF_Image.cxx +++ b/src/Fl_GIF_Image.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_GIF_Image.cxx,v 1.1.2.13 2002/11/19 16:37:34 easysw Exp $" +// "$Id: Fl_GIF_Image.cxx,v 1.1.2.14 2003/01/12 14:49:32 easysw Exp $" // // Fl_GIF_Image routines. // @@ -81,7 +81,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) { char **new_data; // Data array if ((GifFile = fopen(infname, "rb")) == NULL) { - Fl::error("Unable to open %s!", infname); + Fl::error("Fl_GIF_Image: Unable to open %s!", infname); return; } @@ -92,7 +92,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) { } if (b[0]!='G' || b[1]!='I' || b[2] != 'F') { fclose(GifFile); - Fl::error("%s is not a GIF file.\n", infname); + Fl::error("Fl_GIF_Image: %s is not a GIF file.\n", infname); return; } if (b[3]!='8' || b[4]>'9' || b[5]!= 'a') @@ -135,7 +135,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) { int i = NEXTBYTE; if (i<0) { fclose(GifFile); - Fl::error("%s: unexpected EOF",infname); + Fl::error("Fl_GIF_Image: %s - unexpected EOF",infname); return; } int blocklen; @@ -257,7 +257,7 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) { int i; if (CurCode < FreeCode) i = CurCode; else if (CurCode == FreeCode) {*tp++ = (uchar)FinChar; i = OldCode;} - else {fprintf(stderr,"%s : LZW Barf!\n",infname); break;} + else {Fl::error("Fl_GIF_Image: %s - LZW Barf!", infname); break;} while (i >= ColorMapSize) {*tp++ = Suffix[i]; i = Prefix[i];} *tp++ = FinChar = i; @@ -373,5 +373,5 @@ Fl_GIF_Image::Fl_GIF_Image(const char *infname) : Fl_Pixmap((char *const*)0) { // -// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.13 2002/11/19 16:37:34 easysw Exp $". +// End of "$Id: Fl_GIF_Image.cxx,v 1.1.2.14 2003/01/12 14:49:32 easysw Exp $". // |
