### Diff for /gforth/prim between versions 1.104 and 1.107

version 1.104, 2002/12/13 15:49:53 version 1.107, 2002/12/19 23:23:49
Line 1288  while(u1--) Line 1288  while(u1--)
ASCII strings (larger if ubits is large), and should share no     ASCII strings (larger if ubits is large), and should share no
divisors with ubits.     divisors with ubits.
*/  */
unsigned rot = ((char []){5,0,1,2,3,4,5,5,5,5,3,5,5,5,5,7,5,5,5,5,7,5,5,5,5,6,5,5,5,5,7,5,5})[ubits];  static char rot_values[] = {5,0,1,2,3,4,5,5,5,5,3,5,5,5,5,7,5,5,5,5,7,5,5,5,5,6,5,5,5,5,7,5,5};
unsigned rot = rot_values[ubits];
Char *cp = c_addr;  Char *cp = c_addr;
for (ukey=0; cp<c_addr+u; cp++)  for (ukey=0; cp<c_addr+u; cp++)
ukey = ((((ukey<<rot) | (ukey>>(ubits-rot)))       ukey = ((((ukey<<rot) | (ukey>>(ubits-rot)))
Line 1808  floor ( r1 -- r2 ) float Line 1809  floor ( r1 -- r2 ) float
/* !! unclear wording */  /* !! unclear wording */
r2 = floor(r1);  r2 = floor(r1);

(fround)        ( r1 -- r2 )    gforth  paren_f_round  fround  ( r1 -- r2 )    gforth  f_round
""Round to the nearest integral value.  Primitive variant (unused)""  ""Round to the nearest integral value.""
/* !! eliminate this as primitive? */
/* !! unclear wording */
#ifdef HAVE_RINT
r2 = rint(r1);  r2 = rint(r1);
#else
r2 = floor(r1+0.5);
/* !! This is not quite true to the rounding rules given in the standard */
#endif

fmax    ( r1 r2 -- r3 ) float   f_max  fmax    ( r1 r2 -- r3 ) float   f_max
if (r1<r2)  if (r1<r2)
Line 2435  SET_IP((Xt *)a_callee); Line 2429  SET_IP((Xt *)a_callee);
useraddr        ( #u -- a_addr )        new  useraddr        ( #u -- a_addr )        new
a_addr = (Cell *)(up+u);  a_addr = (Cell *)(up+u);

compile-prim ( xt1 -- xt2 )     new     compile_prim  compile-prim ( xt1 -- xt2 )     obsolete        compile_prim
xt2 = (Xt)compile_prim((Label)xt1);  xt2 = (Xt)compile_prim((Label)xt1);

\ lit@ / lit_fetch = lit @  \ lit@ / lit_fetch = lit @
Line 2776  finish-code ( -- ) gforth finish_code Line 2770  finish-code ( -- ) gforth finish_code
flushing).""  flushing).""
finish_code();  finish_code();

forget-dyncode ( a_code -- f ) gforth-internal forget_dyncode  forget-dyncode ( c_code -- f ) gforth-internal forget_dyncode
f = forget_dyncode(a_code);  f = forget_dyncode(c_code);

decompile-prim ( a_code -- a_prim ) gforth-internal decompile_prim  decompile-prim ( a_code -- a_prim ) gforth-internal decompile_prim
""a_prim is the code address of the primitive that has been  ""a_prim is the code address of the primitive that has been

 Removed from v.1.104 changed lines Added in v.1.107

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>