svn commit: r187374 - head/sys/dev/syscons/teken
ed at 80386.nl
Sun Jan 18 02:58:28 PST 2009
* Garrett Cooper <yanefbsd at gmail.com> 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 80386.nl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20090118/3ecb1a85/attachment.pgp
More information about the svn-src-head