CI commit checks (was: [ANNOUNCE] libXft 2.3.7)

2022-11-30 Thread Alan Coopersmith

On 11/16/22 01:08, Thomas Dickey wrote:

On Tue, Nov 15, 2022 at 03:27:38PM -0500, Thomas E. Dickey wrote:

Thomas E. Dickey (4):
   libxft issue #15
   fix compiler warning
   libxft issue #16


I hadn't thought of this while committing the changes,
but had used short titles because a CI rule limited lines to 80 columns.
(I saw some note about that being undone for some projects(*), uncertain...).


We're working through dropping the requirement for signed-off-by lines, but
I've not heard anything about dropping the 80 column rule.  But then, I'm not
aware of any X.Org repos in which we block the commit for failing the check,
we just make the CI status red.  We could reduce that from error to warning
as well (which I think we've already done in the xserver repo, but not others).


For the record, the full titles here would be longer than 80:
 libxft issue #16
 
 https://gitlab.freedesktop.org/xorg/lib/libxft/-/issues/16
 
 Stack gets smashed in fonts with colors when calling XftGlyphRender
 
 BGRA changes made incorrect comparison for local vs allocated

 buffer in XftGlyphSpecRender


None of those lines look longer than 80 characters to me.


and

 libxft issue #15
 
 https://gitlab.freedesktop.org/xorg/lib/libxft/-/issues/15
 
 XftFontLoadGlyphs for mono font returns wrong info in extents from

 XftTextExtentsUtf8 for variable chars


That one you would need to cut down a bit, but could still put in more info
than just an issue number,

--
-Alan Coopersmith- alan.coopersm...@oracle.com
 Oracle Solaris Engineering - https://blogs.oracle.com/solaris



Re: [PATCH libX11 1/2] Indention fixes around recent dpy->in_ifevent changes

2022-11-30 Thread Alan Coopersmith

It looks like we updated the Workflow Overview section at the beginning
to mention "Create a merge request in the freedesktop.org gitlab", but
someone still needs to update the later sections of the document to cover
that and remove the email instructions.  Sorry about the confusion here.

-alan-

On 11/30/22 15:47, Ulrich Sibiller wrote:

Well, then the documentation is wrong, I tried to follow this:

https://www.x.org/wiki/Development/Documentation/SubmittingPatches/ 



which clearly talks about sending patches to the ML, but at the same time 
mentioning gitlab without mentioning merge requests. Would have preferred a 
gitlab MR instead of this ML hassle... ;-)


Uli


On Thu, Dec 1, 2022 at 12:37 AM Alan Coopersmith > wrote:


On 11/30/22 14:42, Ulrich Sibiller wrote:
 > Resent due to gmail mangling tabs.. Seems impossible nowadays to send a
plaintext mail unmodifed using gmail's web interface...

Just one of many reasons we prefer patches to be sent as merge requests on
https://gitlab.freedesktop.org/xorg/lib/libx11
 instead.  We can handle
emailed patches if using gitlab is a problem for you, but then we have
to be extra careful to make sure it doesn't get mangled at any point
along the way.

-- 
          -Alan Coopersmith- alan.coopersm...@oracle.com


           Oracle Solaris Engineering - https://blogs.oracle.com/solaris




--
-Alan Coopersmith- alan.coopersm...@oracle.com
 Oracle Solaris Engineering - https://blogs.oracle.com/solaris



Re: [PATCH libX11 1/2] Indention fixes around recent dpy->in_ifevent changes

2022-11-30 Thread Ulrich Sibiller
Well, then the documentation is wrong, I tried to follow this:

https://www.x.org/wiki/Development/Documentation/SubmittingPatches/

which clearly talks about sending patches to the ML, but at the same time
mentioning gitlab without mentioning merge requests. Would have preferred a
gitlab MR instead of this ML hassle... ;-)

Uli


On Thu, Dec 1, 2022 at 12:37 AM Alan Coopersmith <
alan.coopersm...@oracle.com> wrote:

> On 11/30/22 14:42, Ulrich Sibiller wrote:
> > Resent due to gmail mangling tabs.. Seems impossible nowadays to send a
> plaintext mail unmodifed using gmail's web interface...
>
> Just one of many reasons we prefer patches to be sent as merge requests on
> https://gitlab.freedesktop.org/xorg/lib/libx11 instead.  We can handle
> emailed patches if using gitlab is a problem for you, but then we have
> to be extra careful to make sure it doesn't get mangled at any point
> along the way.
>
> --
>  -Alan Coopersmith- alan.coopersm...@oracle.com
>   Oracle Solaris Engineering - https://blogs.oracle.com/solaris
>
>


