<feed xmlns='http://www.w3.org/2005/Atom'>
<title>nx-libs/nx-X11/programs/Xserver/hw/nxagent/compext, branch 3.6.x</title>
<subtitle>NXv3 (redistributed) 
</subtitle>
<id>https://openid.arctica-project.org/nx-libs/atom?h=3.6.x</id>
<link rel='self' href='https://openid.arctica-project.org/nx-libs/atom?h=3.6.x'/>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/'/>
<updated>2024-05-21T21:07:12+00:00</updated>
<entry>
<title>fix various spelling errors</title>
<updated>2024-05-21T21:07:12+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2024-05-21T21:07:12+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=99bee102279665e4c53eb6ddd51375e2b32d2a40'/>
<id>urn:sha1:99bee102279665e4c53eb6ddd51375e2b32d2a40</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update Copyright years</title>
<updated>2023-04-28T12:39:16+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2022-04-29T19:12:35+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=390887b7487e5a769b2fe2a038404ed47e5c8e91'/>
<id>urn:sha1:390887b7487e5a769b2fe2a038404ed47e5c8e91</id>
<content type='text'>
Addresses ArcticaProject/nx-libs#985
</content>
</entry>
<entry>
<title>nxagent: delete trailing whitespace in many files</title>
<updated>2023-04-27T12:20:56+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2021-11-18T22:02:53+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=36c6f09430f74495cb1802e93b9299be0c3d3e53'/>
<id>urn:sha1:36c6f09430f74495cb1802e93b9299be0c3d3e53</id>
<content type='text'>
Please note that the NX*.c files still have trailing whitespace at
many locations. We keep it like that on purpose to make comparisons to
the files they are derived from easier.
</content>
</entry>
<entry>
<title>Compext.c: spelling fixes</title>
<updated>2023-04-27T12:20:56+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2021-11-18T21:53:56+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=2d26be7da04a0ce870088a8ab2c95b2b0f708ce2'/>
<id>urn:sha1:2d26be7da04a0ce870088a8ab2c95b2b0f708ce2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Compext.c: fix typo in datatype</title>
<updated>2023-04-27T12:20:56+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2021-11-18T21:53:12+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=9859a79d6fdd0c0a0dcf85ffc07ae696b48d0498'/>
<id>urn:sha1:9859a79d6fdd0c0a0dcf85ffc07ae696b48d0498</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Imakefiles: whitespace fixes</title>
<updated>2021-10-30T19:17:30+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2021-10-18T20:54:32+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=3ab28297ce6aa46dfc5f023a405e0ed8247aa881'/>
<id>urn:sha1:3ab28297ce6aa46dfc5f023a405e0ed8247aa881</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Compext.c: fix comparisons of 16bit sequence numbers</title>
<updated>2021-06-08T06:23:35+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2021-03-17T21:17:55+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=2739d0868f849a186f7b06cb0032ee0d2c599532'/>
<id>urn:sha1:2739d0868f849a186f7b06cb0032ee0d2c599532</id>
<content type='text'>
rep-&gt;generic.sequenceNumber is of type CARD16
state-&gt;sequence is of type unsigned long

Converting state-&gt;sequence to an int as it has been done since the
first version of nxcomp I know of (1.3.0-18 from 2003) is wrong here
because for numbers &gt; INT_MAX this will result in a negative number,
which, after applying the 16bit modulo, will not match
rep-&gt;generic.sequenceNumber.

Example with numbers:

CARD16 c = 24565
unsigned long u = 3179110389

c % 65536 = 24565
u % 65536 = 24565

(int)(u) = -1115856907
(int)(u) % 65536 = -40971

-40971 will not match 24565

To fix this we need to ensure the number stays positive. We use CARD16
for this to match the type in the request which is a 16bit number. On
my system CARD16 is unsigned short which is guaranteed to contain _at
least_ the 0-65,535 range. As there is no upper limit of the range we
cannot drop the modulo because we need this value to be 16bit and not
more.

Thanks to Norm Green for providing log after log until we could
finally identify the reason for him seeing "Xlib: unexpected async
reply (sequence 0x94b01439)!" when pasting stopped working.
</content>
</entry>
<entry>
<title>Compext.c: fix misleading error message</title>
<updated>2021-06-08T06:23:35+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2021-03-10T22:04:01+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=3228dcfc5643e18bc7f115b7ac835267d13f42ee'/>
<id>urn:sha1:3228dcfc5643e18bc7f115b7ac835267d13f42ee</id>
<content type='text'>
An X reply contains a type which is X_Reply or X_Error. This is not an
opcode which is used when installing the handler.
</content>
</entry>
<entry>
<title>Compext.c: print received vs expected sequence number</title>
<updated>2021-06-08T06:23:35+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2021-03-10T21:50:46+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=e9a0f94d058c4297e279bae98fbb7fc0ed5ed4c4'/>
<id>urn:sha1:e9a0f94d058c4297e279bae98fbb7fc0ed5ed4c4</id>
<content type='text'>
Should help in debugging "unexpected async reply" problems
</content>
</entry>
<entry>
<title>Compext.c: document function return codes</title>
<updated>2021-06-08T06:23:35+00:00</updated>
<author>
<name>Ulrich Sibiller</name>
<email>uli42@gmx.de</email>
</author>
<published>2021-03-09T17:43:18+00:00</published>
<link rel='alternate' type='text/html' href='https://openid.arctica-project.org/nx-libs/commit/?id=d3573613f209c7d133269a5953ef80f8f947ce0e'/>
<id>urn:sha1:d3573613f209c7d133269a5953ef80f8f947ce0e</id>
<content type='text'>
</content>
</entry>
</feed>
