diff options
author | Daniel Lange <DLange@git.local> | 2020-09-15 08:00:00 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2020-09-15 08:00:00 +0200 |
commit | f80394a20254938142011855f2954b3f63fe5909 (patch) | |
tree | b777de460977f21a6257540d6a687c86882850dc /CRT.h | |
parent | 59eeadec918a955b40427a1b012992161050c939 (diff) | |
download | debian_htop-f80394a20254938142011855f2954b3f63fe5909.tar.gz debian_htop-f80394a20254938142011855f2954b3f63fe5909.tar.bz2 debian_htop-f80394a20254938142011855f2954b3f63fe5909.zip |
New upstream version 3.0.2upstream/3.0.2
Diffstat (limited to 'CRT.h')
-rw-r--r-- | CRT.h | 57 |
1 files changed, 14 insertions, 43 deletions
@@ -1,5 +1,3 @@ -/* Do not edit this file. It was automatically generated. */ - #ifndef HEADER_CRT #define HEADER_CRT /* @@ -9,32 +7,11 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#if HAVE_SETUID_ENABLED -#endif - -#define ColorIndex(i,j) ((7-i)*8+j) - -#define ColorPair(i,j) COLOR_PAIR(ColorIndex(i,j)) - -#define Black COLOR_BLACK -#define Red COLOR_RED -#define Green COLOR_GREEN -#define Yellow COLOR_YELLOW -#define Blue COLOR_BLUE -#define Magenta COLOR_MAGENTA -#define Cyan COLOR_CYAN -#define White COLOR_WHITE - -#define ColorPairGrayBlack ColorPair(Magenta,Magenta) -#define ColorIndexGrayBlack ColorIndex(Magenta,Magenta) +#include <stdbool.h> -#define KEY_WHEELUP KEY_F(20) +#define KEY_WHEELUP KEY_F(20) #define KEY_WHEELDOWN KEY_F(21) -#define KEY_RECLICK KEY_F(22) - -//#link curses - -#include <stdbool.h> +#define KEY_RECLICK KEY_F(22) typedef enum TreeStr_ { TREE_STR_HORZ, @@ -129,9 +106,9 @@ typedef enum ColorElements_ { LAST_COLORELEMENT } ColorElements; -extern void CRT_fatalError(const char* note) __attribute__ ((noreturn)); +void CRT_fatalError(const char* note) __attribute__ ((noreturn)); -extern void CRT_handleSIGSEGV(int sgn); +void CRT_handleSIGSEGV(int sgn); #define KEY_ALT(x) (KEY_F(64 - 26) + (x - 'A')) @@ -162,19 +139,15 @@ extern int CRT_scrollWheelVAmount; extern char* CRT_termType; -// TODO move color scheme to Settings, perhaps? - extern int CRT_colorScheme; extern void *backtraceArray[128]; #if HAVE_SETUID_ENABLED -#define DIE(msg) do { CRT_done(); fprintf(stderr, msg); exit(1); } while(0) - -extern void CRT_dropPrivileges(); +void CRT_dropPrivileges(); -extern void CRT_restorePrivileges(); +void CRT_restorePrivileges(); #else @@ -187,20 +160,18 @@ extern void CRT_restorePrivileges(); #endif -// TODO: pass an instance of Settings instead. - -extern void CRT_init(int delay, int colorScheme, bool allowUnicode); +void CRT_init(int delay, int colorScheme, bool allowUnicode); -extern void CRT_done(); +void CRT_done(); -extern void CRT_fatalError(const char* note); +void CRT_fatalError(const char* note); -extern int CRT_readKey(); +int CRT_readKey(); -extern void CRT_disableDelay(); +void CRT_disableDelay(); -extern void CRT_enableDelay(); +void CRT_enableDelay(); -extern void CRT_setColors(int colorScheme); +void CRT_setColors(int colorScheme); #endif |