This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository e16-epplets.

View the commit online.

commit d7b1d0c8136a0dfe426e38cd5817378a35b4090a
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Fri Dec 15 06:59:12 2023 +0100

    api: Cosmetics
    
    - Rename ECommsGet() to CommsHandleClientMessage()
    - Rename ECommsWaitForMessage() to CommsWaitForMessage()
    - Normally use Epplet_wait_for_ipc(), not CommsWaitForMessage() internally
---
 api/epplet.c | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/api/epplet.c b/api/epplet.c
index 58aaddd..fe1b433 100644
--- a/api/epplet.c
+++ b/api/epplet.c
@@ -128,7 +128,7 @@ struct _etimer {
     ETimer         *next;
 };
 
-#define ESYNC Epplet_send_ipc("nop");free(ECommsWaitForMessage());
+#define ESYNC Epplet_send_ipc("nop");free(Epplet_wait_for_ipc());
 
 /* The structures for the config file management ... */
 typedef struct {
@@ -142,8 +142,8 @@ static void     CommsSetup(void);
 static void     CommsFindCommsWindow(void);
 static void     CommsHandleDestroy(Window win);
 static int      CommsHandlePropertyNotify(XEvent * ev);
-static char    *ECommsGet(XEvent * ev);
-static char    *ECommsWaitForMessage(void);
+static char    *CommsHandleClientMessage(XEvent * ev);
+static char    *CommsWaitForMessage(void);
 
 static void     Epplet_handle_timer(void);
 static ETimer  *Epplet_get_first(void);
@@ -393,12 +393,6 @@ EXFreeGC(GC gc)
     XFreeGC(disp, gc);
 }
 
-char           *
-Epplet_wait_for_ipc(void)
-{
-    return ECommsWaitForMessage();
-}
-
 void
 Epplet_Init(const char *name, const char *version, const char *info,
             int w, int h, int argc, char **argv, char vertical)
@@ -539,7 +533,7 @@ Epplet_Init(const char *name, const char *version, const char *info,
 
     /* Check if the epplet imageclasses are there. */
     Epplet_send_ipc("imageclass EPPLET_BUTTON query");
-    msg = ECommsWaitForMessage();
+    msg = Epplet_wait_for_ipc();
     if (!msg || strstr(msg, "not"))
     {
         Epplet_dialog_ok
@@ -641,7 +635,7 @@ Epplet_internal_create_window(int w, int h, const char *title, char vertical,
 
     /* Check if the epplet imageclasses are there. */
     Epplet_send_ipc("imageclass EPPLET_BUTTON query");
-    msg = ECommsWaitForMessage();
+    msg = Epplet_wait_for_ipc();
     if (!msg || strstr(msg, "not"))
     {
         Epplet_dialog_ok
@@ -1020,7 +1014,7 @@ Epplet_imageclass_paste(const char *iclass, const char *state, Window ww,
 
     Epplet_send_ipc("imageclass %s apply_copy 0x%x %s %i %i", iclass,
                     (unsigned int)ww, state, w, h);
-    msg = ECommsWaitForMessage();
+    msg = Epplet_wait_for_ipc();
     if (msg)
     {
         sscanf(msg, "%x %x", (unsigned int *)&p, (unsigned int *)&m);
@@ -1045,7 +1039,7 @@ Epplet_imageclass_get_pixmaps(const char *iclass, const char *state, Pixmap *p,
 
     Epplet_send_ipc("imageclass %s apply_copy 0x%x %s %i %i", iclass,
                     (unsigned int)context_win->win, state, w, h);
-    msg = ECommsWaitForMessage();
+    msg = Epplet_wait_for_ipc();
     if (msg)
     {
         sscanf(msg, "%x %x", (unsigned int *)&pp, (unsigned int *)&mm);
@@ -1089,7 +1083,7 @@ Epplet_textclass_get_size(const char *iclass, int *w, int *h, const char *txt)
     char           *msg;
 
     Epplet_send_ipc("textclass %s query_size %s", iclass, txt);
-    msg = ECommsWaitForMessage();
+    msg = Epplet_wait_for_ipc();
     if (msg)
     {
         sscanf(msg, "%i %i", w, h);
@@ -1244,7 +1238,7 @@ Epplet_handle_event(XEvent *ev)
                 Epplet_handle_delete_event(ev->xclient.window);
             else
             {
-                msg = ECommsGet(ev);
+                msg = CommsHandleClientMessage(ev);
                 if (msg)
                 {
                     if (comms_func)
@@ -1806,6 +1800,12 @@ Epplet_send_ipc(const char *fmt, ...)
     }
 }
 
+char           *
+Epplet_wait_for_ipc(void)
+{
+    return CommsWaitForMessage();
+}
+
 static          Bool
 ev_check(Display *d __UNUSED__, XEvent *ev, XPointer p __UNUSED__)
 {
@@ -1817,7 +1817,7 @@ ev_check(Display *d __UNUSED__, XEvent *ev, XPointer p __UNUSED__)
 }
 
 static char    *
-ECommsWaitForMessage(void)
+CommsWaitForMessage(void)
 {
     XEvent          ev;
     char           *msg = NULL;
@@ -1828,13 +1828,13 @@ ECommsWaitForMessage(void)
         if (ev.type == DestroyNotify)
             comms_win = 0;
         else
-            msg = ECommsGet(&ev);
+            msg = CommsHandleClientMessage(&ev);
     }
     return msg;
 }
 
 static char    *
-ECommsGet(XEvent *ev)
+CommsHandleClientMessage(XEvent *ev)
 {
     char            s[13], s2[9], *msg = NULL;
     int             i;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to