Re: [PATCH libX11 1/2] Indention fixes around recent dpy->in_ifevent changes

2022-11-30 Thread Alan Coopersmith

On 11/30/22 14:42, Ulrich Sibiller wrote:

Resent due to gmail mangling tabs.. Seems impossible nowadays to send a 
plaintext mail unmodifed using gmail's web interface...


Just one of many reasons we prefer patches to be sent as merge requests on
https://gitlab.freedesktop.org/xorg/lib/libx11 instead.  We can handle
emailed patches if using gitlab is a problem for you, but then we have
to be extra careful to make sure it doesn't get mangled at any point
along the way.

--
-Alan Coopersmith- alan.coopersm...@oracle.com
 Oracle Solaris Engineering - https://blogs.oracle.com/solaris



PATCH libX11 2/2] ChkIfEv.c: fix wrong handling of dpy->in_ifevent

2022-11-30 Thread Ulrich Sibiller
From 9d6bb3d179427d832d811e61fb6e4ebb9d004283 Mon Sep 17 00:00:00 2001
From: Ulrich Sibiller 
Date: Wed, 30 Nov 2022 22:19:15 +0100
Subject: [PATCH libX11 2/2] ChkIfEv.c: fix wrong handling of dpy->in_ifevent

Is no longer a bool but a counter.

Signed-off-by: Ulrich Sibiller 
---
 src/ChkIfEv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ChkIfEv.c b/src/ChkIfEv.c
index eba36941..b32c2d3e 100644
--- a/src/ChkIfEv.c
+++ b/src/ChkIfEv.c
@@ -61,7 +61,7 @@ Bool XCheckIfEvent (
*event = qelt->event;
_XDeq(dpy, prev, qelt);
_XStoreEventCookie(dpy, event);
-dpy->in_ifevent = False;
+   dpy->in_ifevent--;
UnlockDisplay(dpy);
return True;
}
--
2.20.1




[PATCH libX11 1/2] Indention fixes around recent dpy->in_ifevent changes

2022-11-30 Thread Ulrich Sibiller
Resent due to gmail mangling tabs.. Seems impossible nowadays to send a 
plaintext mail unmodifed using gmail's web interface...


From 35072d172d0bfecb24fdd8437ecdcd0e391e1f14 Mon Sep 17 00:00:00 2001
From: Ulrich Sibiller 
Date: Wed, 30 Nov 2022 22:18:42 +0100
Subject: [PATCH libX11 1/2] Indention fixes around recent dpy->in_ifevent
 changes

Use the same indention as the surrounding code.

Signed-off-by: Ulrich Sibiller 
---
 src/ChkIfEv.c  |  6 +++---
 src/IfEvent.c  |  6 +++---
 src/OpenDis.c  |  2 +-
 src/PeekIfEv.c |  4 ++--
 src/locking.c  | 16 
 5 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/ChkIfEv.c b/src/ChkIfEv.c
