From e5d2abb56ca57a613e4ef9398a6499190b2265be Mon Sep 17 00:00:00 2001 From: hunt Date: Sat, 18 Jun 2005 07:24:42 +0000 Subject: 2005-06-18 Martin Hunt * counter.c: New file. Counter aggregations. * stat.c: New file. Stat aggregations. * stat.h: Header file for stats. * map-int.c: New file. Support for int64 values. * map-stat.c: New file. Support for stat values. * map-str.c: New file. Support for string values. * map-values.c: Now just includes the necessary map-*.c files. * stat-common.c: New file. Stats stuff common to Stats and maps containing stats. * Doxyfile: Bumped version to 0.6. * README: Renamed README.doc and reorganized. --- runtime/docs/examples/list.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'runtime/docs/examples/list.c') diff --git a/runtime/docs/examples/list.c b/runtime/docs/examples/list.c index 15d13d4b..6294cccb 100644 --- a/runtime/docs/examples/list.c +++ b/runtime/docs/examples/list.c @@ -1,5 +1,5 @@ -struct map_node_str *ptr; +struct map_node *ptr; MAP map = _stp_list_new(10, STRING); @@ -8,7 +8,10 @@ for (i = 0; i < 10; i++) { _stp_list_add (map, buf); } +/* old way to print a list of strings */ foreach (map, ptr) - printf ("map[%ld] = %s\n", key1int(ptr), ptr->str); + _stp_printf ("list[%ld] = %s\n", key1int(ptr), _stp_get_str(ptr)); +/* new way to print a list of strings */ + _stp_map_print(map, "list[%1d] = %s"); -- cgit