Date: Sun, 18 Jan 2009 11:11:46 +0100 From: Christoph Mallon <christoph.mallon@gmx.de> To: Garrett Cooper <yanefbsd@gmail.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ed Schouten <ed@freebsd.org> Subject: Re: svn commit: r187374 - head/sys/dev/syscons/teken Message-ID: <49730062.2010900@gmx.de> 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
Garrett Cooper schrieb: > On Sat, Jan 17, 2009 at 3:01 PM, Ed Schouten <ed@freebsd.org> wrote: > > [...] > >> Modified: >> head/sys/dev/syscons/teken/teken_subr_compat.h >> >> Modified: head/sys/dev/syscons/teken/teken_subr_compat.h >> ============================================================================== >> --- head/sys/dev/syscons/teken/teken_subr_compat.h Sat Jan 17 22:53:53 2009 (r187373) >> +++ head/sys/dev/syscons/teken/teken_subr_compat.h Sat Jan 17 23:01:40 2009 (r187374) >> @@ -33,20 +33,23 @@ teken_subr_cons25_set_cursor_type(teken_ >> teken_funcs_param(t, TP_SHOWCURSOR, type != 1); >> } > > [...] > > 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. This is just a one-time include. I guess Ed used the .h suffix so his $EDITOR chooses the right syntax highlighting. There is some magic going on to call these functions (you probably noticed he didn't add any obvious callers): The callers are generated by a script. The differnt parts are then all included in teken.c.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49730062.2010900>