Subject: gotos in cat
To: None <tech-misc@netbsd.org>
From: the duke <dukos@freedom.usa.com>
List: tech-misc
Date: 02/11/2004 14:25:56
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/