]> git.webhop.me Git - tuxwetter.git/commitdiff
increase to 256 frames in animated gifs
authorGetAway <get-away@t-online.de>
Wed, 2 Aug 2017 18:31:01 +0000 (20:31 +0200)
committerJacek Jendrzej <satbaby@kawaii.com>
Wed, 2 Aug 2017 19:03:53 +0000 (21:03 +0200)
small cleanups
bump version to 4.04

gif.c
gifdecomp.c
tuxwetter.c

diff --git a/gif.c b/gif.c
index bc79eea806acdf2524adbb169592a2d19e4000b2..9274574f40ca0eb300f5b2842cbb166af9eb5159 100644 (file)
--- a/gif.c
+++ b/gif.c
@@ -40,8 +40,8 @@
 #define gflush return(FH_ERROR_FILE);
 #define grflush { DGifCloseFile(gft, &err); return(FH_ERROR_FORMAT); }
 #define mgrflush { free(lb); free(slb); DGifCloseFile(gft, &err); return(FH_ERROR_FORMAT); }
-#define agflush return(FH_ERROR_FORMAT);
-#define agrflush { DGifCloseFile(gft, &err); return(FH_ERROR_FORMAT); }
+//#define agflush return(FH_ERROR_FORMAT);
+//#define agrflush { DGifCloseFile(gft, &err); return(FH_ERROR_FORMAT); }
 
 int fh_gif_id(const char *name)
 {
index 86507fbe4bacf82e37d397dfce14cd09fd4c9b09..03c3181734fa34c52b783498bda2f17bbbaeb84e 100644 (file)
@@ -77,9 +77,9 @@ int i, err = 0;
     char tempout[80];
     GifByteType *Extension, *CodeBlock;
     GifFileType *GifFileIn = NULL, *GifFileOut = NULL;
-    for(i=0; i<32; i++)
+    for(i=0; i<255; i++)
     {
-       sprintf(tempout,"%s%02d.gif",OutFileName,i);
+       sprintf(tempout,"%s%03d.gif",OutFileName,i);
        xremove(tempout);
     }
     xremove(TempGifName);
@@ -159,7 +159,7 @@ int i, err = 0;
     
                 /* Scan the content of GIF file and dump image(s) to seperate file(s): */
                do {
-               sprintf(CrntFileName, "%s%02d.gif", OutFileName, FileNum++);
+               sprintf(CrntFileName, "%s%03d.gif", OutFileName, FileNum++);
                if ((GifFileOut = EGifOpenFileName(CrntFileName, TRUE, &err)) == NULL)
                    QuitGifError(GifFileIn, GifFileOut, err);
                FileEmpty = TRUE;
@@ -251,7 +251,7 @@ void QuitGifError(GifFileType *GifFileIn, GifFileType *GifFileOut, int ErrorCode
 
     if (GifFileIn != NULL) DGifCloseFile(GifFileIn, &ErrorCode);
     if (GifFileOut != NULL) EGifCloseFile(GifFileOut, &ErrorCode);
-//    exit(EXIT_FAILURE);
+    exit(EXIT_FAILURE);
 }
 
 
index 80ed5dd63214d42fc3fdfe0b0b8ac84cba2a6ba2..1173ac2f53a77a465968d3b141f750bed954da76 100644 (file)
@@ -44,7 +44,7 @@
 #include "gifdecomp.h"
 #include "icons.h"
 
-#define P_VERSION "4.03"
+#define P_VERSION "4.04"
 #define S_VERSION ""
 
 
@@ -2432,7 +2432,7 @@ unsigned char *buffer=NULL;
                cloop=0;
                while(count--)
                {
-                       sprintf(fname,"%s%02d.gif",GIF_MFILE,cloop++);
+                       sprintf(fname,"%s%03d.gif",GIF_MFILE,cloop++);
                        if(fh_gif_getsize(fname, &x1, &y1, xsize, ysize))
                        {
                                printf("Tuxwetter <invalid GIF-Format>\n");
@@ -2449,13 +2449,14 @@ unsigned char *buffer=NULL;
                                fb_set_gmode(1);
                                fb_display(buffer, imx, imy, dxp, dyp, dxo, dyo, 1, 1, 0/*alpha*/);
                                gmodeon=1;
-
+#if 0
                                if(gifs>1)
                                {
                                        sprintf(fname,"%s %2d / %d", prs_translate("Bild",CONVERT_LIST),cloop, gifs);
-//                                     LCD_draw_string(13, 9, fname);
-//                                     LCD_update();
+                                       LCD_draw_string(13, 9, fname);
+                                       LCD_update();
                                }
+#endif
                        }
                        free(buffer);
                }
@@ -3733,11 +3734,11 @@ PLISTENTRY pl=&epl;
        
        CloseRC();
 
-    for(ix=0; ix<32; ix++)
-    {
-       sprintf(tstr,"%s%02d.gif",GIF_MFILE,ix);
-       xremove(tstr);
-    }
+       for(ix=0; ix<255; ix++)
+       {
+               sprintf(tstr,"%s%03d.gif",GIF_MFILE,ix);
+               xremove(tstr);
+       }
        sprintf(tstr,"ls /tmp/picture* &>/dev/null && rm /tmp/picture*");
        system(tstr);
        xremove("/tmp/tuxwettr.tmp");