index 1bbcba5b..eba36941 100644
--- a/src/ChkIfEv.c
+++ b/src/ChkIfEv.c
@@ -49,8 +49,8 @@ Bool XCheckIfEvent (
unsigned long qe_serial = 0;
int n;  /* time through count */

-dpy->in_ifevent++;
-LockDisplay(dpy);
+   dpy->in_ifevent++;
+   LockDisplay(dpy);
prev = NULL;
for (n = 3; --n >= 0;) {
for (qelt = prev ? prev->next : dpy->head;
@@ -80,7 +80,7 @@ Bool XCheckIfEvent (
/* another thread has snatched this event */
prev = NULL;
}
-dpy->in_ifevent--;
+   dpy->in_ifevent--;
UnlockDisplay(dpy);
return False;
 }
diff --git a/src/IfEvent.c b/src/IfEvent.c
index 593e7acf..54c37f00 100644
--- a/src/IfEvent.c
+++ b/src/IfEvent.c
@@ -48,8 +48,8 @@ XIfEvent (
register _XQEvent *qelt, *prev;
unsigned long qe_serial = 0;

-dpy->in_ifevent++;
-LockDisplay(dpy);
+   dpy->in_ifevent++;
+   LockDisplay(dpy);
prev = NULL;
while (1) {
for (qelt = prev ? prev->next : dpy->head;
@@ -60,7 +60,7 @@ XIfEvent (
*event = qelt->event;
_XDeq(dpy, prev, qelt);
_XStoreEventCookie(dpy, event);
-dpy->in_ifevent--;
+   dpy->in_ifevent--;
UnlockDisplay(dpy);
return 0;
}
diff --git a/src/OpenDis.c b/src/OpenDis.c
index 17dc4cb2..7c8d4e1a 100644
--- a/src/OpenDis.c
+++ b/src/OpenDis.c
@@ -189,7 +189,7 @@ XOpenDisplay (
dpy->xcmisc_opcode  = 0;
dpy->xkb_info   = NULL;
dpy->exit_handler_data  = NULL;
-dpy->in_ifevent = 0;
+   dpy->in_ifevent = 0;

 /*
  * Setup other information in this display structure.
diff --git a/src/PeekIfEv.c b/src/PeekIfEv.c
index 7e09c00b..68c028b7 100644
--- a/src/PeekIfEv.c
+++ b/src/PeekIfEv.c
@@ -49,7 +49,7 @@ XPeekIfEvent (
register _XQEvent *prev, *qelt;
unsigned long qe_serial = 0;

-dpy->in_ifevent++;
+   dpy->in_ifevent++;
LockDisplay(dpy);
prev = NULL;
while (1) {
@@ -64,7 +64,7 @@ XPeekIfEvent (
_XStoreEventCookie(dpy, );
*event = copy;
}
-dpy->in_ifevent--;
+   dpy->in_ifevent--;
UnlockDisplay(dpy);
return 0;
}
diff --git a/src/locking.c b/src/locking.c
index 690b2bf6..c550603e 100644
--- a/src/locking.c
+++ b/src/locking.c
@@ -486,12 +486,12 @@ static void _XIfEventUnlockDisplay(
 )
 {
 if (dpy->in_ifevent == 0) {
-dpy->lock_fns->lock_display = _XLockDisplay;
-dpy->lock_fns->unlock_display = _XUnlockDisplay;
-dpy->lock->internal_lock_display = _XInternalLockDisplay;
-UnlockDisplay(dpy);
+   dpy->lock_fns->lock_display = _XLockDisplay;
+   dpy->lock_fns->unlock_display = _XUnlockDisplay;
+   dpy->lock->internal_lock_display = _XInternalLockDisplay;
+   UnlockDisplay(dpy);
 } else
-return;
+   return;
 }

 static void _XLockDisplay(
@@ -521,9 +521,9 @@ static void _XLockDisplay(
 _XIDHandler(dpy);
 _XSeqSyncFunction(dpy);
 if (dpy->in_ifevent) {
-dpy->lock_fns->lock_display = _XIfEventLockDisplay;
-dpy->lock_fns->unlock_display = _XIfEventUnlockDisplay;
-dpy->lock->internal_lock_display = _XIfEventInternalLockDisplay;
+   dpy->lock_fns->lock_display = _XIfEventLockDisplay;
+   dpy->lock_fns->unlock_display = _XIfEventUnlockDisplay;
+   dpy->lock->internal_lock_display = _XIfEventInternalLockDisplay;
 }
 }

--
2.20.1




[PATCH libX11 1/2] Indention fixes around recent dpy->in_ifevent changes

2022-11-30 Thread Ulrich Sibiller
>From 35072d172d0bfecb24fdd8437ecdcd0e391e1f14 Mon Sep 17 00:00:00 2001
From: Ulrich Sibiller 
Date: Wed, 30 Nov 2022 22:18:42 +0100
Subject: [PATCH libX11 1/2] Indention fixes around recent
dpy->in_ifevent changes

Use the same indention as the surrounding code.

Signed-off-by: Ulrich Sibiller 
---
 src/ChkIfEv.c  |  6 +++---
 src/IfEvent.c  |  6 +++---
 src/OpenDis.c  |  2 +-
 src/PeekIfEv.c |  4 ++--
 src/locking.c  | 16 
 5 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/ChkIfEv.c b/src/ChkIfEv.c
index 1bbcba5b..eba36941 100644
--- a/src/ChkIfEv.c
+++ b/src/ChkIfEv.c
@@ -49,8 +49,8 @@ Bool XCheckIfEvent (
  unsigned long qe_serial = 0;
  int n; /* time through count */

-dpy->in_ifevent++;
-LockDisplay(dpy);
+ dpy->in_ifevent++;
+ LockDisplay(dpy);
  prev = NULL;
  for (n = 3; --n >= 0;) {
 for (qelt = prev ? prev->next : dpy->head;
@@ -80,7 +80,7 @@ Bool XCheckIfEvent (
  /* another thread has snatched this event */
  prev = NULL;
  }
-dpy->in_ifevent--;
+ dpy->in_ifevent--;
  UnlockDisplay(dpy);
  return False;
 }
diff --git a/src/IfEvent.c b/src/IfEvent.c
index 593e7acf..54c37f00 100644
--- a/src/IfEvent.c
+++ b/src/IfEvent.c
@@ -48,8 +48,8 @@ XIfEvent (
  register _XQEvent *qelt, *prev;
  unsigned long qe_serial = 0;

-dpy->in_ifevent++;
-LockDisplay(dpy);
+ dpy->in_ifevent++;
+ LockDisplay(dpy);
  prev = NULL;
  while (1) {
 for (qelt = prev ? prev->next : dpy->head;
@@ -60,7 +60,7 @@ XIfEvent (
 *event = qelt->event;
 _XDeq(dpy, prev, qelt);
 _XStoreEventCookie(dpy, event);
-dpy->in_ifevent--;
+dpy->in_ifevent--;
 UnlockDisplay(dpy);
 return 0;
  }
diff --git a/src/OpenDis.c b/src/OpenDis.c
index 17dc4cb2..7c8d4e1a 100644
--- a/src/OpenDis.c
+++ b/src/OpenDis.c
@@ -189,7 +189,7 @@ XOpenDisplay (
  dpy->xcmisc_opcode = 0;
  dpy->xkb_info = NULL;
  dpy->exit_handler_data = NULL;
-dpy->in_ifevent = 0;
+ dpy->in_ifevent = 0;

 /*
  * Setup other information in this display structure.
diff --git a/src/PeekIfEv.c b/src/PeekIfEv.c
index 7e09c00b..68c028b7 100644
--- a/src/PeekIfEv.c
+++ b/src/PeekIfEv.c
@@ -49,7 +49,7 @@ XPeekIfEvent (
  register _XQEvent *prev, *qelt;
  unsigned long qe_serial = 0;

-dpy->in_ifevent++;
+ dpy->in_ifevent++;
  LockDisplay(dpy);
  prev = NULL;
  while (1) {
@@ -64,7 +64,7 @@ XPeekIfEvent (
  _XStoreEventCookie(dpy, );
  *event = copy;
 }
-dpy->in_ifevent--;
+dpy->in_ifevent--;
 UnlockDisplay(dpy);
 return 0;
  }
diff --git a/src/locking.c b/src/locking.c
index 690b2bf6..c550603e 100644
--- a/src/locking.c
+++ b/src/locking.c
@@ -486,12 +486,12 @@ static void _XIfEventUnlockDisplay(
 )
 {
 if (dpy->in_ifevent == 0) {
-dpy->lock_fns->lock_display = _XLockDisplay;
-dpy->lock_fns->unlock_display = _XUnlockDisplay;
-dpy->lock->internal_lock_display = _XInternalLockDisplay;
-UnlockDisplay(dpy);
+ dpy->lock_fns->lock_display = _XLockDisplay;
+ dpy->lock_fns->unlock_display = _XUnlockDisplay;
+ dpy->lock->internal_lock_display = _XInternalLockDisplay;
+ UnlockDisplay(dpy);
 } else
-return;
+ return;
 }

 static void _XLockDisplay(
@@ -521,9 +521,9 @@ static void _XLockDisplay(
 _XIDHandler(dpy);
 _XSeqSyncFunction(dpy);
 if (dpy->in_ifevent) {
-dpy->lock_fns->lock_display = _XIfEventLockDisplay;
-dpy->lock_fns->unlock_display = _XIfEventUnlockDisplay;
-dpy->lock->internal_lock_display = _XIfEventInternalLockDisplay;
+ dpy->lock_fns->lock_display = _XIfEventLockDisplay;
+ dpy->lock_fns->unlock_display = _XIfEventUnlockDisplay;
+ dpy->lock->internal_lock_display = _XIfEventInternalLockDisplay;
 }
 }

-- 
2.20.1