[Magic-dev] Re: Magic MAXPLANES

R. Timothy Edwards tim.edwards at multigig.com
Wed Nov 30 10:18:50 EST 2005


Dear Malvin,

> 1.  Sorry for taking so long, I had some problems
> compiling on Linux with my options.  I manage to
> install in Cygwin without-tcl (as a testcase).  But in
> Linux RH7.3, I had to compile with-tcl before it is
> able to run properly, otherwise running magic
> without-tcl will yield the following message (not sure
> if I messed up somewhere):
> 
> X Error of failed request:  BadValue (integer
> parameter out of range for operation)
>   Major opcode of failed request:  53 (X_CreatePixmap)
>   Value in failed request:  0x7
>   Serial number of failed request:  1991
>   Current serial number in output stream:  2618
> 
> The last working version I tried without this problem
> was rev7.3.74.

This is less critical, so I will look at it sometime later
when I get the chance.  Most likely this is my error, not
yours, although sometimes the error can actually be the
X server.  XCreatePixmap errors, however, usually arise
from a timing problem, in which the call is made before
the target window is mapped.  Which means it could be
difficult to duplicate the error.

> 2.  Also, installing rev7.3.112 in RH7.3, gave:
> CIFsee.c: In function `cifSeeFunc':
> CIFsee.c:78: parse error before `char'
> CIFsee.c:88: `text' undeclared (first use in this
> function)
> CIFsee.c:88: (Each undeclared identifier is reported
> only once
> CIFsee.c:88: for each function it appears in.)

Type declaration inside a code block. . . a C++ syntax
that my compiler accepts without question, but others
balk at.

> 3.  I've found 1 declaration at line 304
> database/DBconnect.c and changed the datatype to
> PlaneMask instead of unsigned integer;  Upon
> recompilation, I was still unable to select/pick paint
> under cursor.  Were you able to recreate the problem
> with the scmos9m_planes.tech testcase?  I traced
> through the routines using the dlong PlaneMask you
> redefined and cannot find any more abnormalities.

I corrected this missing instance, and using your testcase,
managed to track down the problem with selections, which was
that the definition (in database/database.h):

#define PlaneNumToMaskBit(p)    (1 << (p))

had to be changed to:

#define PlaneNumToMaskBit(p)    ((PlaneMask)1 << (p))

Otherwise, the compiler assumes type 32-bit integer for
the "1" and typecasts (p) DOWN to 32-bits to match it,
rather than vice versa.  Compilers never cease to amaze
me in their occasional complete lapse of intelligence.

The fixes are in 7.3.113, which appears to run correctly
on your testcase (assuming a Tcl/Tk-enabled compilation).

				Regards,
				Tim

+--------------------------------+-------------------------------------+
| Dr. R. Timothy Edwards (Tim)   | email: tim.edwards at multigig.com     |
| MultiGiG, Inc.                 | web:   http://www.multigig.com      |
| 100 Enterprise Way, Suite A-3  | phone: (831) 621-3283               |
| Scotts Valley, CA 95066        | cell:  (240) 401-0616               |
+--------------------------------+-------------------------------------+



More information about the magic-dev mailing list