From owner-svn-src-head@FreeBSD.ORG Sun Jan 18 10:58:27 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCFEA106564A; Sun, 18 Jan 2009 10:58:27 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 66B068FC0A; Sun, 18 Jan 2009 10:58:27 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id E49111CC46; Sun, 18 Jan 2009 11:58:25 +0100 (CET) Date: Sun, 18 Jan 2009 11:58:25 +0100 From: Ed Schouten To: Garrett Cooper Message-ID: <20090118105825.GR1247@hoeg.nl> References: <200901172301.n0HN1ePm054707@svn.freebsd.org> <7d6fde3d0901180146v4fe098abmd526e2a2c869282b@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0iexB5Bk8cF8G6DP" Content-Disposition: inline In-Reply-To: <7d6fde3d0901180146v4fe098abmd526e2a2c869282b@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r187374 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2009 10:58:28 -0000 --0iexB5Bk8cF8G6DP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Garrett, * Garrett Cooper wrote: > Dumb question: >=20 > Why are C function definitions in a .h file? I know it's legal, but at > least from what I've been coached on in the past, it isn't necessarily > the most kosher way of solving the issue. >=20 > Macros are a different point. The reason why the file ends with .h, is because it is included from teken.c. I could have named it teken_subr_compat.c, but I used the .h extension to make it more clear this file is included somewhere else, it doesn't live on its own. The reason why everything is included in teken.c, is because libteken has a very large amount of small functions. Right now almost all the functions in teken_subr* are inlined into the state machine itself, having a dramatic effect on the binary size. So yes, it's not as elegant/traditional as what we normally have, but there is a reason why I did it. --=20 Ed Schouten WWW: http://80386.nl/ --0iexB5Bk8cF8G6DP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklzC1EACgkQ52SDGA2eCwWyzgCfUQm00z3QLDOkG7s0mAvF+rKv tZAAnjx1lOYr1jPjaRQUuJ8pn+bJKvLf =LTby -----END PGP SIGNATURE----- --0iexB5Bk8cF8G6DP--