libsa: Add isprint()#1740
Conversation
|
Thank you for taking the time to contribute to FreeBSD! |
|
Things look good. I'm kinda on the fence about including the following: So the rest looks great. |
|
|
||
| static __inline int isprint(int c) | ||
| { | ||
| return ((c >= ' ') && (c <= '~')); |
There was a problem hiding this comment.
Minor nit. I know it's taught that it's a best practices to have the extra parens, all the other isfoo() functions don't use this style. It's a subtle part of our style guide that we try to match the existing style of the file. Now, it's a horrible mix of return foo; and return (foo);, but the latter is what style(9) proscribes, so that's another lesson too: when in doubt or it's ambiguous, favor style(9) when it offers an opinion on something.
There was a problem hiding this comment.
No, that makes complete sense---I knew this and got too focused on following style(9) general fundamentals that I forgot that tidbit. Thank you for reminding me, and now I know that for certain moving forward. Fixed.
libsa is missing isprint(). Adding it with the other isfoo() functions. Signed-off-by: Kayla Powell (AKA Kat) <kpowkitty@FreeBSD.org>
Signed-off-by: Kayla Powell (AKA Kat) <kpowkitty@FreeBSD.org>
|
Does this need an update to libsa.3 (the manual page?). If so, I can help! |
We do need it, but libsa.3 is also somewhat out of date and needs a lot of attention with someone that can read the code and see what's missing. It doesn't need to be with this commit, which I think is otherwise ready. Would you feel comfortable putting it into your list @concussious and looping me and @kpowkitty into the loop when you do? You can I can work on what's missing in libsa.4 as well, if you're wanting to really help a lot :). |
bsdimp
left a comment
There was a problem hiding this comment.
OK. I think this is ready to go. I'll land the change soon.
|
Automated message from ghpr: Thank you for your submission. This PR has been merged to FreeBSD's branch. These changes will appear shortly on our GitHub mirror. |
libsa is missing isprint(). Adding it with the other isfoo() functions. Remove a stray copy from fdt too. Signed-off-by: Kayla Powell (AKA Kat) <kpowkitty@FreeBSD.org> Reviewed by: imp Pull Request: #1740
Signed-off-by: Kayla Powell (AKA Kat) <kpowkitty@FreeBSD.org> Reviewed by: imp Pull Request: #1740
Add
isprint()alongside otherisfoo()functions inlibsa.Motivations for change:
ACPICAwork in loader needs it.libsa/hexdump.calready uses it.Signed-off-by: Kayla Powell (AKA Kat) kpowkitty@FreeBSD.org