t64-bit fixes - plan9port - [fork] Plan 9 from user space
git clone git://src.adamsgaard.dk/plan9port
Log
Files
Refs
README
LICENSE
---
commit 98f7b73f9319016731961d51d1f9f8890da59f0b
parent 30d57c74899f4825349441e2b1e7a0bb5995c21f
Author: rsc 
Date:   Thu, 29 Dec 2005 20:55:19 +0000

64-bit fixes

Diffstat:
  M src/cmd/eqn/input.c                 |       6 +++---
  M src/cmd/grap/input.c                |       8 ++++----
  M src/cmd/pic/input.c                 |       2 +-

3 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/cmd/eqn/input.c b/src/cmd/eqn/input.c
t@@ -19,7 +19,7 @@ void pushsrc(int type, char *ptr)        /* new input source */
         srcp->type = type;
         srcp->sp = ptr;
         if (dbg > 1) {
-                printf("\n%3d ", srcp - src);
+                printf("\n%3ld ", (long)(srcp - src));
                 switch (srcp->type) {
                 case File:
                         printf("push file %s\n", ((Infile *)ptr)->fname);
t@@ -47,7 +47,7 @@ void popsrc(void)        /* restore an old one */
         if (srcp <= src)
                 ERROR "too many inputs popped" FATAL;
         if (dbg > 1) {
-                printf("%3d ", srcp - src);
+                printf("%3ld ", (long)(srcp - src));
                 switch (srcp->type) {
                 case File:
                         printf("pop file\n");
t@@ -98,7 +98,7 @@ void dodef(tbl *stp)        /* collect args and switch input to defn */
                 ap->argstk[i] = "";
         if (dbg)
                 for (i = 0; i < argcnt; i++)
-                        printf("arg %d.%d = <%s>\n", ap-args, i+1, ap->argstk[i]);
+                        printf("arg %ld.%d = <%s>\n", (long)(ap-args), i+1, ap->argstk[i]);
         argfp = ap;
         pushsrc(Macro, stp->cval);
 }
diff --git a/src/cmd/grap/input.c b/src/cmd/grap/input.c
t@@ -21,7 +21,7 @@ void pushsrc(int type, char *ptr)        /* new input source */
         srcp->type = type;
         srcp->sp = ptr;
         if (dbg) {
-                printf("\n%3d ", srcp - src);
+                printf("\n%3ld ", (long)(srcp - src));
                 switch (srcp->type) {
                 case File:
                         printf("push file %s\n", ptr);
t@@ -52,7 +52,7 @@ void popsrc(void)        /* restore an old one */
         if (srcp <= src)
                 ERROR "too many inputs popped" FATAL;
         if (dbg) {
-                printf("%3d ", srcp - src);
+                printf("%3ld ", (srcp - src));
                 switch (srcp->type) {
                 case File:
                         printf("pop file\n");
t@@ -172,7 +172,7 @@ void dodef(Obj *stp)        /* collect args and switch input to defn */
                 ap->argstk[i] = "";
         if (dbg)
                 for (i = 0; i < argcnt; i++)
-                        printf("arg %d.%d = <%s>\n", ap-args, i+1, ap->argstk[i]);
+                        printf("arg %ld.%d = <%s>\n", (long)(ap-args), i+1, ap->argstk[i]);
         argfp = ap;
         pushsrc(Macro, stp->val);
 }
t@@ -371,7 +371,7 @@ void do_thru(void)        /* read one line, make into a macro expansion */
                 ap->argstk[i] = "";
         if (dbg)
                 for (i = 0; i < argcnt; i++)
-                        printf("arg %d.%d = <%s>\n", ap-args, i+1, ap->argstk[i]);
+                        printf("arg %ld.%d = <%s>\n", (long)(ap-args), i+1, ap->argstk[i]);
         if (strcmp(ap->argstk[0], ".G2") == 0) {
                 thru = 0;
                 thrudef = 0;
diff --git a/src/cmd/pic/input.c b/src/cmd/pic/input.c
t@@ -26,7 +26,7 @@ void pushsrc(int type, char *ptr)        /* new input source */
         srcp->type = type;
         srcp->sp = ptr;
         if (dbg > 1) {
-                printf("\n%3d ", (int) (srcp - src));
+                printf("\n%3d ", (int)(srcp - src));
                 switch (srcp->type) {
                 case File:
                         printf("push file %s\n", ((Infile *)ptr)->fname);