git » fp-git.git » commit 82bd54b

renamed functions. added xml-optimize function

author ecalot
2006-01-05 03:02:30 UTC
committer ecalot
2006-01-05 03:02:30 UTC
parent 7b7f5779e912146ddf99d35803dadbde138fc95f

renamed functions. added xml-optimize function

PR/src/include/common.h +3 -2
PR/src/include/en.lang.pr.h +1 -0
PR/src/include/pr.h +3 -0
PR/src/include/tree.h +3 -6

diff --git a/PR/src/include/common.h b/PR/src/include/common.h
index 8033d80..bcc8ba9 100644
--- a/PR/src/include/common.h
+++ b/PR/src/include/common.h
@@ -161,13 +161,14 @@ typedef enum {
 {"cgi",         no_argument,       0,'g'},\
 {"help",        no_argument,       0,'?'},\
 {"resource",    required_argument, 0,'s'},\
-{"compression-level",    required_argument, 0,'z'}\
-PARSING_OPTRAW\
+{"compression-level",required_argument, 0,'z'}\
 {"recursive",   no_argument,       0,'R'},\
 {"datfile",     required_argument, 0,'t'},\
 {"unknown",     no_argument,       0,2},\
 {"verbose",     no_argument,       0,'v'},\
 {"version",     no_argument,       0,1},\
+{"xml-optimize",required_argument, 0,3},\
+PARSING_OPTRAW\
 {0, 0, 0, 0}\
 }
 
diff --git a/PR/src/include/en.lang.pr.h b/PR/src/include/en.lang.pr.h
index bd6c756..238e633 100644
--- a/PR/src/include/en.lang.pr.h
+++ b/PR/src/include/en.lang.pr.h
@@ -175,6 +175,7 @@ NULL,NULL,NULL,\
                               any extraction\n\
    -v, --verbose              explain what is being done\n\
        --version              output version information and exit\n\
+       --xml-optimize=XMLFILE optimizes a resources xml file\n\
 \n"
 
 #define PR_TXT_AUTHORS           "Authors"
diff --git a/PR/src/include/pr.h b/PR/src/include/pr.h
index 6b3103d..6fc935a 100644
--- a/PR/src/include/pr.h
+++ b/PR/src/include/pr.h
@@ -111,6 +111,9 @@ void  freeParsedStructure (tTag** structure);
 void  freeParsingCache    ();
 void  freeTagStructure    (tTag* structure);
 tTag* parseXmlFile        (const char* vFile,int* error);
+int   generateXMLfile     (const char* vFile,/*const*/ tTag* t);
+void  resourceTreeCommonFactor   (tTag* tag);
+void  resourceTreeFixInheritances(tTag* *tree);
 
 /* unknown.xml logging */
 
diff --git a/PR/src/include/tree.h b/PR/src/include/tree.h
index 8d7e9a7..b30c8b8 100644
--- a/PR/src/include/tree.h
+++ b/PR/src/include/tree.h
@@ -19,8 +19,8 @@
 */
 
 /*
-unknown.h: Princed Resources : Unknown.xml generator headers
-\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf\xaf
+tree.h: Princed Resources : Unknown.xml generator headers
+\xaf\xaf\xaf\xaf\xaf\xaf
  Copyright 2003 Princed Development Team
   Created: 24 Aug 2003
 
@@ -38,7 +38,7 @@ unknown.h: Princed Resources : Unknown.xml generator headers
 #include "reslist.h"
 #include <stdio.h> /* FILE* */
 
-typedef struct { 
+typedef struct {
 	tTag*        folderCursor;
 	tTag*        folderFirst;
 	tTag*        itemCursor;
@@ -47,9 +47,6 @@ typedef struct {
 void unknown_item(int value,const char* index,const char* path,const char* type,unsigned long int flags,const char* typedesc,int count, tTreeStatus* status);
 void unknown_folder(const char* path, const char* file, int palette, const char* paletteindex, tTreeStatus* status);
 void unknown_deletetreefile(const char* file, tTag* tree);
-void unknown_fixtreeinheritances(tTag* *tree);
 void generateXML(int n,tTag* t,FILE* outputStream);
-void rec_tree_commonfactor(tTag* tag);
-#define eliminatecommonfactors(a) if (a) rec_tree_commonfactor(a->child) /* this ignores the first tag (resources) */
 
 #endif