diff options
| author | Tyge Løvset <[email protected]> | 2022-12-23 23:55:10 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-12-23 23:55:10 +0100 |
| commit | d623c6c85071b9af5d607bb5d9aceceaea05220a (patch) | |
| tree | f20fc3714f86e1553d1103bed6dc8efefcbd9d6b /misc/examples/regex_match.c | |
| parent | 5f57d597cd27aef55adbcb3b452973b0c6e33667 (diff) | |
| download | STC-modified-d623c6c85071b9af5d607bb5d9aceceaea05220a.tar.gz STC-modified-d623c6c85071b9af5d607bb5d9aceceaea05220a.zip | |
Experimental uppercase macros.
Diffstat (limited to 'misc/examples/regex_match.c')
| -rw-r--r-- | misc/examples/regex_match.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/misc/examples/regex_match.c b/misc/examples/regex_match.c index 376b002e..b6bd6521 100644 --- a/misc/examples/regex_match.c +++ b/misc/examples/regex_match.c @@ -12,19 +12,19 @@ int main() " Boltzmann const: 1.38064852E-23, is very small." " Bohrradius is 5.29177210903e-11, and Avogadros number is 6.02214076e23."; - c_auto (cregex, re) - c_auto (cstack_float, vec) - c_auto (cstr, nums) + c_AUTO (cregex, re) + c_AUTO (cstack_float, vec) + c_AUTO (cstr, nums) { const char* pattern = "[+-]?([0-9]*\\.)?\\d+([Ee][+-]?\\d+)?"; int res = cregex_compile(&re, pattern, CREG_DEFAULT); printf("%d: %s\n", res, pattern); // extract and convert all numbers in str to floats - c_formatch (i, &re, str) + c_FORMATCH (i, &re, str) cstack_float_push(&vec, atof(i.match[0].str)); - c_foreach (i, cstack_float, vec) + c_FOREACH (i, cstack_float, vec) printf(" %g\n", *i.ref); // extracts the numbers only to a comma separated string. |
