Return to BSD News archive
Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!metro!news
From: dawes@physics.su.OZ.AU (David Dawes)
Subject: Re: Bug in X386 Xmono server?
Message-ID: <1992Dec8.123139.9787@ucc.su.OZ.AU>
Sender: news@ucc.su.OZ.AU
Nntp-Posting-Host: physics.su.oz.au
Organization: School of Physics, University of Sydney, Australia
References: <1992Dec4.175440.17024@cli.di.unipi.it>
Date: Tue, 8 Dec 1992 12:31:39 GMT
Lines: 74
In article <1992Dec4.175440.17024@cli.di.unipi.it> romano@pimac2.iet.unipi.it (Romano Giannetti) writes:
>It seem I found a bug in the Xmono server distributed with Linux. I post
>this one here to know if someone know:
>.) if Xfree86 1.2 correct this bug;
>.) if anyone has patched sources so I can recompile Xmono under Linux;
>.) if anyone has a X386 version (not buggy!) to use 640x480x16 generic
> vga (Yes, I have linux on a laptop).
>
>Here is the problem:
>
>It seem I have found a really strange bug in the libX11 library
>(I think, may be the problem is in the Xmono server, I don't know
>so well X11 protocol. Peraphs I have to post it on some other newsgroup?
>Which one? ) I think to have localized the problem
>with the following little program.
>
>Compile (gcc -o bug bug.c -lX11) the program and run it so:
>
>> ./bug 1 10
>
>it writes 'gc line_width=1' and then plot two rectangles with
>ellipses in it: the first one, on the top, correct (I have plotted it
>with Graphic Context gcb, where I have asked *explicitly* line_width
>of 1); the second one, at the bottom, has the ellipses traced only in
>part and shifted on the x-axis to the right (in my screen). Also the
>programs xvier (that comes with the distribution) and xfig 2.1.6 (that
>I compiled and that showed me the problem) have the same behaviour.
This is a known bug in the mono server. I have an unofficial patch which
should fix this:
diff -c mit/server/ddx/mfb/mfbzerarc.c:1.1.1.1 mit/server/ddx/mfb/mfbzerarc.c:1.3
*** mit/server/ddx/mfb/mfbzerarc.c:1.1.1.1 Tue Dec 8 23:24:14 1992
--- mit/server/ddx/mfb/mfbzerarc.c Tue Dec 8 23:24:14 1992
***************
*** 35,46 ****
--- 35,62 ----
extern void miPolyArc(), miZeroPolyArc();
+ /*
+ * Note, LEFTMOST must be the bit leftmost in the actual screen
+ * representation. This depends on both BITMAP_BIT_ORDER and
+ * IMAGE_BYTE_ORDER
+ * DHD 10/92
+ */
+
#if (BITMAP_BIT_ORDER == MSBFirst)
+ #if (IMAGE_BYTE_ORDER == MSBFirst)
#define LEFTMOST ((unsigned int) 0x80000000)
#else
+ #define LEFTMOST ((unsigned int) 0x80)
+ #endif
+ #else
+ #if (IMAGE_BYTE_ORDER == LSBFirst)
#define LEFTMOST ((unsigned int) 1)
+ #else
+ #define LEFTMOST ((unsigned int) 0x1000000)
+ #endif
#endif
+
#define PixelateWhite(addr,off) \
(addr)[(off)>>5] |= SCRRIGHT (LEFTMOST, ((off) & 0x1f))
#define PixelateBlack(addr,off) \
David
--
------------------------------------------------------------------------------
David Dawes (dawes@physics.su.oz.au) DoD#210 | Phone: +61 2 692 2639
School of Physics, University of Sydney, Australia | Fax: +61 2 660 2903
------------------------------------------------------------------------------