Diff for /gforth/prim between versions 1.254 and 1.263

version 1.254, 2010/08/21 19:08:46 version 1.263, 2011/12/19 19:43:29
Line 1 Line 1
 \ Gforth primitives  \ Gforth primitives
   
 \ Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008,2009 Free Software Foundation, Inc.  \ Copyright (C) 1995,1996,1997,1998,2000,2003,2004,2005,2006,2007,2008,2009,2010 Free Software Foundation, Inc.
   
 \ This file is part of Gforth.  \ This file is part of Gforth.
   
Line 612  SET_IP((Xt *)a_target); Line 612  SET_IP((Xt *)a_target);
      cell+       cell+
  THEN  >r ;   THEN  >r ;
   
   (try1)  ( ... a_oldhandler a_recovery -- R:a_recovery R:a_sp R:f_fp R:c_lp R:a_oldhandler a_newhandler ) gforth paren_try1
   a_sp = sp-1;
   f_fp = fp;
   c_lp = lp;
   a_newhandler = rp-5;
   
   (throw1) ( ... wball a_handler -- ... wball ) gforth paren_throw1
   rp = a_handler;
   lp = (Address)rp[1];
   fp = (Float *)rp[2];
   sp = (Cell *)rp[3];
   #ifndef NO_IP
   ip=IP;
   #endif
   SUPER_END;
   VM_JUMP(EXEC1(*(Xt *)rp[4]));
     
   
 \+  \+
   
 \ don't make any assumptions where the return stack is!!  \ don't make any assumptions where the return stack is!!
Line 1085  lshift ( u1 n -- u2 )  core l_shift Line 1103  lshift ( u1 n -- u2 )  core l_shift
 :  :
     0 ?DO 2* LOOP ;      0 ?DO 2* LOOP ;
   
   umax    ( u1 u2 -- u )  core
   if (u1<u2)
     u = u2;
   else
     u = u1;
   :
    2dup u< IF swap THEN drop ;
   
   umin    ( u1 u2 -- u )  core
   if (u1<u2)
     u = u1;
   else
     u = u2;
   :
    2dup u> IF swap THEN drop ;
   
 \g compare  \g compare
   
 \ comparisons(prefix, args, prefix, arg1, arg2, wordsets...)  \ comparisons(prefix, args, prefix, arg1, arg2, wordsets...)
Line 1786  if (a_addr1==NULL) Line 1820  if (a_addr1==NULL)
 else  else
   a_addr2 = (Cell *)realloc(a_addr1, u);    a_addr2 = (Cell *)realloc(a_addr1, u);
 wior = IOR(a_addr2==NULL);      /* !! Define a return code */  wior = IOR(a_addr2==NULL);      /* !! Define a return code */
   if (a_addr2==NULL)
     a_addr2 = a_addr1;
   
 strerror        ( n -- c_addr u )       gforth  strerror        ( n -- c_addr u )       gforth
 c_addr = (Char *)strerror(n);  c_addr = (Char *)strerror(n);
Line 2013  duser = timeval2us(&time1); Line 2049  duser = timeval2us(&time1);
 dsystem = DZERO;  dsystem = DZERO;
 #endif  #endif
   
   ntime   ( -- dtime )    gforth
   ""Report the current time in nanoseconds since some epoch.""
   struct timespec time1;
   #ifdef HAVE_CLOCK_GETTIME
   clock_gettime(CLOCK_REALTIME,&time1);
   #else
   struct timeval time2;
   gettimeofday(&time2,NULL);
   time1.tv_sec = time2.tv_sec;
   time1.tv_nsec = time2.tv_usec*1000;
   #endif
   dtime = timespec2ns(&time1);
   
 \+  \+
   
 \+floating  \+floating

Removed from v.1.254  
changed lines
  Added in v.1.263


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