X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=util%2Fyaz-icu.c;h=3e0c1d817edb455d832b31b86228b3af8c5d4171;hp=d85342873f49ba24f794871bb84bb0a3919a372c;hb=94b1547e5951e1e01bf5180159e74095cd0527f4;hpb=5242cb5a8634bfa38b9333ff7f903e718ac6e292 diff --git a/util/yaz-icu.c b/util/yaz-icu.c index d853428..3e0c1d8 100644 --- a/util/yaz-icu.c +++ b/util/yaz-icu.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2012 Index Data + * Copyright (C) 1995-2013 Index Data * See the file LICENSE for details. */ @@ -473,7 +473,10 @@ static void process_text_file(struct config_t *p_config) success = 0; else { + size_t start, len; const char *sortkey = icu_chain_token_sortkey(p_config->chain); + + icu_chain_get_org_info(p_config->chain, &start, &len); wrbuf_rewind(sw); wrbuf_puts_escaped(sw, sortkey); token_count++; @@ -504,11 +507,13 @@ static void process_text_file(struct config_t *p_config) } else { - fprintf(p_config->outfile, "%lu %lu '%s' '%s'", + fprintf(p_config->outfile, "%lu %lu '%s' '%s' %ld+%ld", token_count, line_count, icu_chain_token_norm(p_config->chain), - icu_chain_token_display(p_config->chain)); + icu_chain_token_display(p_config->chain), + (long) start, + (long) len); if (p_config->sortoutput) { fprintf(p_config->outfile, " '%s'", wrbuf_cstr(sw));