diff --git a/README.md b/README.md index a8de267..e45e716 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ VBinDiff - Visual Binary Diff ============================= -[Visual Binary Diff (VBinDiff)](http://www.cjmweb.net/vbindiff/) displays files in hexadecimal and ASCII (or EBCDIC). It can also display two files at once, and highlight the differences between them. Unlike diff, it works well with large files (up to 4 GB). +[Visual Binary Diff (VBinDiff)](http://www.cjmweb.net/vbindiff/) displays files in hexadecimal and ASCII (or EBCDIC). It can also display two files at once, and highlight the differences between them. Unlike diff, it works well with large files (up to 64 GB). VBinDiff was inspired by the Compare Files function of the [ProSel utilities by Glen Bredon](http://www.apple2.org.za/gswv/USA2WUG/Glen.Bredon.In.Memoriam/A2.Software/), for the [Apple II](https://en.wikipedia.org/wiki/Apple_II). When I couldn't find a similar utility for the PC, I wrote it myself. diff --git a/tools/ReadMe.tt b/tools/ReadMe.tt index cd0a433..4f55e57 100644 --- a/tools/ReadMe.tt +++ b/tools/ReadMe.tt @@ -60,7 +60,7 @@ $stash->set(section => sub { Visual Binary Diff (VBinDiff) displays files in hexadecimal and ASCII (or EBCDIC). It can also display two files at once, and highlight the differences between them. Unlike diff, it works well with large files -(up to 4 GB). +(up to 64 GB). VBinDiff was inspired by the Compare Files function of the ProSel utilities by Glen Bredon, for the Apple II. When I couldn't find a diff --git a/tools/vbindiff.pod.tt b/tools/vbindiff.pod.tt index 41f609f..d1eeaf4 100644 --- a/tools/vbindiff.pod.tt +++ b/tools/vbindiff.pod.tt @@ -39,7 +39,7 @@ B I [ I ] Visual Binary Diff (VBinDiff) displays files in hexadecimal and ASCII (or EBCDIC). It can also display two files at once, and highlight the differences between them. Unlike B, it works well with -large files (up to 4 GB). +large files (up to 64 GB). =head2 Viewing files diff --git a/vbindiff.cpp b/vbindiff.cpp index d762e77..d24b2ab 100644 --- a/vbindiff.cpp +++ b/vbindiff.cpp @@ -114,8 +114,8 @@ const Command cmUseBottom = 11; const Command cmToggleASCII = 12; const Command cmFind = 16; // Commands 16-19 -const short leftMar = 11; // Starting column of hex display -const short leftMar2 = 61; // Starting column of ASCII display +const short leftMar = 13; // Starting column of hex display +const short leftMar2 = 63; // Starting column of ASCII display const int lineWidth = 16; // Number of bytes displayed per line @@ -460,7 +460,7 @@ void FileDisplay::display() FPos lineOffset = offset; short i,j,index,lineLength; - char buf[lineWidth + lineWidth/8 + 1]; + char buf[lineWidth + lineWidth/8]; buf[sizeof(buf)-1] = '\0'; char buf2[screenWidth+1]; @@ -472,7 +472,7 @@ void FileDisplay::display() // cerr << i << '\n'; char* str = buf2; str += - sprintf(str, "%04X %04X:",Word(lineOffset>>16),Word(lineOffset&0xFFFF)); + sprintf(str, "%01X %04X %04X:",Word(lineOffset>>32),Word(lineOffset>>16),Word(lineOffset&0xFFFF)); lineLength = min(lineWidth, bufContents - i*lineWidth); @@ -1548,9 +1548,9 @@ Command getCommand() void gotoPosition(Command cmd) { - positionInWin(cmd, inWidth+2, " Goto "); + positionInWin(cmd, inWidth+3, " Goto "); - const int maxLen = inWidth-2; + const int maxLen = inWidth-1; char buf[maxLen+1]; getString(buf, maxLen, positionHistory, hexDigits, true); @@ -1558,7 +1558,7 @@ void gotoPosition(Command cmd) if (!buf[0]) return; - FPos pos = strtoul(buf, NULL, 16); + FPos pos = _strtoui64(buf, NULL, 16); if (cmd & cmgGotoTop) file1.moveTo(pos);