From f8da655d5b8154940540a1de62122b7639cf235e Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Wed, 21 Nov 2018 23:41:15 -0500 Subject: Add Iter for edi --- bin/edi/edi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'bin/edi/edi.c') diff --git a/bin/edi/edi.c b/bin/edi/edi.c index c8cd2a44..fb6e3929 100644 --- a/bin/edi/edi.c +++ b/bin/edi/edi.c @@ -30,10 +30,8 @@ int main(int argc, char *argv[]) { fileRead(&file); const struct Table *table = &file.log.states[file.log.state].table; - for (size_t i = 0; i < table->len; ++i) { - for (size_t j = 0; j < table->slices[i].len; ++j) { - printf("%lc", table->slices[i].ptr[j]); - } + for (struct Iter it = iter(table, 0); it.ch != WEOF; it = iterNext(it)) { + printf("%lc", it.ch); } fileFree(&file); -- cgit 1.4.1