diff options
Diffstat (limited to 'RichString.h')
-rw-r--r-- | RichString.h | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/RichString.h b/RichString.h index b6622a1..a9cb3f6 100644 --- a/RichString.h +++ b/RichString.h @@ -2,28 +2,31 @@ #ifndef HEADER_RichString #define HEADER_RichString +/* +htop - RichString.h +(C) 2004,2011 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. +*/ +#define RICHSTRING_MAXLEN 300 -#ifndef CONFIG_H -#define CONFIG_H #include "config.h" -#endif - -#include <stdlib.h> -#include <string.h> #include <ctype.h> -#include "debug.h" #include <assert.h> -#ifdef HAVE_LIBNCURSESW +#ifdef HAVE_NCURSESW_CURSES_H #include <ncursesw/curses.h> -#else +#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 -#define RICHSTRING_MAXLEN 300 - - #define RichString_size(this) ((this)->chlen) #define RichString_sizeVal(this) ((this).chlen) @@ -60,16 +63,12 @@ typedef struct RichString_ { #ifdef HAVE_LIBNCURSESW -extern void RichString_appendn(RichString* this, int attrs, const char* data_c, int len); - extern void RichString_setAttrn(RichString* this, int attrs, int start, int finish); int RichString_findChar(RichString* this, char c, int start); #else -extern void RichString_appendn(RichString* this, int attrs, const char* data_c, int len); - void RichString_setAttrn(RichString* this, int attrs, int start, int finish); int RichString_findChar(RichString* this, char c, int start); @@ -80,7 +79,9 @@ void RichString_prune(RichString* this); void RichString_setAttr(RichString* this, int attrs); -extern void RichString_append(RichString* this, int attrs, const char* data); +void RichString_append(RichString* this, int attrs, const char* data); + +void RichString_appendn(RichString* this, int attrs, const char* data, int len); void RichString_write(RichString* this, int attrs, const char* data); |