* Copyright (c) 1980 The Regents of the University of California.
* %sccs.include.redist.c%
"@(#) Copyright (c) 1980 The Regents of the University of California.\n\
static char sccsid
[] = "@(#)main.c 5.3 (Berkeley) %G%";
#define FIRST_TIME 0 /* initial value setjmp returns */
if ((fp
= fopen(objname
, "r")) == NIL
) {
panic("can't read %s", objname
);
if (setjmp(env
) == FIRST_TIME
) {
for (i
= firstarg
; i
< argc
; i
++) {
signal(SIGINT
, catchintr
);
* Initialize the world, including setting initial input file
* After a non-fatal error we jump back to command parsing.
* This routine is called when an interrupt occurs.
LOCAL
scanargs(argc
, argv
)
if (streq(argv
[0], "pxhdr") || streq(argv
[0], "pix")) {
if (streq(argv
[0], "pxhdr")) {
while (i
< argc
&& !done
) {
for (j
= 1; argv
[i
][j
] != '\0'; j
++) {
case 'r': /* run program before accepting commands */
case 'i': /* assume input is a terminal */
case 'b': /* (internal) trace breakpoints */
case 'e': /* (internal) trace execution */
case 'h': /* (internal) display header information */
option(argv
[i
][j
]) = TRUE
;
panic("bad option \"%c\"", argv
[i
]);
* Terminate program. In the case of the -t option, we must remove
* the object file because it's a tmp file.