version 1.43, 2000/03/11 20:35:05
|
version 1.45, 2000/05/16 09:51:21
|
Line 1496 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 1509 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); |
Line 1633 if (wior)
|
Line 1636 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 file read_line |
/* |
#if 1 |
Cell c; |
Cell c; |
flag=-1; |
flag=-1; |
for(u2=0; u2<u1; u2++) |
for(u2=0; u2<u1; u2++) |
{ |
{ |
*c_addr++ = (Char)(c = getc((FILE *)wfileid)); |
c = getc((FILE *)wfileid); |
if(c=='\n') break; |
if (c=='\n') break; |
if(c==EOF) |
if (c=='\r') { |
{ |
if ((c = getc((FILE *)wfileid))!='\n') |
|
ungetc(c,(FILE *)wfileid); |
|
break; |
|
} |
|
if (c==EOF) { |
flag=FLAG(u2!=0); |
flag=FLAG(u2!=0); |
break; |
break; |
} |
} |
|
c_addr[u2] = (Char)c; |
} |
} |
wior=FILEIO(ferror((FILE *)wfileid)); |
wior=FILEIO(ferror((FILE *)wfileid)); |
*/ |
#else |
if ((flag=FLAG(!feof((FILE *)wfileid) && |
if ((flag=FLAG(!feof((FILE *)wfileid) && |
fgets(c_addr,u1+1,(FILE *)wfileid) != NULL))) { |
fgets(c_addr,u1+1,(FILE *)wfileid) != NULL))) { |
wior=FILEIO(ferror((FILE *)wfileid)!=0); /* !! ior? */ |
wior=FILEIO(ferror((FILE *)wfileid)!=0); /* !! ior? */ |
Line 1660 else {
|
Line 1668 else {
|
wior=0; |
wior=0; |
u2=0; |
u2=0; |
} |
} |
|
#endif |
|
|
\+ |
\+ |
|
|
Line 2194 fp=FP;
|
Line 2203 fp=FP;
|
IF_TOS(TOS=sp[0];) |
IF_TOS(TOS=sp[0];) |
IF_FTOS(FTOS=fp[0]); |
IF_FTOS(FTOS=fp[0]); |
|
|
|
newline -- c_addr u gforth |
|
""String containing the newline sequence of the host OS"" |
|
char newline[] = { |
|
#ifdef unix |
|
'\n' |
|
#else |
|
'\r','\n' |
|
#endif |
|
}; |
|
c_addr=newline; |
|
u=sizeof(newline); |