-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extend size of address when file is larger than 4GB #72
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,18 @@ void openFile(void) | |
fileSize = 0; | ||
} | ||
biggestLoc = fileSize; | ||
|
||
// compute number of digits for address | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest adding a comment somewhere explaining that nAddrDigits max is 16 (max size is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you move this code to a function |
||
|
||
nAddrDigits=8; | ||
off_t maxAddr = biggestLoc; | ||
if (maxAddr > 0xFFFFFFFF) { | ||
maxAddr >>= 32; | ||
while (maxAddr) { | ||
nAddrDigits+=2; | ||
maxAddr >>= 8; | ||
} | ||
} | ||
} | ||
|
||
void readFile(void) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7
needs to be explained.Afaik it is
sizeof("%016lX")
with 16 being the maxnAddrDigits