From: Sander van Malssen (sander@kozmix.hacktic.nl)
Date: 08/02/92


From: sander@kozmix.hacktic.nl (Sander van Malssen)
Subject: Re: Spreadsheet for Linux
Date: 2 Aug 1992 18:03:29 GMT

ujlh@pool.info.sunyit.edu (James Henrickson) writes:

> Nope, it's not that easy. :)
>
> It code must be preprocessor-dependent, because there is a macro definition
> (in FOUR places) that doesn't get expanded in the desired way by gcc.
>
> #define ctl(x) ('x'&037) {I'm not sure about the number.}
>
> is the macro. At NUMEROUS places in the code, it is used as ctl(a),
> ctl(b), ctl(c), etc, with the desired effect of expanding to ('a'&037),
> ('b'&037), ('c'&037), etc but gcc just keeps spitting out ('x'&037).
> This results in a statement that goes something like "Same value in switch
> statement."

You could try to add the -traditional-cpp (or was it _cpp) flag, this way
those macros will get expanded properly. Note however that this may cause
cpp to barf on some other constructs - I tried this a while ago in an (as
yet unsuccesfull) attempt to port a TECO-clone to Linux, but cpp then broke
on something else in curses.h, so I ended up changing those CTL(x)'s by hand
just like you did anyway (using qedit under ms-dos I am ashamed to add ;-)).

Sander

Sander van Malssen | sander@kozmix.hacktic.nl | Fido 2:285/101.6