Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jan 2009 11:58:25 +0100
From:      Ed Schouten <ed@80386.nl>
To:        Garrett Cooper <yanefbsd@gmail.com>
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
Message-ID:  <20090118105825.GR1247@hoeg.nl>
In-Reply-To: <7d6fde3d0901180146v4fe098abmd526e2a2c869282b@mail.gmail.com>
References:  <200901172301.n0HN1ePm054707@svn.freebsd.org> <7d6fde3d0901180146v4fe098abmd526e2a2c869282b@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--0iexB5Bk8cF8G6DP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello Garrett,

* Garrett Cooper <yanefbsd@gmail.com> 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 <ed@80386.nl>
 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--



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