Date: Mon, 8 Oct 2001 18:57:38 -0400 From: The Anarcat <anarcat@anarcat.dyndns.org> To: Jordan Hubbard <jkh@freebsd.org> Cc: freebsd-libh@freebsd.org Subject: Re: basic label editor stub, take II Message-ID: <20011008185737.G83944@shall.anarcat.dyndns.org> In-Reply-To: <20011008133800B.jkh@freebsd.org> References: <20011008142300.B53336@shall.anarcat.dyndns.org> <20011008133800B.jkh@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--gdTfX7fkYsEEjebm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon Oct 08, 2001 at 01:38:00PM -0700, Jordan Hubbard wrote: > > Anyways, this interface is getting rather heavy. Isn't there a way to > > export tables such as sliceTypeNames[] from C/C++ to TCL? >=20 > 2. Register a sliceTypeNames procedure instead (also from C) which > takes an index as an argument and returns the relevent data. This > allows the sliceTypeNames variable to have more dynamic contents, > and it's comparatively easy to use [sliceTypeNames 1] from TCL > in lieu of sliceTypeNames(1). this seems more appropriate to me. The proc could be seen as a "dynamic converter" between the int and the char*. So instead of doing: set d [Disk "ad0"] d type_text you would do: type_text [d type] (right?) [same with the "subtype" field] This would cut down on the number of *_text* proc needed, and consequently cleanup the interface. This would also make type_text global (?) and it would therefore be available outside the object (no?). Please remember that I'm new to the mighty H and that I do not clearly understand the relations between the C and TCL api... Ring if I'm talking nonsense. :) A. --gdTfX7fkYsEEjebm Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjvCL2AACgkQttcWHAnWiGdnbgCfawDjZkOlH++oZ8I3AXvymaUa 9h0An26QpbAAiSoPl1Xg4gYWeWlCLZyH =TkXx -----END PGP SIGNATURE----- --gdTfX7fkYsEEjebm-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011008185737.G83944>