new tecs version M.Z.08.2001
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include <termios.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
@@ -18,16 +18,13 @@ int usleep(time_t delay);
|
||||
|
||||
void sys_rd_line_(char *cmd, int *retlen, char *prompt, int clen, int plen)
|
||||
{
|
||||
char *line_read, *p;
|
||||
int l;
|
||||
|
||||
l = lnblnk_(prompt, clen);
|
||||
p = malloc((unsigned) l+2); if( p == NULL ) return;
|
||||
strncpy(p+1,prompt,l); p[0]='\n'; p[l] = '\0';
|
||||
char *line_read, p[64];
|
||||
|
||||
assert(plen < sizeof(p));
|
||||
strncpy(p,prompt,plen); p[plen] = '\0';
|
||||
if (last_line == NULL) { last_line =malloc(1); last_line[0] = '\0';};
|
||||
|
||||
line_read = readline(p);
|
||||
free(p);
|
||||
|
||||
if (line_read)
|
||||
{
|
||||
@@ -156,10 +153,10 @@ int ilen1, ilen2;
|
||||
return(rc);
|
||||
}
|
||||
|
||||
struct termios atts;
|
||||
|
||||
void sys_rd_tmo_(char *prompt, char *result, int *reslen, int p_len, int r_len)
|
||||
{
|
||||
struct termios atts;
|
||||
struct termios attr;
|
||||
int ires, i, ntmo, chr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user