version 1.56, 2000/08/17 12:46:57
|
version 1.59, 2000/09/09 20:32:58
|
Line 1379 c_addr = (Address)CODE_ADDRESS(xt);
|
Line 1379 c_addr = (Address)CODE_ADDRESS(xt);
|
@ ; |
@ ; |
|
|
>does-code ( xt -- a_addr ) gforth to_does_code |
>does-code ( xt -- a_addr ) gforth to_does_code |
""If @i{xt} is the execution token of a defining-word-defined word, |
""If @i{xt} is the execution token of a child of a @code{DOES>} word, |
@i{a-addr} is the start of the Forth code after the @code{DOES>}; |
@i{a-addr} is the start of the Forth code after the @code{DOES>}; |
Otherwise @i{a-addr} is 0."" |
Otherwise @i{a-addr} is 0."" |
a_addr = (Cell *)DOES_CODE(xt); |
a_addr = (Cell *)DOES_CODE(xt); |
Line 1394 CACHE_FLUSH(xt,(size_t)PFA(0));
|
Line 1394 CACHE_FLUSH(xt,(size_t)PFA(0));
|
! ; |
! ; |
|
|
does-code! ( a_addr xt -- ) gforth does_code_store |
does-code! ( a_addr xt -- ) gforth does_code_store |
""Create a code field at @i{xt} for a defining-word-defined word; @i{a-addr} |
""Create a code field at @i{xt} for a child of a @code{DOES>}-word; |
is the start of the Forth code after @code{DOES>}."" |
@i{a-addr} is the start of the Forth code after @code{DOES>}."" |
MAKE_DOES_CF(xt, a_addr); |
MAKE_DOES_CF(xt, a_addr); |
CACHE_FLUSH(xt,(size_t)PFA(0)); |
CACHE_FLUSH(xt,(size_t)PFA(0)); |
: |
: |
dodoes: over ! cell+ ! ; |
dodoes: over ! cell+ ! ; |
|
|
does-handler! ( a_addr -- ) gforth does_handler_store |
does-handler! ( a_addr -- ) gforth does_handler_store |
""Create a @code{DOES>}-handler at address @i{a-addr}. Usually, @i{a-addr} points |
""Create a @code{DOES>}-handler at address @i{a-addr}. Normally, |
just behind a @code{DOES>}."" |
@i{a-addr} points just behind a @code{DOES>}."" |
MAKE_DOES_HANDLER(a_addr); |
MAKE_DOES_HANDLER(a_addr); |
CACHE_FLUSH((caddr_t)a_addr,DOES_HANDLER_SIZE); |
CACHE_FLUSH((caddr_t)a_addr,DOES_HANDLER_SIZE); |
: |
: |
Line 1646 wior = FILEIO(u2<u1 && ferror((FILE *)wf
|
Line 1646 wior = FILEIO(u2<u1 && ferror((FILE *)wf
|
if (wior) |
if (wior) |
clearerr((FILE *)wfileid); |
clearerr((FILE *)wfileid); |
|
|
read-line ( c_addr u1 wfileid -- u2 flag wior ) file read_line |
(read-line) ( c_addr u1 wfileid -- u2 flag wior u3 ) file read_line |
#if 1 |
#if 1 |
Cell c; |
Cell c; |
flag=-1; |
flag=-1; |
|
u3=0; |
for(u2=0; u2<u1; u2++) |
for(u2=0; u2<u1; u2++) |
{ |
{ |
c = getc((FILE *)wfileid); |
c = getc((FILE *)wfileid); |
|
u3++; |
if (c=='\n') break; |
if (c=='\n') break; |
if (c=='\r') { |
if (c=='\r') { |
if ((c = getc((FILE *)wfileid))!='\n') |
if ((c = getc((FILE *)wfileid))!='\n') |
ungetc(c,(FILE *)wfileid); |
ungetc(c,(FILE *)wfileid); |
|
else |
|
u3++; |
break; |
break; |
} |
} |
if (c==EOF) { |
if (c==EOF) { |
Line 2286 dsystem = timeval2us(&usage.ru_stime);
|
Line 2290 dsystem = timeval2us(&usage.ru_stime);
|
struct timeval time1; |
struct timeval time1; |
gettimeofday(&time1,NULL); |
gettimeofday(&time1,NULL); |
duser = timeval2us(&time1); |
duser = timeval2us(&time1); |
|
#ifndef BUGGY_LONG_LONG |
dsystem = (DCell)0; |
dsystem = (DCell)0; |
|
#else |
|
dsystem=(DCell){0,0}; |
|
#endif |
#endif |
#endif |
|
|
\+ |
\+ |