Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359244
b: refs/heads/master
c: 62dc989
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and Michal Marek committed Feb 19, 2013
1 parent 21d2c36 commit 2b12cf9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2c68115cb3d2863004f1dd5c01e3adbd54facd4c
refs/heads/master: 62dc989921df2a98d1a73aacd085abe941cb9828
7 changes: 6 additions & 1 deletion trunk/scripts/kconfig/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ enum input_mode {
} input_mode = oldaskconfig;

static int indent = 1;
static int tty_stdio;
static int valid_stdin = 1;
static int sync_kconfig;
static int conf_cnt;
Expand Down Expand Up @@ -108,6 +109,8 @@ static int conf_askvalue(struct symbol *sym, const char *def)
case oldaskconfig:
fflush(stdout);
xfgets(line, 128, stdin);
if (!tty_stdio)
printf("\n");
return 1;
default:
break;
Expand Down Expand Up @@ -495,6 +498,8 @@ int main(int ac, char **av)
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);

tty_stdio = isatty(0) && isatty(1) && isatty(2);

while ((opt = getopt_long(ac, av, "", long_opts, NULL)) != -1) {
input_mode = (enum input_mode)opt;
switch (opt) {
Expand Down Expand Up @@ -621,7 +626,7 @@ int main(int ac, char **av)
return 1;
}
}
valid_stdin = isatty(0) && isatty(1) && isatty(2);
valid_stdin = tty_stdio;
}

switch (input_mode) {
Expand Down

0 comments on commit 2b12cf9

Please sign in to comment.