version 1.49, 1996/01/07 17:22:13
|
version 1.50, 1996/01/25 16:45:55
|
Line 327 key? -- n facility key_q
|
Line 327 key? -- n facility key_q
|
fflush(stdout); |
fflush(stdout); |
n = key_query; |
n = key_query; |
|
|
|
form -- urows ucols gforth |
|
""The number of lines and columns in the terminal. These numbers may change |
|
with the window size."" |
|
/* we could block SIGWINCH here to get a consistent size, but I don't |
|
think this is necessary or always beneficial */ |
|
urows=rows; |
|
ucols=cols; |
|
|
move c_from c_to ucount -- core |
move c_from c_to ucount -- core |
memmove(c_to,c_from,ucount); |
memmove(c_to,c_from,ucount); |
/* make an Ifdef for bsd and others? */ |
/* make an Ifdef for bsd and others? */ |
Line 873 getenv c_addr1 u1 -- c_addr2 u2 gforth
|
Line 881 getenv c_addr1 u1 -- c_addr2 u2 gforth
|
c_addr2 = getenv(cstr(c_addr1,u1,1)); |
c_addr2 = getenv(cstr(c_addr1,u1,1)); |
u2 = (c_addr2 == NULL ? 0 : strlen(c_addr2)); |
u2 = (c_addr2 == NULL ? 0 : strlen(c_addr2)); |
|
|
popen c_addr u n -- wfileid own |
open-pipe c_addr u ntype -- wfileid wior gforth open_pipe |
static char* mode[2]={"r","w"}; /* !! should we use FAM here? */ |
wfileid=(Cell)popen(cstr(c_addr,u,1),fileattr[ntype]); /* ~ expansion of 1st arg? */ |
wfileid=(Cell)popen(cstr(c_addr,u,1),mode[n]); /* ~ expansion of 1st arg? */ |
wior = IOR(wfileid==0); /* !! the man page says that errno is not set reliably */ |
|
|
pclose wfileid -- wior own |
close-pipe wfileid -- wior gforth close_pipe |
wior=pclose((FILE *)wfileid); /* !! what to do with the result */ |
wior = IOR(pclose((FILE *)wfileid)==-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 |
struct timeval time1; |
struct timeval time1; |