ref: 826f4c0daffe7c7d7599f407c2c6897823b64b6e
parent: 9cc9d6113cc2b25e1651771c967990939ce09581
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat May 3 20:17:27 EDT 2014
gs: remove PStorage data type from ttf interpreter i dont see that pointers are stored in PStorage at all, so just use PLong directly avoding all this confusion.
--- a/sys/src/cmd/gs/src/ttinterp.c
+++ b/sys/src/cmd/gs/src/ttinterp.c
@@ -166,7 +166,7 @@
#endif
-#define INS_ARG EXEC_OPS PStorage args /* see ttexec.h */
+#define INS_ARG EXEC_OPS PLong args /* see ttexec.h */
#define SKIP_Code() SkipCode( EXEC_ARG )
--- a/sys/src/cmd/gs/src/ttobjs.h
+++ b/sys/src/cmd/gs/src/ttobjs.h
@@ -589,7 +589,7 @@
PLong cvt;
Int storeSize; /* The storage area is now part of the */
- PStorage storage; /* instance */
+ PLong storage; /* instance */
};
@@ -638,11 +638,11 @@
/* useful for the debugger */
Int storeSize; /* size of current storage */
- PStorage storage; /* storage area */
+ PLong storage; /* storage area */
Int stackSize; /* size of exec. stack */
Int top; /* top of exec. stack */
- PStorage stack; /* current exec. stack */
+ PLong stack; /* current exec. stack */
Int args,
new_top; /* new top after exec. */
--- a/sys/src/cmd/gs/src/tttables.h
+++ b/sys/src/cmd/gs/src/tttables.h
@@ -191,7 +191,7 @@
struct _TLoca
{
UShort Size;
- PStorage Table;
+ PLong Table;
};
typedef struct _TLoca TLoca;
--- a/sys/src/cmd/gs/src/tttypes.h
+++ b/sys/src/cmd/gs/src/tttypes.h
@@ -117,17 +117,6 @@
#define NULL (void*)0
#endif
-#ifdef Plan9
- typedef unsigned int* PStorage;
-#elif ARCH_SIZEOF_PTR == SIZEOF_LONG
- typedef long* PStorage;
-#elif ARCH_SIZEOF_PTR == SIZEOF_INT
- typedef int* PStorage;
-#else
-#error "Size of pointer type is not equal to either long or int"
-#endif
-
-
/* Rounding mode constants */
#define TT_Round_Off 5
--
⑨