version 1.42, 2000/01/17 00:04:29
|
version 1.44, 2000/03/17 21:32:03
|
Line 496 if (n<0)
|
Line 496 if (n<0)
|
else if (n>0) |
else if (n>0) |
n = 1; |
n = 1; |
: |
: |
rot 2dup - >r min swap -text dup |
rot 2dup swap - >r min swap -text dup |
IF rdrop |
IF rdrop ELSE drop r> sgn THEN ; |
ELSE drop r@ 0> |
: sgn ( n -- -1/0/1 ) |
IF rdrop -1 |
dup 0= IF EXIT THEN 0< 2* 1+ ; |
ELSE r> 1 and |
|
THEN |
|
THEN ; |
|
|
|
-text c_addr1 u c_addr2 -- n new dash_text |
-text c_addr1 u c_addr2 -- n new dash_text |
n = memcmp(c_addr1, c_addr2, u); |
n = memcmp(c_addr1, c_addr2, u); |
Line 514 else if (n>0)
|
Line 511 else if (n>0)
|
swap bounds |
swap bounds |
?DO dup c@ I c@ = WHILE 1+ LOOP drop 0 |
?DO dup c@ I c@ = WHILE 1+ LOOP drop 0 |
ELSE c@ I c@ - unloop THEN -text-flag ; |
ELSE c@ I c@ - unloop THEN -text-flag ; |
: -text-flag ( n -- -1/0/1 ) |
: sgn ( n -- -1/0/1 ) |
dup 0< IF drop -1 ELSE 0> 1 and THEN ; |
dup 0= IF EXIT THEN 0< 2* 1+ ; |
|
|
toupper c1 -- c2 gforth |
toupper c1 -- c2 gforth |
""If @i{c1} is a lower-case character (in the current locale), @i{c2} |
""If @i{c1} is a lower-case character (in the current locale), @i{c2} |
Line 1499 wretval = pclose((FILE *)wfileid);
|
Line 1496 wretval = pclose((FILE *)wfileid);
|
wior = IOR(wretval==-1); |
wior = IOR(wretval==-1); |
|
|
time&date -- nsec nmin nhour nday nmonth nyear facility-ext time_and_date |
time&date -- nsec nmin nhour nday nmonth nyear facility-ext time_and_date |
|
""Report the current time of day. Seconds, minutes and hours are numbered from 0. |
|
Months are numbered from 1."" |
struct timeval time1; |
struct timeval time1; |
struct timezone zone1; |
struct timezone zone1; |
struct tm *ltime; |
struct tm *ltime; |
Line 1512 nmin =ltime->tm_min;
|
Line 1511 nmin =ltime->tm_min;
|
nsec =ltime->tm_sec; |
nsec =ltime->tm_sec; |
|
|
ms n -- facility-ext |
ms n -- facility-ext |
|
""Wait at least @i{n} milli-second."" |
struct timeval timeout; |
struct timeval timeout; |
timeout.tv_sec=n/1000; |
timeout.tv_sec=n/1000; |
timeout.tv_usec=1000*(n%1000); |
timeout.tv_usec=1000*(n%1000); |