Angelo you could add a preliminary patch to put the last "\n" in "power
off the phone\n\n" on a line by its own, and then add the message about
"help|--help" without the need to change the "power off the phone\n"
line. Commits are cheap, in a good way.

This is really nitpicking, but it is an example of how to split
generalization/refactoring changes from new stuff.

Ok. I'll do it, thanks by the tip.

avoid hparam, join the two new conditions like in:
  (!strcmp(argv[1], "help") || !strcmp(argv[1], "--help"))
and do this check after the "argc<  2" block, this way you KNOW
that argc is>= 2 already: follow the code. Diff attached.

In new code I would prefer strncmp() return value to be checked
explicitly (== 0 instead of !) because the NOT syntax does not match
the intuitive semantics here, and that really hurts my simple brain, but
this is another thing to keep in mind: when you add code to a project
you need to use the style already in use, you need to "blend in" in
order to keep the style consistent.

These little changes are a good didactic excuse, forgive the
verbosity :)
Thanks.
I thought about maintaining the original code style with the patch's style, and i tried hard to do it.
 Unfortunately as you can see i did not think the condition that
 if the program gets in the comparison of 'help|--help'
 it obviously would have >= of two parameters.
Regards,
    Antonio

I'll do the changes as soon as possible again and re-send the patch.
 Thanks by replying.

Regards,
    Angelo

Reply via email to