2002-06-10 02:37:10 +00:00

25 lines
1.0 KiB
Plaintext

$OpenBSD: patch-scp_c,v 1.5 2002/06/10 02:37:10 form Exp $
--- scp.c.orig Sat May 18 13:26:12 2002
+++ scp.c Mon Jun 10 09:25:40 2002
@@ -423,7 +423,10 @@ if ((argc > 1) && argv[1]) { /* cmd f
do { printf ("sim> "); /* prompt */
cptr = read_line (cbuf, CBUFSIZE, stdin); /* read command line */
stat = SCPE_UNK;
- if (cptr == NULL) continue; /* ignore EOF */
+ if (cptr == NULL || *cptr == 0) { /* ignore EOF */
+ putchar('\n');
+ continue;
+ }
if (*cptr == 0) continue; /* ignore blank */
if (sim_log) fprintf (sim_log, "sim> %s\n", cbuf); /* log cmd */
cptr = get_glyph (cptr, gbuf, 0); /* get command glyph */
@@ -1478,7 +1481,7 @@ for (i = 1; (dptr = sim_devices[i]) != N
(UNIT_ATT + UNIT_SEQ))
fseek (uptr -> fileref, uptr -> pos, SEEK_SET); } }
stop_cpu = 0;
-if ((int) signal (SIGINT, int_handler) == -1) { /* set WRU */
+if (signal (SIGINT, int_handler) == (void *)-1) { /* set WRU */
return SCPE_SIGERR; }
if (ttrunstate () != SCPE_OK) { /* set console */
ttcmdstate ();