BSD 4_3_Tahoe development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Sun, 27 Apr 1986 12:06:22 +0000 (04:06 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Sun, 27 Apr 1986 12:06:22 +0000 (04:06 -0800)
Work on file usr/tmp/housel/franz/tahoe/fixmask.c
Work on file usr/src/ucb/lisp/franz/tahoe/fixmask.c

Synthesized-from: CSRG/cd2/4.3tahoe

usr/src/ucb/lisp/franz/tahoe/fixmask.c [new file with mode: 0644]
usr/tmp/housel/franz/tahoe/fixmask.c [new file with mode: 0644]

diff --git a/usr/src/ucb/lisp/franz/tahoe/fixmask.c b/usr/src/ucb/lisp/franz/tahoe/fixmask.c
new file mode 100644 (file)
index 0000000..2a07411
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+** file: fixmask.c
+** new & improved version by P. S. Housel 04/27/86
+**
+** note: "changing register save masks" involves making sure r6 and r7
+**      are saved for use as "np" and "lbot"
+*/
+
+/*
+ *     fixmask.c
+ * complete program to change register save masks on the CCI "tahoe"
+ *
+ * (c) copyright 1982, Regents of the University of California
+ */
+
+#include <stdio.h>
+
+char mybuf[BUFSIZ];
+int mask;
+
+main()
+{
+ register savesize = 0;
+ char *cp;
+
+ while(fgets(mybuf,BUFSIZ,stdin) != NULL)
+      {
+       if(*mybuf=='#')
+         if(strcmpn(mybuf,"#protect", 8)==0)
+           {
+            savesize = 1;
+           }
+
+       if(savesize && strcmpn(mybuf,"  .set    L",7)==0)
+         {
+         for(cp=mybuf;*cp++!=',';) ;
+         sscanf(cp, "0x%x", &mask);
+         sprintf(cp,"0x%X\n", mask | 0x0C0);
+         savesize = 0;
+        }
+
+       fputs(mybuf,stdout);
+      }
+}
diff --git a/usr/tmp/housel/franz/tahoe/fixmask.c b/usr/tmp/housel/franz/tahoe/fixmask.c
new file mode 100644 (file)
index 0000000..2a07411
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+** file: fixmask.c
+** new & improved version by P. S. Housel 04/27/86
+**
+** note: "changing register save masks" involves making sure r6 and r7
+**      are saved for use as "np" and "lbot"
+*/
+
+/*
+ *     fixmask.c
+ * complete program to change register save masks on the CCI "tahoe"
+ *
+ * (c) copyright 1982, Regents of the University of California
+ */
+
+#include <stdio.h>
+
+char mybuf[BUFSIZ];
+int mask;
+
+main()
+{
+ register savesize = 0;
+ char *cp;
+
+ while(fgets(mybuf,BUFSIZ,stdin) != NULL)
+      {
+       if(*mybuf=='#')
+         if(strcmpn(mybuf,"#protect", 8)==0)
+           {
+            savesize = 1;
+           }
+
+       if(savesize && strcmpn(mybuf,"  .set    L",7)==0)
+         {
+         for(cp=mybuf;*cp++!=',';) ;
+         sscanf(cp, "0x%x", &mask);
+         sprintf(cp,"0x%X\n", mask | 0x0C0);
+         savesize = 0;
+        }
+
+       fputs(mybuf,stdout);
+      }
+}