git » fp-git.git » commit 72044e5

Moved some defines. Added text type.

author ecalot
2005-12-21 19:56:37 UTC
committer ecalot
2005-12-21 19:56:37 UTC
parent bb4d8ae6d98dede264123680135d7b9377d2502f

Moved some defines. Added text type.

PR/src/include/common.h +14 -1
PR/src/include/parse.h +3 -2
PR/src/include/reslist.h +1 -12
PR/src/include/types.h +1 -12
PR/src/lib/actions/export.c +1 -0
PR/src/lib/layers/idlist.c +0 -2

diff --git a/PR/src/include/common.h b/PR/src/include/common.h
index 219fe81..be7a227 100644
--- a/PR/src/include/common.h
+++ b/PR/src/include/common.h
@@ -79,7 +79,20 @@ common.h: Princed Resources : Defines and prototypes common to all PR code
 #define DEFAULT_BACKUP_EXTENSION "bak"
 
 /* File extensions */
-#define RES_FILE_EXTENSIONS   {"raw","plv","bmp","wav","mid","bin","pal","pcs"}
+#define RES_FILE_EXTENSIONS   {"raw","plv","bmp","wav","mid","bin","pal","pcs","txt"}
+#define RES_FILE_TYPES        {"autodetect","level","image","wave","midi","binary","palette","pcspeaker","text"}
+
+typedef enum {
+	eResTypeRaw=0,
+	eResTypeLevel=1,
+	eResTypeImage=2,
+	eResTypeWave=3,
+	eResTypeMidi=4,
+	eResTypeBinary=5,
+	eResTypePalette=6,
+	eResTypePcspeaker=7,
+	eResTypeText=8
+} tResourceType;
 
 /***************************************************************\
 |                        L A N G U A G E                        |
diff --git a/PR/src/include/parse.h b/PR/src/include/parse.h
index fe6cb9c..3f7c13e 100644
--- a/PR/src/include/parse.h
+++ b/PR/src/include/parse.h
@@ -38,7 +38,8 @@ const char* getExtDesc(int type);
 
 /* Constants */
 #define MAX_VALUE_SIZE        3000
-#define RES_TYPECOUNT         8
-#define RES_FILE_TYPES        {"autodetect","level","image","wave","midi","binary","palette","pcspeaker"}
+#define RES_TYPECOUNT         9
+/* for RES_FILE_TYPES */
+#include "common.h"
 
 #endif
diff --git a/PR/src/include/reslist.h b/PR/src/include/reslist.h
index 6b7af2b..14ff167 100644
--- a/PR/src/include/reslist.h
+++ b/PR/src/include/reslist.h
@@ -37,18 +37,7 @@ reslist.h: Princed Resources : Resource list
 #include "list.h" /* tList */
 #define tResourceList tList
 
-/* Item Types */
-
-typedef enum {
-	eResTypeRaw=0,
-	eResTypeLevel=1,
-	eResTypeImage=2,
-	eResTypeWave=3,
-	eResTypeMidi=4,
-	eResTypeBinary=5,
-	eResTypePalette=6,
-	eResTypePcspeaker=7
-} tResourceType;
+#include "common.h" /* Item Types */
 
 /* types */
 typedef struct {
diff --git a/PR/src/include/types.h b/PR/src/include/types.h
index 6b7af2b..14ff167 100644
--- a/PR/src/include/types.h
+++ b/PR/src/include/types.h
@@ -37,18 +37,7 @@ reslist.h: Princed Resources : Resource list
 #include "list.h" /* tList */
 #define tResourceList tList
 
-/* Item Types */
-
-typedef enum {
-	eResTypeRaw=0,
-	eResTypeLevel=1,
-	eResTypeImage=2,
-	eResTypeWave=3,
-	eResTypeMidi=4,
-	eResTypeBinary=5,
-	eResTypePalette=6,
-	eResTypePcspeaker=7
-} tResourceType;
+#include "common.h" /* Item Types */
 
 /* types */
 typedef struct {
diff --git a/PR/src/lib/actions/export.c b/PR/src/lib/actions/export.c
index 8184ade..6a7d637 100644
--- a/PR/src/lib/actions/export.c
+++ b/PR/src/lib/actions/export.c
@@ -109,6 +109,7 @@ int extract(const char* vFiledat,const char* vDirExt, tResourceList* r, int opti
 						ok=mFormatExportPlv(res.data,vFileext,res.size,res.number,vDatFileName,res.name,res.desc,vDatAuthor,optionflag,backupExtension);
 						break;
 					case eResTypeBinary: /* Binary files */
+					case eResTypeText: /* Text files */
 					case eResTypeRaw: /* Raw files */
 						ok=writeData(res.data,1,vFileext,res.size,optionflag,backupExtension); /* Ignore checksum */
 						break;
diff --git a/PR/src/lib/layers/idlist.c b/PR/src/lib/layers/idlist.c
index 16e5aea..b426126 100644
--- a/PR/src/lib/layers/idlist.c
+++ b/PR/src/lib/layers/idlist.c
@@ -44,8 +44,6 @@ idlist.c: Princed Resources : Partial Id list
 #include "idlist.h"
 
 /* Id list for partial manipulation. Private type */
-typedef enum {eString,eId,eIdValue,eIdIndex}tResLocationType;
-
 typedef struct {
 	int             count;
 	tResourceMatch* list;