diff options
author | Nathan Scott <nathans@redhat.com> | 2020-09-08 16:45:11 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2020-09-08 16:45:11 +1000 |
commit | eede79b29af116bc568c7f7a1be319f0c1dfd311 (patch) | |
tree | b271a1980e4b48a5178d60b8aed1efa6987e4e3d /RichString.c | |
parent | 85ff6960ed5c1312f9d773e695418fdbfffd5303 (diff) | |
parent | 7758ffcdeae26f47f4ad6ec847fb8292fd5ceee3 (diff) |
Merge branch 'noheadergen' of https://github.com/zevweiss/htop into zevweiss-noheadergen
Diffstat (limited to 'RichString.c')
-rw-r--r-- | RichString.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/RichString.c b/RichString.c index d246f1e1..702ab329 100644 --- a/RichString.c +++ b/RichString.c @@ -13,55 +13,6 @@ in the source distribution for its full text. #define RICHSTRING_MAXLEN 350 -/*{ -#include "config.h" -#include <ctype.h> - -#include <assert.h> -#ifdef HAVE_NCURSESW_CURSES_H -#include <ncursesw/curses.h> -#elif HAVE_NCURSES_NCURSES_H -#include <ncurses/ncurses.h> -#elif HAVE_NCURSES_CURSES_H -#include <ncurses/curses.h> -#elif HAVE_NCURSES_H -#include <ncurses.h> -#elif HAVE_CURSES_H -#include <curses.h> -#endif - -#ifdef HAVE_LIBNCURSESW -#include <wctype.h> -#endif - -#define RichString_size(this) ((this)->chlen) -#define RichString_sizeVal(this) ((this).chlen) - -#define RichString_begin(this) RichString (this); memset(&this, 0, sizeof(RichString)); (this).chptr = (this).chstr; -#define RichString_beginAllocated(this) memset(&this, 0, sizeof(RichString)); (this).chptr = (this).chstr; -#define RichString_end(this) RichString_prune(&(this)); - -#ifdef HAVE_LIBNCURSESW -#define RichString_printVal(this, y, x) mvadd_wchstr(y, x, (this).chptr) -#define RichString_printoffnVal(this, y, x, off, n) mvadd_wchnstr(y, x, (this).chptr + off, n) -#define RichString_getCharVal(this, i) ((this).chptr[i].chars[0] & 255) -#define RichString_setChar(this, at, ch) do{ (this)->chptr[(at)] = (CharType) { .chars = { ch, 0 } }; } while(0) -#define CharType cchar_t -#else -#define RichString_printVal(this, y, x) mvaddchstr(y, x, (this).chptr) -#define RichString_printoffnVal(this, y, x, off, n) mvaddchnstr(y, x, (this).chptr + off, n) -#define RichString_getCharVal(this, i) ((this).chptr[i]) -#define RichString_setChar(this, at, ch) do{ (this)->chptr[(at)] = ch; } while(0) -#define CharType chtype -#endif - -typedef struct RichString_ { - int chlen; - CharType* chptr; - CharType chstr[RICHSTRING_MAXLEN+1]; -} RichString; - -}*/ #ifndef CLAMP #define CLAMP(x,low,high) (((x)>(high))?(high):(((x)<(low))?(low):(x))) |