[gforth] / gforth / Attic / primitives  

gforth: gforth/Attic/primitives

Diff for /gforth/Attic/primitives between version 1.13 and 1.14

version 1.13, Thu Jul 21 10:52:48 1994 UTC version 1.14, Thu Aug 25 15:25:32 1994 UTC
Line 488 
Line 488 
 i'      -- w            fig             i_tick  i'      -- w            fig             i_tick
 w=rp[1];  w=rp[1];
   
   2>r     w1 w2 --        core-ext        two_to_r
   *--rp = w1;
   *--rp = w2;
   
   2r>     -- w1 w2        core-ext        two_r_from
   w2 = *rp++;
   w1 = *rp++;
   
   2r@     -- w1 w2        core-ext        two_r_fetch
   w2 = rp[0];
   w1 = rp[1];
   
   2rdrop  --              new     two_r_drop
   rp+=2;
   
 over    w1 w2 -- w1 w2 w1               core,fig  over    w1 w2 -- w1 w2 w1               core,fig
   
 drop    w --            core,fig  drop    w --            core,fig
Line 649 
Line 664 
 while(u1--)  while(u1--)
    u2+=(int)toupper(*c_addr++);     u2+=(int)toupper(*c_addr++);
   
   (hashkey1)      c_addr u ubits -- ukey          new     paren_hashkey1
   ""ukey is the hash key for the string c_addr u fitting in ubits bits""
   /* this hash function rotates the key at every step by rot bits within
      ubits bits and xors it with the character. This function does ok in
      the chi-sqare-test.  Rot should be <=7 (preferably <=5) for
      ASCII strings (larger if ubits is large), and should share no
      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];
   Char *cp = c_addr;
   for (ukey=0; cp<c_addr+u; cp++)
       ukey = ((((ukey<<rot) | (ukey>>(ubits-rot)))
                ^ toupper(*cp))
               & ((1<<ubits)-1));
   
 (parse-white)   c_addr1 u1 -- c_addr2 u2        new     paren_parse_white  (parse-white)   c_addr1 u1 -- c_addr2 u2        new     paren_parse_white
 /* use !isgraph instead of isspace? */  /* use !isgraph instead of isspace? */
 Char *endp = c_addr1+u1;  Char *endp = c_addr1+u1;


Generate output suitable for use with a patch program
Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help