projects
/
platform
/
upstream
/
zypper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e7cbcd
)
Avoid initializing readline if not writing to terminal.
author
Ján Kupec
<jkupec@suse.cz>
Mon, 27 Jul 2009 10:02:52 +0000
(12:02 +0200)
committer
Ján Kupec
<jkupec@suse.cz>
Mon, 27 Jul 2009 10:02:52 +0000
(12:02 +0200)
src/utils/misc.cc
patch
|
blob
|
history
diff --git
a/src/utils/misc.cc
b/src/utils/misc.cc
index
618dcd0
..
6fe4ce9
100644
(file)
--- a/
src/utils/misc.cc
+++ b/
src/utils/misc.cc
@@
-61,6
+61,9
@@
string readline_getline()
unsigned get_screen_width()
{
+ if (!::isatty(STDOUT_FILENO))
+ return 80;
+
int width = 80;
const char *cols_env = getenv("COLUMNS");