aboutsummaryrefslogtreecommitdiffstats
path: root/CRT.c
diff options
context:
space:
mode:
authorDaniel Lange <DLange@git.local>2016-04-11 13:00:29 +0200
committerDaniel Lange <DLange@git.local>2016-04-11 13:00:29 +0200
commiteaf11cc12a1aa4b050a8a1e7ea3770d3d9c81e95 (patch)
tree833f3fae6e3604a439f909c245a6e35f574997d7 /CRT.c
parent283707c5e5bc436b78ea23bf5500cb6b16a01148 (diff)
downloaddebian_htop-eaf11cc12a1aa4b050a8a1e7ea3770d3d9c81e95.tar.gz
debian_htop-eaf11cc12a1aa4b050a8a1e7ea3770d3d9c81e95.tar.bz2
debian_htop-eaf11cc12a1aa4b050a8a1e7ea3770d3d9c81e95.zip
Imported Upstream version 1.0upstream/1.0
Diffstat (limited to 'CRT.c')
-rw-r--r--CRT.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/CRT.c b/CRT.c
index 14af420..949b543 100644
--- a/CRT.c
+++ b/CRT.c
@@ -1,6 +1,6 @@
/*
htop - CRT.c
-(C) 2004-2010 Hisham H. Muhammad
+(C) 2004-2011 Hisham H. Muhammad
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
@@ -11,7 +11,9 @@ in the source distribution for its full text.
#include <signal.h>
#include <stdlib.h>
#include <stdbool.h>
+#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
+#endif
#include "String.h"
@@ -116,6 +118,8 @@ int CRT_colorScheme = 0;
int CRT_colors[LAST_COLORELEMENT] = { 0 };
+int CRT_cursorX = 0;
+
char* CRT_termType;
void *backtraceArray[128];
@@ -125,12 +129,14 @@ static void CRT_handleSIGSEGV(int sgn) {
CRT_done();
#if __linux
fprintf(stderr, "\n\nhtop " VERSION " aborting. Please report bug at http://htop.sf.net\n");
+ #ifdef HAVE_EXECINFO_H
+ size_t size = backtrace(backtraceArray, sizeof(backtraceArray) / sizeof(void *));
+ fprintf(stderr, "Backtrace: \n");
+ backtrace_symbols_fd(backtraceArray, size, 2);
+ #endif
#else
fprintf(stderr, "\n\nhtop " VERSION " aborting. Unsupported platform.\n");
#endif
- size_t size = backtrace(backtraceArray, sizeof(backtraceArray));
- fprintf(stderr, "Backtrace: \n");
- backtrace_symbols_fd(backtraceArray, size, 2);
abort();
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy