strtonum() for /usr/games/caesar

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

strtonum() for /usr/games/caesar

Peter Williams-8
Hi Everyone,

I noticed that /usr/games/caesar uses atoi() in order to parse the rotation
argument. I thought that it would be better if this used strtonum(), so
I've submitted a diff that changes this. It also changes the rotation
bounds check in the printit() function, and brings it into the argument
parsing portion of the main() code.

I wasn't sure if this is a worthwhile change, but it seems to clean up the
code a bit!

Thanks for your time,
Peter

caesar.diff (650 bytes) Download Attachment