Fixed a bug and made a few minor performance improvements.#152
Open
rosenrost wants to merge 4 commits intofreemint:masterfrom
Open
Fixed a bug and made a few minor performance improvements.#152rosenrost wants to merge 4 commits intofreemint:masterfrom
rosenrost wants to merge 4 commits intofreemint:masterfrom
Conversation
Error handling has been added; `errno` is set in case of an error. For example, `fclose(NULL)` now correctly returns `EOF` instead of `0`.
- `field_width` is now `register int` - Redundant `flag_found` removed and loop adjusted accordingly - `ISUPPER()` in the condition for `do_long = LONG_VAL` moved from the very end to the very beginning - `tolower(fmt)` replaced with `fmt | 0x20` at a point where only 'e' and 'g' are checked - Bugfix: String constant manipulation replaced - Use of `strlen()` replaced with manual counting
Contributor
|
Contributor
Author
No, definitely not. That's what From the man page: From what mintlib does: |
- Revert field_width being register int. - Revert replacing strlen() call by manual counting.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
delay.c/sleep.c:Subtraction removed from while condition.
fclose.c:Error handling has been added;
errnois set in case of an error. For example,fclose(NULL)now correctly returnsEOFinstead of0.doprnt.c:Bug fixed and performance improved:
field_widthis nowregister intflag_foundremoved and loop adjusted accordinglyISUPPER()in the condition fordo_long = LONG_VALmoved from the very end to the very beginningtolower(fmt)replaced withfmt | 0x20at a point where only 'e' and 'g' are checkedfmt == 'x'orfmt == 'X'):prefix = "x0";*(char*)prefix = fmt;...
fmt == 'x'):prefix = "x0";...
fmt == 'X'):prefix = "X0";...
strlen()replaced with manual counting