char *s51_prompt = "> ";
struct ccdbg *s51_dbg;
int s51_interrupted = 0;
+int s51_monitor = 0;
static FILE *s51_input;
static FILE *s51_output;
char *endptr;
struct sigvec vec, ovec;
- while ((opt = getopt(argc, argv, "PVvHht:X:c:r:Z:s:S:p:")) != -1) {
+ while ((opt = getopt(argc, argv, "PVvHhmt:X:c:r:Z:s:S:p:")) != -1) {
switch (opt) {
case 't':
cpu = optarg;
case 'h':
usage ();
break;
+ case 'm':
+ s51_monitor = 1;
+ break;
}
}
if (s51_port) {
perror("fdopen");
exit(1);
}
- vec.sv_handler = s51_sigint;
+ vec.sv_handler = SIG_IGN;
vec.sv_mask = 0;
vec.sv_flags = 0;
sigvec(SIGINT, &vec, &ovec);
va_start(ap, format);
vfprintf(s51_output, format, ap);
-#if 1
- if (s51_port)
+ if (s51_monitor)
vfprintf(stdout, format, ap);
-#endif
va_end(ap);
}
s51_putc('\0');
fflush(s51_output);
ret = fgets(line, len, s51_input) != NULL;
-#if 1
- if (s51_port)
+ if (s51_monitor)
printf("> %s", line);
-#endif
fflush(stdout);
return ret;
}