summaryrefslogtreecommitdiffstats
path: root/hl/tools/gif2h5/gif2mem.c
diff options
context:
space:
mode:
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!");