- no need to check if JOBS is defined. Config.in ensures it.

This commit is contained in:
Ned Ludd 2005-02-10 00:44:31 +00:00
parent 2123b7cded
commit d1e3cbdb5a

View File

@ -12583,7 +12583,7 @@ readcmd(int argc, char **argv)
char *prompt; char *prompt;
const char *ifs; const char *ifs;
char *p; char *p;
#if defined(CONFIG_ASH_TIMEOUT) && JOBS #if defined(CONFIG_ASH_TIMEOUT)
fd_set set; fd_set set;
int timeout; int timeout;
struct timeval timeout_struct; struct timeval timeout_struct;
@ -12595,7 +12595,7 @@ readcmd(int argc, char **argv)
rflag = 0; rflag = 0;
prompt = NULL; prompt = NULL;
#if defined(CONFIG_ASH_TIMEOUT) && JOBS #if defined(CONFIG_ASH_TIMEOUT)
timeout = 0; timeout = 0;
while ((i = nextopt("p:rt:")) != '\0') while ((i = nextopt("p:rt:")) != '\0')
@ -12607,7 +12607,7 @@ readcmd(int argc, char **argv)
prompt = optionarg; prompt = optionarg;
else if (i == 'r') else if (i == 'r')
rflag = 1; rflag = 1;
#if defined(CONFIG_ASH_TIMEOUT) && JOBS #if defined(CONFIG_ASH_TIMEOUT)
else else
timeout = atoi(optionarg); timeout = atoi(optionarg);
#endif #endif
@ -12619,7 +12619,7 @@ readcmd(int argc, char **argv)
error("arg count"); error("arg count");
if ((ifs = bltinlookup("IFS")) == NULL) if ((ifs = bltinlookup("IFS")) == NULL)
ifs = defifs; ifs = defifs;
#if defined(CONFIG_ASH_TIMEOUT) && JOBS #if defined(CONFIG_ASH_TIMEOUT)
c = 0; c = 0;
#endif #endif
status = 0; status = 0;
@ -12627,7 +12627,7 @@ readcmd(int argc, char **argv)
backslash = 0; backslash = 0;
STARTSTACKSTR(p); STARTSTACKSTR(p);
#if defined(CONFIG_ASH_TIMEOUT) && JOBS #if defined(CONFIG_ASH_TIMEOUT)
if (timeout > 0) { if (timeout > 0) {
tcgetattr(0, &tty); tcgetattr(0, &tty);
old_tty = tty; old_tty = tty;
@ -12642,8 +12642,7 @@ readcmd(int argc, char **argv)
timeout_struct.tv_sec = timeout; timeout_struct.tv_sec = timeout;
timeout_struct.tv_usec = 0; timeout_struct.tv_usec = 0;
i = select (FD_SETSIZE, &set, NULL, NULL, &timeout_struct); if ((i = select (FD_SETSIZE, &set, NULL, NULL, &timeout_struct)) == 1)
if(i == 1)
{ {
read(0, &c, 1); read(0, &c, 1);
if(c == '\n' || c == 4) /* Handle newlines and EOF */ if(c == '\n' || c == 4) /* Handle newlines and EOF */