login
Header Space

 
 

Re: Spreadsheet for Linux

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
Date: Saturday, August 1, 1992 - 3:26 pm

In article <1992Jul31.191834.18442@b11.b11.ingr.com> tracyre@infonode.ingr.com 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."

I've been programming in C for a few years now but never mastered everything
about the preprocessor, so please tell me if there is a better solution.
(My attempts at token pasting and stringizing were unsuccessful.)  I changed
the multiple macro definitions to

#define ctl(x) (x&037)  {Whatever the number really is.}

and converted every instance of ctl(a), ctl(b), ctl(c), etc, to ctl('a'),
ctl('b'), ctl('c'), etc.  This method took quite a while because this
macro is used a lot, but it now expands properly and works.

As I mentioned in an earlier post, xspread suffers from the same bug that
causes sc to display a row a asterisks in a cell containing a value that
is a multiple of ten.


-- 
Jim H.
*
* James L. Henrickson                                 ujlh@sunyit.edu
* "Yet another Jim in the Linux world."  :-)
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Spreadsheet for Linux, James Henrickson, (Sat Aug 1, 3:26 pm)
speck-geostationary