# HG changeset patch # User sugi # Date 1368005515 -32400 # Node ID a560b92bfd72c5722031ed6123c9e8f0ebfa3ae8 # Parent c70cd1b2cacaa56f90484d360122526052087c72 add comment diff -r c70cd1b2caca -r a560b92bfd72 src/alice/test/codesegment/local/wordcount/CorrectResult.java --- a/src/alice/test/codesegment/local/wordcount/CorrectResult.java Wed May 08 15:43:49 2013 +0900 +++ b/src/alice/test/codesegment/local/wordcount/CorrectResult.java Wed May 08 18:31:55 2013 +0900 @@ -27,8 +27,7 @@ line_num +=result.line_num; word_num +=result.word_num; } - long t = System.currentTimeMillis(); - System.out.println(t - StartWordCount.t); + System.out.println(System.currentTimeMillis() - StartWordCount.t); System.out.println(line_num+" "+word_num); System.exit(0); diff -r c70cd1b2caca -r a560b92bfd72 src/alice/test/codesegment/local/wordcount/WordCount.java --- a/src/alice/test/codesegment/local/wordcount/WordCount.java Wed May 08 15:43:49 2013 +0900 +++ b/src/alice/test/codesegment/local/wordcount/WordCount.java Wed May 08 18:31:55 2013 +0900 @@ -37,6 +37,8 @@ } word_num += word_flag; if (!r.flag){ + // buf.get(r.end) is next block's char. + // buf.get(r.end-1) is this block's last char if (((char)buf.get(r.end-1) == 0x0A||(char)buf.get(r.end-1) == 0x20) && ((char)buf.get(r.end) == 0x0A||(char)buf.get(r.end) == 0x20)){ word_num--;