/** * Parse a Git style timezone string. * <p> * The sequence "-0315" will be parsed as the numeric value -195, as the * lower two positions count minutes, not 100ths of an hour. * * @param b * buffer to scan. * @param ptr * position within buffer to start parsing digits at. * @param ptrResult * optional location to return the new ptr value through. If null * the ptr value will be discarded. * @return the timezone at this location, expressed in minutes. * @since 4.1 */ public static final int parseTimeZoneOffset(final byte[] b, int ptr, MutableInteger ptrResult) { final int v = parseBase10(b, ptr, ptrResult); final int tzMins = v % 100; final int tzHours = v / 100; return tzHours * 60 + tzMins; }
void parseHeader() { // Parse "@@ -236,9 +236,9 @@ protected boolean" // final byte[] buf = file.buf; final MutableInteger ptr = new MutableInteger(); ptr.value = nextLF(buf, startOffset, ' '); old.startLine = -parseBase10(buf, ptr.value, ptr); if (buf[ptr.value] == ',') old.lineCount = parseBase10(buf, ptr.value + 1, ptr); else old.lineCount = 1; newStartLine = parseBase10(buf, ptr.value + 1, ptr); if (buf[ptr.value] == ',') newLineCount = parseBase10(buf, ptr.value + 1, ptr); else newLineCount = 1; }
@Override void parseHeader() { // Parse "@@@ -55,12 -163,13 +163,15 @@@ protected boolean" // final byte[] buf = file.buf; final MutableInteger ptr = new MutableInteger(); ptr.value = nextLF(buf, startOffset, ' '); for (int n = 0; n < old.length; n++) { old[n].startLine = -parseBase10(buf, ptr.value, ptr); if (buf[ptr.value] == ',') old[n].lineCount = parseBase10(buf, ptr.value + 1, ptr); else old[n].lineCount = 1; } newStartLine = parseBase10(buf, ptr.value + 1, ptr); if (buf[ptr.value] == ',') newLineCount = parseBase10(buf, ptr.value + 1, ptr); else newLineCount = 1; }
length = parseBase10(buf, ptr + LITERAL.length, null); length = parseBase10(buf, ptr + DELTA.length, null);
encodedName = NO_NAME; entrySpan = RawParseUtils.parseBase10(in, ptr, off); final int subcnt = RawParseUtils.parseBase10(in, off.value, off); off.value = RawParseUtils.next(in, off.value, '\n');
commitTime = RawParseUtils.parseBase10(raw, ptr, null);
/** * Parse a Git style timezone string. * <p> * The sequence "-0315" will be parsed as the numeric value -195, as the * lower two positions count minutes, not 100ths of an hour. * * @param b * buffer to scan. * @param ptr * position within buffer to start parsing digits at. * @param ptrResult * optional location to return the new ptr value through. If null * the ptr value will be discarded. * @return the timezone at this location, expressed in minutes. * @since 4.1 */ public static final int parseTimeZoneOffset(final byte[] b, int ptr, MutableInteger ptrResult) { final int v = parseBase10(b, ptr, ptrResult); final int tzMins = v % 100; final int tzHours = v / 100; return tzHours * 60 + tzMins; }
/** * Parse a Git style timezone string. * <p> * The sequence "-0315" will be parsed as the numeric value -195, as the * lower two positions count minutes, not 100ths of an hour. * * @param b * buffer to scan. * @param ptr * position within buffer to start parsing digits at. * @param ptrResult * optional location to return the new ptr value through. If null * the ptr value will be discarded. * @return the timezone at this location, expressed in minutes. * @since 4.1 */ public static final int parseTimeZoneOffset(final byte[] b, int ptr, MutableInteger ptrResult) { final int v = parseBase10(b, ptr, ptrResult); final int tzMins = v % 100; final int tzHours = v / 100; return tzHours * 60 + tzMins; }
@Override void parseHeader() { // Parse "@@@ -55,12 -163,13 +163,15 @@@ protected boolean" // final byte[] buf = file.buf; final MutableInteger ptr = new MutableInteger(); ptr.value = nextLF(buf, startOffset, ' '); for (int n = 0; n < old.length; n++) { old[n].startLine = -parseBase10(buf, ptr.value, ptr); if (buf[ptr.value] == ',') old[n].lineCount = parseBase10(buf, ptr.value + 1, ptr); else old[n].lineCount = 1; } newStartLine = parseBase10(buf, ptr.value + 1, ptr); if (buf[ptr.value] == ',') newLineCount = parseBase10(buf, ptr.value + 1, ptr); else newLineCount = 1; }
void parseHeader() { // Parse "@@ -236,9 +236,9 @@ protected boolean" // final byte[] buf = file.buf; final MutableInteger ptr = new MutableInteger(); ptr.value = nextLF(buf, startOffset, ' '); old.startLine = -parseBase10(buf, ptr.value, ptr); if (buf[ptr.value] == ',') old.lineCount = parseBase10(buf, ptr.value + 1, ptr); else old.lineCount = 1; newStartLine = parseBase10(buf, ptr.value + 1, ptr); if (buf[ptr.value] == ',') newLineCount = parseBase10(buf, ptr.value + 1, ptr); else newLineCount = 1; }
parseBase10(raw, emailE + 1, bufPtr); // when if (emailE + 1 == bufPtr.value || bufPtr.value == raw.length || raw[bufPtr.value] != ' ') { parseBase10(raw, p, bufPtr); // tz offset if (p == bufPtr.value) { report(BAD_TIMEZONE, id, JGitText.get().corruptObjectBadTimezone);
void parseHeader() { // Parse "@@ -236,9 +236,9 @@ protected boolean" // final byte[] buf = file.buf; final MutableInteger ptr = new MutableInteger(); ptr.value = nextLF(buf, startOffset, ' '); old.startLine = -parseBase10(buf, ptr.value, ptr); if (buf[ptr.value] == ',') old.lineCount = parseBase10(buf, ptr.value + 1, ptr); else old.lineCount = 1; newStartLine = parseBase10(buf, ptr.value + 1, ptr); if (buf[ptr.value] == ',') newLineCount = parseBase10(buf, ptr.value + 1, ptr); else newLineCount = 1; }
@Override void parseHeader() { // Parse "@@@ -55,12 -163,13 +163,15 @@@ protected boolean" // final byte[] buf = file.buf; final MutableInteger ptr = new MutableInteger(); ptr.value = nextLF(buf, startOffset, ' '); for (int n = 0; n < old.length; n++) { old[n].startLine = -parseBase10(buf, ptr.value, ptr); if (buf[ptr.value] == ',') old[n].lineCount = parseBase10(buf, ptr.value + 1, ptr); else old[n].lineCount = 1; } newStartLine = parseBase10(buf, ptr.value + 1, ptr); if (buf[ptr.value] == ',') newLineCount = parseBase10(buf, ptr.value + 1, ptr); else newLineCount = 1; }
score = parseBase10(buf, ptr + SIMILARITY_INDEX.length, null); score = parseBase10(buf, ptr + DISSIMILARITY_INDEX.length, null);
encodedName = NO_NAME; entrySpan = RawParseUtils.parseBase10(in, ptr, off); final int subcnt = RawParseUtils.parseBase10(in, off.value, off); off.value = RawParseUtils.next(in, off.value, '\n');
length = parseBase10(buf, ptr + LITERAL.length, null); length = parseBase10(buf, ptr + DELTA.length, null);
length = parseBase10(buf, ptr + LITERAL.length, null); length = parseBase10(buf, ptr + DELTA.length, null);
commitTime = RawParseUtils.parseBase10(raw, ptr, null);
parseBase10(raw, emailE + 1, bufPtr); // when if (emailE + 1 == bufPtr.value || bufPtr.value == raw.length || raw[bufPtr.value] != ' ') { parseBase10(raw, p, bufPtr); // tz offset if (p == bufPtr.value) { report(BAD_TIMEZONE, id, JGitText.get().corruptObjectBadTimezone);
parseBase10(raw, emailE + 1, bufPtr); // when if (emailE + 1 == bufPtr.value || bufPtr.value == raw.length || raw[bufPtr.value] != ' ') { parseBase10(raw, p, bufPtr); // tz offset if (p == bufPtr.value) { report(BAD_TIMEZONE, id, JGitText.get().corruptObjectBadTimezone);