aboutsummaryrefslogtreecommitdiffstats
path: root/RichString.h
diff options
context:
space:
mode:
Diffstat (limited to 'RichString.h')
-rw-r--r--RichString.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/RichString.h b/RichString.h
index 796965a..f5b5cba 100644
--- a/RichString.h
+++ b/RichString.h
@@ -59,6 +59,10 @@ typedef struct RichString_ {
} 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)

© 2014-2024 Faster IT GmbH | imprint | privacy policy