gotos in cat

"the duke" <[email protected]>
Newsgroups gmane.os.netbsd.devel.general
Message-ID <[email protected]>
Hi people,

I'm not sure this is the right list, but I have noticed that the code for /bin/cat includes several gotos which were inserted when the -f flag was implemented (starting from line 252 on version 1.43).
To me these gotos look like a quick patch (especially with names like "skip" :)) and seem like a good start for a spaghetti code... but I'm no expert.

My question is this: wouldn't it be more clean to implement these using a flag?
This way the danger of code additions which will make "skip" move too far and become obscure will disappear.

According to http://www.netbsd.org/Misc/features.html#clean-design, clean code is quite important fot NetBSD.

If there's some optimization or other issues here, let me know. 
If it's a matter of religious wars, well, I'll be happy to know too :)
And if it's a matter of finding  someone to make the change, again, let me know.

Thanks
    Ofer Waldman
-- 
__________________________________________________________
Sign-up for your own personalized E-mail at Mail.com
http://www.mail.com/?sr=signup

Search Smarter - get the new eXact Search Bar for free!
http://www.exactsearchbar.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.