-
Notifications
You must be signed in to change notification settings - Fork 247
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
rework libeinfo #651
Closed
Closed
rework libeinfo #651
Commits on Sep 28, 2023
-
start new libeinfo color handling
Uses (n)curses/terminfo for "fancy" stuff. No env vars yet. These functions are not sent to syslog (yet): - ewarn - ewarnx - eerror - eerrorx The syslog id for elog(3) is currently hardcoded. Some intentional API/behavior differences: - ebracket(3) does the same negative column stuff as described in _move_col(). Pretty sick if you ask me. - the length of the "prefix|" string is counted as part of the total length returned by einfo(3) et al.
Configuration menu - View commit details
-
Copy full SHA for 74dd769 - Browse repository at this point
Copy the full SHA 74dd769View commit details -
Properly implement is_quiet(), is_really_quiet(), and is_verbose() by checking the truthyness of the EINFO_QUIET, EERROR_QUIET, EINFO_VERBOSE env vars, respectively. Use the EINFO_LOG env var to set the log id for syslog messages and send ewarn(3), ewarnx(3), eerror(3), and eerrorx(3) to syslog. Only happens if the env var is set tho. Behavior change for EINFO_INDENT: - integer overflow is treated as valid, but >INDENT_MAX (which it arguably is), and therefore chomped to INDENT_MAX API/behavior changes for EINFO_COLOR: - case insensitive on color names - more predictable error case (keep current on parse error) - use the last (valid) definition if multiple given for a single color
Configuration menu - View commit details
-
Copy full SHA for 6178bb8 - Browse repository at this point
Copy the full SHA 6178bb8View commit details -
check setupterm errors, add prepare_term()
Used to ensure that the terminal is actually good for curses use, and enables short circuiting functions that do curses stuff in case the terminal is not.
Configuration menu - View commit details
-
Copy full SHA for 185501d - Browse repository at this point
Copy the full SHA 185501dView commit details -
Replaced with an array and two calls to tput(s). No need for "proper string concatenation" if there is no string concatenation :P
Configuration menu - View commit details
-
Copy full SHA for b38926b - Browse repository at this point
Copy the full SHA b38926bView commit details -
curses/terminfo errors are "basically handled" through: - tiparm() returning NULL on error - tputs() returning an error if the string is NULL We don't actually do anything with the tputs() error since all functions that call it are void.
Configuration menu - View commit details
-
Copy full SHA for 6767815 - Browse repository at this point
Copy the full SHA 6767815View commit details -
The rewrite should be "complete" as far as matching features goes. Still gotta do some small TODO's. As well as non-curses.
Configuration menu - View commit details
-
Copy full SHA for 7a3abe8 - Browse repository at this point
Copy the full SHA 7a3abe8View commit details -
eend_status: sane-ish default message
Set the message in the brackets to "..." if the message is empty. Only possible with ebracket().
Configuration menu - View commit details
-
Copy full SHA for 631f5ce - Browse repository at this point
Copy the full SHA 631f5ceView commit details -
Configuration menu - View commit details
-
Copy full SHA for b581b49 - Browse repository at this point
Copy the full SHA b581b49View commit details -
Configuration menu - View commit details
-
Copy full SHA for cdb0722 - Browse repository at this point
Copy the full SHA cdb0722View commit details -
Configuration menu - View commit details
-
Copy full SHA for ca60832 - Browse repository at this point
Copy the full SHA ca60832View commit details
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.