summaryrefslogtreecommitdiff
path: root/emulators/simh/files/patch-sim__console.c
diff options
context:
space:
mode:
authorMatthew Seaman <matthew@FreeBSD.org>2017-01-03 14:00:47 +0000
committerMatthew Seaman <matthew@FreeBSD.org>2017-01-03 14:00:47 +0000
commit7c084f620e6dcec68140cd4df90f64870cae813b (patch)
tree0752b4ea3e6f7dda7f1a2ab4235d6bffb9455613 /emulators/simh/files/patch-sim__console.c
parentUpdate to 7.1.0. Changes include: (diff)
Fixes to allow building on 12-CURRENT
- fix build failures in i386 and amd64 due to compiler changes - fix numerous compilation warnings and logical errors that may trap in the future - convert all distribution files from DOS format to ease future changes - convert legacy patch file to new naming convention PR: 214990 Submitted by: bob@eager.cx (maintainer)
Notes
Notes: svn path=/head/; revision=430469
Diffstat (limited to 'emulators/simh/files/patch-sim__console.c')
-rw-r--r--emulators/simh/files/patch-sim__console.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/emulators/simh/files/patch-sim__console.c b/emulators/simh/files/patch-sim__console.c
new file mode 100644
index 000000000000..6ebaafa1caff
--- /dev/null
+++ b/emulators/simh/files/patch-sim__console.c
@@ -0,0 +1,33 @@
+--- sim_console.c.orig 2016-12-01 22:43:43 UTC
++++ sim_console.c
+@@ -162,10 +162,10 @@ if ((cptr == NULL) || (*cptr == 0))
+ return SCPE_2FARG;
+ while (*cptr != 0) { /* do all mods */
+ cptr = get_glyph_nc (cptr, gbuf, ','); /* get modifier */
+- if (cvptr = strchr (gbuf, '=')) /* = value? */
++ if ((cvptr = strchr (gbuf, '='))) /* = value? */
+ *cvptr++ = 0;
+ get_glyph (gbuf, gbuf, 0); /* modifier to UC */
+- if (ctptr = find_ctab (set_con_tab, gbuf)) { /* match? */
++ if ((ctptr = find_ctab (set_con_tab, gbuf))) { /* match? */
+ r = ctptr->action (ctptr->arg, cvptr); /* do the rest */
+ if (r != SCPE_OK)
+ return r;
+@@ -190,7 +190,7 @@ if (*cptr == 0) {
+ }
+ while (*cptr != 0) {
+ cptr = get_glyph (cptr, gbuf, ','); /* get modifier */
+- if (shptr = find_shtab (show_con_tab, gbuf))
++ if ((shptr = find_shtab (show_con_tab, gbuf)))
+ shptr->action (st, dptr, uptr, shptr->arg, cptr);
+ else return SCPE_NOPARAM;
+ }
+@@ -459,7 +459,7 @@ if ((c == SCPE_STOP) || (sim_con_tmxr.ma
+ if (sim_con_ldsc.conn == 0) /* no Telnet conn? */
+ return SCPE_LOST;
+ tmxr_poll_rx (&sim_con_tmxr); /* poll for input */
+-if (c = tmxr_getc_ln (&sim_con_ldsc)) /* any char? */
++if ((c = tmxr_getc_ln (&sim_con_ldsc))) /* any char? */
+ return (c & (SCPE_BREAK | 0377)) | SCPE_KFLAG;
+ return SCPE_OK;
+ }