aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorRajagopal Venkat <rajagopal.venkat@linaro.org>2012-09-17 16:43:53 +0530
committerRajagopal Venkat <rajagopal.venkat@linaro.org>2012-09-17 17:44:30 +0530
commit439cc8e4c0080f7487510b0309afbf853e3fb7a0 (patch)
treef0a3ed103d61ba7ae6fd02998712f60a940ad58e /src/main.cpp
parent02f391cf7432353938119a3c46451439d0fc4e1c (diff)
downloadpowertop-2.0-v2-439cc8e4c0080f7487510b0309afbf853e3fb7a0.tar.gz
set terminal info for Android buildlinaro
Signed-off-by: Rajagopal Venkat <rajagopal.venkat@linaro.org>
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index dc49dba..66b641f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -349,6 +349,16 @@ int main(int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+#ifdef DEFAULT_TERM
+ if (!getenv("TERM"))
+ setenv("TERM", DEFAULT_TERM, 1);
+#endif
+
+#ifdef TERMINFO_PATH
+ if (!getenv("TERMINFO"))
+ setenv("TERMINFO", TERMINFO_PATH, 1);
+#endif
+
while (1) { /* parse commandline options */
c = getopt_long (argc, argv, "ch:C:i:t:uVw:q", long_options, &option_index);
/* Detect the end of the options. */