Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 May 2000 00:42:48 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Joe Karthauser <joe@pavilion.net>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/chflags chflags.c [Heads up?]
Message-ID:  <Pine.BSF.4.21.0005090013120.370-100000@besplex.bde.org>
In-Reply-To: <20000505202851.A20115@pavilion.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 5 May 2000, Joe Karthauser wrote:

> I only received one reply to this so I'm guessing that no-one else minds.
> [I know that we've all been preoccupied with restructuring documents ;)]
> 
> It's been suggested the {g|s}etflagsbyname is a better set of
> function names, and I'm inclined to agree.  I'm going to commit
> this next week, unless there are serious objections in advance.

getflagsbyname() is a much worse name.  getflags() gets a string
representing the flags from the flags, i.e., it gets non-flags by number.

"flags" is too generic.  I would prefer names like fileflagstostr()
and strtofileflags(), but shorter.

If the names are changed, then the broken interfaces should be fixed:
1) getflags() returns the string in a static buffer.
2) The "def" arg for getflags() is too specialized for ls.  The caller
   can easily translate from "" to whatever it wants to print if no
   flags are set.  (ls prints "-" and mtree prints "none".)

Bruce



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0005090013120.370-100000>