summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2022-08-08 08:32:31 +0200
committerTyge Løvset <[email protected]>2022-08-08 08:32:31 +0200
commit3b548336d109e8d17b048da075a2ca9019a63280 (patch)
tree3c37f17434d7d28983793446c161c978e519d93e
parent9e529c1ba7e575881656265b468b35863ae9e82a (diff)
downloadSTC-modified-3b548336d109e8d17b048da075a2ca9019a63280.tar.gz
STC-modified-3b548336d109e8d17b048da075a2ca9019a63280.zip
Reverted `{{` to `{ {` in documentation as markdown treats it special.
-rw-r--r--README.md4
-rw-r--r--docs/ccommon_api.md6
-rw-r--r--docs/cmap_api.md2
-rw-r--r--docs/csmap_api.md2
4 files changed, 7 insertions, 7 deletions
diff --git a/README.md b/README.md
index 29c28a4f..a3ffebfa 100644
--- a/README.md
+++ b/README.md
@@ -207,8 +207,8 @@ int main(void) {
c_auto (csmap_int, map)
{
int nums[4] = {10, 20, 30, 40};
- struct Point pts[4] = {{10, 1}, {20, 2}, {30, 3}, {40, 4}};
- int pairs[4][2] = {{20, 2}, {10, 1}, {30, 3}, {40, 4}};
+ struct Point pts[4] = { {10, 1}, {20, 2}, {30, 3}, {40, 4} };
+ int pairs[4][2] = { {20, 2}, {10, 1}, {30, 3}, {40, 4} };
/* add some elements to each container */
for (int i = 0; i < 4; ++i) {
diff --git a/docs/ccommon_api.md b/docs/ccommon_api.md
index 61791a20..0fb1a575 100644
--- a/docs/ccommon_api.md
+++ b/docs/ccommon_api.md
@@ -141,11 +141,11 @@ c_forarray (int, v, {1, 2, 3})
cvec_i_push_back(&vec, *v);
// insert in existing map
-c_forarray (cmap_ii_raw, v, {{4, 5}, {6, 7}})
+c_forarray (cmap_ii_raw, v, { {4, 5}, {6, 7} })
cmap_ii_insert(&map, v->first, v->second);
// even define an anonymous struct inside it (no commas allowed)
-c_forarray (struct { int a; int b; }, v, {{1, 2}, {3, 4}, {5, 6}})
+c_forarray (struct { int a; int b; }, v, { {1, 2}, {3, 4}, {5, 6} })
printf("{%d %d} ", v->a, v->b);
// `c_forarray_p` is required for pointer type elements
@@ -167,7 +167,7 @@ c_forarray_p (const char*, v, {"Hello", "crazy", "world"})
#define i_tag ii
#include <stc/csmap.h>
...
-c_forarray (csmap_ii_value, v, {{23,1}, {3,2}, {7,3}, {5,4}, {12,5}})
+c_forarray (csmap_ii_value, v, { {23,1}, {3,2}, {7,3}, {5,4}, {12,5} })
csmap_ii_insert(&map, v->first, v->second);
c_foreach (i, csmap_ii, map)
diff --git a/docs/cmap_api.md b/docs/cmap_api.md
index 9a4a2ef1..28e5529c 100644
--- a/docs/cmap_api.md
+++ b/docs/cmap_api.md
@@ -172,7 +172,7 @@ int main()
c_auto (cmap_id, idnames)
{
- c_forarray (cmap_id_raw, v, {{100, "Red"}, {110, "Blue"}})
+ c_forarray (cmap_id_raw, v, { {100, "Red"}, {110, "Blue"} })
cmap_id_emplace(&idnames, v->first, v->second);
// replace existing mapped value:
diff --git a/docs/csmap_api.md b/docs/csmap_api.md
index c3e3f3ea..3a1a5aa6 100644
--- a/docs/csmap_api.md
+++ b/docs/csmap_api.md
@@ -159,7 +159,7 @@ int main()
csmap_id idnames = csmap_id_init();
c_autodefer (csmap_id_drop(&idnames))
{
- c_forarray (csmap_id_raw, v, {{100, "Red"}, {110, "Blue"}})
+ c_forarray (csmap_id_raw, v, { {100, "Red"}, {110, "Blue"} })
csmap_id_emplace(&idnames, v->first, v->second);
// put replaces existing mapped value: