bcpl: remove a stdio usage and a pointless indirection
authorAlan Cox <alan@linux.intel.com>
Sat, 3 Dec 2016 20:19:41 +0000 (20:19 +0000)
committerAlan Cox <alan@linux.intel.com>
Sat, 3 Dec 2016 20:19:41 +0000 (20:19 +0000)
Faster faster..

Applications/BCPL/blib.c
Applications/BCPL/icint.c

index ad96e30..79aac81 100644 (file)
@@ -22,7 +22,7 @@ uint16_t rdM(uint16_t addr);
 
 #else
 
-extern uint16_t *M;
+extern uint16_t M[];
 #define wrM(address, data) M[address]=data
 #define rdM(address) M[address]
 #endif
@@ -171,5 +171,5 @@ void endwrite(void)
 
 void mapstore(void)
 {
-    fprintf(stderr, "\nMAPSTORE NOT IMPLEMENTED\n");
+    write(2, "\nMAPSTORE NOT IMPLEMENTED\n", 26);
 }
index c4a3132..6c43494 100644 (file)
@@ -97,7 +97,7 @@
 #endif
 
 
-uint16_t *M;
+uint16_t M[PSIZE];
 int fp;
 
 static uint16_t G;
@@ -562,8 +562,6 @@ fetch:
     }
 }
 
-uint16_t pgvec[PSIZE];
-
 int main(int argc, char *argv[])
 {
     if (argc != 2) {
@@ -606,7 +604,6 @@ int main(int argc, char *argv[])
     }
 #endif
 
-    M = pgvec;
     G = MGLOB;
     P = MPROG;
     wrM(P++, LIG1);