svn commit: r187374 - head/sys/dev/syscons/teken

Ed Schouten ed at
Sun Jan 18 02:58:28 PST 2009

Hello Garrett,

* Garrett Cooper <yanefbsd at> wrote:
> Dumb question:
> 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.
> 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.

 Ed Schouten <ed at>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url :

More information about the svn-src-head mailing list