From owner-freebsd-libh Mon Oct 8 15:57:17 2001 Delivered-To: freebsd-libh@freebsd.org Received: from tomts14-srv.bellnexxia.net (tomts14.bellnexxia.net [209.226.175.35]) by hub.freebsd.org (Postfix) with ESMTP id 127D737B40A; Mon, 8 Oct 2001 15:57:03 -0700 (PDT) Received: from khan.anarcat.dyndns.org ([65.94.128.156]) by tomts14-srv.bellnexxia.net (InterMail vM.4.01.03.16 201-229-121-116-20010115) with ESMTP id <20011008225701.JBKI27994.tomts14-srv.bellnexxia.net@khan.anarcat.dyndns.org>; Mon, 8 Oct 2001 18:57:01 -0400 Received: from shall.anarcat.dyndns.org (shall.anarcat.dyndns.org [192.168.0.1]) by khan.anarcat.dyndns.org (Postfix) with ESMTP id 7B6881AD0; Mon, 8 Oct 2001 18:56:56 -0400 (EDT) Received: by shall.anarcat.dyndns.org (Postfix, from userid 1000) id 66AE420B36; Mon, 8 Oct 2001 18:57:38 -0400 (EDT) Date: Mon, 8 Oct 2001 18:57:38 -0400 From: The Anarcat To: Jordan Hubbard Cc: freebsd-libh@freebsd.org Subject: Re: basic label editor stub, take II Message-ID: <20011008185737.G83944@shall.anarcat.dyndns.org> Mail-Followup-To: The Anarcat , Jordan Hubbard , freebsd-libh@freebsd.org References: <20011008142300.B53336@shall.anarcat.dyndns.org> <20011008133800B.jkh@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gdTfX7fkYsEEjebm" Content-Disposition: inline In-Reply-To: <20011008133800B.jkh@freebsd.org> User-Agent: Mutt/1.3.22.1i Sender: owner-freebsd-libh@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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