summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/books.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-12-23 23:55:10 +0100
committerTyge Løvset <[email protected]>2022-12-23 23:55:10 +0100
commitd623c6c85071b9af5d607bb5d9aceceaea05220a (patch)
treef20fc3714f86e1553d1103bed6dc8efefcbd9d6b /misc/examples/books.c
parent5f57d597cd27aef55adbcb3b452973b0c6e33667 (diff)
downloadSTC-modified-d623c6c85071b9af5d607bb5d9aceceaea05220a.tar.gz
STC-modified-d623c6c85071b9af5d607bb5d9aceceaea05220a.zip
Experimental uppercase macros.
Diffstat (limited to 'misc/examples/books.c')
-rw-r--r--misc/examples/books.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/examples/books.c b/misc/examples/books.c
index b6067d81..96c7ff6e 100644
--- a/misc/examples/books.c
+++ b/misc/examples/books.c
@@ -8,7 +8,7 @@
// would be `HashMap<String, String>` in this example).
int main()
{
- c_auto (cmap_str, book_reviews)
+ c_AUTO (cmap_str, book_reviews)
{
// Review some books.
cmap_str_emplace(&book_reviews,
@@ -41,7 +41,7 @@ int main()
// Look up the values associated with some keys.
const char* to_find[] = {"Pride and Prejudice", "Alice's Adventure in Wonderland"};
- c_forrange (i, c_arraylen(to_find)) {
+ c_FORRANGE (i, c_ARRAYLEN(to_find)) {
const cmap_str_value* b = cmap_str_get(&book_reviews, to_find[i]);
if (b)
printf("%s: %s\n", cstr_str(&b->first), cstr_str(&b->second));
@@ -53,7 +53,7 @@ int main()
printf("Review for Jane: %s\n", cstr_str(cmap_str_at(&book_reviews, "Pride and Prejudice")));
// Iterate over everything.
- c_forpair (book, review, cmap_str, book_reviews) {
+ c_FORPAIR (book, review, cmap_str, book_reviews) {
printf("%s: \"%s\"\n", cstr_str(_.book), cstr_str(_.review));
}
}