Re: Ming-0.4.4 released

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

 



shige 10/28 2011
----------------

Thanks for your reply.

Sandro Santilli <strk@xxxxxxxxxx> wrote:
| > 2) I needed to change paths of the 1st line of test scripts:
| > 
| >  #!/usr/bin/python, #!/usr/bin/perl, #!/usr/bin/php
| > 
| > to the proper paths
| 
| We want to find a way to recuce maintainance cost, maybe
| 
| #!/usr/bin/env python
| 
| and similar would work for you ?

This works for me too. It is a nice solution.


| Alternatively we should work something out from the dotests.pl
| runner, so that the path to interpreter is only substituted
| in that single place.
| 
| Could you please file a ticket for this on bugzilla ?

Sorry, I can't understand your proposal.


| > 3) I used the patch below at the compilation. Especially, I think
| > it is serious for util/parser.c.
| 
| Is there any test failing w/out your patch and working with ?

Sorry, I made a mistake. A patch for util/parser.c is not correct.
I attached correct version of it below.

I tested again on my Solaris 9. Since the OS does not have 
vasprintf(), doing "CCLD ActionScriptTest" is faild without 
my patch for actionscript/ActionScriptTest.c. 

Without the patch for util/read.c about endian, "make check" says:

> Compiling `forin.as.pp'... successfully compiled 174 bytes bytecode.
> ../../util/listswf forin.swf | diff - ./forin.ref
> Testing legacy_functions with swfversion 6
> Preprocessing ./legacy_functions.as... 168c168
> <      [000]   Float: 0.000000
> ---
> >      [000]   Float: 1.000000
> 175c175
> <      [000]   Float: 0.000000
> ---
> >      [000]   Float: 1.000000
> done.
> .............
> FAIL: ActionScriptTest
> ==================
> 1 of 1 test failed
> ==================

Without the patch for util/parser.c, "make check" says:

> Executing './test03 .' in /home/users/shige/tmp/work6/ming-0.4.4/test/Font
> 64c64
> <    GlyphIndex[0] = 5ee90    GlyphAdvance[0] = 0086
> ---
> >    GlyphIndex[0] = 0000    GlyphAdvance[0] = 0086
> test03 failed (c). Problem comparing against ./test03.ref

for test03. This may be a problem for initialization of 
GlyphIndex[0].

After applied mypatch, all test passed in "make check". The 
modified patch is the following:

----- From here -----
diff -uN ming-0.4.4/configure.in.ORG ming-0.4.4/configure.in
--- ming-0.4.4/configure.in.ORG	Wed Oct 26 16:29:42 2011
+++ ming-0.4.4/configure.in	Fri Oct 28 08:55:52 2011
@@ -150,6 +150,8 @@
 		AC_MSG_ERROR([Can't build tcl extension, as tcl executable could not be found])
 	fi
 
+tclbindir=`dirname $TCL`
+
 tcllibdirs_default="\
 $prefix/lib/itcl \
 $prefix/lib \
@@ -157,7 +159,8 @@
 $HOME/lib \
 /usr/local/lib \
 /usr/lib64 \
-/usr/lib"
+/usr/lib \
+`dirname $tclbindir`/lib"
 
 	for i in $tcllibdirs_default; do
 	  for suf in 8.3 8.4 ""; do
@@ -193,7 +196,8 @@
 $HOME/include \
 /usr/local/include \
 /usr/include/tcl \
-/usr/include"
+/usr/include \
+`dirname $tclbindir`/include"
 
 	for i in $tclincdirs_default; do
 	   if test -f $i/tcl.h; then
diff -uN ming-0.4.4/test/actionscript/ActionScriptTest.c.ORG ming-0.4.4/test/actionscript/ActionScriptTest.c
--- ming-0.4.4/test/actionscript/ActionScriptTest.c.ORG	Wed Oct 26 15:33:18 2011
+++ ming-0.4.4/test/actionscript/ActionScriptTest.c	Fri Oct 28 12:36:01 2011
@@ -41,6 +41,46 @@
 #include <limits.h>
 #include <makeswf.h>
 
+#ifndef HAVE_VASPRINTF
+/* Workaround for the lack of vasprintf()
+ * As found on: http://unixpapa.com/incnote/stdio.html
+ * Seems to be Public Domain
+ */
+int
+vasprintf(char **ret, const char *format, va_list ap)
+{
+	va_list ap2;
+	int len = 100;        /* First guess at the size */
+
+	if ((*ret = (char *) malloc(len)) == NULL)
+	{
+	    return -1;
+	}
+	while (1)
+	{
+	    int nchar;
+	    va_copy(ap2, ap);
+	    nchar= vsnprintf(*ret, len, format, ap2);
+	    if (nchar > -1 && nchar < len)
+	    {
+		return nchar;
+	    }
+	    if (nchar > len)
+	    {
+		len= nchar+1;
+	    } else
+	    {
+		len*= 2;
+	    }
+	    if ((*ret = (char *) realloc(*ret, len)) == NULL)
+	    {
+		free(*ret);
+		return -1;
+	    }
+	}
+}
+#endif
+
 static SWFMovie
 compile(const char* filename, const char* ppfile, int version)
 {
diff -uN ming-0.4.4/util/parser.c.ORG ming-0.4.4/util/parser.c
--- ming-0.4.4/util/parser.c.ORG	Fri Oct 28 14:22:39 2011
+++ ming-0.4.4/util/parser.c	Fri Oct 28 15:44:33 2011
@@ -242,6 +242,7 @@
   int i;
 
   gerec->GlyphIndex = malloc((glyphbits+31)/32 * sizeof(UI32) );
+  gerec->GlyphIndex[0] = 0; /* for glyphbits == 0 */
   for( i=0; glyphbits; i++ ) {
 	  if( glyphbits > 32 ) {
 	  	gerec->GlyphIndex[i] = readBits(f, 32);
@@ -253,6 +254,7 @@
   }
 
   gerec->GlyphAdvance = malloc((advancebits+31)/32 * sizeof(UI32) );
+  gerec->GlyphAdvance[0] = 0; /* for advancebits == 0 */
   for( i=0; advancebits; i++ ) {
 	  if( advancebits > 32 ) {
 	  	gerec->GlyphAdvance[i] = readBits(f, 32);
diff -uN ming-0.4.4/util/read.c.ORG ming-0.4.4/util/read.c
--- ming-0.4.4/util/read.c.ORG	Wed Oct 26 15:33:18 2011
+++ ming-0.4.4/util/read.c	Fri Oct 28 12:42:22 2011
@@ -122,6 +122,7 @@
 {
   char data[8];
 
+#ifdef SWF_LITTLE_ENDIAN
   data[4] = readUInt8(f);
   data[5] = readUInt8(f);
   data[6] = readUInt8(f);
@@ -130,6 +131,17 @@
   data[1] = readUInt8(f);
   data[2] = readUInt8(f);
   data[3] = readUInt8(f);
+#else
+  data[3] = readUInt8(f);
+  data[2] = readUInt8(f);
+  data[1] = readUInt8(f);
+  data[0] = readUInt8(f);
+  data[7] = readUInt8(f);
+  data[6] = readUInt8(f);
+  data[5] = readUInt8(f);
+  data[4] = readUInt8(f);
+#endif
+
 
   return *((double *)data);
 }
@@ -138,10 +150,17 @@
 {
   char data[4];
 
+#ifdef SWF_LITTLE_ENDIAN
   data[0] = readUInt8(f);
   data[1] = readUInt8(f);
   data[2] = readUInt8(f);
   data[3] = readUInt8(f);
+#else
+  data[3] = readUInt8(f);
+  data[2] = readUInt8(f);
+  data[1] = readUInt8(f);
+  data[0] = readUInt8(f);
+#endif
 
   return *((float *)data);
 }
@@ -374,8 +393,6 @@
 {
 	_dumpBytes(f, length, 1 );
 }
-
-  int j=0, i, k, l=0;
 
 void dumpBuffer(unsigned char *buf, int length)
 {
----- To here -----

+========================================================+
 Shigeharu TAKENO     NIigata Institute of Technology
                       kashiwazaki,Niigata 945-1195 JAPAN
 shige@xxxxxxxxxxxxxx   TEL(&FAX): +81-257-22-8161
+========================================================+

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Ming-users mailing list
Ming-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ming-users


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux