r3192 - in packages/trunk/fenix0.92/debian: . patches

Miriam Ruiz baby-guest at alioth.debian.org
Mon Jul 2 20:06:41 UTC 2007


Author: baby-guest
Date: 2007-07-02 20:06:41 +0000 (Mon, 02 Jul 2007)
New Revision: 3192

Added:
   packages/trunk/fenix0.92/debian/patches/fxc_output.patch
Modified:
   packages/trunk/fenix0.92/debian/changelog
   packages/trunk/fenix0.92/debian/patches/series
Log:
Added switch -o to fxc to redirect bytecode to a certain file or to stdout.



Modified: packages/trunk/fenix0.92/debian/changelog
===================================================================
--- packages/trunk/fenix0.92/debian/changelog	2007-07-02 19:56:15 UTC (rev 3191)
+++ packages/trunk/fenix0.92/debian/changelog	2007-07-02 20:06:41 UTC (rev 3192)
@@ -2,6 +2,7 @@
 
   * Divided i18n patches into smaller ones.
   * Fixed some messages missing from the gettextization.
+  * Added switch -o to fxc to redirect bytecode to a certain file or to stdout.
   * Added icons.
 
  -- Miriam Ruiz <little_miry at yahoo.es>  Mon, 02 Jul 2007 18:23:10 +0000

Added: packages/trunk/fenix0.92/debian/patches/fxc_output.patch
===================================================================
--- packages/trunk/fenix0.92/debian/patches/fxc_output.patch	                        (rev 0)
+++ packages/trunk/fenix0.92/debian/patches/fxc_output.patch	2007-07-02 20:06:41 UTC (rev 3192)
@@ -0,0 +1,85 @@
+--- fenix0.92-0.92a.dfsg1.orig/fxc/src/main.c
++++ fenix0.92-0.92a.dfsg1/fxc/src/main.c
+@@ -114,6 +114,7 @@
+ {
+     char * filename = 0 ;
+ 	char dcbname[256] ;
++	char outname[256] = "";
+ 	char stubname[256] = "";
+ 	int i, j ;
+ 
+@@ -226,6 +227,17 @@
+ 					break ;
+ 				}
+ 
++				if (argv[i][j] == 'o')
++				{
++					// -o "output": Write to a certain file
++
++					if (argv[i][j+1])
++						strncpy (outname, argv[i]+j+1, 256);
++					else if (argv[i+1] && (argv[i+1][0] != '-' || argv[i+1][1] == '\0'))
++						strncpy (outname, argv[++i], 256);
++					break;
++				}
++
+ 				j++ ;
+ 			}
+ 		}
+@@ -246,10 +258,17 @@
+ 		return 0 ;
+ 	}
+ 
+-	strcpy (dcbname, filename) ;
+-	if (strrchr(dcbname, '.'))
+-		*strrchr(dcbname, '.') = 0 ;
+-	strcat (dcbname, ".dcb") ;
++	if (*outname)
++	{
++		strcpy (dcbname, outname) ;
++	}
++	else
++	{
++		strcpy (dcbname, filename) ;
++		if (strrchr(dcbname, '.'))
++			*strrchr(dcbname, '.') = 0 ;
++		strcat (dcbname, ".dcb") ;
++	}
+ 
+ 	memset (&dcb, 0, sizeof(dcb));
+ 
+--- fenix0.92-0.92a.dfsg1.orig/common/files.c
++++ fenix0.92-0.92a.dfsg1/common/files.c
+@@ -460,6 +460,22 @@
+ 	memset (f, 0, sizeof(file)) ;
+ 	strncpy (f->name, filename, MAX_PATH);
+ 
++	if (strcmp(filename, "-") == 0 && strchr(mode,'w'))
++	{
++		f->type = F_STDFILE;
++		f->fp = stdout;
++		opened_files++;
++		return f ;
++	}
++
++	if (strcmp(filename, "-") == 0 && strchr(mode,'r'))
++	{
++		f->type = F_STDFILE;
++		f->fp = stdin;
++		opened_files++;
++		return f ;
++	}
++
+ 	c = filename ;
+ 	for (n = c+strlen(c) ; n >= c ; n--)
+ 	{
+--- fenix0.92-0.92a.dfsg1.orig/include/files_st.h
++++ fenix0.92-0.92a.dfsg1/include/files_st.h
+@@ -39,6 +39,7 @@
+ #define F_XFILE  1
+ #define F_FILE   2
+ #define F_GZFILE 3
++#define F_STDFILE 4
+ 
+ #include <zlib.h>
+ 

Modified: packages/trunk/fenix0.92/debian/patches/series
===================================================================
--- packages/trunk/fenix0.92/debian/patches/series	2007-07-02 19:56:15 UTC (rev 3191)
+++ packages/trunk/fenix0.92/debian/patches/series	2007-07-02 20:06:41 UTC (rev 3192)
@@ -5,3 +5,4 @@
 i18n_map.patch
 fxi_binname.patch
 fxc_nosdlinit.patch
+fxc_output.patch




More information about the Pkg-games-commits mailing list