Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2000 23:38:09 +0200
From:      Adrian Chadd <adrian@freebsd.org>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        arch@freebsd.org
Subject:   Re: dynamic filetypes.  please comment.
Message-ID:  <20000626233809.A36017@zoe.bastard.co.uk>
In-Reply-To: <20000626143555.C275@fw.wintelcom.net>; from bright@wintelcom.net on Mon, Jun 26, 2000 at 02:35:55PM -0700
References:  <20000626142428.A275@fw.wintelcom.net> <20000626233203.Y36017@zoe.bastard.co.uk> <20000626143555.C275@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jun 26, 2000, Alfred Perlstein wrote:
> > > the api would look something like:
> > > 
> > >    (void)sequence_register("filetypes", starting_number);
> > >    mynum = sequence_next("filetypes"); /* to be used for f_type */
> > 
> > The debug gods might like:
> > 
> > mynum = sequence_next("filetypes", "DTYPE_FOO", "A foo-type file");
> 
> Yes, the only problem is that it requires storage for each number.
> 
> I think that the correct thing to do is provide both APIs, one
> requiring storage but providing nicer debugging capabilities along
> with number recycling and another with just a straight-up sequence
> which fails once a wrap needs to happen.

You could always just give the one API, and some options BLAH magic
to say whether to compile in the strings or not ..

"storage for each number" - how many filetypes are you going to
register? :-)


Adrian

-- 
Adrian Chadd			Build a man a fire, and he's warm for the
<adrian@FreeBSD.org>		rest of the evening. Set a man on fire and
				he's warm for the rest of his life.



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000626233809.A36017>