[fenix] 24/127: Added switch -o to fxc to redirect bytecode to a certain file or to stdout.

Peter Pentchev roam at ringlet.net
Thu Dec 17 14:39:31 UTC 2015


This is an automated email from the git hooks/post-receive script.

roam-guest pushed a commit to branch master
in repository fenix.

commit e75a452ff0bf3812c9f3843362cb216d7bc5d552
Author: Miriam Ruiz <miriam at debian.org>
Date:   Mon Jul 2 20:06:41 2007 +0000

    Added switch -o to fxc to redirect bytecode to a certain file or to stdout.
---
 debian/changelog                |  1 +
 debian/patches/fxc_output.patch | 85 +++++++++++++++++++++++++++++++++++++++++
 debian/patches/series           |  1 +
 3 files changed, 87 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index fe7b67b..0cc3d2d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ fenix0.92 (0.92a.dfsg1-5) UNRELEASED; urgency=low
 
   * 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
diff --git a/debian/patches/fxc_output.patch b/debian/patches/fxc_output.patch
new file mode 100644
index 0000000..3f39abe
--- /dev/null
+++ b/debian/patches/fxc_output.patch
@@ -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>
+ 
diff --git a/debian/patches/series b/debian/patches/series
index e1f99db..f62e7b5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ i18n_fpg.patch
 i18n_map.patch
 fxi_binname.patch
 fxc_nosdlinit.patch
+fxc_output.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/fenix.git



More information about the Pkg-games-commits mailing list