Re: Jive -> Kernel (International Linux)

Daniel G. Linder (dlinder@webcentric.net)
Sat, 18 Jan 1997 22:29:23 -0600 (CST)


On Sat, 18 Jan 1997, Charlie Ross wrote:
> Try this one...
> In generic.h:
> #ifndef HELLO
> #define HELLO "Hello!"
> #endif
> #ifndef BYE
> #define BYE "Bye!"
> #endif
[....]
> Actual program:
> printk(HELLO);
> printk(BYE);
> printk(PRINTER_ERROR);
> printk(KERNEL_OOPS);
>
> compile with -DLANGH1=\"slang.h\" -DLANGH2=\"english.h\" and you get:
> YO!
> PISS OFF!
> Somthing is wrong with the printer.
> OOPS!

At first, I was leaning more toward an in-RAM list of messages that
might be updated by a module when needed (I.E. A Yiddish speaking
operator comes on after a Swahilli operator leaves...). The one thing
that I did not like about this was the kernel "bloat" that this might
entail.
I think that Mr. Ross' usage of the individual files works well. The
only thing we will have to get use to is doing printk(HELLO) as opposed
to doing printk("literal string"). How about printk's that have values
in the string? I.E. "CRC sum on packet %i should be %i but is actually
%i\n". In retrospect, these #defined constants are transparent to the
compiler so this should still work, right?

Dan
OBJoke/Hack: Anyone have the Klingon Language dictionary handy?
compile with -DLANGH1=\"klingon.h\" -DLANGH2=\"english.h\"
:) :| :/ --> Actually, half way serious...?!?!