summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/make.sh2
-rw-r--r--examples/sso_substr.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/examples/make.sh b/examples/make.sh
index 4a4fdbcf..facdedc1 100644
--- a/examples/make.sh
+++ b/examples/make.sh
@@ -1,9 +1,9 @@
#!/bin/bash
cc='gcc -s -O2 -Wall -std=c99 -pedantic'
#cc='clang -s -O2 -Wall -std=c99 -pedantic'
+#cc='clang -s -O2 -Wall -std=c99 -pedantic -DSTC_CSTR_V1 -DSTC_CSMAP_V1'
#cc='gcc -x c++ -s -O2 -Wall -std=c++20'
#cc='g++ -x c++ -s -O2 -Wall'
-#cc='clang -s -O2 -Wall -std=c99 -pedantic -DSTC_OLD_CSTR'
#cc='clang'
#cc='clang -c -DSTC_HEADER'
#cc='cl -O2 -nologo -W2 -MD'
diff --git a/examples/sso_substr.c b/examples/sso_substr.c
index fdb53d0b..f8382f16 100644
--- a/examples/sso_substr.c
+++ b/examples/sso_substr.c
@@ -14,8 +14,9 @@ int main ()
cstr_assign(&str, "apples are green or red");
cstr s2 = cstr_from_sv(cstr_substr(&str, -3, 3)); // "red"
cstr s3 = cstr_from_sv(cstr_substr(&str, 0, 6)); // "apples"
+ #ifndef STC_CSTR_V1
printf("%s %s: %d, %d\n", cstr_str(&s2), cstr_str(&s3),
cstr_is_long(&str), cstr_is_long(&s2));
-
+ #endif
c_drop (cstr, &str, &s2, &s3);
}