version 1.47, 2000/07/14 08:55:15
|
version 1.50, 2000/07/30 19:56:05
|
Line 36
|
Line 36
|
\ be separated by at least one empty line |
\ be separated by at least one empty line |
\ |
\ |
\ Both pronounciation and stack items (in the stack effect) must |
\ Both pronounciation and stack items (in the stack effect) must |
\ conform to the C name syntax or the C compiler will complain. |
\ conform to the C identifier syntax or the C compiler will complain. |
\ |
\ If you don't have a pronounciation field, the Forth name is used, |
|
\ and has to conform to the C identifier syntax. |
\ |
\ |
\ These specifications are automatically translated into C-code for the |
\ These specifications are automatically translated into C-code for the |
\ interpreter and into some other files. I hope that your C compiler has |
\ interpreter and into some other files. I hope that your C compiler has |
Line 510 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 sgn ; |
: sgn ( n -- -1/0/1 ) |
: sgn ( n -- -1/0/1 ) |
dup 0= IF EXIT THEN 0< 2* 1+ ; |
dup 0= IF EXIT THEN 0< 2* 1+ ; |
|
|
Line 532 else if (n>0)
|
Line 533 else if (n>0)
|
?DO dup c@ I c@ <> |
?DO dup c@ I c@ <> |
IF dup c@ toupper I c@ toupper = |
IF dup c@ toupper I c@ toupper = |
ELSE true THEN WHILE 1+ LOOP drop 0 |
ELSE true THEN WHILE 1+ LOOP drop 0 |
ELSE c@ toupper I c@ toupper - unloop THEN -text-flag ; |
ELSE c@ toupper I c@ toupper - unloop THEN sgn ; |
|
|
-trailing ( c_addr u1 -- c_addr u2 ) string dash_trailing |
-trailing ( c_addr u1 -- c_addr u2 ) string dash_trailing |
""Adjust the string specified by @i{c-addr, u1} to remove all trailing |
""Adjust the string specified by @i{c-addr, u1} to remove all trailing |
Line 1584 wior = IOR(fclose((FILE *)wfileid)==EOF)
|
Line 1585 wior = IOR(fclose((FILE *)wfileid)==EOF)
|
|
|
open-file ( c_addr u ntype -- wfileid wior ) file open_file |
open-file ( c_addr u ntype -- wfileid wior ) file open_file |
wfileid = (Cell)fopen(tilde_cstr(c_addr, u, 1), fileattr[ntype]); |
wfileid = (Cell)fopen(tilde_cstr(c_addr, u, 1), fileattr[ntype]); |
#if defined(GO32) && defined(MSDOS) |
|
if(wfileid && !(ntype & 1)) |
|
setbuf((FILE*)wfileid, NULL); |
|
#endif |
|
wior = IOR(wfileid == 0); |
wior = IOR(wfileid == 0); |
|
|
create-file ( c_addr u ntype -- wfileid wior ) file create_file |
create-file ( c_addr u ntype -- wfileid wior ) file create_file |
Line 1595 Cell fd;
|
Line 1592 Cell fd;
|
fd = open(tilde_cstr(c_addr, u, 1), O_CREAT|O_TRUNC|ufileattr[ntype], 0666); |
fd = open(tilde_cstr(c_addr, u, 1), O_CREAT|O_TRUNC|ufileattr[ntype], 0666); |
if (fd != -1) { |
if (fd != -1) { |
wfileid = (Cell)fdopen(fd, fileattr[ntype]); |
wfileid = (Cell)fdopen(fd, fileattr[ntype]); |
#if defined(GO32) && defined(MSDOS) |
|
if(wfileid && !(ntype & 1)) |
|
setbuf((FILE*)wfileid, NULL); |
|
#endif |
|
wior = IOR(wfileid == 0); |
wior = IOR(wfileid == 0); |
} else { |
} else { |
wfileid = 0; |
wfileid = 0; |
Line 2248 char newline[] = {
|
Line 2241 char newline[] = {
|
}; |
}; |
c_addr=newline; |
c_addr=newline; |
u=sizeof(newline); |
u=sizeof(newline); |
|
: |
|
"newline count ; |
|
Create "newline 1 c, $0A c, |