-
Notifications
You must be signed in to change notification settings - Fork 7
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
Watch implementation changes #35
Conversation
I am having some trouble with my box for now, but I will test it as soon as possible. |
…d sock" project. I know that it may not look as hip as it looked before, but at least it's more conformant with the decades-old code style that this project made question of perpetuate, it's also more simple for someone studying this code.
…d sock" project. I know that it may not look as hip as it looked before, but at least it's more conformant with the decades-old code style that this project made question of perpetuate, it's also more simple for someone studying this code. Also explained the code a little bit more than the necessary.
@arthurbacci It seems to work fairly well. |
"This is an old sock project"; |
Needs testing |
"Testing Heirloom" for me usually means using it everyday, but I think we could fix some annotations I've made before. |
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.
Already reviewed the code, made some annotations at:
https://github.com/Projeto-Pindorama/heirloom-ng/blob/watch-implementation-changes/watch/watch.c#L164-L170
https://github.com/Projeto-Pindorama/heirloom-ng/blob/watch-implementation-changes/watch/watch.c#L186-L193
I think we could also rework perror()
, since it doesn't work properly and just prints "ERROR:" without anything else about the error itself. Maybe it's errno fault?
But this would fall into libcommon
, where it is defined, not here.
We could also fix the comments and make it C99, so it will compile on pretty much anything (like Heirloom NG was meant to).
About systems that were not POSIX.1b (IEEE Std 1003.1b-1993) yet --- for some reason, such as being old and we're still needing to support it ---, an #ifdef
that limits watch
to use a integer number as time for the vulgar sleep()
function shall be enough --- anyway, I think everyone here already supports the POSIX standard from 1993, eh? Well, so nevermind, just an observation.
I believe |
The code was previously using |
|
When not consideration a faulty impl., I don't really know if runtime issues can cause |
After implementing it, pls. request a review from me. |
Yes, we've implemented back in 2022 if I'm not erred.
It's weird the fact that it just prints "ERROR:" anyway, isn't this our fault?
Couldn't this be achieved by using some specific option at
Well, I think we already do this sort of check back in
I will correct this later at the comment. Thanks.
Just change |
Was there any old function from heirloom with that name or you decided to create it?
ERRATA:
I was thinking about it but couldn't recall any.
The problem isn't checking the input itself, but making sure
Feel free to do so. |
…and "status bar" naming.
… comment syntax --- although it's possible to use it since C99.
How can I request a review? Damn. |
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.
Seems fine
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.
o k .
Still, the code doesn't comform with C90.
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.
Doesn't seem very fine. Some changes would be good
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.
Why?
I know this is not so urgent for now, but what is missing in this code to it conform with C90? |
Several things |
… not setting the entire struct as 0 since it implementation can change between UNIX-compatible systems without a lot of interference from POSIX.
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.
Seems right
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.
Seems right
I believe it's ready for merging |
…nsidering it an "incomplete type".
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.
Seems right
I will just look for memory leaks before merging. |
Although Valgrind reports memory leaks at We can conclude that it's good to merge and working flawlessly well. |
DON'T MERGE NOW!
Please review the code and test it. More commits will most likely be needed before the merge since I didn't test anything.