summaryrefslogtreecommitdiffstats
path: root/hl/tools/gif2h5/gif2mem.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2019-12-19 20:55:49 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2019-12-19 20:55:49 (GMT)
commitd11b347aa77cbcfa2bf782c8856bf559444ad880 (patch)
treedf43489411575f566e0475ad4bb040dc69f623e6 /hl/tools/gif2h5/gif2mem.c
parent4281d101c41f80a75143c0d40232383a81afc7f0 (diff)
parent817235bb60e1f79c4b22b4a6116a1594aa75b81d (diff)
downloadhdf5-d11b347aa77cbcfa2bf782c8856bf559444ad880.zip
hdf5-d11b347aa77cbcfa2bf782c8856bf559444ad880.tar.gz
hdf5-d11b347aa77cbcfa2bf782c8856bf559444ad880.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit '817235bb60e1f79c4b22b4a6116a1594aa75b81d': (145 commits) Remove const Fix compile error - declaration after executable statement Adjust cache.c only variables. Fix include to correct memory calls - big-endian issue. Update h5debug to retrieve file pointer through VOL framework Minor whitespace Remove duplicate instance Revert and move declaration Correct struct access Fix duplicate and varname Fix compile and test issues from DT Modify H5VL initialization routines to initialize all VOL-managed object types. Modify H5VLwrap_register() to reject non-VOL-managed object types. Also fix overisights in h5trace.c from previous changes. Add release note for sanitizer support HDFFV-10979 cleanup globals TRILABS-135 Add clang analyzers HDFFV-10979 fix global name clash Fix issues found with ONLY_SHARED_LIBS option Fix 2010 compile issues Change from using H5Dcreate to H5Dcreate2 Latest date first in RELEASE.txt ...
Diffstat (limited to 'hl/tools/gif2h5/gif2mem.c')
-rw-r--r--hl/tools/gif2h5/gif2mem.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/hl/tools/gif2h5/gif2mem.c b/hl/tools/gif2h5/gif2mem.c
index 8fb575c..ae0a113 100644
--- a/hl/tools/gif2h5/gif2mem.c
+++ b/hl/tools/gif2h5/gif2mem.c
@@ -36,7 +36,7 @@
#include "gif.h"
int
-Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
+Gif2Mem(GIFBYTE *MemGif, GIFTOMEM *GifMemoryStruct)
{
/*
* The gif structure outline for passing data to memory is given in gif.h.
@@ -49,22 +49,22 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
GIFCOMMENT **gifComment; /* Comment Extension structure */
GIFGRAPHICCONTROL **gifGraphicControl; /* Graphic Control Extension strct */
- register WORD i; /* Loop counter */
- BYTE Identifier; /* Extension block identifier holder */
- BYTE Label; /* Extension block label holder */
- BYTE ImageCount; /* Count of the number of images in the file */
- BYTE ImageArray; /* Keep the size of the array to store Images */
- BYTE CommentCount;
- BYTE CommentArray;
- BYTE ApplicationCount;
- BYTE ApplicationArray;
- BYTE PlainTextCount;
- BYTE PlainTextArray;
- BYTE GCEflag;
- BYTE aTemp;
- BYTE j;
- BYTE w; /* Two more variables needed only while testing */
- BYTE *b; /* Endian Ordering */
+ register GIFWORD i; /* Loop counter */
+ GIFBYTE Identifier; /* Extension block identifier holder */
+ GIFBYTE Label; /* Extension block label holder */
+ GIFBYTE ImageCount; /* Count of the number of images in the file */
+ GIFBYTE ImageArray; /* Keep the size of the array to store Images */
+ GIFBYTE CommentCount;
+ GIFBYTE CommentArray;
+ GIFBYTE ApplicationCount;
+ GIFBYTE ApplicationArray;
+ GIFBYTE PlainTextCount;
+ GIFBYTE PlainTextArray;
+ GIFBYTE GCEflag;
+ GIFBYTE aTemp;
+ GIFBYTE j;
+ GIFBYTE w; /* Two more variables needed only while testing */
+ GIFBYTE *b; /* Endian Ordering */
/* Allocate memory for the GIF structures */
/* Plug the structs into GifMemoryStruct at the end */
@@ -90,7 +90,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
/* Carry out Endian Testing and set Endian Order */
w = 0x0001;
- b = (BYTE *) &w;
+ b = (GIFBYTE *) &w;
EndianOrder = (b[0] ? 1 : 0);
/* Read the GIF image file header information */
@@ -151,7 +151,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
if (ImageCount > ImageArray) {
aTemp = ImageArray;
- ImageArray = (BYTE)((ImageArray << 1) + 1);
+ ImageArray = (GIFBYTE)((ImageArray << 1) + 1);
if (!(gifImageDesc = (GIFIMAGEDESC **)realloc(gifImageDesc,
sizeof(GIFIMAGEDESC *) * ImageArray))) {
printf("Out of memory!");
@@ -218,7 +218,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
PlainTextCount++;
if (PlainTextCount > PlainTextArray)
- PlainTextArray = (BYTE)((PlainTextArray << 1) + 1);
+ PlainTextArray = (GIFBYTE)((PlainTextArray << 1) + 1);
if (!(gifPlainText = (GIFPLAINTEXT **)realloc(gifPlainText , sizeof(GIFPLAINTEXT *) * PlainTextArray))) {
printf("Out of memory!");
@@ -240,7 +240,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
CommentCount++;
if (CommentCount > CommentArray)
- CommentArray = (BYTE)((CommentArray << 1) + 1);
+ CommentArray = (GIFBYTE)((CommentArray << 1) + 1);
if (!(gifComment = (GIFCOMMENT **)realloc(gifComment , sizeof(GIFCOMMENT *) * CommentArray))) {
printf("Out of memory!");
@@ -267,7 +267,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
if (ImageCount > ImageArray) {
aTemp = ImageArray;
- ImageArray = (BYTE)((ImageArray << 1) + 1);
+ ImageArray = (GIFBYTE)((ImageArray << 1) + 1);
if (!(gifGraphicControl = (GIFGRAPHICCONTROL **)realloc(gifGraphicControl , sizeof(GIFGRAPHICCONTROL *) * ImageArray))) {
printf("Out of memory!");
@@ -306,7 +306,7 @@ Gif2Mem(BYTE *MemGif, GIFTOMEM *GifMemoryStruct)
ApplicationCount++;
if (ApplicationCount > ApplicationArray)
- ApplicationArray = (BYTE)((ApplicationArray << 1) + 1);
+ ApplicationArray = (GIFBYTE)((ApplicationArray << 1) + 1);
if (!(gifApplication = (GIFAPPLICATION **)realloc(gifApplication , sizeof(GIFAPPLICATION *) * ApplicationArray))) {
printf("Out of memory!");