summaryrefslogtreecommitdiffhomepage
path: root/misc/examples/printspan.c
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-06-11 14:03:16 +0200
committerTyge Løvset <[email protected]>2023-06-11 14:59:06 +0200
commitb564ef6bdfcd2437f1b4997f42054c45ccdedbb1 (patch)
treeb6c5458b8bc47279d18408f25e79eb6118808d78 /misc/examples/printspan.c
parentf3529a2600141dc7f84c734ea3bf5db8f7090e56 (diff)
downloadSTC-modified-b564ef6bdfcd2437f1b4997f42054c45ccdedbb1.tar.gz
STC-modified-b564ef6bdfcd2437f1b4997f42054c45ccdedbb1.zip
Added priv/linkage.h and renamed priv/template2.h => priv/template_undef.h.
Make all examples c++ compatible, except those using cspan.h Removed: crange_obj() Renamed: crange_make() => crange_init() Renamed: cspan_make() => cspan_init() Renamed: cstr_NULL => cstr_null Renamed: csview_NULL => csview_null
Diffstat (limited to 'misc/examples/printspan.c')
-rw-r--r--misc/examples/printspan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/misc/examples/printspan.c b/misc/examples/printspan.c
index b5099ed5..7564bd88 100644
--- a/misc/examples/printspan.c
+++ b/misc/examples/printspan.c
@@ -22,22 +22,22 @@ void printMe(intspan container) {
int main()
{
- intspan sp1 = cspan_make(intspan, {1, 2});
+ intspan sp1 = cspan_init(intspan, {1, 2});
printMe( sp1 );
printMe( c_init(intspan, {1, 2, 3}) );
int arr[] = {1, 2, 3, 4, 5, 6};
intspan sp2 = cspan_from_array(arr);
- printMe( (intspan)cspan_subspan(&sp2, 1, 4) );
+ printMe( c_LITERAL(intspan)cspan_subspan(&sp2, 1, 4) );
cvec_int vec = c_init(cvec_int, {1, 2, 3, 4, 5});
- printMe( (intspan)cspan_from(&vec) );
+ printMe( c_LITERAL(intspan)cspan_from(&vec) );
printMe( sp2 );
cstack_int stk = c_init(cstack_int, {1, 2, 3, 4, 5, 6, 7});
- printMe( (intspan)cspan_from(&stk) );
+ printMe( c_LITERAL(intspan)cspan_from(&stk) );
csset_str set = c_init(csset_str, {"5", "7", "4", "3", "8", "2", "1", "9", "6"});
printf("%d:", (int)csset_str_size(&set));