diff options
| author | Wiimm <none> | 2020-07-27 09:47:16 +0200 |
|---|---|---|
| committer | Wiimm <none> | 2020-07-27 09:47:16 +0200 |
| commit | 88e810624c68f35f1d1adb2f7738bea3318b6fb4 (patch) | |
| tree | 4ba4f47446d876ed2148abd8f9ccc193619c3658 /project/src | |
| parent | 0c5fb5d25e1c665e9bfadd5b5520a45a10e40f28 (diff) | |
r8226: test mac build: replacement for memrchr()
Diffstat (limited to '')
| -rw-r--r-- | project/src/wtest.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/project/src/wtest.c b/project/src/wtest.c index 5f146ac..38e2960 100644 --- a/project/src/wtest.c +++ b/project/src/wtest.c @@ -3684,6 +3684,18 @@ const gobj_cond_ref_t * FindConditionRef2 ( u16 ref_id ) static enumError develop ( int argc, char ** argv ) { #if 1 + static const char text[] = "abc/def/ghi\0jkl/mno/pqr"; + uint i; + for ( i = 0; i < sizeof(text); i++ ) + { + ccp res = memrchr(text,'/',i); + ccp dc = dc_memrchr(text,'/',i); + printf(" %3u: %3zd %3zd%s\n", + i, res ? res-text : -1, dc ? dc-text : -1, + res == dc ? "" : " DIFFER!" ); + } + + #elif 1 static const u16 tab[] = { 0x1000,0x103f, 0x1900,0x193f, 0 }; const u16 *ptr; |
