summaryrefslogtreecommitdiffstats
path: root/hl/tools/gif2h5/gif2mem.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-08-13 20:53:35 (GMT)
commit6b45f5172ccb4311e0be9ae15da3758abb6b0e67 (patch)
tree5a7a112fe7a8a98c6fecb45b513789d15962eb3d /hl/tools/gif2h5/gif2mem.c
parent6562465a2c2a58cfbc2f47bf60bb538f7a783933 (diff)
downloadhdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.zip
hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.gz
hdf5-6b45f5172ccb4311e0be9ae15da3758abb6b0e67.tar.bz2
[svn-r11245] Purpose:
Code cleanup Description: Trim trailing whitespace, which is making 'diff'ing the two branches difficult. Solution: Ran this script in each directory: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
Diffstat (limited to 'hl/tools/gif2h5/gif2mem.c')
-rw-r--r--hl/tools/gif2h5/gif2mem.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/hl/tools/gif2h5/gif2mem.c b/hl/tools/gif2h5/gif2mem.c
index 01aa5a2..0695995 100644
--- a/hl/tools/gif2h5/gif2mem.c
+++ b/hl/tools/gif2h5/gif2mem.c
@@ -100,7 +100,7 @@ Gif2Mem(BYTE *MemGif)
/* Read the GIF image file header information */
ReadGifHeader(gifHead, &MemGif);
-
+
/* Check for FILE stream error */
#if 0
if (ferror(fpGif))
@@ -121,7 +121,7 @@ Gif2Mem(BYTE *MemGif)
for (;;) {
Identifier = *MemGif++;
-
+
switch (Identifier) {
case 0x3B: /* Trailer */
/*
@@ -140,16 +140,16 @@ Gif2Mem(BYTE *MemGif)
GifMemoryStruct.GifApplicationExtension = gifApplication;
GifMemoryStruct.GifCommentExtension = gifComment;
GifMemoryStruct.GifGraphicControlExtension = gifGraphicControl;
-
+
/* return the struct */
return GifMemoryStruct;
case 0x2C: /* Image Descriptor */
/*
* If there was no image descriptor before this increase image
- * count. If an imagedescriptor was present, reset GCEflag
+ * count. If an imagedescriptor was present, reset GCEflag
*/
- if (GCEflag == 0)
+ if (GCEflag == 0)
ImageCount++;
else
GCEflag = 0;
@@ -180,17 +180,17 @@ Gif2Mem(BYTE *MemGif)
printf("Out of memory!");
exit(-1);
}
-
+
if (ReadGifImageDesc(gifImageDesc[ImageCount-1], &MemGif) == -1)
fputs("Error reading Image Descriptor information\n", stderr);
-
+
/* Decompress the Image */
gifImageDesc[ImageCount-1]->Image = Decompress(gifImageDesc[ImageCount-1],
gifHead);
free(gifImageDesc[ImageCount-1]->GIFImage);
- /*
+ /*
* Convert the local palette into an HDF compatible palette In
* case the local color table is present, it is written out as
* the HDFPalette If it is absent the global table is written
@@ -213,8 +213,8 @@ Gif2Mem(BYTE *MemGif)
}
break;
-
- case 0x21: /* Extension Block */
+
+ case 0x21: /* Extension Block */
Label = *MemGif++;
switch (Label) {
@@ -240,7 +240,7 @@ Gif2Mem(BYTE *MemGif)
"Error reading Plain Text Extension information.\n");
break;
-
+
case 0xFE: /* Comment Extension */
CommentCount++;
@@ -251,19 +251,19 @@ Gif2Mem(BYTE *MemGif)
printf("Out of memory!");
exit(-1);
}
-
+
if(!(gifComment[CommentCount - 1] = (GIFCOMMENT *)malloc(sizeof(GIFCOMMENT)))) {
printf("Out of memory!");
exit(-1);
}
-
+
if (ReadGifComment(gifComment[CommentCount - 1], &MemGif))
fprintf(stderr,
"Error reading Comment Extension information\n");
break;
-
+
case 0xF9: /* Graphic Control Extension */
if (GCEflag == 0 )
ImageCount++;
@@ -289,17 +289,17 @@ Gif2Mem(BYTE *MemGif)
gifImageDesc[j] = NULL;
}
}
-
+
if(!(gifGraphicControl[ImageCount-1] = (GIFGRAPHICCONTROL*)malloc(sizeof(GIFGRAPHICCONTROL)))) {
printf("Out of memory!");
exit(-1);
}
-
-
+
+
if (ReadGifGraphicControl(gifGraphicControl[ImageCount-1], &MemGif))
fprintf(stderr,
"Error reading Graphic Control Extension information\n");
-
+
if (!*MemGif++ == 0)
fprintf(stderr,
"Error reading Graphic Control Extension\n");
@@ -311,18 +311,18 @@ Gif2Mem(BYTE *MemGif)
if (ApplicationCount > ApplicationArray)
ApplicationArray = (ApplicationArray << 1) + 1;
-
+
if (!(gifApplication = (GIFAPPLICATION **)realloc(gifApplication , sizeof(GIFAPPLICATION *) * ApplicationArray))) {
printf("Out of memory!");
exit(-1);
}
-
+
if(!(gifApplication[ApplicationCount - 1] = (GIFAPPLICATION *)malloc(sizeof(GIFAPPLICATION)))) {
printf("Out of memory!");
exit(-1);
}
-
+
if (ReadGifApplication(gifApplication[ApplicationCount - 1], &MemGif))
fprintf(stderr,
"Error reading Application Extension information\n");