summaryrefslogtreecommitdiffstats
path: root/tools/gifconv/hdf2gif.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gifconv/hdf2gif.c')
-rw-r--r--tools/gifconv/hdf2gif.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/tools/gifconv/hdf2gif.c b/tools/gifconv/hdf2gif.c
index 6443627..56be138 100644
--- a/tools/gifconv/hdf2gif.c
+++ b/tools/gifconv/hdf2gif.c
@@ -29,12 +29,9 @@
#define MAX_FILE_LEN 256
#define MAX_NUMBER_IMAGES 50
-extern int hdfWriteGIF(FILE *fp, BYTE *pic, int ptype, int w, int h, BYTE *rmap,
- BYTE *gmap, BYTE *bmap, BYTE *pc2ncmap, int numcols, int colorstyle, int BitsPerPixel);
-
int EndianOrder;
-void PutByte(BYTE b , FILE *fpGif)
+static void PutByte(BYTE b , FILE *fpGif)
{
if (fputc(b , fpGif) == EOF) {
printf("File Writing Error, cannot continue");
@@ -43,7 +40,7 @@ void PutByte(BYTE b , FILE *fpGif)
}
-void putword(int w, FILE *fp)
+static void putword(int w, FILE *fp)
{
/* writes a 16-bit integer in GIF order (LSB first) */
@@ -86,7 +83,7 @@ int main(int argc , char **argv) {
int w,i;
int numcols = 256;
int time_out = 0; /* time between two images in the animation */
- int n_images , index;
+ int n_images , indx;
BYTE pc2nc[256] , r1[256] , g1[256] , b1[256];
@@ -182,7 +179,7 @@ int main(int argc , char **argv) {
n_images = number_of_images;
Background = 0;
- for (index = 0 ; index < n_images ; index++) {
+ for (indx = 0 ; indx < n_images ; indx++) {
/* try to read the image and the palette */
/* Lots of funky stuff to support multiple images has been taken off.
@@ -193,7 +190,7 @@ int main(int argc , char **argv) {
** to write the global palette out and then independantly write the smaller local
** palettes
*/
- if (ReadHDF(&Image , GlobalPalette , dim_sizes , HDFName , image_name_arr[index] , pal_name_arr[index]) < 0) {
+ if (ReadHDF(&Image , GlobalPalette , dim_sizes , HDFName , image_name_arr[indx] , pal_name_arr[indx]) < 0) {
fprintf(stderr , "Unable to read HDF file\n");
return -1;
}
@@ -260,7 +257,7 @@ int main(int argc , char **argv) {
/* If it is the first image we do all the header stuff that isn't required for the
** rest of the images.
*/
- if (index == 0) {
+ if (indx == 0) {
/* Write out the GIF header and logical screen descriptor */
if (n_images > 1) {
fwrite("GIF89a", 1, 6, fpGif); /* the GIF magic number */
@@ -332,7 +329,7 @@ int main(int argc , char **argv) {
fputc (InitCodeSize , fpGif);
- hdfWriteGIF(fpGif , Image , 0 , dim_sizes[0] , dim_sizes[1] , r1, g1 , b1 , pc2nc , 256 , 8 , BitsPerPixel);
+ hdfWriteGIF(fpGif , Image , (int)dim_sizes[0] , (int)dim_sizes[1] , pc2nc , BitsPerPixel);
fputc(0x00 , fpGif);
free (Image);
}