summaryrefslogtreecommitdiff
path: root/mpg2c.c
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>2009-10-21 00:02:02 +0000
committercvs2svn <admin@example.com>2009-10-21 00:02:02 +0000
commit97a97ca3358eb48de3eb7a222e487e800566569f (patch)
tree97c920d0225a1c9773a3bce2207f261d7d230123 /mpg2c.c
parenta61961358c5a2ec92340b3f8e056bab55438f103 (diff)
downloadxineliboutput-CVS.tar.gz
xineliboutput-CVS.tar.bz2
This commit was manufactured by cvs2svn to create branch 'CVS'.CVS
Diffstat (limited to 'mpg2c.c')
-rw-r--r--mpg2c.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/mpg2c.c b/mpg2c.c
deleted file mode 100644
index 50c1e25a..00000000
--- a/mpg2c.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2003-2006 Petri Hintukainen <phintuka@cc.hut.fi>
- *
- * This code is distributed under the terms and conditions of the
- * GNU GENERAL PUBLIC LICENSE. See the file COPYING for details.
- *
- * mpg2.c:
- *
- * $Id: mpg2c.c,v 1.3 2006-06-04 11:00:04 phintuka Exp $
- *
- */
-
-#include <stdio.h>
-
-#define LINELEN 20
-
-int main(int argc, char *argv[])
-{
- int ch;
- int pos=1;
-
- if(argc != 4) {
- printf("%s - convert binary file to C code\n\n"
- "usage: %s variable inputfile outputfile\n",
- argv[0],argv[0]);
- return -1;
- }
-
- FILE *fi = fopen(argv[2],"rb");
- FILE *fo = fopen(argv[3],"wt");
- if(!fi ||!fo) {
- printf("Error opening files\n");
- return -1;
- }
- fprintf(fo, "extern const unsigned char v_mpg_%s[] = \n \"", argv[1]);
- while(EOF != (ch = fgetc(fi))) {
- fprintf(fo, "\\x%02x", ch);
- if(pos++ > LINELEN) {
- fprintf(fo, "\"\n \"");
- pos=1;
- }
- }
- fprintf(fo, "\";\n\nextern const int v_mpg_%s_length = sizeof(v_mpg_%s);\n\n",
- argv[1], argv[1]);
-
- fclose(fi);
- fclose(fo);
-
- return 0;
-}