kjv

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 63748cd726af4b252a7257ca924e22343fbda625
parent 1da71999acb814148cbef35739fc26ffe0738f3b
Author: Tim Cooper <tim.cooper@layeh.com>
Date:   Tue,  7 Aug 2018 19:09:35 -0300

eliminate beforeprintverse function

Diffstat:
Mkjv.awk | 13+++++--------
1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/kjv.awk b/kjv.awk @@ -93,13 +93,6 @@ cmd == "list" { } } -function beforeprintverse(book, bookabbr) { - if (last_book_printed != bookabbr) { - print $1 - last_book_printed = bookabbr - } -} - function printverse(verse, word_count, characters_printed) { word_count = split(verse, words, " ") for (i = 1; i <= word_count; i++) { @@ -118,7 +111,11 @@ function printverse(verse, word_count, characters_printed) { } function processline() { - beforeprintverse($1, $2) + if (last_book_printed != $2) { + print $1 + last_book_printed = $2 + } + printf("%d:%d\t", $4, $5) printverse($6) outputted_records++