Skip to content

Commit

Permalink
Patches from Sergey Poznyakoff, way back in 2001. powf() function may…
Browse files Browse the repository at this point in the history
… not be

present. struct termios may lack c_ispeed, c_ospeed members.


git-svn-id: http:https://unix-jun72.googlecode.com/svn/trunk@250 44b2186c-a14b-0410-8c95-595313601b93
  • Loading branch information
warren.toomey committed May 17, 2008
1 parent f52f772 commit d374c14
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
5 changes: 3 additions & 2 deletions tools/apout/cpu.c
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -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)();
Expand Down
8 changes: 6 additions & 2 deletions tools/apout/fp.c
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -13,7 +13,11 @@
*/
#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 */

Expand Down
12 changes: 6 additions & 6 deletions tools/apout/v7trap.c
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d374c14

Please sign in to comment.