Patches from Sergey Poznyakoff, way back in 2001. powf() function may not be
authorwarren.toomey <warren.toomey@44b2186c-a14b-0410-8c95-595313601b93>
Sat, 17 May 2008 02:37:44 +0000 (02:37 +0000)
committerwarren.toomey <warren.toomey@44b2186c-a14b-0410-8c95-595313601b93>
Sat, 17 May 2008 02:37:44 +0000 (02:37 +0000)
present. struct termios may lack c_ispeed, c_ospeed members.

cpu.c
fp.c
v7trap.c

diff --git a/cpu.c b/cpu.c
index 17753f4..45784e8 100644 (file)
--- a/cpu.c
+++ b/cpu.c
@@ -1,8 +1,8 @@
 /* cpu.c - this holds the main loop for the emulator, plus generic
  * functions to deal with exceptional instructions and events
  *
- * $Revision: 1.25 $
- * $Date: 2002/06/10 11:41:40 $
+ * $Revision: 1.26 $
+ * $Date: 2008/05/15 07:52:45 $
  */
 #include "defines.h"
 #include <unistd.h>
@@ -69,6 +69,7 @@ void run() {
                regs[0], regs[1], regs[2], regs[3],
                regs[4], regs[5], regs[6]));
           TrapDebug((dbg_file, "NZVC1 %d%d%d%d\n",CC_N,CC_Z,CC_V,CC_C));
+          fflush(dbg_file);
        }
        regs[PC] += 2; itab[ir >> 6] ();
        if ((Sighead!=NULL) && (sigrunner!=NULL)) (void) (*sigrunner)();
diff --git a/fp.c b/fp.c
index b3bc85d..3b69cb3 100644 (file)
--- a/fp.c
+++ b/fp.c
@@ -1,7 +1,7 @@
 /* fp.c - PDP-11 floating point operations
  *
- * $Revision: 2.23 $
- * $Date: 1999/12/30 02:11:16 $
+ * $Revision: 2.24 $
+ * $Date: 2008/05/15 07:52:45 $
  */
 
 /* The floating-point emulation code here is just enough to allow
  */
 #include "defines.h"
 #include <math.h>
+#ifdef HAVE_POWF
 float powf(float x, float y);  /* FreeBSD 3.X no longer defines this */
+#else
+# define powf(x,y) (float)pow((double)x, (double)y)
+#endif
 
 #define XUL    170141163178059628080016879768632819712.0 /* Biggest float */
 
index 0ea142f..4246d76 100644 (file)
--- a/v7trap.c
+++ b/v7trap.c
@@ -1,8 +1,8 @@
 /* v7trap.c - Deal with V7 trap instructions. V5 and V6 syscalls are also
  * done here, because the syscall interface is nearly the same as V7.
  *
- * $Revision: 1.47 $
- * $Date: 2002/06/10 11:43:24 $
+ * $Revision: 1.48 $
+ * $Date: 2008/05/15 07:52:45 $
  */
 #include "defines.h"
 #include <sys/stat.h>
@@ -609,8 +609,8 @@ trap_gtty(u_int16_t fd, u_int16_t ucnt)
        return i;
     CLR_CC_C();
     sgtb = (struct tr_sgttyb *) & dspace[ucnt];
-    sgtb->sg_ispeed = tios.c_ispeed;
-    sgtb->sg_ospeed = tios.c_ospeed;
+    sgtb->sg_ispeed = cfgetispeed(&tios); /* tios.c_ispeed; --gray */
+    sgtb->sg_ospeed = cfgetospeed(&tios); /* tios.c_ospeed; --gray */
     sgtb->sg_erase = tios.c_cc[VERASE];
     sgtb->sg_kill = tios.c_cc[VKILL];
     sgtb->sg_flags = 0;
@@ -644,8 +644,8 @@ trap_stty(u_int16_t fd, u_int16_t ucnt)
 
     if (ucnt != 0) {
        sgtb = (struct tr_sgttyb *) & dspace[ucnt];
-       tios.c_ispeed = sgtb->sg_ispeed;
-       tios.c_ospeed = sgtb->sg_ospeed;
+       cfsetispeed(&tios, sgtb->sg_ispeed); 
+       cfsetospeed(&tios, sgtb->sg_ospeed);
        tios.c_cc[VERASE] = sgtb->sg_erase;
        tios.c_cc[VKILL] = sgtb->sg_kill;
        if (sgtb->sg_flags & TR_XTABS)