gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. c49dbeaee649e3a05b63


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. c49dbeaee649e3a05b639ebd2d8e598e66690f1a
Date: Sun, 31 Oct 2010 18:49:13 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  c49dbeaee649e3a05b639ebd2d8e598e66690f1a (commit)
      from  be2ad6beda2af39b7268c30fd4a302f49ba22053 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=c49dbeaee649e3a05b639ebd2d8e598e66690f1a


commit c49dbeaee649e3a05b639ebd2d8e598e66690f1a
Author: Benjamin Wolsey <address@hidden>
Date:   Sun Oct 31 19:48:39 2010 +0100

    Fix testsuite for old mingers.

diff --git a/testsuite/misc-ming.all/BitmapDataDraw.c 
b/testsuite/misc-ming.all/BitmapDataDraw.c
index 83287d7..083019d 100644
--- a/testsuite/misc-ming.all/BitmapDataDraw.c
+++ b/testsuite/misc-ming.all/BitmapDataDraw.c
@@ -46,6 +46,7 @@ main(int argc, char** argv)
     SWFFillStyle fill;
     SWFBitmap bp;
     SWFInput inp;
+    FILE* imgfile;
 
     if (argc > 1) mediadir = argv[1];
     else {
@@ -242,7 +243,16 @@ main(int argc, char** argv)
     strcpy(path, mediadir);
     strcat(path, file);
 
-    inp = newSWFInput_filename(path);
+    imgfile = fopen(path, "rb");
+    if (!imgfile) {
+        fprintf(stderr, "Failed to open bitmap file");
+        exit(EXIT_FAILURE);
+    }
+
+    // Note that recent ming version have the more convenient
+    // newSWFInput_filename() function, but we want to support
+    // older versions.
+    inp = newSWFInput_file(imgfile);
     bp = (SWFBitmap)newSWFJpegBitmap_fromInput(inp);
     
     // Image clip
@@ -305,5 +315,7 @@ main(int argc, char** argv)
     puts("Saving " OUTPUT_FILENAME);
     SWFMovie_save(mo, OUTPUT_FILENAME);
 
+    fclose(imgfile);
+
     return EXIT_SUCCESS;
 }
diff --git a/testsuite/misc-ming.all/BitmapSmoothingTest.c 
b/testsuite/misc-ming.all/BitmapSmoothingTest.c
index 90b3f39..2a33405 100644
--- a/testsuite/misc-ming.all/BitmapSmoothingTest.c
+++ b/testsuite/misc-ming.all/BitmapSmoothingTest.c
@@ -45,6 +45,7 @@ main(int argc, char **argv)
        SWFFont font;
        SWFMovieClip dejagnuclip;
        char outputFilename[256];
+    FILE* imgfile;
 
        if ( argc < 2 ) {
                fprintf(stderr, "Usage: %s <swf_version>\n", argv[0]);
@@ -71,13 +72,18 @@ main(int argc, char **argv)
        /****************************************************
        * Create filled shapes mc
        ****************************************************/
-       in = newSWFInput_filename(MEDIADIR"/vstroke.png");
-       if ( ! in ) {
-               return EXIT_FAILURE;
-       }
-
+    imgfile = fopen(MEDIADIR"/vstroke.png", "rb");
+    if (!imgfile) {
+        fprintf(stderr, "Failed to open bitmap file");
+        return EXIT_FAILURE;
+    }
+
+    // Note that recent ming version have the more convenient
+    // newSWFInput_filename() function, but we want to support
+    // older versions.
+    in = newSWFInput_file(imgfile);
        bitmap = newSWFBitmap_fromInput(in);
-       if ( ! bitmap ) {
+       if (!bitmap) {
                return EXIT_FAILURE;
        }
 
@@ -127,6 +133,8 @@ main(int argc, char **argv)
 
        SWFMovie_save(mo, outputFilename);
 
+    fclose(imgfile);
+
        return EXIT_SUCCESS;
 }
 
diff --git a/testsuite/misc-ming.all/LoadBitmapTest.c 
b/testsuite/misc-ming.all/LoadBitmapTest.c
index 936ed97..d45b0fe 100644
--- a/testsuite/misc-ming.all/LoadBitmapTest.c
+++ b/testsuite/misc-ming.all/LoadBitmapTest.c
@@ -42,6 +42,7 @@ main(int argc, char** argv)
     SWFMovieClip dejagnuclip;
     SWFBitmap bp;
     SWFInput inp;
+    FILE* imgfile;
 
     if (argc > 1) mediadir = argv[1];
     else {
@@ -72,8 +73,20 @@ main(int argc, char** argv)
     strcpy(path, mediadir);
     strcat(path, file);
 
-    inp = newSWFInput_filename(path);
-    bp = (SWFBitmap)newSWFJpegBitmap_fromInput(inp);
+    imgfile = fopen(MEDIADIR"/vstroke.png", "rb");
+    if (!imgfile) {
+        fprintf(stderr, "Failed to open bitmap file");
+        return EXIT_FAILURE;
+    }
+
+    // Note that recent ming version have the more convenient
+    // newSWFInput_filename() function, but we want to support
+    // older versions.
+    inp = newSWFInput_file(imgfile);
+       bp = newSWFBitmap_fromInput(inp);
+       if (!bp) {
+               return EXIT_FAILURE;
+       }
     SWFMovie_addExport(mo, (SWFBlock)bp, "img1");
 
     SWFMovie_writeExports(mo);
@@ -160,5 +173,7 @@ main(int argc, char** argv)
     puts("Saving " OUTPUT_FILENAME);
     SWFMovie_save(mo, OUTPUT_FILENAME);
 
+    fclose(imgfile);
+
     return EXIT_SUCCESS;
 }

-----------------------------------------------------------------------

Summary of changes:
 testsuite/misc-ming.all/BitmapDataDraw.c      |   14 +++++++++++++-
 testsuite/misc-ming.all/BitmapSmoothingTest.c |   20 ++++++++++++++------
 testsuite/misc-ming.all/LoadBitmapTest.c      |   19 +++++++++++++++++--
 3 files changed, 44 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]