summaryrefslogtreecommitdiff
path: root/zap
diff options
context:
space:
mode:
Diffstat (limited to 'zap')
-rw-r--r--zap/include/zap/bs.h4
-rw-r--r--zap/include/zap/mem.h4
-rw-r--r--zap/src/mem/memcmp.c2
-rw-r--r--zap/src/mem/strcmp.c2
-rw-r--r--zap/src/mem/utf8dec.c2
-rw-r--r--zap/src/mem/utf8declen.c2
-rw-r--r--zap/src/mem/win1252dec.c2
-rw-r--r--zap/src/mem/win1252enc.c6
8 files changed, 12 insertions, 12 deletions
diff --git a/zap/include/zap/bs.h b/zap/include/zap/bs.h
index 930b1a8..c2a7053 100644
--- a/zap/include/zap/bs.h
+++ b/zap/include/zap/bs.h
@@ -7,7 +7,7 @@
#if !defined(zap_priv_hdr_bs)
#define zap_priv_hdr_bs
-#if defined(sus_lang_cxx)
+#if defined(__cplusplus)
extern "C" {
#endif
@@ -36,7 +36,7 @@ typedef unsigned long zap_sz;
#define zap_ver ((unsigned long)+0x10u)
-#if defined(sus_lang_cxx)
+#if defined(__cplusplus)
}
#endif
diff --git a/zap/include/zap/mem.h b/zap/include/zap/mem.h
index 0580019..46ab872 100644
--- a/zap/include/zap/mem.h
+++ b/zap/include/zap/mem.h
@@ -9,7 +9,7 @@
#include <zap/bs.h>
-#if defined(sus_lang_cxx)
+#if defined(__cplusplus)
extern "C" {
#endif
@@ -35,7 +35,7 @@ __attribute__ ((hot,nothrow)) zap_sz zap_utf8enclen(zap_chr
__attribute__ ((hot,nothrow)) void zap_win1252dec(zap_chr8 const * in, zap_chr20 * out);
__attribute__ ((hot,nothrow)) void zap_win1252enc(zap_chr20 const * in, zap_chr8 * out);
-#if defined(sus_lang_cxx)
+#if defined(__cplusplus)
}
#endif
diff --git a/zap/src/mem/memcmp.c b/zap/src/mem/memcmp.c
index 601da99..13fa269 100644
--- a/zap/src/mem/memcmp.c
+++ b/zap/src/mem/memcmp.c
@@ -15,7 +15,7 @@ zap_cmp zap_memcmp(void const * const _lstr,zap_sz const _num,void const * const
for (;lpos != afterlbuf;++lpos,++rpos) {
unsigned char const lbyte = *lpos;
unsigned char const rbyte = *rpos;
- sus_likely (lbyte != rbyte) {return lbyte < rbyte ? zap_lt : zap_gt;}
+ if (lbyte != rbyte) {return lbyte < rbyte ? zap_lt : zap_gt;}
}
return zap_eq;
}
diff --git a/zap/src/mem/strcmp.c b/zap/src/mem/strcmp.c
index 691717a..d620560 100644
--- a/zap/src/mem/strcmp.c
+++ b/zap/src/mem/strcmp.c
@@ -17,7 +17,7 @@ zap_cmp zap_strcmp(char const * const _lstr,char const * const _rstr) {
unsigned char const lchr = *lpos;
unsigned char const rchr = *rpos;
sus_likely (lchr != rchr) {return lchr < rchr ? zap_lt : zap_gt;}
- sus_unlikely (lchr == (unsigned char)0x0) {return zap_eq;}
+ if (lchr == (unsigned char)0x0) {return zap_eq;}
}
sus_unreach();
}
diff --git a/zap/src/mem/utf8dec.c b/zap/src/mem/utf8dec.c
index 32ebd00..62f3f61 100644
--- a/zap/src/mem/utf8dec.c
+++ b/zap/src/mem/utf8dec.c
@@ -46,6 +46,6 @@ void zap_utf8dec(zap_chr8 const * const _in,zap_chr20 * const _out) {
/* One octet. */
*out = oct;
++in;
- sus_unlikely (oct == 0x0u) {break;}
+ if (oct == 0x0u) {break;}
}
}
diff --git a/zap/src/mem/utf8declen.c b/zap/src/mem/utf8declen.c
index 202e995..85062b9 100644
--- a/zap/src/mem/utf8declen.c
+++ b/zap/src/mem/utf8declen.c
@@ -15,7 +15,7 @@ zap_sz zap_utf8declen(zap_chr8 const * const _in) {
zap_chr8 const * in;
for (in = _in;;++len) {
zap_chr8 const oct = *in;
- sus_unlikely (oct == 0x0u) {break;}
+ if (oct == 0x0u) {break;}
if (oct >= 0xF0u) {
in += 0x4u;
continue;
diff --git a/zap/src/mem/win1252dec.c b/zap/src/mem/win1252dec.c
index 529bbe3..2a5e897 100644
--- a/zap/src/mem/win1252dec.c
+++ b/zap/src/mem/win1252dec.c
@@ -106,6 +106,6 @@ void zap_win1252dec(zap_chr8 const * const _in,zap_chr20 * const _out) {
*out = 0x178u;
break;
}
- sus_unlikely (chr == 0x0u) {break;}
+ if (chr == 0x0u) {break;}
}
}
diff --git a/zap/src/mem/win1252enc.c b/zap/src/mem/win1252enc.c
index 147ddaf..cd313cd 100644
--- a/zap/src/mem/win1252enc.c
+++ b/zap/src/mem/win1252enc.c
@@ -16,11 +16,11 @@ void zap_win1252enc(zap_chr20 const * const _in,zap_chr8 * const _out) {
zap_chr8 const bad = 0x3Fu;
switch (chr) {
default:
- sus_unlikely (chr > 0xFFu) {
+ if (chr > 0xFFu) {
*out = bad;
break;
}
- sus_unlikely (chr >= 0x80u && chr <= 0x9Fu) {
+ if (chr >= 0x80u && chr <= 0x9Fu) {
*out = bad;
break;
}
@@ -108,6 +108,6 @@ void zap_win1252enc(zap_chr20 const * const _in,zap_chr8 * const _out) {
*out = 0x9Fu;
break;
}
- sus_unlikely (chr == 0x0u) {break;}
+ if (chr == 0x0u) {break;}
}
}