git » fp-git.git » commit 8e1e89c

added support for 64-bit machines in variable record

author ecalot
2004-07-06 04:38:32 UTC
committer ecalot
2004-07-06 04:38:32 UTC
parent addd13b77b1628206ae68d4d53561a3ad0f7625d

added support for 64-bit machines in variable record

PR/src/include/autodetect.h +5 -2
PR/src/include/idlist.h +5 -2
PR/src/include/tree.h +5 -2
PR/src/include/unknown.h +5 -2
PR/src/lib/layers/autodetect.c +5 -5
PR/src/lib/layers/idlist.c +5 -5
PR/src/lib/xml/tree.c +5 -5
PR/src/lib/xml/unknown.c +5 -5

diff --git a/PR/src/include/autodetect.h b/PR/src/include/autodetect.h
index 629f316..6a579a3 100644
--- a/PR/src/include/autodetect.h
+++ b/PR/src/include/autodetect.h
@@ -77,8 +77,11 @@ typedef struct {
 typedef enum {eString,eValue}tResIdType;
 
 typedef struct {
-	tResIdType idType;
-	char*      value;
+  tResIdType idType;
+  union {
+    char*      text;
+    long       number;
+  } value;
 }tResIdListItem;
 
 typedef struct {
diff --git a/PR/src/include/idlist.h b/PR/src/include/idlist.h
index 629f316..6a579a3 100644
--- a/PR/src/include/idlist.h
+++ b/PR/src/include/idlist.h
@@ -77,8 +77,11 @@ typedef struct {
 typedef enum {eString,eValue}tResIdType;
 
 typedef struct {
-	tResIdType idType;
-	char*      value;
+  tResIdType idType;
+  union {
+    char*      text;
+    long       number;
+  } value;
 }tResIdListItem;
 
 typedef struct {
diff --git a/PR/src/include/tree.h b/PR/src/include/tree.h
index 629f316..6a579a3 100644
--- a/PR/src/include/tree.h
+++ b/PR/src/include/tree.h
@@ -77,8 +77,11 @@ typedef struct {
 typedef enum {eString,eValue}tResIdType;
 
 typedef struct {
-	tResIdType idType;
-	char*      value;
+  tResIdType idType;
+  union {
+    char*      text;
+    long       number;
+  } value;
 }tResIdListItem;
 
 typedef struct {
diff --git a/PR/src/include/unknown.h b/PR/src/include/unknown.h
index 629f316..6a579a3 100644
--- a/PR/src/include/unknown.h
+++ b/PR/src/include/unknown.h
@@ -77,8 +77,11 @@ typedef struct {
 typedef enum {eString,eValue}tResIdType;
 
 typedef struct {
-	tResIdType idType;
-	char*      value;
+  tResIdType idType;
+  union {
+    char*      text;
+    long       number;
+  } value;
 }tResIdListItem;
 
 typedef struct {
diff --git a/PR/src/lib/layers/autodetect.c b/PR/src/lib/layers/autodetect.c
index 996d085..35f6cf5 100644
--- a/PR/src/lib/layers/autodetect.c
+++ b/PR/src/lib/layers/autodetect.c
@@ -165,11 +165,11 @@ void parseGivenPath(char* path) {
 		} else {
 			if (n) {
 				partialList.list[j].idType=eString;
-				partialList.list[j].value=(char*)strallocandcopy(repairFolders(path+separator));
+				partialList.list[j].value.text=strallocandcopy(repairFolders(path+separator));
 				while (path[i]) i++;
 			} else {
 				partialList.list[j].idType=eValue;
-				partialList.list[j].value=(void*)resourceValue;
+				partialList.list[j].value.number=resourceValue;
 			}
 			resourceValue=0;
 			separator=i+1;
@@ -194,10 +194,10 @@ int isInThePartialList(const char* vFile, int value) {
 
 	for (i=0;i<partialList.count;i++) {
 		if (partialList.list[i].idType==eValue) {
-			if (value==(int)partialList.list[i].value) return 1;
+			if (value==partialList.list[i].value.number) return 1;
 		} else {
 			if (file)
-				if (equalsIgnoreCase(file,(char*)partialList.list[i].value)) return 1;
+				if (equalsIgnoreCase(file,partialList.list[i].value.text)) return 1;
 		}
 	}
 	return 0;
@@ -207,7 +207,7 @@ void freePartialList() {
 	int i;
 	for (i=0;i<partialList.count;i++) {
 		if (partialList.list[i].idType==eString)
-			free(partialList.list[i].value);
+			free(partialList.list[i].value.text);
 	}
 	partialList.count=0;
 }
diff --git a/PR/src/lib/layers/idlist.c b/PR/src/lib/layers/idlist.c
index 996d085..35f6cf5 100644
--- a/PR/src/lib/layers/idlist.c
+++ b/PR/src/lib/layers/idlist.c
@@ -165,11 +165,11 @@ void parseGivenPath(char* path) {
 		} else {
 			if (n) {
 				partialList.list[j].idType=eString;
-				partialList.list[j].value=(char*)strallocandcopy(repairFolders(path+separator));
+				partialList.list[j].value.text=strallocandcopy(repairFolders(path+separator));
 				while (path[i]) i++;
 			} else {
 				partialList.list[j].idType=eValue;
-				partialList.list[j].value=(void*)resourceValue;
+				partialList.list[j].value.number=resourceValue;
 			}
 			resourceValue=0;
 			separator=i+1;
@@ -194,10 +194,10 @@ int isInThePartialList(const char* vFile, int value) {
 
 	for (i=0;i<partialList.count;i++) {
 		if (partialList.list[i].idType==eValue) {
-			if (value==(int)partialList.list[i].value) return 1;
+			if (value==partialList.list[i].value.number) return 1;
 		} else {
 			if (file)
-				if (equalsIgnoreCase(file,(char*)partialList.list[i].value)) return 1;
+				if (equalsIgnoreCase(file,partialList.list[i].value.text)) return 1;
 		}
 	}
 	return 0;
@@ -207,7 +207,7 @@ void freePartialList() {
 	int i;
 	for (i=0;i<partialList.count;i++) {
 		if (partialList.list[i].idType==eString)
-			free(partialList.list[i].value);
+			free(partialList.list[i].value.text);
 	}
 	partialList.count=0;
 }
diff --git a/PR/src/lib/xml/tree.c b/PR/src/lib/xml/tree.c
index 996d085..35f6cf5 100644
--- a/PR/src/lib/xml/tree.c
+++ b/PR/src/lib/xml/tree.c
@@ -165,11 +165,11 @@ void parseGivenPath(char* path) {
 		} else {
 			if (n) {
 				partialList.list[j].idType=eString;
-				partialList.list[j].value=(char*)strallocandcopy(repairFolders(path+separator));
+				partialList.list[j].value.text=strallocandcopy(repairFolders(path+separator));
 				while (path[i]) i++;
 			} else {
 				partialList.list[j].idType=eValue;
-				partialList.list[j].value=(void*)resourceValue;
+				partialList.list[j].value.number=resourceValue;
 			}
 			resourceValue=0;
 			separator=i+1;
@@ -194,10 +194,10 @@ int isInThePartialList(const char* vFile, int value) {
 
 	for (i=0;i<partialList.count;i++) {
 		if (partialList.list[i].idType==eValue) {
-			if (value==(int)partialList.list[i].value) return 1;
+			if (value==partialList.list[i].value.number) return 1;
 		} else {
 			if (file)
-				if (equalsIgnoreCase(file,(char*)partialList.list[i].value)) return 1;
+				if (equalsIgnoreCase(file,partialList.list[i].value.text)) return 1;
 		}
 	}
 	return 0;
@@ -207,7 +207,7 @@ void freePartialList() {
 	int i;
 	for (i=0;i<partialList.count;i++) {
 		if (partialList.list[i].idType==eString)
-			free(partialList.list[i].value);
+			free(partialList.list[i].value.text);
 	}
 	partialList.count=0;
 }
diff --git a/PR/src/lib/xml/unknown.c b/PR/src/lib/xml/unknown.c
index 996d085..35f6cf5 100644
--- a/PR/src/lib/xml/unknown.c
+++ b/PR/src/lib/xml/unknown.c
@@ -165,11 +165,11 @@ void parseGivenPath(char* path) {
 		} else {
 			if (n) {
 				partialList.list[j].idType=eString;
-				partialList.list[j].value=(char*)strallocandcopy(repairFolders(path+separator));
+				partialList.list[j].value.text=strallocandcopy(repairFolders(path+separator));
 				while (path[i]) i++;
 			} else {
 				partialList.list[j].idType=eValue;
-				partialList.list[j].value=(void*)resourceValue;
+				partialList.list[j].value.number=resourceValue;
 			}
 			resourceValue=0;
 			separator=i+1;
@@ -194,10 +194,10 @@ int isInThePartialList(const char* vFile, int value) {
 
 	for (i=0;i<partialList.count;i++) {
 		if (partialList.list[i].idType==eValue) {
-			if (value==(int)partialList.list[i].value) return 1;
+			if (value==partialList.list[i].value.number) return 1;
 		} else {
 			if (file)
-				if (equalsIgnoreCase(file,(char*)partialList.list[i].value)) return 1;
+				if (equalsIgnoreCase(file,partialList.list[i].value.text)) return 1;
 		}
 	}
 	return 0;
@@ -207,7 +207,7 @@ void freePartialList() {
 	int i;
 	for (i=0;i<partialList.count;i++) {
 		if (partialList.list[i].idType==eString)
-			free(partialList.list[i].value);
+			free(partialList.list[i].value.text);
 	}
 	partialList.count=0;
 }