"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core/src/main/java/com/google/zxing/oned/rss/expanded/decoders/AI01decoder.java" between
zxing-zxing-3.4.1.tar.gz and zxing-zxing-3.5.0.tar.gz

About: ZXing ("zebra crossing") is a multi-format 1D/2D barcode image processing library implemented in Java, with ports to other languages. Info: Project is in maintenance mode (no active development).

AI01decoder.java  (zxing-zxing-3.4.1):AI01decoder.java  (zxing-zxing-3.5.0)
skipping to change at line 63 skipping to change at line 63
int currentBlock = this.getGeneralDecoder().extractNumericValueFromBitArra y(currentPos + 10 * i, 10); int currentBlock = this.getGeneralDecoder().extractNumericValueFromBitArra y(currentPos + 10 * i, 10);
if (currentBlock / 100 == 0) { if (currentBlock / 100 == 0) {
buf.append('0'); buf.append('0');
} }
if (currentBlock / 10 == 0) { if (currentBlock / 10 == 0) {
buf.append('0'); buf.append('0');
} }
buf.append(currentBlock); buf.append(currentBlock);
} }
appendCheckDigit(buf, initialBufferPosition); appendCheckDigit(buf, initialBufferPosition);
} }
private static void appendCheckDigit(StringBuilder buf, int currentPos) { private static void appendCheckDigit(StringBuilder buf, int currentPos) {
int checkDigit = 0; int checkDigit = 0;
for (int i = 0; i < 13; i++) { for (int i = 0; i < 13; i++) {
int digit = buf.charAt(i + currentPos) - '0'; int digit = buf.charAt(i + currentPos) - '0';
checkDigit += (i & 0x01) == 0 ? 3 * digit : digit; checkDigit += (i & 0x01) == 0 ? 3 * digit : digit;
} }
checkDigit = 10 - (checkDigit % 10); checkDigit = 10 - (checkDigit % 10);
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)