From eaf11cc12a1aa4b050a8a1e7ea3770d3d9c81e95 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:00:29 +0200 Subject: Imported Upstream version 1.0 --- CRT.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'CRT.c') 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 #include #include +#ifdef HAVE_EXECINFO_H #include +#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(); } -- cgit v1.2.3