is re-initialized
SCCS-vsn: usr.bin/pascal/pdx/command/remake.c 1.2
/* Copyright (c) 1982 Regents of the University of California */
/* Copyright (c) 1982 Regents of the University of California */
-static char sccsid[] = "@(#)remake.c 1.1 %G%";
+static char sccsid[] = "@(#)remake.c 1.2 %G%";
/*
* Remake the object file from the source.
/*
* Remake the object file from the source.
*
* We have to save tracing info before, and read it in after, because
* it might contain symbol table pointers.
*
* We have to save tracing info before, and read it in after, because
* it might contain symbol table pointers.
+ *
+ * We also have to restart the process so that px dependent information
+ * is recomputed.
- if (call("pi", stdin, stdout, dotpfile, NIL) == 0) {
- if (strcmp(objname, "obj") != 0) {
- call("mv", stdin, stdout, "obj", objname, NIL);
- }
- tmpfile = mktemp("/tmp/pdxXXXX");
- setout(tmpfile);
- status();
- unsetout();
- bpfree();
- objfree();
- readobj(objname);
- setinput(tmpfile);
- unlink(tmpfile);
- } else {
- puts("pi unsuccessful");
+ if (call("pi", stdin, stdout, dotpfile, NIL) == 0) {
+ if (strcmp(objname, "obj") != 0) {
+ call("mv", stdin, stdout, "obj", objname, NIL);
+ tmpfile = mktemp("/tmp/pdxXXXX");
+ setout(tmpfile);
+ status();
+ unsetout();
+ bpfree();
+ objfree();
+ initstart();
+ readobj(objname);
+ setinput(tmpfile);
+ unlink(tmpfile);
+ } else {
+ puts("pi unsuccessful");
+ }