--- gforth/prim 2000/07/14 09:24:06 1.48 +++ gforth/prim 2000/07/30 19:56:05 1.50 @@ -511,7 +511,7 @@ else if (n>0) : swap bounds ?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 ) dup 0= IF EXIT THEN 0< 2* 1+ ; @@ -533,7 +533,7 @@ else if (n>0) ?DO dup c@ I c@ <> IF dup c@ toupper I c@ toupper = 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 ""Adjust the string specified by @i{c-addr, u1} to remove all trailing @@ -1585,10 +1585,6 @@ wior = IOR(fclose((FILE *)wfileid)==EOF) open-file ( c_addr u ntype -- wfileid wior ) file open_file 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); create-file ( c_addr u ntype -- wfileid wior ) file create_file @@ -1596,10 +1592,6 @@ Cell fd; fd = open(tilde_cstr(c_addr, u, 1), O_CREAT|O_TRUNC|ufileattr[ntype], 0666); if (fd != -1) { wfileid = (Cell)fdopen(fd, fileattr[ntype]); -#if defined(GO32) && defined(MSDOS) - if(wfileid && !(ntype & 1)) - setbuf((FILE*)wfileid, NULL); -#endif wior = IOR(wfileid == 0); } else { wfileid = 0; @@ -2249,3 +2241,6 @@ char newline[] = { }; c_addr=newline; u=sizeof(newline); +: + "newline count ; +Create "newline 1 c, $0A c,