--- gforth/prim 2003/01/01 17:28:29 1.112 +++ gforth/prim 2003/01/08 09:53:07 1.116 @@ -1473,13 +1473,6 @@ f_addr = (Float *)((((Cell)c_addr)+(size : [ 1 floats 1- ] Literal + [ -1 floats ] Literal and ; ->body ( xt -- a_addr ) core to_body -"" Get the address of the body of the word represented by @i{xt} (the address -of the word's data field)."" -a_addr = PFA(xt); -: - 2 cells + ; - \ threading stuff is currently only interesting if we have a compiler \fhas? standardthreading has? compiler and [IF] @@ -1886,10 +1879,11 @@ flag = FLAG(!fnmatch(pattern, string, 0) newline ( -- c_addr u ) gforth ""String containing the newline sequence of the host OS"" char newline[] = { -#if defined(unix) || defined(__MACH__) -/* Darwin/MacOS X sets __MACH__, but not unix. */ +#if DIRSEP=='/' +/* Unix */ '\n' #else +/* DOS, Win, OS/2 */ '\r','\n' #endif }; @@ -1941,7 +1935,11 @@ comparisons(f0, r, f_zero_, r, 0., float d>f ( d -- r ) float d_to_f #ifdef BUGGY_LONG_LONG extern double ldexp(double x, int exp); -r = ldexp((Float)d.hi,CELL_BITS) + (Float)d.lo; +if (d.hi<0) { + DCell d2=dnegate(d); + r = -(ldexp((Float)d2.hi,CELL_BITS) + (Float)d2.lo); +} else + r = ldexp((Float)d.hi,CELL_BITS) + (Float)d.lo; #else r = d; #endif @@ -2482,7 +2480,7 @@ f = forget_dyncode(c_code); decompile-prim ( a_code -- a_prim ) gforth-internal decompile_prim ""a_prim is the code address of the primitive that has been compile_prim1ed to a_code"" -a_prim = decompile_code(a_code); +a_prim = (Label)decompile_code((Label)a_code); \+