Messages in this thread |  | | Date | Sun, 19 Jan 1997 01:37:04 +0000 | From | William Sowerbutts <> | Subject | Re: Jive -> Kernel (International Linux) |
| |
>This is easy: >#define INTERNATIONAL(x) \PREINTL(x,LANGUAGE) >#define PREINTL(x,y) \ >#ifndef x##y\ >x##_generic\ >#else\ >x##y\ >#endif
inferno:~/temp$ cat posted.c #define INTERNATIONAL(x) \PREINTL(x,LANGUAGE) #define PREINTL(x,y) \ #ifndef x##y\ x##_generic\ #else\ x##y\ #endif inferno:~/temp$ cc posted.c posted.c:7: `#' operator should be followed by a macro argument name posted.c:7: `#' operator should be followed by a macro argument name posted.c:7: `#' operator should be followed by a macro argument name inferno:~/temp$
> >I'm not sure this would work, but it should if cpp is worth anything :).
hot damn, let's all chuck cpp away shall we? ;) actually, i already tried coding this before you suggested it, and it didn't work. i think cpp doesn't expand macros it's just expanded containing "#"s. as they say, "close, but no cigar!".
>What was the whole PREINTL2 step for, anyways?
no idea. i didn't write it, cloister bell did. i just pointed out where it fell over.
> >> If we could get it to work with this primary-language and >> fallback-language, we could maybe insert one or two extra layers in >> between. So, for example, one could ask for kernel messages in German. If >> there was no German message, in French. If there was no German and no >> French, then the generic message. > >This is insanity. :)
bleglebleeeeeeugh. (Elbonian for "Yup").
_________________________________________________________________________ William R Sowerbutts (BtG) btg@thepentagon.com Coder / Guru / Nrrrd http://www.users.dircon.co.uk/~guru/ main(){char*s=">#=0> ^#X@#@^7=";int c=0,m;for(;c<15;c++)for (m=-1;m<7;putchar(m++/6&c%3/2?10:s[c]-31&1<<m?42:32));}
|  |