9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: George Michaelson <ggm@apnic.net>
To: 9fans@cse.psu.edu
Subject: [9fans] the return of cat -v (NetBSD sources)
Date: Thu, 12 Feb 2004 11:06:04 +1000	[thread overview]
Message-ID: <20040212110604.478bfdca@garlic> (raw)

from a posting to a NetBSD list...

-George

----
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


             reply	other threads:[~2004-02-12  1:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-12  1:06 George Michaelson [this message]
2004-02-12  1:59 ` Geoff Collyer
2004-02-12  2:04   ` George Michaelson
2004-02-12  2:22     ` Bruce Ellis
2004-02-12  3:00     ` boyd, rounin
2004-02-12  2:58   ` boyd, rounin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040212110604.478bfdca@garlic \
    --to=ggm@apnic.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).