From f80394a20254938142011855f2954b3f63fe5909 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Tue, 15 Sep 2020 08:00:00 +0200 Subject: New upstream version 3.0.2 --- RichString.h | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) (limited to 'RichString.h') diff --git a/RichString.h b/RichString.h index d6fa635..e6fb4c3 100644 --- a/RichString.h +++ b/RichString.h @@ -1,5 +1,3 @@ -/* Do not edit this file. It was automatically generated. */ - #ifndef HEADER_RichString #define HEADER_RichString /* @@ -9,7 +7,6 @@ Released under the GNU GPL, see the COPYING file in the source distribution for its full text. */ -#define RICHSTRING_MAXLEN 350 #include "config.h" #include @@ -52,43 +49,36 @@ in the source distribution for its full text. #define CharType chtype #endif +#define RICHSTRING_MAXLEN 350 + 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))) -#endif - -#define charBytes(n) (sizeof(CharType) * (n)) - -#define RichString_setLen(this, len) do{ if(len < RICHSTRING_MAXLEN && this->chlen < RICHSTRING_MAXLEN) { RichString_setChar(this,len,0); this->chlen=len; } else RichString_extendLen(this,len); }while(0) - #ifdef HAVE_LIBNCURSESW -extern void RichString_setAttrn(RichString* this, int attrs, int start, int finish); +void RichString_setAttrn(RichString* this, int attrs, int start, int finish); -extern int RichString_findChar(RichString* this, char c, int start); +int RichString_findChar(RichString* this, char c, int start); #else -extern void RichString_setAttrn(RichString* this, int attrs, int start, int finish); +void RichString_setAttrn(RichString* this, int attrs, int start, int finish); -extern int RichString_findChar(RichString* this, char c, int start); +int RichString_findChar(RichString* this, char c, int start); #endif -extern void RichString_prune(RichString* this); +void RichString_prune(RichString* this); -extern void RichString_setAttr(RichString* this, int attrs); +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); -extern void RichString_appendn(RichString* this, int attrs, const char* data, int len); +void RichString_appendn(RichString* this, int attrs, const char* data, int len); -extern void RichString_write(RichString* this, int attrs, const char* data); +void RichString_write(RichString* this, int attrs, const char* data); #endif -- cgit v1.2.3