BSD 4_1_snap release
[unix-history] / usr / src / cmd / pc0 / yymain.c
index dc193cd..d09350f 100644 (file)
@@ -1,6 +1,6 @@
 /* Copyright (c) 1979 Regents of the University of California */
 
 /* Copyright (c) 1979 Regents of the University of California */
 
-static char sccsid[] = "@(#)yymain.c 1.1 8/27/80";
+static char sccsid[] = "@(#)yymain.c 1.2 3/8/81";
 
 #include "whoami.h"
 #include "0.h"
 
 #include "whoami.h"
 #include "0.h"
@@ -9,8 +9,6 @@ static  char sccsid[] = "@(#)yymain.c 1.1 8/27/80";
 #include "objfmt.h"
 #include <signal.h>
 
 #include "objfmt.h"
 #include <signal.h>
 
-short  line = 1;
-
 /*
  * Yymain initializes each of the utility
  * clusters and then starts the processing
 /*
  * Yymain initializes each of the utility
  * clusters and then starts the processing
@@ -39,6 +37,8 @@ yymain()
        magic();
 #   endif OBJ
 #endif
        magic();
 #   endif OBJ
 #endif
+       line = 1;
+       errpfx = 'E';
        /*
         * Initialize the clusters
         *
        /*
         * Initialize the clusters
         *
@@ -145,7 +145,7 @@ magic2()
        magichdr.a_data -= sizeof (struct exec);
        write(ofil, &magichdr, sizeof(struct exec));
        pxhd.objsize = ( ( unsigned ) lc) - HEADER_BYTES;
        magichdr.a_data -= sizeof (struct exec);
        write(ofil, &magichdr, sizeof(struct exec));
        pxhd.objsize = ( ( unsigned ) lc) - HEADER_BYTES;
-       pxhd.maketime = time(0);
+       time(&pxhd.maketime);
        pxhd.magicnum = MAGICNUM;
        lseek(ofil, ( long ) ( HEADER_BYTES - sizeof ( pxhd ) ) , 0);
        write(ofil, &pxhd, sizeof (pxhd));
        pxhd.magicnum = MAGICNUM;
        lseek(ofil, ( long ) ( HEADER_BYTES - sizeof ( pxhd ) ) , 0);
        write(ofil, &pxhd, sizeof (pxhd));