From owner-freebsd-libh Sun Apr 14 16: 4:46 2002 Delivered-To: freebsd-libh@freebsd.org Received: from tomts7-srv.bellnexxia.net (tomts7.bellnexxia.net [209.226.175.40]) by hub.freebsd.org (Postfix) with ESMTP id AEEAF37B400 for ; Sun, 14 Apr 2002 16:04:41 -0700 (PDT) Received: from khan.anarcat.dyndns.org ([65.94.186.97]) by tomts7-srv.bellnexxia.net (InterMail vM.4.01.03.23 201-229-121-123-20010418) with ESMTP id <20020414230441.VMJN17364.tomts7-srv.bellnexxia.net@khan.anarcat.dyndns.org> for ; Sun, 14 Apr 2002 19:04:41 -0400 Received: from lenny.anarcat.dyndns.org (lenny.anarcat.dyndns.org [192.168.0.4]) by khan.anarcat.dyndns.org (Postfix) with SMTP id 858DC191F for ; Sun, 14 Apr 2002 19:04:38 -0400 (EDT) Received: by lenny.anarcat.dyndns.org (sSMTP sendmail emulation); Sun, 14 Apr 2002 19:03:34 -0400 Date: Sun, 14 Apr 2002 19:03:34 -0400 From: The Anarcat To: libh@FreeBSD.org Subject: Re: cvs commit: libh/bin/tclh Makefile Message-ID: <20020414230334.GD313@lenny.anarcat.dyndns.org> References: <200204140102.g3E12b216485@usw4.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="FFoLq8A0u+X9iRU8" Content-Disposition: inline In-Reply-To: <200204140102.g3E12b216485@usw4.freebsd.org> User-Agent: Mutt/1.3.27i 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 --FFoLq8A0u+X9iRU8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I just noticed that accidentally committed local changes that were not really tested in the 1.20 commit. Instead of just making this makefile use the $S variable, the commit also modified the way this makefile handles dependencies. It doesn't break anything since the case it handles (.CURDIR =3D=3D =2EOBJDIR, ie no compile/ dir) was already broken. I'll surgically hack the ,v to include a proper commit log. A. --=20 =46rom the age of uniformity, from the age of solitude, from the age of Big Brother, from the age of doublethink - greetings! --FFoLq8A0u+X9iRU8 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 iEYEARECAAYFAjy6CsUACgkQttcWHAnWiGc1nQCfcAFGDUSHW86nH8LDw4gNMkNr KUUAoJE0YpNvfbcGiqw0HVBcutfTdaJT =l4T1 -----END PGP SIGNATURE----- --FFoLq8A0u+X9iRU8-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 16:33:51 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 0153537B400 for ; Sun, 14 Apr 2002 16:33:49 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3ENXnH18074 for libh@FreeBSD.org; Sun, 14 Apr 2002 18:33:49 -0500 (CDT) (envelope-from antoine) Message-Id: <200204142333.g3ENXnH18074@usw4.freebsd.org> From: Antoine Beaupré Date: Sun, 14 Apr 2002 18:33:48 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh BUGS 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 antoine 2002/04/14 18:33:48 CDT Modified files: . BUGS Log: add bug about regular exit screwing up terminal Revision Changes Path 1.14 +5 -1 libh/BUGS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 16:51: 9 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 47F0837B404 for ; Sun, 14 Apr 2002 16:51:07 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3ENp6K18124 for libh@FreeBSD.org; Sun, 14 Apr 2002 18:51:06 -0500 (CDT) (envelope-from antoine) Message-Id: <200204142351.g3ENp6K18124@usw4.freebsd.org> From: Antoine Beaupré Date: Sun, 14 Apr 2002 18:51:06 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/init run.c 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 antoine 2002/04/14 18:51:06 CDT Modified files: release/init run.c Log: silence warnings about undefined printf and strerror by including correct headers Revision Changes Path 1.2 +2 -0 libh/release/init/run.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 17: 0:32 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id A7E3637B400 for ; Sun, 14 Apr 2002 17:00:30 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3F00Us18177 for libh@FreeBSD.org; Sun, 14 Apr 2002 19:00:30 -0500 (CDT) (envelope-from antoine) Message-Id: <200204150000.g3F00Us18177@usw4.freebsd.org> From: Antoine Beaupré Date: Sun, 14 Apr 2002 19:00:30 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/init run.h system.h main.c run.c system.c 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 antoine 2002/04/14 19:00:30 CDT Modified files: release/init main.c run.c system.c Added files: release/init run.h system.h Log: create header files for functions used outside their source files and use them Revision Changes Path 1.2 +3 -0 libh/release/init/main.c 1.3 +2 -0 libh/release/init/run.c 1.2 +3 -1 libh/release/init/system.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 17: 8:41 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 2F19437B41B for ; Sun, 14 Apr 2002 17:08:40 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3F08dL18217 for libh@FreeBSD.org; Sun, 14 Apr 2002 19:08:39 -0500 (CDT) (envelope-from antoine) Message-Id: <200204150008.g3F08dL18217@usw4.freebsd.org> From: Antoine Beaupré Date: Sun, 14 Apr 2002 19:08:39 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/init termcap.h system.c termcap.c 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 antoine 2002/04/14 19:08:39 CDT Modified files: release/init system.c termcap.c Added files: release/init termcap.h Log: create header files for functions used outside their source files and use them Revision Changes Path 1.3 +4 -1 libh/release/init/system.c 1.2 +3 -0 libh/release/init/termcap.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 17:10:31 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 609E437B400 for ; Sun, 14 Apr 2002 17:10:30 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3F0ATH18251 for libh@FreeBSD.org; Sun, 14 Apr 2002 19:10:29 -0500 (CDT) (envelope-from antoine) Message-Id: <200204150010.g3F0ATH18251@usw4.freebsd.org> From: Antoine Beaupré Date: Sun, 14 Apr 2002 19:10:29 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/init system.c termcap.c 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 antoine 2002/04/14 19:10:29 CDT Modified files: release/init system.c termcap.c Log: remove unused variables to silence warnings Revision Changes Path 1.4 +2 -5 libh/release/init/system.c 1.3 +0 -2 libh/release/init/termcap.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 17:20:22 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 6383E37B41F for ; Sun, 14 Apr 2002 17:20:19 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3F0KIf18293 for libh@FreeBSD.org; Sun, 14 Apr 2002 19:20:18 -0500 (CDT) (envelope-from antoine) Message-Id: <200204150020.g3F0KIf18293@usw4.freebsd.org> From: Antoine Beaupré Date: Sun, 14 Apr 2002 19:20:18 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/floppies Makefile 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 antoine 2002/04/14 19:20:18 CDT Modified files: release/floppies Makefile Log: diskeditor now resides in scripts/ Revision Changes Path 1.15 +2 -3 libh/release/floppies/Makefile To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 17:21:10 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id A5A4F37B405 for ; Sun, 14 Apr 2002 17:21:08 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3F0L8n18326 for libh@FreeBSD.org; Sun, 14 Apr 2002 19:21:08 -0500 (CDT) (envelope-from antoine) Message-Id: <200204150021.g3F0L8n18326@usw4.freebsd.org> From: Antoine Beaupré Date: Sun, 14 Apr 2002 19:21:08 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/scripts/pkgtools pkg_delete.tcl makepackage.sh pkg_info.tcl 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 antoine 2002/04/14 19:21:08 CDT Modified files: release/scripts/pkgtools makepackage.sh pkg_info.tcl Added files: release/scripts/pkgtools pkg_delete.tcl Log: add simple command to pkg_delete Revision Changes Path 1.4 +2 -2 libh/release/scripts/pkgtools/makepackage.sh 1.2 +23 -16 libh/release/scripts/pkgtools/pkg_info.tcl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 17:23:18 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id A9F6837B400 for ; Sun, 14 Apr 2002 17:23:15 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3F0NFH18357 for libh@FreeBSD.org; Sun, 14 Apr 2002 19:23:15 -0500 (CDT) (envelope-from antoine) Message-Id: <200204150023.g3F0NFH18357@usw4.freebsd.org> From: Antoine Beaupré Date: Sun, 14 Apr 2002 19:23:15 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/floppies README 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 antoine 2002/04/14 19:23:15 CDT Modified files: release/floppies README Log: note that the mfsroot system needs devfs support right now Revision Changes Path 1.2 +3 -2 libh/release/floppies/README To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 17:24:12 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 4D0FC37B400 for ; Sun, 14 Apr 2002 17:24:11 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3F0OAo18388 for libh@FreeBSD.org; Sun, 14 Apr 2002 19:24:10 -0500 (CDT) (envelope-from antoine) Message-Id: <200204150024.g3F0OAo18388@usw4.freebsd.org> From: Antoine Beaupré Date: Sun, 14 Apr 2002 19:24:10 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/init system.c 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 antoine 2002/04/14 19:24:10 CDT Modified files: release/init system.c Log: garbage collect unused interrupt handler Revision Changes Path 1.5 +1 -10 libh/release/init/system.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 17:30:14 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 8E0ED37B405 for ; Sun, 14 Apr 2002 17:30:12 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3F0UCO18436 for libh@FreeBSD.org; Sun, 14 Apr 2002 19:30:12 -0500 (CDT) (envelope-from antoine) Message-Id: <200204150030.g3F0UCO18436@usw4.freebsd.org> From: Antoine Beaupré Date: Sun, 14 Apr 2002 19:30:11 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/scripts/pkgtools pkg_info.tcl 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 antoine 2002/04/14 19:30:11 CDT Modified files: release/scripts/pkgtools pkg_info.tcl Log: backout last accidental commit Revision Changes Path 1.3 +16 -23 libh/release/scripts/pkgtools/pkg_info.tcl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 17:37: 5 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 9800B37B400 for ; Sun, 14 Apr 2002 17:37:03 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3F0b3518480 for libh@FreeBSD.org; Sun, 14 Apr 2002 19:37:03 -0500 (CDT) (envelope-from antoine) Message-Id: <200204150037.g3F0b3518480@usw4.freebsd.org> From: Antoine Beaupré Date: Sun, 14 Apr 2002 19:37:02 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/scripts/pkgtools makepackage.sh 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 antoine 2002/04/14 19:37:02 CDT Modified files: release/scripts/pkgtools makepackage.sh Log: partially back out last accidental commit: revert to /opt prefix, but keep the -v switch on tar Revision Changes Path 1.5 +1 -1 libh/release/scripts/pkgtools/makepackage.sh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 17:48:12 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 774E937B42A for ; Sun, 14 Apr 2002 17:47:58 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3F0lvd18518 for libh@FreeBSD.org; Sun, 14 Apr 2002 19:47:57 -0500 (CDT) (envelope-from antoine) Message-Id: <200204150047.g3F0lvd18518@usw4.freebsd.org> From: Antoine Beaupré Date: Sun, 14 Apr 2002 19:47:57 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/floppies README 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 antoine 2002/04/14 19:47:57 CDT Modified files: release/floppies README Log: add better description of the install tools Revision Changes Path 1.3 +9 -1 libh/release/floppies/README To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 17:50:56 2002 Delivered-To: freebsd-libh@freebsd.org Received: from tomts19-srv.bellnexxia.net (tomts19.bellnexxia.net [209.226.175.73]) by hub.freebsd.org (Postfix) with ESMTP id CE49F37B400 for ; Sun, 14 Apr 2002 17:50:53 -0700 (PDT) Received: from khan.anarcat.dyndns.org ([65.94.186.97]) by tomts19-srv.bellnexxia.net (InterMail vM.4.01.03.23 201-229-121-123-20010418) with ESMTP id <20020415005053.XAHL22306.tomts19-srv.bellnexxia.net@khan.anarcat.dyndns.org> for ; Sun, 14 Apr 2002 20:50:53 -0400 Received: from lenny.anarcat.dyndns.org (lenny.anarcat.dyndns.org [192.168.0.4]) by khan.anarcat.dyndns.org (Postfix) with SMTP id E36E5191E for ; Sun, 14 Apr 2002 20:50:49 -0400 (EDT) Received: by lenny.anarcat.dyndns.org (sSMTP sendmail emulation); Sun, 14 Apr 2002 20:49:45 -0400 Date: Sun, 14 Apr 2002 20:49:45 -0400 From: The Anarcat To: libh@FreeBSD.org Subject: Re: cvs commit: libh/release/floppies README Message-ID: <20020415004945.GE313@lenny.anarcat.dyndns.org> References: <200204150047.g3F0lvd18518@usw4.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0QFb0wBpEddLcDHQ" Content-Disposition: inline In-Reply-To: <200204150047.g3F0lvd18518@usw4.freebsd.org> User-Agent: Mutt/1.3.27i 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 --0QFb0wBpEddLcDHQ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun Apr 14, 2002 at 07:47:57PM -0500, Antoine Beaupr=E9 wrote: > antoine 2002/04/14 19:47:57 CDT >=20 > Modified files: > release/floppies README=20 > Log: > add better description of the install tools > =20 > Revision Changes Path > 1.3 +9 -1 libh/release/floppies/README For the adventurous, there is a mfsroot image available for peeking at http://anarcat.ath.cx/mfsroot.flp that is bootable with a 5.x kernel floppy. See this README file for more information. I'll just note here that the mfsroot scripts don't do much and panic the system as they don't know how to halt() yet. ;) A. --=20 The idea that Bill Gates has appeared like a knight in shining armour to lead all customers out of a mire of technological chaos neatly ignores the fact that it was he who, by peddling second-rate technology, led them into it in the first place. - Douglas Adams (1952-2001) --0QFb0wBpEddLcDHQ 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 iEYEARECAAYFAjy6I6gACgkQttcWHAnWiGe2nACbBz0VEmNoZLMKNNcLWRMUpYHt XVMAn2j/6vd6WfszsjcmnHr0YJQXLDVh =aTl+ -----END PGP SIGNATURE----- --0QFb0wBpEddLcDHQ-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sun Apr 14 17:53:39 2002 Delivered-To: freebsd-libh@freebsd.org Received: from tomts10-srv.bellnexxia.net (tomts10.bellnexxia.net [209.226.175.54]) by hub.freebsd.org (Postfix) with ESMTP id A2BB737B404 for ; Sun, 14 Apr 2002 17:53:36 -0700 (PDT) Received: from khan.anarcat.dyndns.org ([65.94.186.97]) by tomts10-srv.bellnexxia.net (InterMail vM.4.01.03.23 201-229-121-123-20010418) with ESMTP id <20020415005335.WRHP28636.tomts10-srv.bellnexxia.net@khan.anarcat.dyndns.org>; Sun, 14 Apr 2002 20:53:35 -0400 Received: from lenny.anarcat.dyndns.org (lenny.anarcat.dyndns.org [192.168.0.4]) by khan.anarcat.dyndns.org (Postfix) with SMTP id E799D191E; Sun, 14 Apr 2002 20:53:32 -0400 (EDT) Received: by lenny.anarcat.dyndns.org (sSMTP sendmail emulation); Sun, 14 Apr 2002 20:52:28 -0400 Date: Sun, 14 Apr 2002 20:52:28 -0400 From: The Anarcat To: Max Okumoto Cc: freebsd-libh@FreeBSD.ORG Subject: Re: cleanup of HSystem (stage 1) Message-ID: <20020415005228.GF313@lenny.anarcat.dyndns.org> Mail-Followup-To: The Anarcat , Max Okumoto , freebsd-libh@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3oCie2+XPXTnK5a5" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i 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 --3oCie2+XPXTnK5a5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable please separate (sp?) comments and whitespace commits from others. also note that this patch doesn't apply cleanly anymore since I almost finished the double header guards cleanup pass. A. On Fri Apr 12, 2002 at 03:35:10AM -0700, Max Okumoto wrote: > [snip] --=20 Pemature optimization is the root of all evil - Donald Knuth --3oCie2+XPXTnK5a5 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 iEYEARECAAYFAjy6JEwACgkQttcWHAnWiGfnQgCgiN67LF/PtYIjcKqZH3ks3Bzh FbAAoKRhlRVdL6WKC/1WIbYyGZ9h6C5d =Xk+k -----END PGP SIGNATURE----- --3oCie2+XPXTnK5a5-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 0:10:27 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id 1FD5537B400 for ; Mon, 15 Apr 2002 00:10:06 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/36) with ESMTP id g3F7A1729302; Mon, 15 Apr 2002 00:10:02 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3F7A1w26845; Mon, 15 Apr 2002 00:10:01 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: cleanup of HSystem 2nd try (stage 1) From: Max Okumoto Date: 15 Apr 2002 00:10:01 -0700 Message-ID: Lines: 356 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 Ok only one type of change at at time. :-) * (include/HSystem.hh, lib/tcl/tcl_interface_gen.cc) Created types and use them to make code more readable. Index: include/HSystem.hh =================================================================== RCS file: /home/libh/cvs/libh/include/HSystem.hh,v retrieving revision 1.5 diff -u -r1.5 HSystem.hh --- include/HSystem.hh 2002/04/11 23:35:52 1.5 +++ include/HSystem.hh 2002/04/15 03:58:12 @@ -50,8 +50,15 @@ class HSystem { + /* + * Types used to simplify code. + */ + typedef LanguageInterface::Object::ClassDescription ClassDesc; + typedef LanguageInterface::Object::MethodDescription MethodDesc; + typedef LanguageInterface::Object::CallbackDescription CallBackDesc; + public: - typedef list Descriptions; + typedef list Descriptions; typedef set Includes; typedef list CommandAccessToRegister; typedef list > StaticMethods; @@ -61,7 +68,7 @@ HSystem( const HSystem& aHSystem ) : name( aHSystem.name ) {} - void add_class( const LanguageInterface::Object::ClassDescription* class_desc, const string& include_file ) + void add_class(const ClassDesc *class_desc, const string& include_file) { descriptions.push_back( class_desc ); includes.insert( include_file ); @@ -82,12 +89,12 @@ bool operator == ( const HSystem& toCompare ) const { return name == toCompare.name; } private: - void gen_class_header( ostream& out, const LanguageInterface::Object::ClassDescription* aClassDescription ); - void gen_callback_interfaces( ostream& out, const LanguageInterface::Object::ClassDescription* aClassDescription ); - void gen_dynamic_methods_interfaces( ostream& out, const LanguageInterface::Object::ClassDescription* aClassDescription ); - void gen_static_method_interfaces( ostream& out, const LanguageInterface::Object::ClassDescription* aClassDescription ); - string gen_result_to_obj( LanguageInterface::Object::MethodDescription::Value t ); - string gen_method_argument( LanguageInterface::Object::MethodDescription::Value t, int argno, int method_argno, bool last_arg_in_set_method ); + void gen_class_header(ostream& out, const ClassDesc *cd); + void gen_callback_interfaces(ostream& out, const ClassDesc *cd); + void gen_dynamic_methods_interfaces(ostream& out, const ClassDesc *cd); + void gen_static_method_interfaces(ostream& out, const ClassDesc *cd); + string gen_result_to_obj(MethodDesc::Value t ); + string gen_method_argument(MethodDesc::Value t, int argno, int method_argno, bool last_arg_in_set_method ); }; // class HSystem Index: lib/tcl/tcl_interface_gen.cc =================================================================== RCS file: /home/libh/cvs/libh/lib/tcl/tcl_interface_gen.cc,v retrieving revision 1.8 diff -u -r1.8 tcl_interface_gen.cc --- lib/tcl/tcl_interface_gen.cc 2002/04/13 23:10:53 1.8 +++ lib/tcl/tcl_interface_gen.cc 2002/04/15 03:58:14 @@ -105,11 +105,11 @@ } /* HSystem::gen_header */ -void HSystem::gen_class_header( ostream& out, const LanguageInterface::Object::ClassDescription* aClassDescription ) +void HSystem::gen_class_header( ostream& out, const ClassDesc *aClassDescription ) { out << "class " << replace_chars( aClassDescription->name, ':', '_' ) << "Access : "; if ( aClassDescription->parents[0] ) { - for ( const LanguageInterface::Object::ClassDescription* const* pd = aClassDescription->parents; *pd; ++pd ) { + for ( const ClassDesc *const* pd = aClassDescription->parents; *pd; ++pd ) { if ( pd != aClassDescription->parents ) out << ", "; out << "public " << replace_chars( (*pd)->name, ':', '_' ) << "Access"; @@ -124,14 +124,14 @@ } /* HSystem::gen_class_header */ -void HSystem::gen_callback_interfaces( ostream& out, const LanguageInterface::Object::ClassDescription* aClassDescription ) +void HSystem::gen_callback_interfaces( ostream& out, const ClassDesc *aClassDescription ) { if ( aClassDescription->has_callbacks() ) { out << " virtual void activate_callback( Tcl_Interp* interp, Tcl_Obj* aCommand, Tcl_Obj* aUserData, Tcl_Obj* aArg, LanguageInterface::SpecificCallbackData& aSpecificCallbackData )\n" << " {\n" << " /* cerr << \"" << aClassDescription->name << " activate_callback\" << endl; */\n" << " "; - for ( const LanguageInterface::Object::CallbackDescription* cd = aClassDescription->callbacks; cd->type; ++cd ) { + for ( const CallBackDesc *cd = aClassDescription->callbacks; cd->type; ++cd ) { out << "if ( dynamic_cast<" << cd->type << "*>( &aSpecificCallbackData ) != 0 ) {\n" << " " << cd->type << "& scd = dynamic_cast<" << cd->type << "&>( aSpecificCallbackData );\n" << " Tcl_Obj* toEval = Tcl_NewObj();\n" @@ -165,7 +165,7 @@ } /* HSystem::gen_callback_interfaces */ -void HSystem::gen_dynamic_methods_interfaces( ostream& out, const LanguageInterface::Object::ClassDescription* aClassDescription ) +void HSystem::gen_dynamic_methods_interfaces( ostream& out, const ClassDesc *aClassDescription ) { out << " static int methodCommand( ClientData obj, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[] )\n" << " {\n" @@ -194,7 +194,7 @@ << " }\n" << " else "; - for ( const LanguageInterface::Object::MethodDescription* method = aClassDescription->methods; method->name; ++method ) { + for ( const MethodDesc* method = aClassDescription->methods; method->name; ++method ) { if ( method->dynamic() ) { cout << '\t' << method->name << endl; out << "if ( !strcmp( method, \"" << method->name << "\" ) ) {\n"; @@ -211,14 +211,14 @@ for ( int argno = 0; argno < max_args; ++argno ) { if ( !method->getOrSet() || argno != max_args - 1 ) { out << prefix << LanguageInterface::method_argument_type( method->args[argno], false ) << " a" << to_string( argno ); - if ( method->args[argno] == LanguageInterface::Object::MethodDescription::vtList || method->args[argno] == LanguageInterface::Object::MethodDescription::vtListRef || method->args[argno] == LanguageInterface::Object::MethodDescription::vtListPtr ) + if ( method->args[argno] == MethodDesc::vtList || method->args[argno] == MethodDesc::vtListRef || method->args[argno] == MethodDesc::vtListPtr ) out << ";\n" << prefix << gen_method_argument( method->args[argno], argno + 3, argno + 1, false ) << ";\n"; else out << " = " << gen_method_argument( method->args[argno], argno + 3, argno + 1, false ) << ";\n"; } } - const bool result_present = method->result != LanguageInterface::Object::MethodDescription::vtVoid; + const bool result_present = method->result != MethodDesc::vtVoid; if ( method->getOrSet() ) { if ( method->setReturnsOld() ) { out << prefix << "const " << LanguageInterface::method_result_type( method->result, false ) << " result_object = object_t->" << method->name_to_call << "( "; @@ -231,7 +231,7 @@ out << prefix << "if ( objc - 3 == " << max_args << " ) { /* set requested */\n"; out << prefix << " " << LanguageInterface::method_argument_type( method->args[max_args - 1], false ) << " a" << to_string( max_args - 1 ); - if ( method->args[max_args - 1] == LanguageInterface::Object::MethodDescription::vtList || method->args[max_args - 1] == LanguageInterface::Object::MethodDescription::vtListRef || method->args[max_args - 1] == LanguageInterface::Object::MethodDescription::vtListPtr ) + if ( method->args[max_args - 1] == MethodDesc::vtList || method->args[max_args - 1] == MethodDesc::vtListRef || method->args[max_args - 1] == MethodDesc::vtListPtr ) out << ";\n" << prefix << " " << gen_method_argument( method->args[max_args - 1], max_args + 2, max_args, true ) << ";\n"; else out << " = " << gen_method_argument( method->args[max_args - 1], max_args + 2, max_args, true ) << ";\n"; @@ -247,7 +247,7 @@ else if ( method->setReturnsNew() ) { out << prefix << "if ( objc - 3 == " << max_args << " ) { /* set requested */\n"; out << prefix << " " << LanguageInterface::method_argument_type( method->args[max_args - 1], false ) << " a" << to_string( max_args - 1 ); - if ( method->args[max_args - 1] == LanguageInterface::Object::MethodDescription::vtList || method->args[max_args - 1] == LanguageInterface::Object::MethodDescription::vtListRef || method->args[max_args - 1] == LanguageInterface::Object::MethodDescription::vtListPtr ) + if ( method->args[max_args - 1] == MethodDesc::vtList || method->args[max_args - 1] == MethodDesc::vtListRef || method->args[max_args - 1] == MethodDesc::vtListPtr ) out << ";\n" << prefix << " " << gen_method_argument( method->args[max_args - 1], max_args + 2, max_args, true ) << ";\n"; else out << " = " << gen_method_argument( method->args[max_args - 1], max_args + 2, max_args, true ) << ";\n"; @@ -270,7 +270,7 @@ else { out << prefix << "if ( objc - 3 == " << max_args << " ) { /* set requested */\n"; out << prefix << " " << LanguageInterface::method_argument_type( method->args[max_args - 1], false ) << " a" << to_string( max_args - 1 ); - if ( method->args[max_args - 1] == LanguageInterface::Object::MethodDescription::vtList || method->args[max_args - 1] == LanguageInterface::Object::MethodDescription::vtListRef || method->args[max_args - 1] == LanguageInterface::Object::MethodDescription::vtListPtr ) + if ( method->args[max_args - 1] == MethodDesc::vtList || method->args[max_args - 1] == MethodDesc::vtListRef || method->args[max_args - 1] == MethodDesc::vtListPtr ) out << ";\n" << prefix << " " << gen_method_argument( method->args[max_args - 1], max_args + 2, max_args, true ) << ";\n"; else out << " = " << gen_method_argument( method->args[max_args - 1], max_args + 2, max_args, true ) << ";\n"; @@ -322,7 +322,7 @@ if ( aClassDescription->parents[0] ) { out << "if ( "; - for ( const LanguageInterface::Object::ClassDescription* const* pd = aClassDescription->parents; *pd; ++pd ) { + for ( const ClassDesc *const* pd = aClassDescription->parents; *pd; ++pd ) { if ( pd != aClassDescription->parents ) out << " && "; out << replace_chars( (*pd)->name, ':', '_' ) << "Access::methodCommand_object( object, method, master_interpreter, interp, objc, objv ) == TCL_ERROR"; @@ -342,11 +342,11 @@ } /* HSystem::gen_dynamic_methods_interfaces */ -void HSystem::gen_static_method_interfaces( ostream& out, const LanguageInterface::Object::ClassDescription* aClassDescription ) +void HSystem::gen_static_method_interfaces( ostream& out, const ClassDesc *aClassDescription ) { if ( aClassDescription->staticMethods() > 0 ) { out << " public:\n"; - for ( const LanguageInterface::Object::MethodDescription* method = aClassDescription->methods; method->name; ++method ) { + for ( const MethodDesc* method = aClassDescription->methods; method->name; ++method ) { if ( !method->dynamic() ) { cout << '\t' << method->name << endl; @@ -364,20 +364,20 @@ int min_args, max_args; method->numberOfArgs( min_args, max_args ); - const int max_args_in_call = method->args[max_args-1] == LanguageInterface::Object::MethodDescription::vtLanguageInterface ? max_args - 1 : max_args; + const int max_args_in_call = method->args[max_args-1] == MethodDesc::vtLanguageInterface ? max_args - 1 : max_args; out << " if ( objc - 2 < " << min_args << " || objc - 2 > " << max_args_in_call << " ) \n" << " return error( interp, \"Wrong number of arguments: \", \"" << aClassDescription->name << "::" << method->name << "\", \" (was \", to_string( objc - 2 ).c_str(), \", expected " << ( min_args < max_args_in_call ? to_string( min_args ) + " to " + to_string( max_args_in_call ) : to_string( max_args_in_call ) ) << ")\", 0 );\n"; out << " const char* method = \"" << method->name << "\";\n"; string prefix = " "; for ( int argno = 0; argno < max_args; ++argno ) { out << prefix << LanguageInterface::method_argument_type( method->args[argno], false ) << " a" << to_string( argno ); - if ( method->args[argno] == LanguageInterface::Object::MethodDescription::vtList || method->args[argno] == LanguageInterface::Object::MethodDescription::vtListRef || method->args[argno] == LanguageInterface::Object::MethodDescription::vtListPtr ) + if ( method->args[argno] == MethodDesc::vtList || method->args[argno] == MethodDesc::vtListRef || method->args[argno] == MethodDesc::vtListPtr ) out << ";\n" << prefix << gen_method_argument( method->args[argno], argno + 2, argno + 1, false ) << ";\n"; else out << " = " << gen_method_argument( method->args[argno], argno + 2, argno + 1, false ) << ";\n"; } out << prefix; - if ( method->result != LanguageInterface::Object::MethodDescription::vtVoid ) + if ( method->result != MethodDesc::vtVoid ) out << LanguageInterface::method_result_type( method->result, false ) << " result_object = "; out << aClassDescription->cxx_name << "::" << method->name_to_call << "( "; for ( int argno = 0; argno < max_args; ++argno ) { @@ -386,7 +386,7 @@ out << ", "; } out << " );\n"; - if ( method->result != LanguageInterface::Object::MethodDescription::vtVoid ) { + if ( method->result != MethodDesc::vtVoid ) { out << " Tcl_SetObjResult( interp, " << gen_result_to_obj( method->result ) << " );\n"; } else { @@ -458,35 +458,35 @@ } /* HSystem::gen_footer */ -string HSystem::gen_result_to_obj( LanguageInterface::Object::MethodDescription::Value t ) +string HSystem::gen_result_to_obj( MethodDesc::Value t ) { - switch ( (LanguageInterface::Object::MethodDescription::ValueType)t ) { - case LanguageInterface::Object::MethodDescription::vtVoid: + switch ( (MethodDesc::ValueType)t ) { + case MethodDesc::vtVoid: return("Tcl_NewObj()"); - case LanguageInterface::Object::MethodDescription::vtChar: - case LanguageInterface::Object::MethodDescription::vtUChar: - case LanguageInterface::Object::MethodDescription::vtShort: - case LanguageInterface::Object::MethodDescription::vtUShort: - case LanguageInterface::Object::MethodDescription::vtInt: - case LanguageInterface::Object::MethodDescription::vtUInt: - case LanguageInterface::Object::MethodDescription::vtLong: - case LanguageInterface::Object::MethodDescription::vtULong: - case LanguageInterface::Object::MethodDescription::vtLongLong: - case LanguageInterface::Object::MethodDescription::vtULongLong: - case LanguageInterface::Object::MethodDescription::vtBool: - case LanguageInterface::Object::MethodDescription::vtFloat: - case LanguageInterface::Object::MethodDescription::vtDouble: - case LanguageInterface::Object::MethodDescription::vtLongDouble: - case LanguageInterface::Object::MethodDescription::vtString: - case LanguageInterface::Object::MethodDescription::vtObject: + case MethodDesc::vtChar: + case MethodDesc::vtUChar: + case MethodDesc::vtShort: + case MethodDesc::vtUShort: + case MethodDesc::vtInt: + case MethodDesc::vtUInt: + case MethodDesc::vtLong: + case MethodDesc::vtULong: + case MethodDesc::vtLongLong: + case MethodDesc::vtULongLong: + case MethodDesc::vtBool: + case MethodDesc::vtFloat: + case MethodDesc::vtDouble: + case MethodDesc::vtLongDouble: + case MethodDesc::vtString: + case MethodDesc::vtObject: return("tclLanguageInterface->cxx2tcl( result_object )"); - case LanguageInterface::Object::MethodDescription::vtList: - case LanguageInterface::Object::MethodDescription::vtListRef: - case LanguageInterface::Object::MethodDescription::vtListPtr: + case MethodDesc::vtList: + case MethodDesc::vtListRef: + case MethodDesc::vtListPtr: return("tclLanguageInterface->list2tcl( interp, result_object )"); - case LanguageInterface::Object::MethodDescription::vtLanguageInterface: + case MethodDesc::vtLanguageInterface: throw LanguageInterface::Error( string( "vtLanguageInterface cannot be used as method return type for method " ) + (const char*)t ); - case LanguageInterface::Object::MethodDescription::vtCallbackData: + case MethodDesc::vtCallbackData: return("tclLanguageInterface->callbackData2tcl( interp, result_object )"); } @@ -495,56 +495,56 @@ } /* HSystem::gen_result_to_obj */ -string HSystem::gen_method_argument( LanguageInterface::Object::MethodDescription::Value t, int argno, int method_argno, bool last_arg_in_set_method ) +string HSystem::gen_method_argument( MethodDesc::Value t, int argno, int method_argno, bool last_arg_in_set_method ) { string result; - if ( t.optional() && t != LanguageInterface::Object::MethodDescription::vtList && t != LanguageInterface::Object::MethodDescription::vtListRef && t != LanguageInterface::Object::MethodDescription::vtListPtr && !last_arg_in_set_method ) { + if ( t.optional() && t != MethodDesc::vtList && t != MethodDesc::vtListRef && t != MethodDesc::vtListPtr && !last_arg_in_set_method ) { result += string( "( objc - 1 < " ) + to_string( argno ) + " ) ? " + t.defaultValue() + " : "; } - switch ( (LanguageInterface::Object::MethodDescription::ValueType)t ) { - case LanguageInterface::Object::MethodDescription::vtVoid: + switch ( (MethodDesc::ValueType)t ) { + case MethodDesc::vtVoid: return("void"); - case LanguageInterface::Object::MethodDescription::vtChar: - case LanguageInterface::Object::MethodDescription::vtUChar: + case MethodDesc::vtChar: + case MethodDesc::vtUChar: result += string( "*Tcl_GetStringFromObj( objv[" ) + to_string( argno ) + "], 0 )"; break; - case LanguageInterface::Object::MethodDescription::vtShort: - case LanguageInterface::Object::MethodDescription::vtUShort: - case LanguageInterface::Object::MethodDescription::vtInt: - case LanguageInterface::Object::MethodDescription::vtUInt: + case MethodDesc::vtShort: + case MethodDesc::vtUShort: + case MethodDesc::vtInt: + case MethodDesc::vtUInt: result += string( "TclLanguageInterface::tcl_obj2int( interp, objv[" ) + to_string( argno ) + "], method, " + to_string( method_argno ) + " )"; break; - case LanguageInterface::Object::MethodDescription::vtLong: - case LanguageInterface::Object::MethodDescription::vtULong: - case LanguageInterface::Object::MethodDescription::vtLongLong: - case LanguageInterface::Object::MethodDescription::vtULongLong: + case MethodDesc::vtLong: + case MethodDesc::vtULong: + case MethodDesc::vtLongLong: + case MethodDesc::vtULongLong: result += string( "TclLanguageInterface::tcl_obj2long( interp, objv[" ) + to_string( argno ) + "], method, " + to_string( method_argno ) + " )"; break; - case LanguageInterface::Object::MethodDescription::vtBool: + case MethodDesc::vtBool: result += string( "TclLanguageInterface::tcl_obj2bool( interp, objv[" ) + to_string( argno ) + "], method, " + to_string( method_argno ) + " )"; break; - case LanguageInterface::Object::MethodDescription::vtFloat: - case LanguageInterface::Object::MethodDescription::vtDouble: - case LanguageInterface::Object::MethodDescription::vtLongDouble: + case MethodDesc::vtFloat: + case MethodDesc::vtDouble: + case MethodDesc::vtLongDouble: result += string( "TclLanguageInterface::tcl_obj2double( interp, objv[" ) + to_string( argno ) + "], method, " + to_string( method_argno ) + " )"; break; - case LanguageInterface::Object::MethodDescription::vtString: + case MethodDesc::vtString: result += string( "TclLanguageInterface::to_string( objv[" ) + to_string( argno ) + "] )"; break; - case LanguageInterface::Object::MethodDescription::vtObject: + case MethodDesc::vtObject: result += string( "tclLanguageInterface->tcl2object( objv[" ) + to_string( argno ) + "], (" + (const char*)t + "*)0, method, " + to_string( method_argno ) + " )"; break; - case LanguageInterface::Object::MethodDescription::vtList: - case LanguageInterface::Object::MethodDescription::vtListRef: - case LanguageInterface::Object::MethodDescription::vtListPtr: + case MethodDesc::vtList: + case MethodDesc::vtListRef: + case MethodDesc::vtListPtr: if ( t.optional() && !last_arg_in_set_method ) result += string( "( objc - 1 < " ) + to_string( argno ) + " ) ? ( a" + to_string( method_argno - 1 ) + " = " + t.defaultValue() + " ) : "; result += string( "tclLanguageInterface->tcl2list( a" ) + to_string( method_argno - 1 ) + ", interp, objv[" + to_string( argno ) + "], method, " + to_string( method_argno ) + " )"; break; - case LanguageInterface::Object::MethodDescription::vtLanguageInterface: + case MethodDesc::vtLanguageInterface: return("tclLanguageInterface"); - case LanguageInterface::Object::MethodDescription::vtCallbackData: + case MethodDesc::vtCallbackData: result += string( "tclLanguageInterface->tcl2callbackData( interp, objv[" ) + to_string( argno ) + "] )"; break; default: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 0:10:47 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id 6E86A37B419 for ; Mon, 15 Apr 2002 00:10:42 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/36) with ESMTP id g3F7Af729328; Mon, 15 Apr 2002 00:10:42 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3F7AfR26876; Mon, 15 Apr 2002 00:10:41 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: More stuff for HACKERS From: Max Okumoto Date: 15 Apr 2002 00:10:41 -0700 Message-ID: Lines: 41 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 * More decode libh internals. Index: HACKERS =================================================================== RCS file: /home/libh/cvs/libh/HACKERS,v retrieving revision 1.1 diff -u -r1.1 HACKERS --- HACKERS 2002/04/11 23:33:32 1.1 +++ HACKERS 2002/04/15 05:22:59 @@ -21,6 +21,30 @@ Assuming your new libh subsystem is called dance; +You need to create the atleast the following files + lib/dance/Dance.cc + This file contains the actual functionality of the subsystem. + + lib/dance/libhDance_init.cc + This file contains code used to initialize the subsytem. + [Can someone confirm this?] + + lib/tcl/LibHTclInit_Dance.cc + This file contains code used to register the subsystems + commands with the tcl interpreter. (it calls + register_command_access_tcl() in LibTclInterface_dance.cc) + + lib/dance/Dance.cd.cc + This file contains a description of the tcl<->libh interface. + [Can someone fill in a short desc about the format of this + file?] + + The perl script find_classes_descriptions.pl proccess this + file to create build_systems_disk.cc That file is linked + with tcl_interface_gen.cc to create the executable + tcl_interface_gen_dance. Which in turn generates + LibTclInterface_dance.cc + bin/tclh/tclh.cc Update H_Tcl_AppInit() to add tcl bindings for your library. (Note: this is only required if the library To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 9: 1:12 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id D895037B47C for ; Mon, 15 Apr 2002 09:00:32 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FG0VE19771 for libh@FreeBSD.org; Mon, 15 Apr 2002 11:00:31 -0500 (CDT) (envelope-from antoine) Message-Id: <200204151600.g3FG0VE19771@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 11:00:31 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh HACKERS 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 antoine 2002/04/15 11:00:31 CDT Modified files: . HACKERS Log: add a bit more descriptions on files necessary the implementation of a subsystem Submitted by: Max Okumoto Revision Changes Path 1.2 +28 -2 libh/HACKERS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 9: 2: 7 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 619E437B41A for ; Mon, 15 Apr 2002 09:01:50 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FG1nl19802 for libh@FreeBSD.org; Mon, 15 Apr 2002 11:01:49 -0500 (CDT) (envelope-from antoine) Message-Id: <200204151601.g3FG1nl19802@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 11:01:49 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh HACKERS 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 antoine 2002/04/15 11:01:49 CDT Modified files: . HACKERS Log: make spacing and paragraphs consistent no content change Revision Changes Path 1.3 +11 -10 libh/HACKERS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 9:15: 7 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 30F1F37B404 for ; Mon, 15 Apr 2002 09:15:05 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FGF4j19843 for libh@FreeBSD.org; Mon, 15 Apr 2002 11:15:04 -0500 (CDT) (envelope-from antoine) Message-Id: <200204151615.g3FGF4j19843@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 11:15:04 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh HACKERS 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 antoine 2002/04/15 11:15:04 CDT Modified files: . HACKERS Log: fill in a bit more description about the .cd.cc files Revision Changes Path 1.4 +27 -10 libh/HACKERS To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 9:16:20 2002 Delivered-To: freebsd-libh@freebsd.org Received: from tomts21-srv.bellnexxia.net (tomts21.bellnexxia.net [209.226.175.183]) by hub.freebsd.org (Postfix) with ESMTP id AD05237B400 for ; Mon, 15 Apr 2002 09:16:15 -0700 (PDT) Received: from khan.anarcat.dyndns.org ([65.94.186.97]) by tomts21-srv.bellnexxia.net (InterMail vM.4.01.03.23 201-229-121-123-20010418) with ESMTP id <20020415161609.HNAR12420.tomts21-srv.bellnexxia.net@khan.anarcat.dyndns.org>; Mon, 15 Apr 2002 12:16:09 -0400 Received: from lenny.anarcat.dyndns.org (lenny.anarcat.dyndns.org [192.168.0.4]) by khan.anarcat.dyndns.org (Postfix) with SMTP id C04B8191F; Mon, 15 Apr 2002 12:16:06 -0400 (EDT) Received: by lenny.anarcat.dyndns.org (sSMTP sendmail emulation); Mon, 15 Apr 2002 12:15:03 -0400 Date: Mon, 15 Apr 2002 12:15:03 -0400 From: The Anarcat To: Max Okumoto Cc: freebsd-libh@FreeBSD.ORG Subject: Re: More stuff for HACKERS Message-ID: <20020415161502.GA410@lenny.anarcat.dyndns.org> Mail-Followup-To: The Anarcat , Max Okumoto , freebsd-libh@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fdj2RfSjLxBAspz7" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i 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 --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon Apr 15, 2002 at 12:10:41AM -0700, Max Okumoto wrote: > =20 > * More decode libh internals.=20 >=20 > Index: HACKERS patch applied, with my usual spicing. :) a. --=20 =46rom the age of uniformity, from the age of solitude, from the age of Big Brother, from the age of doublethink - greetings! --fdj2RfSjLxBAspz7 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 iEYEARECAAYFAjy6/IUACgkQttcWHAnWiGcz3QCgjWAGI3BqHiT6AAriJG5bvfU/ b8QAoIoDGPJCV3cevl/mLTyTBg8lwUcH =AC2t -----END PGP SIGNATURE----- --fdj2RfSjLxBAspz7-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 9:21:53 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 6A62137B404 for ; Mon, 15 Apr 2002 09:21:50 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FGLnX20051 for libh@FreeBSD.org; Mon, 15 Apr 2002 11:21:49 -0500 (CDT) (envelope-from antoine) Message-Id: <200204151621.g3FGLnX20051@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 11:21:49 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/include Configuration.hh Container.hh H.hh HSystem.hh LanguageInterface.hh Log.hh Pointer.hh ProgressIndicator.hh libh/include/database DatabaseEngine.hh DatabaseEngineDb185.hh libh/include/disk Disk.hh libh/include/file ... 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 antoine 2002/04/15 11:21:49 CDT Modified files: include Configuration.hh Container.hh H.hh HSystem.hh LanguageInterface.hh Log.hh Pointer.hh ProgressIndicator.hh include/database DatabaseEngine.hh DatabaseEngineDb185.hh include/disk Disk.hh include/file Archive.hh DirectoriesAccess.hh Fetch.hh File.hh FileInfo.hh RealFile.hh include/hui Hui.hh HuiQt.hh ProgressIndicatorHui.hh include/sysinstall Callback.hh Database.hh Exec.hh Feature.hh FeaturesProvided.hh History.hh Package.hh PackageDescription.hh PackageStream.hh PackageStreamReference.hh PackageStreamStructure.hh PackageStreamSubpackage.hh include/tcl TclLanguageInterface.hh Log: double header guards sweep Revision Changes Path 1.8 +1 -3 libh/include/Configuration.hh 1.8 +1 -3 libh/include/Container.hh 1.6 +1 -3 libh/include/H.hh 1.6 +1 -3 libh/include/HSystem.hh 1.6 +1 -3 libh/include/LanguageInterface.hh 1.5 +1 -3 libh/include/Log.hh 1.9 +1 -3 libh/include/Pointer.hh 1.5 +1 -6 libh/include/ProgressIndicator.hh 1.5 +1 -3 libh/include/database/DatabaseEngine.hh 1.5 +1 -3 libh/include/database/DatabaseEngineDb185.hh 1.7 +1 -6 libh/include/disk/Disk.hh 1.5 +1 -12 libh/include/file/Archive.hh 1.5 +1 -3 libh/include/file/DirectoriesAccess.hh 1.6 +1 -6 libh/include/file/Fetch.hh 1.7 +1 -6 libh/include/file/File.hh 1.5 +1 -6 libh/include/file/FileInfo.hh 1.5 +1 -6 libh/include/file/RealFile.hh 1.19 +1 -9 libh/include/hui/Hui.hh 1.26 +1 -8 libh/include/hui/HuiQt.hh 1.6 +1 -6 libh/include/hui/ProgressIndicatorHui.hh 1.5 +1 -21 libh/include/sysinstall/Callback.hh 1.9 +1 -12 libh/include/sysinstall/Database.hh 1.4 +1 -6 libh/include/sysinstall/Exec.hh 1.4 +1 -6 libh/include/sysinstall/Feature.hh 1.4 +1 -3 libh/include/sysinstall/FeaturesProvided.hh 1.4 +1 -6 libh/include/sysinstall/History.hh 1.5 +1 -12 libh/include/sysinstall/Package.hh 1.4 +1 -3 libh/include/sysinstall/PackageDescription.hh 1.5 +1 -18 libh/include/sysinstall/PackageStream.hh 1.4 +1 -6 libh/include/sysinstall/PackageStreamReference.hh 1.4 +1 -9 libh/include/sysinstall/PackageStreamStructure.hh 1.4 +1 -3 libh/include/sysinstall/PackageStreamSubpackage.hh 1.5 +1 -12 libh/include/tcl/TclLanguageInterface.hh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 9:26:50 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 44CD137B405 for ; Mon, 15 Apr 2002 09:26:48 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FGQl220109 for libh@FreeBSD.org; Mon, 15 Apr 2002 11:26:47 -0500 (CDT) (envelope-from antoine) Message-Id: <200204151626.g3FGQl220109@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 11:26:47 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/lib/tcl tcl_interface_gen.cc libh/include HSystem.hh 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 antoine 2002/04/15 11:26:47 CDT Modified files: lib/tcl tcl_interface_gen.cc include HSystem.hh Log: typdef some LanguageInterface::Objects to lighten the code Submitted by: Max Okumoto Revision Changes Path 1.9 +68 -68 libh/lib/tcl/tcl_interface_gen.cc 1.7 +16 -9 libh/include/HSystem.hh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 9:27:13 2002 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 D3E8C37B405 for ; Mon, 15 Apr 2002 09:27:10 -0700 (PDT) Received: from khan.anarcat.dyndns.org ([65.94.186.97]) by tomts14-srv.bellnexxia.net (InterMail vM.4.01.03.23 201-229-121-123-20010418) with ESMTP id <20020415162709.JRYX13590.tomts14-srv.bellnexxia.net@khan.anarcat.dyndns.org>; Mon, 15 Apr 2002 12:27:09 -0400 Received: from lenny.anarcat.dyndns.org (lenny.anarcat.dyndns.org [192.168.0.4]) by khan.anarcat.dyndns.org (Postfix) with SMTP id DDA1B1A1F; Mon, 15 Apr 2002 12:27:06 -0400 (EDT) Received: by lenny.anarcat.dyndns.org (sSMTP sendmail emulation); Mon, 15 Apr 2002 12:26:03 -0400 Date: Mon, 15 Apr 2002 12:26:03 -0400 From: The Anarcat To: Max Okumoto Cc: freebsd-libh@FreeBSD.ORG Subject: Re: cleanup of HSystem 2nd try (stage 1) Message-ID: <20020415162602.GB410@lenny.anarcat.dyndns.org> Mail-Followup-To: The Anarcat , Max Okumoto , freebsd-libh@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0eh6TmSyL6TZE2Uz" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.27i 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 --0eh6TmSyL6TZE2Uz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon Apr 15, 2002 at 12:10:01AM -0700, Max Okumoto wrote: > =20 > Ok only one type of change at at time. :-) =20 > =20 > * (include/HSystem.hh, lib/tcl/tcl_interface_gen.cc) Created types=20 > and use them to make code more readable.=20 done. --=20 The idea that Bill Gates has appeared like a knight in shining armour to lead all customers out of a mire of technological chaos neatly ignores the fact that it was he who, by peddling second-rate technology, led them into it in the first place. - Douglas Adams (1952-2001) --0eh6TmSyL6TZE2Uz 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 iEYEARECAAYFAjy6/xoACgkQttcWHAnWiGfKFgCcDe0GQwKaP7yE8EcjquLppjtY eakAn0nYRPfEoyzg4ijmhEDSYk6AaX2C =0baD -----END PGP SIGNATURE----- --0eh6TmSyL6TZE2Uz-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 9:33:29 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 8862B37B400 for ; Mon, 15 Apr 2002 09:33:27 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FGXQD20144 for libh@FreeBSD.org; Mon, 15 Apr 2002 11:33:26 -0500 (CDT) (envelope-from antoine) Message-Id: <200204151633.g3FGXQD20144@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 11:33:26 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/scripts/diskedit disklabel.tcl 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 antoine 2002/04/15 11:33:26 CDT Modified files: release/scripts/diskedit disklabel.tcl Log: allocate more horizontal screen space and less vertical for the partition editor window Revision Changes Path 1.31 +1 -1 libh/release/scripts/diskedit/disklabel.tcl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 9:39:21 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 29BB537B404 for ; Mon, 15 Apr 2002 09:39:20 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FGdJg20178 for libh@FreeBSD.org; Mon, 15 Apr 2002 11:39:19 -0500 (CDT) (envelope-from antoine) Message-Id: <200204151639.g3FGdJg20178@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 11:39:19 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/scripts/diskedit disklabel.tcl 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 antoine 2002/04/15 11:39:19 CDT Modified files: release/scripts/diskedit disklabel.tcl Log: comment out stderr printout because it garbles display in tvision these kind of output should be handled by a "status bar" Revision Changes Path 1.32 +2 -2 libh/release/scripts/diskedit/disklabel.tcl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 9:42:29 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id C5A1437B405 for ; Mon, 15 Apr 2002 09:42:27 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FGgR020213 for libh@FreeBSD.org; Mon, 15 Apr 2002 11:42:27 -0500 (CDT) (envelope-from antoine) Message-Id: <200204151642.g3FGgR020213@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 11:42:27 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/scripts/diskedit disklabel.tcl 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 antoine 2002/04/15 11:42:27 CDT Modified files: release/scripts/diskedit disklabel.tcl Log: correct vertical size to have it fit in a 80x25 console Revision Changes Path 1.33 +1 -1 libh/release/scripts/diskedit/disklabel.tcl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 9:59:45 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 60B6537B416 for ; Mon, 15 Apr 2002 09:59:44 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FGxhH20254 for libh@FreeBSD.org; Mon, 15 Apr 2002 11:59:43 -0500 (CDT) (envelope-from antoine) Message-Id: <200204151659.g3FGxhH20254@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 11:59:43 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/scripts/diskedit disk.tcl 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 antoine 2002/04/15 11:59:43 CDT Modified files: release/scripts/diskedit disk.tcl Log: add keybindings to test and quit buttons Revision Changes Path 1.9 +2 -2 libh/release/scripts/diskedit/disk.tcl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 10:11:42 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id DFD4237B400 for ; Mon, 15 Apr 2002 10:11:40 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FHBed20301 for libh@FreeBSD.org; Mon, 15 Apr 2002 12:11:40 -0500 (CDT) (envelope-from antoine) Message-Id: <200204151711.g3FHBed20301@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 12:11:39 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/scripts/diskedit disklabel.tcl formats.tcl labeledit.tcl 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 antoine 2002/04/15 12:11:39 CDT Modified files: release/scripts/diskedit disklabel.tcl formats.tcl labeledit.tcl Log: remove all mount and newfs code which didn't do anything anyways mount and newfs operations should be in a seperate window to lighten displays Revision Changes Path 1.34 +1 -43 libh/release/scripts/diskedit/disklabel.tcl 1.4 +9 -18 libh/release/scripts/diskedit/formats.tcl 1.7 +6 -29 libh/release/scripts/diskedit/labeledit.tcl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 10:13:15 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 6C0D237B400 for ; Mon, 15 Apr 2002 10:13:14 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FHDDY20333 for libh@FreeBSD.org; Mon, 15 Apr 2002 12:13:13 -0500 (CDT) (envelope-from antoine) Message-Id: <200204151713.g3FHDDY20333@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 12:13:13 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/release/scripts/diskedit TODO 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 antoine 2002/04/15 12:13:13 CDT Modified files: release/scripts/diskedit TODO Log: add todo: we cleared any kind of newfs-related code from the current diskeditor, so we need to put this functionality somewhere Revision Changes Path 1.5 +4 -1 libh/release/scripts/diskedit/TODO To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 12:20:34 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id 1DB4237B400 for ; Mon, 15 Apr 2002 12:20:18 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/36) with ESMTP id g3FJKH713310; Mon, 15 Apr 2002 12:20:17 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3FJKHN12622; Mon, 15 Apr 2002 12:20:17 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: cleanup of HSystem 2nd try (stage 2) From: Max Okumoto Date: 15 Apr 2002 12:20:17 -0700 Message-ID: Lines: 93 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 * Just add doxygen comments. Index: include/HSystem.hh =================================================================== RCS file: /home/libh/cvs/libh/include/HSystem.hh,v retrieving revision 1.7 diff -u -r1.7 HSystem.hh --- include/HSystem.hh 2002/04/15 16:26:47 1.7 +++ include/HSystem.hh 2002/04/15 19:18:21 @@ -46,6 +46,9 @@ //====================================================================== +/** + * Represent a libh subsystem object interface generator. + */ class HSystem { /* @@ -61,20 +64,49 @@ typedef list CommandAccessToRegister; typedef list > StaticMethods; + /** + * Constructor. + */ HSystem( const string& aName ) : name( aName ) {} + + /** + * Copy constructor. XXX This is broken! None of the other state is + * copied! + */ HSystem( const HSystem& aHSystem ) : name( aHSystem.name ) {} + /** + * Adds the class description and include file to the system definition. + * + * @param class_desc + * @param include_file + * + * @see find_classes_descriptions.pl + */ void add_class(const ClassDesc *class_desc, const string& include_file) { descriptions.push_back( class_desc ); includes.insert( include_file ); } + /** + * Output header and includes. The output text contains a + * warning that it is a generated source file. + * + * @param out stream to send text. + */ void gen_header( ostream& out ); + void gen_classes_interfaces( ostream& out ); void gen_register_command_access( ostream& out ); + + /** + * Output comment marking end of file. + * + * @param out stream to send text. + */ void gen_footer( ostream& out ); Descriptions descriptions; @@ -83,8 +115,20 @@ StaticMethods staticMethods; string name; - bool operator < ( const HSystem& toCompare ) const { return name < toCompare.name; } - bool operator == ( const HSystem& toCompare ) const { return name == toCompare.name; } + + /** + * LessThan operator. + * + * @param rhs Right hand side of the less than operator. + */ + bool operator < (const HSystem& rhs ) const { return name < rhs.name; } + + /** + * Equivilance operator. + * + * @param rhs Right hand side of the Equivilance operator. + */ + bool operator == ( const HSystem& rhs ) const { return name == rhs.name; } private: void gen_class_header(ostream& out, const ClassDesc *cd); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 12:41: 1 2002 Delivered-To: freebsd-libh@freebsd.org Received: from southpole.winternet.com (southpole.winternet.com [198.174.169.153]) by hub.freebsd.org (Postfix) with ESMTP id 490DE37B419 for ; Mon, 15 Apr 2002 12:40:58 -0700 (PDT) Received: from tundra.winternet.com (nrahlstr@tundra.winternet.com [198.174.169.11]) by southpole.winternet.com (8.12.2/8.12.1/sci) with ESMTP id g3FJea1X023445; Mon, 15 Apr 2002 14:40:41 -0500 (CDT) SMTP "HELO" (ESMTP) greeting from tundra.winternet.com But _really_ from :: nrahlstr@tundra.winternet.com [198.174.169.11] SMTP "MAIL From:" = nrahlstr@iceberg.winternet.com SMTP "RCPT To:" = We have no RCPT Received: (from nrahlstr@localhost) by tundra.winternet.com (8.10.2+Sun/8.10.2) id g3FJeTQ20586; Mon, 15 Apr 2002 14:40:29 -0500 (CDT) Date: Mon, 15 Apr 2002 14:40:29 -0500 From: Nathan Ahlstrom To: Miguel Mendez Cc: freebsd-libh@FreeBSD.org Subject: Re: libh project Message-ID: <20020415194028.GA20546@winternet.com> Mail-Followup-To: Nathan Ahlstrom , Miguel Mendez , freebsd-libh@FreeBSD.org References: <20020415211749.A97833@energyhq.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020415211749.A97833@energyhq.homeip.net> User-Agent: Mutt/1.3.24i 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 Hi Miguel! [I have CC'ed the libh mailing list.] Thanks for your interest!! There is certainly a lot of work that needs to be done in the libh project. Right now I am not involved very much, due to work and other time constraints...sad. I would encourage you to look at the project web page: http://www.freebsd.org/projects/libh.html Also please check out the libh project and begin reading the BUGS and HACKERS files. Right now one of the main thrusts of the project is to document the source code well, so help there would be very much appreciated. Also the port (/usr/ports/misc/libh) is in need of updating, which I haven't had a chance to do. Thanks in advance for your help! If you do document some code, please email them to the list or to me, I can commit them. Nathan Miguel Mendez wrote: > Hi, > > I'm very interested in the libh project. I'm the author of a little tool > called thefish that handles management of /etc/rc.conf, and I'd like to > contribute to your project. I have experience with GTK and dialog > programming. Is there any area where you currently need help? > > Thanks in advance, > -- > Miguel Mendez - flynn@energyhq.homeip.net > GPG Public Key :: http://energyhq.homeip.net/files/pubkey.txt > EnergyHQ :: http://www.energyhq.tk > FreeBSD - The power to serve! -- Nathan Ahlstrom / nra@NetBSD.org / nra@FreeBSD.org / GPG: 0x67BC9D19 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 13: 7:31 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 1E36437B41E for ; Mon, 15 Apr 2002 13:07:27 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FK7Q620942 for libh@FreeBSD.org; Mon, 15 Apr 2002 15:07:26 -0500 (CDT) (envelope-from antoine) Message-Id: <200204152007.g3FK7Q620942@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 15:07:25 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/include HSystem.hh 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 antoine 2002/04/15 15:07:25 CDT Modified files: include HSystem.hh Log: add doxygen comments no functional change Submitted by: Max Okumoto Revision Changes Path 1.8 +47 -3 libh/include/HSystem.hh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 13:16:32 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 428B037B416 for ; Mon, 15 Apr 2002 13:16:30 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FKGTv21008 for libh@FreeBSD.org; Mon, 15 Apr 2002 15:16:29 -0500 (CDT) (envelope-from antoine) Message-Id: <200204152016.g3FKGTv21008@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 15:16:29 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh TODO libh/include/sysinstall PackageCreator.hh PackageFile.hh PackageStreamFile.hh 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 antoine 2002/04/15 15:16:29 CDT Modified files: . TODO include/sysinstall PackageCreator.hh PackageFile.hh PackageStreamFile.hh Log: close the double-header guards cleanup todo item with a final sweep this should cover all double header file guards Confirmed by: grep -r #ifndef ~/libh Revision Changes Path 1.21 +1 -4 libh/TODO 1.6 +1 -6 libh/include/sysinstall/PackageCreator.hh 1.4 +1 -6 libh/include/sysinstall/PackageFile.hh 1.4 +1 -3 libh/include/sysinstall/PackageStreamFile.hh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 14:38:39 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id 6A77B37B41C for ; Mon, 15 Apr 2002 14:38:31 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/36) with ESMTP id g3FLcQ705622; Mon, 15 Apr 2002 14:38:26 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3FLcQN24849; Mon, 15 Apr 2002 14:38:26 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: cleanup of HSystem 2nd try (stage 3) From: Max Okumoto Date: 15 Apr 2002 14:38:26 -0700 Message-ID: Lines: 150 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 * Clean up white space Index: include/HSystem.hh =================================================================== RCS file: /home/libh/cvs/libh/include/HSystem.hh,v retrieving revision 1.8 diff -u -r1.8 HSystem.hh --- include/HSystem.hh 2002/04/15 20:07:25 1.8 +++ include/HSystem.hh 2002/04/15 21:36:02 @@ -49,8 +49,7 @@ /** * Represent a libh subsystem object interface generator. */ -class HSystem -{ +class HSystem { /* * Types used to simplify code. */ @@ -59,23 +58,23 @@ typedef LanguageInterface::Object::CallbackDescription CallBackDesc; public: - typedef list Descriptions; - typedef set Includes; - typedef list CommandAccessToRegister; - typedef list > StaticMethods; + typedef list Descriptions; + typedef set Includes; + typedef list CommandAccessToRegister; + typedef list > StaticMethods; /** * Constructor. */ - HSystem( const string& aName ) - : name( aName ) {} + HSystem(const string& aName) + : name(aName) {} /** * Copy constructor. XXX This is broken! None of the other state is * copied! */ - HSystem( const HSystem& aHSystem ) - : name( aHSystem.name ) {} + HSystem(const HSystem& aHSystem) + : name(aHSystem.name) {} /** * Adds the class description and include file to the system definition. @@ -85,58 +84,59 @@ * * @see find_classes_descriptions.pl */ - void add_class(const ClassDesc *class_desc, const string& include_file) - { - descriptions.push_back( class_desc ); - includes.insert( include_file ); - } + void + add_class(const ClassDesc *class_desc, const string& include_file) + { + descriptions.push_back(class_desc); + includes.insert(include_file); + } /** * Output header and includes. The output text contains a * warning that it is a generated source file. - * - * @param out stream to send text. + * + * @param out stream to send text. */ - void gen_header( ostream& out ); + void gen_header(ostream& out); - void gen_classes_interfaces( ostream& out ); - void gen_register_command_access( ostream& out ); + void gen_classes_interfaces(ostream& out); + void gen_register_command_access(ostream& out); /** * Output comment marking end of file. - * - * @param out stream to send text. + * + * @param out stream to send text. */ - void gen_footer( ostream& out ); + void gen_footer(ostream& out); - Descriptions descriptions; - Includes includes; - CommandAccessToRegister commandAccessToRegister; - StaticMethods staticMethods; + Descriptions descriptions; + Includes includes; + CommandAccessToRegister commandAccessToRegister; + StaticMethods staticMethods; - string name; + string name; /** * LessThan operator. * * @param rhs Right hand side of the less than operator. */ - bool operator < (const HSystem& rhs ) const { return name < rhs.name; } + bool operator<(const HSystem& rhs) const { return name < rhs.name; } /** * Equivilance operator. * * @param rhs Right hand side of the Equivilance operator. */ - bool operator == ( const HSystem& rhs ) const { return name == rhs.name; } + bool operator==(const HSystem& rhs) const { return name == rhs.name; } private: - void gen_class_header(ostream& out, const ClassDesc *cd); - void gen_callback_interfaces(ostream& out, const ClassDesc *cd); - void gen_dynamic_methods_interfaces(ostream& out, const ClassDesc *cd); - void gen_static_method_interfaces(ostream& out, const ClassDesc *cd); - string gen_result_to_obj(MethodDesc::Value t ); - string gen_method_argument(MethodDesc::Value t, int argno, int method_argno, bool last_arg_in_set_method ); + void gen_class_header(ostream& out, const ClassDesc *cd); + void gen_callback_interfaces(ostream& out, const ClassDesc *cd); + void gen_dynamic_methods_interfaces(ostream& out, const ClassDesc *cd); + void gen_static_method_interfaces(ostream& out, const ClassDesc *cd); + string gen_result_to_obj(MethodDesc::Value t); + string gen_method_argument(MethodDesc::Value t, int argno, int method_argno, bool last_arg_in_set_method); }; // class HSystem @@ -160,9 +160,9 @@ * each subsystem. * * @see find_classes_descriptions.pl - * @param systems the set of HSystem objects to add the subsystem to + * @param systems the set of HSystem objects to add the subsystem to */ -void build_systems( Systems& systems ); +void build_systems(Systems& systems); //====================================================================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 14:47:37 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 238BC37B41C for ; Mon, 15 Apr 2002 14:47:32 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3FLlVw21131 for libh@FreeBSD.org; Mon, 15 Apr 2002 16:47:31 -0500 (CDT) (envelope-from antoine) Message-Id: <200204152147.g3FLlVw21131@usw4.freebsd.org> From: Antoine Beaupré Date: Mon, 15 Apr 2002 16:47:31 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/include HSystem.hh 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 antoine 2002/04/15 16:47:31 CDT Modified files: include HSystem.hh Log: whitespace cleanup no functional change Submitted by: Max Okumoto Revision Changes Path 1.9 +39 -39 libh/include/HSystem.hh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 15:33:15 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id 2017637B416 for ; Mon, 15 Apr 2002 15:33:09 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/36) with ESMTP id g3FMX8713196; Mon, 15 Apr 2002 15:33:08 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3FMX8028517; Mon, 15 Apr 2002 15:33:08 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: cleanup of HSystem 2nd try (stage 4) From: Max Okumoto Date: 15 Apr 2002 15:33:08 -0700 Message-ID: Lines: 180 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 * (include/HSystem.hh) Added new function gen_file(). Make gen_header() gen_classes_interfaces(), gen_register_command_access(), gen_footer() and other types to private. * (lib/tcl/tcl_interface_gen.cc) Use new gen_file(). Index: include/HSystem.hh =================================================================== RCS file: /home/libh/cvs/libh/include/HSystem.hh,v retrieving revision 1.9 diff -u -r1.9 HSystem.hh --- include/HSystem.hh 2002/04/15 21:47:31 1.9 +++ include/HSystem.hh 2002/04/15 22:27:03 @@ -39,10 +39,9 @@ #include "LanguageInterface.hh" -#include - -#include +#include #include +#include //====================================================================== @@ -57,39 +56,15 @@ typedef LanguageInterface::Object::MethodDescription MethodDesc; typedef LanguageInterface::Object::CallbackDescription CallBackDesc; - public: typedef list Descriptions; typedef set Includes; typedef list CommandAccessToRegister; typedef list > StaticMethods; - - /** - * Constructor. - */ - HSystem(const string& aName) - : name(aName) {} - /** - * Copy constructor. XXX This is broken! None of the other state is - * copied! - */ - HSystem(const HSystem& aHSystem) - : name(aHSystem.name) {} - - /** - * Adds the class description and include file to the system definition. - * - * @param class_desc - * @param include_file - * - * @see find_classes_descriptions.pl - */ - void - add_class(const ClassDesc *class_desc, const string& include_file) - { - descriptions.push_back(class_desc); - includes.insert(include_file); - } + Descriptions descriptions; + Includes includes; + CommandAccessToRegister commandAccessToRegister; + StaticMethods staticMethods; /** * Output header and includes. The output text contains a @@ -109,14 +84,34 @@ */ void gen_footer(ostream& out); - Descriptions descriptions; - Includes includes; - CommandAccessToRegister commandAccessToRegister; - StaticMethods staticMethods; + void gen_class_header(ostream& out, const ClassDesc *cd); + void gen_callback_interfaces(ostream& out, const ClassDesc *cd); + void gen_dynamic_methods_interfaces(ostream& out, const ClassDesc *cd); + void gen_static_method_interfaces(ostream& out, const ClassDesc *cd); + string gen_result_to_obj(MethodDesc::Value t); + string gen_method_argument(MethodDesc::Value t, int argno, int method_argno, bool last_arg_in_set_method); + public: + /** Mame of subsystem. + * @note This should be made private But this would require modifications + * out side of HSystem.hh. + */ string name; /** + * Constructor. + */ + HSystem(const string& aName) + : name(aName) {} + + /** + * Copy constructor. XXX This is broken! None of the other state is + * copied! + */ + HSystem(const HSystem& aHSystem) + : name(aHSystem.name) {} + + /** * LessThan operator. * * @param rhs Right hand side of the less than operator. @@ -130,13 +125,27 @@ */ bool operator==(const HSystem& rhs) const { return name == rhs.name; } - private: - void gen_class_header(ostream& out, const ClassDesc *cd); - void gen_callback_interfaces(ostream& out, const ClassDesc *cd); - void gen_dynamic_methods_interfaces(ostream& out, const ClassDesc *cd); - void gen_static_method_interfaces(ostream& out, const ClassDesc *cd); - string gen_result_to_obj(MethodDesc::Value t); - string gen_method_argument(MethodDesc::Value t, int argno, int method_argno, bool last_arg_in_set_method); + /** + * Adds the class description and include file to the system definition. + * + * @param cd + * @param include_file + * + * @see find_classes_descriptions.pl + */ + void + add_class(const ClassDesc *cd, const string& include_file) + { + descriptions.push_back(cd); + includes.insert(include_file); + } + + /** + * Generate libh subsystem tcl interface text. + * + * @param out stream to send text. + */ + void gen_file(ostream &out); }; // class HSystem Index: lib/tcl/tcl_interface_gen.cc =================================================================== RCS file: /home/libh/cvs/libh/lib/tcl/tcl_interface_gen.cc,v retrieving revision 1.9 diff -u -r1.9 tcl_interface_gen.cc --- lib/tcl/tcl_interface_gen.cc 2002/04/15 16:26:47 1.9 +++ lib/tcl/tcl_interface_gen.cc 2002/04/15 22:27:05 @@ -62,10 +62,7 @@ throw runtime_error( string( "Unable to create " ) + argv[2] + ": " + ::strerror( errno ) ); HSystem& s = const_cast( *system ); - s.gen_header( out ); - s.gen_classes_interfaces( out ); - s.gen_register_command_access( out ); - s.gen_footer( out ); + s.gen_file( out ); } catch ( exception& err ) { cerr << "Error: " << err.what() << endl; @@ -75,6 +72,15 @@ return 0; } /* main */ + +void +HSystem::gen_file(ostream& out) +{ + gen_header(out); + gen_classes_interfaces(out); + gen_register_command_access(out); + gen_footer(out); +} void HSystem::gen_header( ostream& out ) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Mon Apr 15 23:37:30 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id BE2E637B404 for ; Mon, 15 Apr 2002 23:37:25 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/36) with ESMTP id g3G6bP729084; Mon, 15 Apr 2002 23:37:25 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3G6bOS24172; Mon, 15 Apr 2002 23:37:24 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: cleanup of HSystem 2nd try (stage 5) From: Max Okumoto Date: 15 Apr 2002 23:37:24 -0700 Message-ID: Lines: 98 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 * Cleanup some more white space =================================================================== --- include/HSystem.hh.stage1 Mon Apr 15 15:26:03 2002 +++ include/HSystem.hh Mon Apr 15 23:33:50 2002 @@ -58,7 +58,7 @@ typedef list Descriptions; typedef set Includes; - typedef list CommandAccessToRegister; + typedef list CommandAccessToRegister; typedef list > StaticMethods; Descriptions descriptions; @@ -72,22 +72,22 @@ * * @param out stream to send text. */ - void gen_header(ostream& out); + void gen_header(ostream &out); - void gen_classes_interfaces(ostream& out); - void gen_register_command_access(ostream& out); + void gen_classes_interfaces(ostream &out); + void gen_register_command_access(ostream &out); /** * Output comment marking end of file. * * @param out stream to send text. */ - void gen_footer(ostream& out); + void gen_footer(ostream &out); - void gen_class_header(ostream& out, const ClassDesc *cd); - void gen_callback_interfaces(ostream& out, const ClassDesc *cd); - void gen_dynamic_methods_interfaces(ostream& out, const ClassDesc *cd); - void gen_static_method_interfaces(ostream& out, const ClassDesc *cd); + void gen_class_header(ostream &out, const ClassDesc *cd); + void gen_callback_interfaces(ostream &out, const ClassDesc *cd); + void gen_dynamic_methods_interfaces(ostream &out, const ClassDesc *cd); + void gen_static_method_interfaces(ostream &out, const ClassDesc *cd); string gen_result_to_obj(MethodDesc::Value t); string gen_method_argument(MethodDesc::Value t, int argno, int method_argno, bool last_arg_in_set_method); @@ -101,14 +101,14 @@ /** * Constructor. */ - HSystem(const string& aName) + HSystem(const string &aName) : name(aName) {} /** * Copy constructor. XXX This is broken! None of the other state is * copied! */ - HSystem(const HSystem& aHSystem) + HSystem(const HSystem &aHSystem) : name(aHSystem.name) {} /** @@ -116,14 +116,14 @@ * * @param rhs Right hand side of the less than operator. */ - bool operator<(const HSystem& rhs) const { return name < rhs.name; } + bool operator<(const HSystem &rhs) const { return name < rhs.name; } /** * Equivilance operator. * * @param rhs Right hand side of the Equivilance operator. */ - bool operator==(const HSystem& rhs) const { return name == rhs.name; } + bool operator==(const HSystem &rhs) const { return name == rhs.name; } /** * Adds the class description and include file to the system definition. @@ -134,7 +134,7 @@ * @see find_classes_descriptions.pl */ void - add_class(const ClassDesc *cd, const string& include_file) + add_class(const ClassDesc *cd, const string &include_file) { descriptions.push_back(cd); includes.insert(include_file); @@ -171,7 +171,7 @@ * @see find_classes_descriptions.pl * @param systems the set of HSystem objects to add the subsystem to */ -void build_systems(Systems& systems); +void build_systems(Systems &systems); //====================================================================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Tue Apr 16 19:31:45 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 57A7A37B404 for ; Tue, 16 Apr 2002 19:31:43 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3H2VgM23046 for libh@FreeBSD.org; Tue, 16 Apr 2002 21:31:42 -0500 (CDT) (envelope-from antoine) Message-Id: <200204170231.g3H2VgM23046@usw4.freebsd.org> From: Antoine Beaupré Date: Tue, 16 Apr 2002 21:31:41 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh Makefile 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 antoine 2002/04/16 21:31:41 CDT Modified files: . Makefile Log: don't print misleading build message about what build we start print build timings between the 4 builds Revision Changes Path 1.8 +8 -5 libh/Makefile To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Tue Apr 16 19:34:58 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 15D7B37B400 for ; Tue, 16 Apr 2002 19:34:56 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3H2Yt423095 for libh@FreeBSD.org; Tue, 16 Apr 2002 21:34:55 -0500 (CDT) (envelope-from antoine) Message-Id: <200204170234.g3H2Yt423095@usw4.freebsd.org> From: Antoine Beaupré Date: Tue, 16 Apr 2002 21:34:55 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/lib/tcl tcl_interface_gen.cc libh/include HSystem.hh 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 antoine 2002/04/16 21:34:55 CDT Modified files: lib/tcl tcl_interface_gen.cc include HSystem.hh Log: (include/HSystem.hh) Added new function gen_file(). Make gen_header() gen_classes_interfaces(), gen_register_command_access(), gen_footer() and other types private. (lib/tcl/tcl_interface_gen.cc) Use new gen_file(). Submitted by: Max Okumoto Revision Changes Path 1.10 +11 -5 libh/lib/tcl/tcl_interface_gen.cc 1.10 +52 -43 libh/include/HSystem.hh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Tue Apr 16 19:36: 9 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id E944237B419 for ; Tue, 16 Apr 2002 19:36:06 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3H2a6k23129 for libh@FreeBSD.org; Tue, 16 Apr 2002 21:36:06 -0500 (CDT) (envelope-from antoine) Message-Id: <200204170236.g3H2a6k23129@usw4.freebsd.org> From: Antoine Beaupré Date: Tue, 16 Apr 2002 21:36:06 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/include HSystem.hh 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 antoine 2002/04/16 21:36:06 CDT Modified files: include HSystem.hh Log: whitespace cleanup Submitted by: Max Okumoto Revision Changes Path 1.11 +16 -16 libh/include/HSystem.hh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 6:19:49 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id 20B6A37B405 for ; Wed, 17 Apr 2002 06:19:42 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/36) with ESMTP id g3HDJb701792; Wed, 17 Apr 2002 06:19:37 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3HDJbD10776; Wed, 17 Apr 2002 06:19:37 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: cleanup of HSystem 2nd try (stage 6) From: Max Okumoto Date: 17 Apr 2002 06:19:37 -0700 Message-ID: Lines: 61 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 * Corrected spelling and added some parameter comments Index: include/HSystem.hh =================================================================== RCS file: /home/libh/cvs/libh/include/HSystem.hh,v retrieving revision 1.11 diff -u -r1.11 HSystem.hh --- include/HSystem.hh 2002/04/17 02:36:06 1.11 +++ include/HSystem.hh 2002/04/17 13:17:05 @@ -92,14 +92,18 @@ string gen_method_argument(MethodDesc::Value t, int argno, int method_argno, bool last_arg_in_set_method); public: - /** Mame of subsystem. + /** + * Name of subsystem. + * * @note This should be made private But this would require modifications - * out side of HSystem.hh. + * outside of HSystem.hh. */ string name; /** * Constructor. + * + * @param aName Name of subsystem. */ HSystem(const string &aName) : name(aName) {} @@ -107,6 +111,8 @@ /** * Copy constructor. XXX This is broken! None of the other state is * copied! + * + * @param aHSystem HSystem object to copy. */ HSystem(const HSystem &aHSystem) : name(aHSystem.name) {} @@ -119,9 +125,9 @@ bool operator<(const HSystem &rhs) const { return name < rhs.name; } /** - * Equivilance operator. + * Equivalence operator. * - * @param rhs Right hand side of the Equivilance operator. + * @param rhs Right hand side of the equivalence operator. */ bool operator==(const HSystem &rhs) const { return name == rhs.name; } @@ -141,7 +147,7 @@ } /** - * Generate libh subsystem tcl interface text. + * Generate libh subsystem TCL interface text. * * @param out stream to send text. */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 6:29:30 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id 7706F37B405 for ; Wed, 17 Apr 2002 06:29:25 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/36) with ESMTP id g3HDTO702633; Wed, 17 Apr 2002 06:29:25 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3HDTO611051; Wed, 17 Apr 2002 06:29:24 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: cleanup of HSystem 2nd try (stage 7) From: Max Okumoto Date: 17 Apr 2002 06:29:24 -0700 Message-ID: Lines: 23 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 * Changed name variable to const since it shouldn't change. --- include/HSystem.hh Wed Apr 17 06:10:28 2002 +++ include/HSystem.hh.stage1 Wed Apr 17 06:22:47 2002 @@ -27,7 +27,7 @@ * are those of the authors and should not be interpreted as representing * official policies, either expressed or implied, of the FreeBSD Project. * - * $FreeBSD: libh/include/HSystem.hh,v 1.11 2002/04/17 02:36:06 antoine Exp $ + * $FreeBSD: libh/include/HSystem.hh,v 1.9 2002/04/15 21:47:31 antoine Exp $ */ // -*- C++ -*- Sun Nov 29 1998 @@ -98,7 +98,7 @@ * @note This should be made private But this would require modifications * outside of HSystem.hh. */ - string name; + const string name; /** * Constructor. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 6:32:27 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id A6D2E37B416 for ; Wed, 17 Apr 2002 06:32:25 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/36) with ESMTP id g3HDWP702906; Wed, 17 Apr 2002 06:32:25 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3HDWPo11123; Wed, 17 Apr 2002 06:32:25 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: cleanup of HSystem 2nd try (stage 8) From: Max Okumoto Date: 17 Apr 2002 06:32:24 -0700 Message-ID: Lines: 14 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 * Fixed missing white space --- include/HSystem.hh.stage1 Wed Apr 17 06:22:47 2002 +++ include/HSystem.hh Wed Apr 17 06:22:00 2002 @@ -105,7 +105,7 @@ * * @param aName Name of subsystem. */ - HSystem(const string &aName) + HSystem(const string &aName) : name(aName) {} /** To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 6:56:23 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id 91A3A37B400 for ; Wed, 17 Apr 2002 06:56:21 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/36) with ESMTP id g3HDuK705037; Wed, 17 Apr 2002 06:56:21 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3HDuKb13107; Wed, 17 Apr 2002 06:56:20 -0700 (PDT) To: The Anarcat Subject: Re: cleanup of HSystem 2nd try (stage 4) References: <20020416235859.GA312@lenny.anarcat.dyndns.org> <20020417015227.GA563@lenny.anarcat.dyndns.org> Cc: freebsd-libh@FreeBSD.ORG From: Max Okumoto Date: 17 Apr 2002 06:56:20 -0700 In-Reply-To: The Anarcat's message of "Tue, 16 Apr 2002 21:52:27 -0400" Message-ID: Lines: 40 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 The Anarcat writes: [stuff deleted] > I don't know if anyone ever considered replacing the current tcl > interface stuff with swig, but it's an interesting idea. I never > really paid attention to swig before. I think, however, that reducing > the number of dependencies of libh would help it getting into the base > system. There's already a big issue about libh using tcl as a > scripting language because tcl itself is not part of base, and > everyone seems to hate tcl. :) I don't have many problems with tcl. Quoting can become a pain but otherwise its just another programming language. Swig (http://www.swig.org/) is a software development tool that connects programs written in C, C++, and Objective-C with a variety of high-level programming languages. (Java, Perl, Tcl/Tk, etc) After I have clean HSystem up. I might consider replacing it with swig. But first I have to understand it first. :-) > Did you mention you have a non-perl parser that replace > find_classes_descriptions.pl? That would sure be interesting. Again, > the more we reduce dependencies, the more libh will get > acceptance. But perl isn't really considered as excessive dependency > since it's in the base system. [stuff deleted] Yea, the parser would be in HSystem. So we could get ride of a few steps in the build process. Basically build_systems_*.cc and tcl_interface_gen_* would go away. *.cd.cc -> build_systems_*.cc -> tcl_interface_gen_* -> LibTclInterface_*.cc would become *.cd.cc -> LibTclInterface_*.cc Max Okumoto To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 7:13:45 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id CD4D037B400 for ; Wed, 17 Apr 2002 07:13:41 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/36) with ESMTP id g3HEDf706975; Wed, 17 Apr 2002 07:13:41 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3HEDfO14667; Wed, 17 Apr 2002 07:13:41 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: cleanup of HSystem 2nd try (stage 9) From: Max Okumoto Date: 17 Apr 2002 07:13:40 -0700 Message-ID: Lines: 55 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 * Cleaned up main by adding usefull named variables and added a doxygen comment explaining what it does. Index: lib/tcl/tcl_interface_gen.cc =================================================================== RCS file: /home/libh/cvs/libh/lib/tcl/tcl_interface_gen.cc,v retrieving revision 1.10 diff -u -w -r1.10 tcl_interface_gen.cc --- lib/tcl/tcl_interface_gen.cc 2002/04/17 02:34:55 1.10 +++ lib/tcl/tcl_interface_gen.cc 2002/04/17 14:11:37 @@ -42,24 +42,38 @@ #include #include +/** + * Main entry point for tcl bindings generator. Create the interface code + * between tcl and C++ + * + * @returns 0 for success, + * 1 for incorrect number of args, + * 2 for some an exception. + */ int main( int argc, char** argv ) { + const string progname = argv[0]; + if ( argc != 3 ) { - cerr << "Usage: " << argv[0] << " " << endl; + cerr << "Usage: " << progname << " " << endl; return 1; } + const string name = argv[1]; + const string ofile = argv[2]; + try { Systems systems; build_systems( systems ); - Systems::iterator system = systems.find( HSystem( argv[1] ) ); + Systems::const_iterator system = systems.find(HSystem(name)); if ( system == systems.end() ) - throw runtime_error( string( "System " ) + argv[1] + " is unknown" ); + throw runtime_error("System " + name + " is unknown"); - ofstream out( argv[2] ); + ofstream out(ofile.c_str()); if ( !out ) - throw runtime_error( string( "Unable to create " ) + argv[2] + ": " + ::strerror( errno ) ); + throw runtime_error("Unable to create " + ofile + + ": " + ::strerror(errno)); HSystem& s = const_cast( *system ); s.gen_file( out ); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 7:21:59 2002 Delivered-To: freebsd-libh@freebsd.org Received: from mail1.qc.uunet.ca (mail1.qc.uunet.ca [198.168.54.16]) by hub.freebsd.org (Postfix) with ESMTP id 4908E37B405 for ; Wed, 17 Apr 2002 07:21:54 -0700 (PDT) Received: from Xtanbul ([216.94.147.34]) by mail1.qc.uunet.ca (8.10.2/8.10.2) with ESMTP id g3HELlj11645; Wed, 17 Apr 2002 10:21:48 -0400 Date: Wed, 17 Apr 2002 10:20:13 -0400 Subject: Re: cleanup of HSystem 2nd try (stage 4) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Mime-Version: 1.0 (Apple Message framework v481) Cc: The Anarcat , freebsd-libh@FreeBSD.ORG To: Max Okumoto From: Antoine Beaupre In-Reply-To: Message-Id: <3BABB735-520E-11D6-BCD9-0050E4A0BB3F@anarcat.ath.cx> Content-Transfer-Encoding: quoted-printable X-Mailer: Apple Mail (2.481) 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 Le Mercredi 17 avril 2002, =E0 09:56 , Max Okumoto a =E9crit : > The Anarcat writes: > > [stuff deleted] >> I don't know if anyone ever considered replacing the current tcl >> interface stuff with swig, but it's an interesting idea. I never >> really paid attention to swig before. I think, however, that reducing >> the number of dependencies of libh would help it getting into the = base >> system. There's already a big issue about libh using tcl as a >> scripting language because tcl itself is not part of base, and >> everyone seems to hate tcl. :) > > I don't have many problems with tcl. Quoting can become a pain > but otherwise its just another programming language. That's what I think too. > Swig (http://www.swig.org/) is a software development tool > that connects programs written in C, C++, and Objective-C > with a variety of high-level programming languages. (Java, > Perl, Tcl/Tk, etc) Yeah, I read their propaganda too. The advantage of swig over our current scheme is that it kind of removes=20= the binding of libh with tcl. It allows generation of other interfaces.=20= But that can also be a problem in itself: tcl has the safe interpreter=20= mode for installing packages which is mostly why it was chosen (along=20 with easy C integration). But then again, if the packages are written in=20= TCL, they won't be interpreted as perl, won't they? :) The disadvantage of swig over our current scheme is that it's another=20 dependency, and we don't have control over the API. > After I have clean HSystem up. I might consider replacing it with > swig. But first I have to understand it first. :-) Yeah. And you'll have to face the flamewar. But I think I'd be happy to=20= see a flamewar on libh@. It'd warm up the project. ;) >> Did you mention you have a non-perl parser that replace >> find_classes_descriptions.pl? That would sure be interesting. Again, >> the more we reduce dependencies, the more libh will get >> acceptance. But perl isn't really considered as excessive dependency >> since it's in the base system. > [stuff deleted] > > Yea, the parser would be in HSystem. So we could get ride of a few > steps in the build process. Basically build_systems_*.cc and > tcl_interface_gen_* would go away. Whoa, that would be good. Really good. It's really bad to have generated=20= cc files in the compile directories: they escape documentation and=20 impede understanding of the system. > *.cd.cc -> build_systems_*.cc -> tcl_interface_gen_* ->=20 > LibTclInterface_*.cc > would become > > *.cd.cc -> LibTclInterface_*.cc I don't see anything wrong with this, if it works. I was wondering why=20= the heck we'd parse the .cd.cc files with a perl script to generate C++=20= code when the .cd.cc file is C++ code in itself. > Max Okumoto , my hero. ;) A. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 7:28:46 2002 Delivered-To: freebsd-libh@freebsd.org Received: from energyhq.homeip.net (213-97-200-73.uc.nombres.ttd.es [213.97.200.73]) by hub.freebsd.org (Postfix) with ESMTP id 3E04437B41A for ; Wed, 17 Apr 2002 07:28:40 -0700 (PDT) Received: by energyhq.homeip.net (Postfix, from userid 1001) id 8855A3FC5C; Wed, 17 Apr 2002 16:28:29 +0200 (CEST) Date: Wed, 17 Apr 2002 16:28:29 +0200 From: Miguel Mendez To: Nathan Ahlstrom , freebsd-libh@FreeBSD.org Subject: Re: libh project Message-ID: <20020417162829.A22290@energyhq.homeip.net> Mail-Followup-To: Nathan Ahlstrom , freebsd-libh@FreeBSD.org References: <20020415211749.A97833@energyhq.homeip.net> <20020415194028.GA20546@winternet.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="TB36FDmn/VVEgNH/" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020415194028.GA20546@winternet.com>; from nrahlstr@winternet.com on Mon, Apr 15, 2002 at 02:40:29PM -0500 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 --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 15, 2002 at 02:40:29PM -0500, Nathan Ahlstrom wrote: Hi Nathan and the rest of the libh people, > Also please check out the libh project and begin reading the BUGS and > HACKERS files. Right now one of the main thrusts of the project is > to document the source code well, so help there would be very much > appreciated. =20 I've been playing with libh for a while, and reading the source code. I think I might help documenting it. So my question is, is there a prefered format for that task?=20 >=20 > Also the port (/usr/ports/misc/libh) is in need of updating, which=20 > I haven't had a chance to do. If now one is going to work on that, I'll update the port myself. Cheers, --=20 Miguel Mendez - flynn@energyhq.homeip.net GPG Public Key :: http://energyhq.homeip.net/files/pubkey.txt EnergyHQ :: http://www.energyhq.tk FreeBSD - The power to serve! --TB36FDmn/VVEgNH/ 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 iD8DBQE8vYaMnLctrNyFFPERAr8gAJ9jLfbycgel3EGZfGDVOI4mLmiAZwCgkJX0 o5F0ZIsNvwtfRk2Uc/JDet4= =c7/7 -----END PGP SIGNATURE----- --TB36FDmn/VVEgNH/-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 7:41:48 2002 Delivered-To: freebsd-libh@freebsd.org Received: from southpole.winternet.com (southpole.winternet.com [198.174.169.153]) by hub.freebsd.org (Postfix) with ESMTP id C3ECF37B405 for ; Wed, 17 Apr 2002 07:41:45 -0700 (PDT) Received: from tundra.winternet.com (nrahlstr@tundra.winternet.com [198.174.169.11]) by southpole.winternet.com (8.12.2/8.12.1/sci) with ESMTP id g3HEfHZd012356; Wed, 17 Apr 2002 09:41:25 -0500 (CDT) SMTP "HELO" (ESMTP) greeting from tundra.winternet.com But _really_ from :: nrahlstr@tundra.winternet.com [198.174.169.11] SMTP "MAIL From:" = nrahlstr@iceberg.winternet.com SMTP "RCPT To:" = We have no RCPT Received: (from nrahlstr@localhost) by tundra.winternet.com (8.10.2+Sun/8.10.2) id g3HEf9B27253; Wed, 17 Apr 2002 09:41:09 -0500 (CDT) Date: Wed, 17 Apr 2002 09:41:09 -0500 From: Nathan Ahlstrom To: Miguel Mendez Cc: freebsd-libh@FreeBSD.ORG Subject: Re: libh project Message-ID: <20020417144109.GB27157@winternet.com> Mail-Followup-To: Nathan Ahlstrom , Miguel Mendez , freebsd-libh@FreeBSD.ORG References: <20020415211749.A97833@energyhq.homeip.net> <20020415194028.GA20546@winternet.com> <20020417162829.A22290@energyhq.homeip.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020417162829.A22290@energyhq.homeip.net> User-Agent: Mutt/1.3.24i 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 > I've been playing with libh for a while, and reading the source code. I > think I might help documenting it. So my question is, is there a > prefered format for that task? I think that Javadoc style comments are the required format, someone correct me if I am wrong. The plan is to use doxygen (http://www.doxygen.org) to auto-generate HTML from the code documentation. Thanks, Nathan -- Nathan Ahlstrom / nra@NetBSD.org / nra@FreeBSD.org / GPG: 0x67BC9D19 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 7:48: 3 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id 7839737B41E for ; Wed, 17 Apr 2002 07:48:01 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/36) with ESMTP id g3HElu713060; Wed, 17 Apr 2002 07:47:57 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3HEluR17836; Wed, 17 Apr 2002 07:47:56 -0700 (PDT) To: Nathan Ahlstrom Cc: Miguel Mendez , freebsd-libh@FreeBSD.ORG Subject: Re: libh project References: <20020415211749.A97833@energyhq.homeip.net> <20020415194028.GA20546@winternet.com> <20020417162829.A22290@energyhq.homeip.net> <20020417144109.GB27157@winternet.com> From: Max Okumoto Date: 17 Apr 2002 07:47:56 -0700 In-Reply-To: Nathan Ahlstrom's message of "Wed, 17 Apr 2002 09:41:09 -0500" Message-ID: Lines: 25 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 Thats the format that I have been adding to the HSystem code. Max Okumoto Nathan Ahlstrom writes: > > I've been playing with libh for a while, and reading the source code. I > > think I might help documenting it. So my question is, is there a > > prefered format for that task? > > I think that Javadoc style comments are the required format, someone > correct me if I am wrong. > > The plan is to use doxygen (http://www.doxygen.org) to auto-generate > HTML from the code documentation. > > Thanks, > Nathan > > -- > Nathan Ahlstrom / nra@NetBSD.org / nra@FreeBSD.org / GPG: 0x67BC9D19 > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-libh" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 7:48:16 2002 Delivered-To: freebsd-libh@freebsd.org Received: from mail1.qc.uunet.ca (mail1.qc.uunet.ca [198.168.54.16]) by hub.freebsd.org (Postfix) with ESMTP id 6338A37B41A for ; Wed, 17 Apr 2002 07:48:12 -0700 (PDT) Received: from Xtanbul ([216.94.147.34]) by mail1.qc.uunet.ca (8.10.2/8.10.2) with ESMTP id g3HEluj17052; Wed, 17 Apr 2002 10:47:56 -0400 Date: Wed, 17 Apr 2002 10:46:22 -0400 Subject: Re: libh project Content-Type: text/plain; charset=ISO-8859-1; format=flowed Mime-Version: 1.0 (Apple Message framework v481) Cc: Miguel Mendez , freebsd-libh@FreeBSD.ORG To: Nathan Ahlstrom From: Antoine Beaupre In-Reply-To: <20020417144109.GB27157@winternet.com> Message-Id: Content-Transfer-Encoding: quoted-printable X-Mailer: Apple Mail (2.481) 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 Le Mercredi 17 avril 2002, =E0 10:41 , Nathan Ahlstrom a =E9crit : > >> I've been playing with libh for a while, and reading the source code. = I >> think I might help documenting it. So my question is, is there a >> prefered format for that task? > > I think that Javadoc style comments are the required format, someone > correct me if I am wrong. > > The plan is to use doxygen (http://www.doxygen.org) to auto-generate > HTML from the code documentation. that's exactly it. At least, for the libh API. For other parts aspects=20= of the system (howtos, etc), plain text is used, right now, but=20 HTML/SGML is also recommended. A To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 7:57:19 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 7F91137B417 for ; Wed, 17 Apr 2002 07:57:17 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3HEvGu24320 for libh@FreeBSD.org; Wed, 17 Apr 2002 09:57:16 -0500 (CDT) (envelope-from antoine) Message-Id: <200204171457.g3HEvGu24320@usw4.freebsd.org> From: Antoine Beaupré Date: Wed, 17 Apr 2002 09:57:16 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/include HSystem.hh 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 antoine 2002/04/17 09:57:16 CDT Modified files: include HSystem.hh Log: Correct spelling and add some parameter comments Submitted by: Max Okumoto Revision Changes Path 1.12 +12 -6 libh/include/HSystem.hh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 8: 0:53 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id 6EC2437B421 for ; Wed, 17 Apr 2002 08:00:18 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/36) with ESMTP id g3HF0H715541; Wed, 17 Apr 2002 08:00:17 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3HF0Hd19261; Wed, 17 Apr 2002 08:00:17 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: cleanup of HSystem 2nd try (stage 10) From: Max Okumoto Date: 17 Apr 2002 08:00:17 -0700 Message-ID: Lines: 153 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 * Cleanup some white space in main, and for function declarations --- lib/tcl/tcl_interface_gen.cc Wed Apr 17 07:29:41 2002 +++ lib/tcl/tcl_interface_gen.cc.stage1 Wed Apr 17 07:41:44 2002 @@ -50,11 +50,12 @@ * 1 for incorrect number of args, * 2 for some an exception. */ -int main( int argc, char** argv ) +int +main(int argc, char** argv) { const string progname = argv[0]; - if ( argc != 3 ) { + if (argc != 3) { cerr << "Usage: " << progname << " " << endl; return 1; } @@ -64,21 +65,21 @@ try { Systems systems; - build_systems( systems ); + build_systems(systems); Systems::const_iterator system = systems.find(HSystem(name)); - if ( system == systems.end() ) + if (system == systems.end()) throw runtime_error("System " + name + " is unknown"); ofstream out(ofile.c_str()); - if ( !out ) + if (!out) throw runtime_error("Unable to create " + ofile + ": " + ::strerror(errno)); - HSystem& s = const_cast( *system ); - s.gen_file( out ); + HSystem& s = const_cast(*system); + s.gen_file(out); } - catch ( exception& err ) { + catch (exception& err) { cerr << "Error: " << err.what() << endl; return 2; } @@ -96,7 +97,8 @@ gen_footer(out); } -void HSystem::gen_header( ostream& out ) +void +HSystem::gen_header(ostream& out) { time_t t = time( 0 ); out << "/*" << endl; @@ -125,7 +127,8 @@ } /* HSystem::gen_header */ -void HSystem::gen_class_header( ostream& out, const ClassDesc *aClassDescription ) +void +HSystem::gen_class_header(ostream& out, const ClassDesc *aClassDescription) { out << "class " << replace_chars( aClassDescription->name, ':', '_' ) << "Access : "; if ( aClassDescription->parents[0] ) { @@ -144,7 +147,9 @@ } /* HSystem::gen_class_header */ -void HSystem::gen_callback_interfaces( ostream& out, const ClassDesc *aClassDescription ) +void +HSystem::gen_callback_interfaces(ostream& out, + const ClassDesc *aClassDescription) { if ( aClassDescription->has_callbacks() ) { out << " virtual void activate_callback( Tcl_Interp* interp, Tcl_Obj* aCommand, Tcl_Obj* aUserData, Tcl_Obj* aArg, LanguageInterface::SpecificCallbackData& aSpecificCallbackData )\n" @@ -185,7 +190,9 @@ } /* HSystem::gen_callback_interfaces */ -void HSystem::gen_dynamic_methods_interfaces( ostream& out, const ClassDesc *aClassDescription ) +void +HSystem::gen_dynamic_methods_interfaces(ostream& out, + const ClassDesc *aClassDescription) { out << " static int methodCommand( ClientData obj, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[] )\n" << " {\n" @@ -362,7 +369,9 @@ } /* HSystem::gen_dynamic_methods_interfaces */ -void HSystem::gen_static_method_interfaces( ostream& out, const ClassDesc *aClassDescription ) +void +HSystem::gen_static_method_interfaces(ostream& out, + const ClassDesc *aClassDescription) { if ( aClassDescription->staticMethods() > 0 ) { out << " public:\n"; @@ -427,7 +436,8 @@ } /* HSystem::gen_static_method_interfaces */ -void HSystem::gen_classes_interfaces( ostream& out ) +void +HSystem::gen_classes_interfaces(ostream& out) { for ( Descriptions::const_iterator di = descriptions.begin(); di != descriptions.end(); ++di ) { cout << (*di)->name << endl; @@ -446,7 +456,8 @@ } /* HSystem::gen_dynamic_methods_interfaces */ -void HSystem::gen_register_command_access( ostream& out ) +void +HSystem::gen_register_command_access(ostream& out) { out << "void register_command_access_tcl()\n" << "{\n"; @@ -470,7 +481,8 @@ } /* HSystem::gen_register_command_access */ -void HSystem::gen_footer( ostream& out ) +void +HSystem::gen_footer(ostream& out) { out << "/* end */" << endl; out << endl; @@ -478,7 +490,8 @@ } /* HSystem::gen_footer */ -string HSystem::gen_result_to_obj( MethodDesc::Value t ) +string +HSystem::gen_result_to_obj(MethodDesc::Value t) { switch ( (MethodDesc::ValueType)t ) { case MethodDesc::vtVoid: @@ -515,7 +528,9 @@ } /* HSystem::gen_result_to_obj */ -string HSystem::gen_method_argument( MethodDesc::Value t, int argno, int method_argno, bool last_arg_in_set_method ) +string +HSystem::gen_method_argument(MethodDesc::Value t, int argno, + int method_argno, bool last_arg_in_set_method) { string result; if ( t.optional() && t != MethodDesc::vtList && t != MethodDesc::vtListRef && t != MethodDesc::vtListPtr && !last_arg_in_set_method ) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 8: 5: 3 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 4D41C37B400 for ; Wed, 17 Apr 2002 08:05:00 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3HF4xH24359 for libh@FreeBSD.org; Wed, 17 Apr 2002 10:04:59 -0500 (CDT) (envelope-from antoine) Message-Id: <200204171504.g3HF4xH24359@usw4.freebsd.org> From: Antoine Beaupré Date: Wed, 17 Apr 2002 10:04:59 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/include HSystem.hh 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 antoine 2002/04/17 10:04:59 CDT Modified files: include HSystem.hh Log: constify HSystem::name Submitted by: Max Okumoto Revision Changes Path 1.13 +2 -2 libh/include/HSystem.hh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 8: 5:49 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 1240937B404 for ; Wed, 17 Apr 2002 08:05:47 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3HF5k924391 for libh@FreeBSD.org; Wed, 17 Apr 2002 10:05:46 -0500 (CDT) (envelope-from antoine) Message-Id: <200204171505.g3HF5k924391@usw4.freebsd.org> From: Antoine Beaupré Date: Wed, 17 Apr 2002 10:05:46 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/include HSystem.hh 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 antoine 2002/04/17 10:05:46 CDT Modified files: include HSystem.hh Log: whitespace cleanup Submitted by: Max Okumoto Revision Changes Path 1.14 +2 -2 libh/include/HSystem.hh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Wed Apr 17 8:11: 9 2002 Delivered-To: freebsd-libh@freebsd.org Received: from usw4.freebsd.org (usw4.freebsd.org [209.180.6.228]) by hub.freebsd.org (Postfix) with ESMTP id 6345637B400 for ; Wed, 17 Apr 2002 08:11:07 -0700 (PDT) Received: (from antoine@localhost) by usw4.freebsd.org (8.11.6/8.11.6) id g3HFB7J24433 for libh@FreeBSD.org; Wed, 17 Apr 2002 10:11:07 -0500 (CDT) (envelope-from antoine) Message-Id: <200204171511.g3HFB7J24433@usw4.freebsd.org> From: Antoine Beaupré Date: Wed, 17 Apr 2002 10:11:06 -0500 (CDT) To: libh@FreeBSD.org Subject: cvs commit: libh/lib/tcl tcl_interface_gen.cc 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 antoine 2002/04/17 10:11:06 CDT Modified files: lib/tcl tcl_interface_gen.cc Log: cleanup main() by adding more significant variable names also add doxygen comment explaining what it does Submitted by: Max Okumoto Revision Changes Path 1.11 +20 -6 libh/lib/tcl/tcl_interface_gen.cc To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Thu Apr 18 5:54:35 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id 238DA37B41E for ; Thu, 18 Apr 2002 05:53:56 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/37) with ESMTP id g3ICrph02476; Thu, 18 Apr 2002 05:53:52 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3ICrpl28750; Thu, 18 Apr 2002 05:53:51 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: *.cd.cc parser From: Max Okumoto Date: 18 Apr 2002 05:53:51 -0700 Message-ID: Lines: 258 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 Here is my *cd.cc parser can people check if it parses and generates the same kind of output as the perl version? Currently the only difference that I can find is the sort order of the header includes. The ordering is for perl hashs vs C++ map<>. Which should not cause any problems... I don't really plan to use it in the build process, since that would complicate matters. I am looking into merging it with HSystem. *.cd.cc -> build_systems_*.cc -> tcl_interface_gen_* -> LibTclInterface_*.cc would become *.cd.cc -> LibTclInterface_*.cc Max Okumoto ---------------------%<----------------%<-------------- /** * @file */ #include #include #include #include #include extern "C" { #include /* getopt() */ #include /* strlen() */ } class ClassDescParser { typedef string FilePath; typedef string DirPath; typedef string SysName; typedef string ClassDesc; typedef set FileSet; typedef vector ClassDescV; typedef map MapV; typedef map Map; FileSet files; MapV classes; Map systems; public: /** * Process the contents of the ClassDescription file (*.cd.cc). * * @param filename name of file to process. */ void process_file(const string &filename) { ifstream file(filename.c_str()); char buff[4096]; while (file.getline(buff, sizeof(buff))) { string line(buff); /* remove C++ style comments from line */ string::size_type pos = line.find("//"); if (pos != string::npos) { line.erase(pos); } /* * LanguageInterface::Object::ClassDescription ([^\s]+)::sClassDescription[^A-Za-z0-9]/ */ string prefix("LanguageInterface::Object::ClassDescription "); string suffix("::sClassDescription"); /* Find lines which contain prefix */ pos = line.find(prefix); if (pos == string::npos) { continue; /* line does not contain prefix */ } string cd = line.substr(pos + prefix.length()); pos = cd.find(suffix); /* class description must also contain the suffix */ assert(pos != string::npos); /* char following suffix should not be alpha or number */ assert(!isalnum(cd[pos + suffix.length()])); cd.erase(pos); assert(cd.find_first_of(" \t") == string::npos); classes[filename].push_back(cd); } file.close(); files.insert(filename); } /** * Output the build_systems_*.cc file. * * @param prog Name of generator program. * @param the_only_system (Don't know yet.) */ void gen_file(const string &prog, const string *the_only_system) { cout << "/*\n" " * This file is automatically generated by " << prog << ",\n" " * do not edit!\n" " */\n" "\n" "#ifndef HSystem_hh\n" "#include \"HSystem.hh\"\n" "#endif\n" "\n" "#define H_BUILD_SYSTEMS 1\n" "\n"; for (MapV::iterator i = classes.begin(); i != classes.end(); ++i) { FilePath filename = i->first; string::size_type pos = filename.rfind('/'); assert(pos != string::npos); /* contains at least 1 slash */ string system = filename.substr(0, pos); string file = filename.substr(pos + 1); if (the_only_system == NULL) { pos = system.rfind('/'); assert(pos != string::npos); /* contains 1 slash */ systems[system] = system.substr(pos + 1); } else { systems[*the_only_system] = *the_only_system; } pos = system.rfind('/'); pos = system.rfind('/', pos); string systemdir = system.substr(pos + 1); /* remove ".cd.cc" suffix */ pos = file.find(".cd.cc"); assert(pos != string::npos); /* contains ".cd.cc" */ assert(file.length() == pos + strlen(".cd.cc")); /* at end */ file.erase(pos); if (systemdir == "common") { cout << "#ifndef " << file << "_hh\n" "#include \"" << file << ".hh\"\n" "#endif\n" "\n"; } else { cout << "#ifndef " << file << "_hh\n" "#include \"" << systemdir << "/" << file << ".hh\"\n" "#endif\n" "\n"; } } cout << "void\n" "build_systems(Systems& systems)\n" "{\n"; for (Map::iterator i = systems.begin(); i != systems.end(); ++i) { DirPath system = i->first; SysName sysname = i->second; cout << "\tpair s = systems.insert(HSystem(\"" << sysname << "\"));\n" "\tif (!s.second)\n" "\t throw runtime_error(string(\"System \") + s.first->name + \" already exists\");\n" "\tHSystem& system = const_cast(*s.first);\n"; for (FileSet::iterator j = files.begin(); j != files.end(); ++j) { FilePath filename = *j; if ((the_only_system != NULL) || (filename.substr(0, system.length() + 1) == (system + '/'))) { ClassDescV cl = classes[filename]; for (ClassDescV::iterator k = cl.begin(); k != cl.end(); ++k) { cout << "\tsystem.add_class(" << *k << "::thisClassDescription(),\n" "\t\t\t" << *k << "::fileToInclude());\n"; } } } } cout << "} /* build systems */ \n" "\n"; } }; /** * Outputs usage information. * * @param prog Name of binary */ static void usage(const string &prog) { cout << "Usage: " << prog << " -s ...\n"; } /** * The main program. * * It parses the command line arguments, and checks for input files. */ int main(int argc, char *argv[]) { /************************************************************************* * Parse command line args *************************************************************************/ const string prog(argv[0]); string *the_only_system = NULL; int c; while ((c = getopt(argc, argv, "s:")) != -1) { switch (c) { case 's': the_only_system = new string(optarg); break; case '?': default: usage(prog); return(1); /* bad cli options */ } } argc -= optind; argv += optind; if (argc < 1) { usage(prog); return(1); /* missing input files */ } /************************************************************************* * process files *************************************************************************/ ClassDescParser parser; for (int i = 0; i < argc; ++i) { parser.process_file(argv[i]); } parser.gen_file(prog, the_only_system); delete the_only_system; return(0); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Thu Apr 18 13:55:17 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id 2625337B417 for ; Thu, 18 Apr 2002 13:54:54 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/37) with ESMTP id g3IKsnh12307; Thu, 18 Apr 2002 13:54:49 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3IKsnL12355; Thu, 18 Apr 2002 13:54:49 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: cleanup of HSystem 2nd try (stage 11) From: Max Okumoto Date: 18 Apr 2002 13:54:49 -0700 Message-ID: Lines: 141 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 * Created new file lib/tcl/HSystem.cc, it just contains a few includes and a copyright stuff. * Modifed lib/tcl/Makefile.inc1 to compile new file diff -u lib/tcl/Makefile.inc1 lib/tcl/Makefile.inc1.stagex =========================================================== --- lib/tcl/Makefile.inc1 Sun Apr 14 20:14:03 2002 +++ lib/tcl/Makefile.inc1.stagex Sun Apr 14 20:13:53 2002 @@ -44,11 +44,12 @@ -I$S/include/$(HSYSTEM) -I${.OBJDIR} TCL_INGEN_OBJ= tcl_interface_gen.o +HSYSTEM_OBJ= HSystem.o CLEANFILES+= tcl_interface_gen_$(HSYSTEM) \ build_systems_$(HSYSTEM).cc build_systems_$(HSYSTEM).o \ LibTclInterface_$(HSYSTEM).cc LibTclInterface_$(HSYSTEM).o \ - $(TCL_INGEN_OBJ) + $(TCL_INGEN_OBJ) $(HSYSTEM_OBJ) # ------------ DEPENDENCIES --- @@ -57,12 +58,16 @@ LibTclInterface_$(HSYSTEM).cc: tcl_interface_gen_$(HSYSTEM) ./tcl_interface_gen_$(HSYSTEM) $(HSYSTEM) $@ -tcl_interface_gen_$(HSYSTEM): $(TCL_INGEN_OBJ) build_systems_$(HSYSTEM).o $(LIBH_LIBS) - $(CXX) $(CFLAGS) $(TCL_INGEN_OBJ) build_systems_$(HSYSTEM).o \ +tcl_interface_gen_$(HSYSTEM): $(TCL_INGEN_OBJ) $(HSYSTEM_OBJ) build_systems_$(HSYSTEM).o $(LIBH_LIBS) + $(CXX) $(CFLAGS) $(TCL_INGEN_OBJ) $(HSYSTEM_OBJ) build_systems_$(HSYSTEM).o \ -o tcl_interface_gen_$(HSYSTEM) $(LIBH_LIBS) $(LDADD) $(TCL_INGEN_OBJ): $(CXX) $(CFLAGS) -c $S/lib/tcl/tcl_interface_gen.cc -o ${TCL_INGEN_OBJ} + +$(HSYSTEM_OBJ): + $(CXX) $(CFLAGS) -c $S/lib/tcl/HSystem.cc -o ${HSYSTEM_OBJ} + # build_system_*.cc dependencies diff -u /dev/null lib/tcl/HSystem.cc =========================================================== --- /dev/null Thu Apr 18 03:02:05 2002 +++ lib/tcl/HSystem.cc Wed Apr 17 22:50:04 2002 @@ -0,0 +1,92 @@ +/*- + * Copyright (c) 1998-2002 The FreeBSD Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD PROJECT OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation + * are those of the authors and should not be interpreted as representing + * official policies, either expressed or implied, of the FreeBSD Project. + * + * $FreeBSD$ + */ + +// $Id$ + +#include "HSystem.hh" +#include "String.hh" + +#include +#include +#include +#include + +/* + * The HSystem code will move out of tcl_interface_gen.cc and into + * this file in stage 2 of this commit. + */ +/*- + * Copyright (c) 1998-2002 The FreeBSD Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD PROJECT OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation + * are those of the authors and should not be interpreted as representing + * official policies, either expressed or implied, of the FreeBSD Project. + * + * $FreeBSD$ + */ + +// $Id$ + +#include "HSystem.hh" +#include "String.hh" + +#include +#include +#include +#include + +/* + * The HSystem code will move out of tcl_interface_gen.cc and into + * this file in stage X of this commit. + */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Thu Apr 18 17:20:24 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id E965137B423 for ; Thu, 18 Apr 2002 17:20:03 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/37) with ESMTP id g3J0K3h27384; Thu, 18 Apr 2002 17:20:03 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3J0K3l28745; Thu, 18 Apr 2002 17:20:03 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: cleanup of HSystem 2nd try (stage 12) From: Max Okumoto Date: 18 Apr 2002 17:20:03 -0700 Message-ID: Lines: 68 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 * Clean up comments. Add markers for new functions contained in HSystem.cc Index: include/HSystem.hh =================================================================== RCS file: /home/libh/cvs/libh/include/HSystem.hh,v retrieving revision 1.14 diff -u -r1.14 HSystem.hh --- include/HSystem.hh 2002/04/17 15:05:46 1.14 +++ include/HSystem.hh 2002/04/19 00:17:44 @@ -43,8 +43,6 @@ #include #include -//====================================================================== - /** * Represent a libh subsystem object interface generator. */ @@ -91,6 +89,19 @@ string gen_result_to_obj(MethodDesc::Value t); string gen_method_argument(MethodDesc::Value t, int argno, int method_argno, bool last_arg_in_set_method); + /*----- New methods in HSystem.cc will go here ----*/ + + /** + * Parse *.cd.cc file for ClassDescriptions. + * + * @param filename Name of input file. + * + * @note This func has yet to be written. + */ + void parse_ClassDesc(const string &filename); + + /*----- New methods in HSystem.cc will go here ----*/ + public: /** * Name of subsystem. @@ -152,18 +163,14 @@ * @param out stream to send text. */ void gen_file(ostream &out); - -}; // class HSystem -//====================================================================== +}; /** * a set of systems */ typedef set Systems; -//====================================================================== - /** * Initialize a subsystem and register it. * @@ -178,7 +185,5 @@ * @param systems the set of HSystem objects to add the subsystem to */ void build_systems(Systems &systems); - -//====================================================================== #endif // HSystem_hh To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message From owner-freebsd-libh Sat Apr 20 0:30: 3 2002 Delivered-To: freebsd-libh@freebsd.org Received: from postal.sdsc.edu (postal.sdsc.edu [132.249.20.114]) by hub.freebsd.org (Postfix) with ESMTP id A453937B404 for ; Sat, 20 Apr 2002 00:30:00 -0700 (PDT) Received: from multivac.sdsc.edu (multivac.sdsc.edu [132.249.20.57]) by postal.sdsc.edu (8.11.6/8.11.6/server/37) with ESMTP id g3K7Txh01409; Sat, 20 Apr 2002 00:30:00 -0700 (PDT) Received: by multivac (8.11.6+Sun/1.11-SolarisClient) id g3K7Txp13292; Sat, 20 Apr 2002 00:29:59 -0700 (PDT) To: freebsd-libh@FreeBSD.ORG Subject: ping From: Max Okumoto Date: 20 Apr 2002 00:29:59 -0700 Message-ID: Lines: 4 X-Mailer: Gnus v5.5/XEmacs 20.4 - "Emerald" 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 Anyone home? Max Okumoto To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-libh" in the body of the message