Created attachment 28835 [details] [review] The patch for XSyncValueSubtract Subtracting the same XSyncValue from XSyncValue, XSyncValueSubtract does not return 0. XSyncIntToValue(&a, 100); // a.hi = 0, a.lo = 100 XSyncValueSubtract(&result, &a, &a, overflow); printf("a.hi = %d, a.lo = %d, overflow = %d", a.hi, a.lo, overflow); // a.hi = -1, a.lo = 0 overflow is set to true In the _XSyncValueSubtract MACRO if (t>(presult)->lo) (presult)->hi--;\ must be replaced with if (t<(presult)->lo) (presult)->hi--;\ Sign '>' with '<' Subtracting different values also work not in a correct form. P.S. Copy Paste sometimes work against us.
fixed in xextproto git, thanks for the report! commit 55a0bbdde9b27b8dbc6e75d41c51af3f92dea6e3 Author: Eduard Bagrov <ebagrov@linuxtesting.org> Date: Fri Aug 21 18:48:19 2009 +0200 Fix XSyncValueSubtract typo X.Org bug#23438 <http://bugs.freedesktop.org/show_bug.cgi?id=23438> Signed-off-by: Julien Cristau <jcristau@debian.org>
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.