Mercurial > hg > xemacs-beta
comparison src/gif_io.c @ 771:943eaba38521
[xemacs-hg @ 2002-03-13 08:51:24 by ben]
The big ben-mule-21-5 check-in!
Various files were added and deleted. See CHANGES-ben-mule.
There are still some test suite failures. No crashes, though.
Many of the failures have to do with problems in the test suite itself
rather than in the actual code. I'll be addressing these in the next
day or so -- none of the test suite failures are at all critical.
Meanwhile I'll be trying to address the biggest issues -- i.e. build
or run failures, which will almost certainly happen on various platforms.
All comments should be sent to ben@xemacs.org -- use a Cc: if necessary
when sending to mailing lists. There will be pre- and post- tags,
something like
pre-ben-mule-21-5-merge-in, and
post-ben-mule-21-5-merge-in.
author | ben |
---|---|
date | Wed, 13 Mar 2002 08:54:06 +0000 |
parents | fdefd0186b75 |
children | 61855263cb07 |
comparison
equal
deleted
inserted
replaced
770:336a418893b5 | 771:943eaba38521 |
---|---|
99 } | 99 } |
100 | 100 |
101 Bytecount GifStdRead(GifByteType *buf, Bytecount size, VoidPtr method_data) | 101 Bytecount GifStdRead(GifByteType *buf, Bytecount size, VoidPtr method_data) |
102 { | 102 { |
103 GifStdIODataType *IOtype = (GifStdIODataType*)method_data; | 103 GifStdIODataType *IOtype = (GifStdIODataType*)method_data; |
104 return (fread(buf, 1, size, IOtype->File)); | 104 return (retry_fread(buf, 1, size, IOtype->File)); |
105 } | 105 } |
106 | 106 |
107 Bytecount GifStdWrite(GifByteType *buf, Bytecount size, VoidPtr method_data) | 107 Bytecount GifStdWrite(GifByteType *buf, Bytecount size, VoidPtr method_data) |
108 { | 108 { |
109 GifStdIODataType *IOtype = (GifStdIODataType*)method_data; | 109 GifStdIODataType *IOtype = (GifStdIODataType*)method_data; |
110 return (fwrite(buf, 1, size, IOtype->File)); | 110 return (retry_fwrite(buf, 1, size, IOtype->File)); |
111 } | 111 } |
112 | 112 |
113 int GifStdFileClose(VoidPtr method_data) | 113 int GifStdFileClose(VoidPtr method_data) |
114 { | 114 { |
115 int ret; | 115 int ret; |
116 GifStdIODataType *IOtype = (GifStdIODataType*)method_data; | 116 GifStdIODataType *IOtype = (GifStdIODataType*)method_data; |
117 ret = fclose(IOtype->File); | 117 ret = retry_fclose(IOtype->File); |
118 if (ret == 0 && IOtype->FileHandle != -1) | 118 if (ret == 0 && IOtype->FileHandle != -1) |
119 ret = close(IOtype->FileHandle); | 119 ret = retry_close(IOtype->FileHandle); |
120 return ret; | 120 return ret; |
121 } | 121 } |
122 | 122 |
123 void GifRead(GifByteType *buf, Bytecount size, GifFileType *GifFile) | 123 void GifRead(GifByteType *buf, Bytecount size, GifFileType *GifFile) |
124 { | 124 { |
155 "Image is defective, decoding aborted", /* D_GIF_ERR_IMAGE_DEFECT */ | 155 "Image is defective, decoding aborted", /* D_GIF_ERR_IMAGE_DEFECT */ |
156 "Image EOF detected before image complete", /* D_GIF_ERR_EOF_TOO_SOON */ | 156 "Image EOF detected before image complete", /* D_GIF_ERR_EOF_TOO_SOON */ |
157 "Undefined error!", | 157 "Undefined error!", |
158 }; | 158 }; |
159 | 159 |
160 const char *GetGifError(int error); | 160 const char *GetGifError(int errore); |
161 | 161 |
162 /***************************************************************************** | 162 /***************************************************************************** |
163 * Get the last GIF error in human-readable form. * | 163 * Get the last GIF error in human-readable form. * |
164 *****************************************************************************/ | 164 *****************************************************************************/ |
165 const char *GetGifError(int error) | 165 const char *GetGifError(int errore) |
166 { | 166 { |
167 char *Err; | 167 char *Err; |
168 | 168 |
169 switch(error) { | 169 switch(errore) { |
170 case D_GIF_ERR_OPEN_FAILED: | 170 case D_GIF_ERR_OPEN_FAILED: |
171 Err = GifErrorString[0]; | 171 Err = GifErrorString[0]; |
172 break; | 172 break; |
173 case D_GIF_ERR_READ_FAILED: | 173 case D_GIF_ERR_READ_FAILED: |
174 Err = GifErrorString[1]; | 174 Err = GifErrorString[1]; |