Dnia 2010-02-01, pon o godzinie 14:33 -0800, Ping Cheng pisze:
> 2010/1/29 Przemysław Firszt <[email protected]>
>         Hi,
>         It's the last part of "rename xf86Wcm* to wcm*" story.
>         There are a few more remaining, but only in xf86Msg calls:
>         
>         src/wcmCommon.c:xf86Msg(X_ERROR, "Wacom xf86WcmWrite error : %
>         s\n",
>         strerror(errno));
>         
>         src/wcmISDV4.c: xf86Msg(X_WARNING, "%s: xf86WcmWrite
>         ISDV4_STOP error :
>         %s\n",
>         
>         src/wcmISDV4.c: xf86Msg(X_WARNING, "%s: unable to xf86WcmWrite
>         request %
>         s "
>         
>         src/wcmISDV4.c: xf86Msg(X_ERROR, "%s: xf86WcmWrite error : %s
>         \n",
>         local->name, strerror(errno));
>         
>         src/wcmISDV4.c: xf86Msg(X_ERROR, "Wacom xf86WcmRead error : %s
>         \n",
>         
>         src/xf86Wacom.h: * xf86WcmRead() returns -1 AND errno is left
>         as EINTR
>         from hell knows where.
>         
>         I'm not fixing them now, because I'm not sure "what author
>         wants to say"
> 
> I'd say we change them all in the same patch or leave them all as is
> to avoid future confusion.  I vote for changing them all.
I'm afraid I didn't express myself clearly enough - sorry for this.
We dont have xf86Wcm{Read,Write}, xf86{Read,Write} or wcm{Read,Write}
functions in the code. 
[2 minutes for googling]
I found this:
#define xf86WcmRead(a,b,c) xf86ReadSerial((a),(b),(c))
#define xf86WcmWrite(a,b,c) xf86WriteSerial((a),(char*)(b),(c)) 
,so I'll rename xf86WcmRead/Write to xf86{Read,Write}Serial - see
attached patch.
--
Przemo


>From 06e784e57e2c09180b98f3bee02a5319794af22b Mon Sep 17 00:00:00 2001
From: Przemo Firszt <[email protected]>
Date: Tue, 2 Feb 2010 19:37:25 +0000
Subject: [PATCH] Rename xf86Wcm{Read,Write} to xf86{Read,Write}Serial

The xf86Wcm{Read,Write} macros no longer exist, so the modified comments
are more precise with xf86{Read,Write}Serial
Signed-off-by: Przemo Firszt <[email protected]>
---
 src/wcmCommon.c |    2 +-
 src/wcmISDV4.c  |    8 ++++----
 src/xf86Wacom.h |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/wcmCommon.c b/src/wcmCommon.c
index 4ef4071..7fd8d84 100644
--- a/src/wcmCommon.c
+++ b/src/wcmCommon.c
@@ -1641,7 +1641,7 @@ int wcmInitTablet(LocalDevicePtr local, const char* id, float version)
 	/* Reset tablet to known state */
 	if (model->Reset && (model->Reset(local) != Success))
 	{
-		xf86Msg(X_ERROR, "Wacom xf86WcmWrite error : %s\n", strerror(errno));
+		xf86Msg(X_ERROR, "Wacom xf86WriteSerial error : %s\n", strerror(errno));
 		return !Success;
 	}
 
diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c
index 2ad15b3..fee70bd 100644
--- a/src/wcmISDV4.c
+++ b/src/wcmISDV4.c
@@ -156,7 +156,7 @@ static int isdv4Query(LocalDevicePtr local, const char* query, char* data)
 	err = xf86WriteSerial(local->fd, WC_ISDV4_STOP, strlen(WC_ISDV4_STOP));
 	if (err == -1)
 	{
-		xf86Msg(X_WARNING, "%s: xf86WcmWrite ISDV4_STOP error : %s\n",
+		xf86Msg(X_WARNING, "%s: xf86WriteSerial ISDV4_STOP error : %s\n",
 			 local->name, strerror(errno));
 		return !Success;
 	}
@@ -168,7 +168,7 @@ static int isdv4Query(LocalDevicePtr local, const char* query, char* data)
 	/* Send query command to the tablet */
 	if (!wcmWriteWait(local->fd, query))
 	{
-		xf86Msg(X_WARNING, "%s: unable to xf86WcmWrite request %s "
+		xf86Msg(X_WARNING, "%s: unable to xf86WriteSerial request %s "
 			"ISDV4 query command after %d tries\n", local->name,
 			 query, MAXTRY);
 		return !Success;
@@ -385,7 +385,7 @@ static int isdv4StartTablet(LocalDevicePtr local)
 
 	if (err == -1)
 	{
-		xf86Msg(X_ERROR, "%s: xf86WcmWrite error : %s\n", local->name, strerror(errno));
+		xf86Msg(X_ERROR, "%s: xf86WriteSerial error : %s\n", local->name, strerror(errno));
 		return !Success;
 	}
 
@@ -587,7 +587,7 @@ static int wcmWaitForTablet(int fd, char* answer, int size)
 			len = xf86ReadSerial(fd, answer, size);
 			if ((len == -1) && (errno != EAGAIN))
 			{
-				xf86Msg(X_ERROR, "Wacom xf86WcmRead error : %s\n",
+				xf86Msg(X_ERROR, "Wacom xf86ReadSerial error : %s\n",
 						strerror(errno));
 				return 0;
 			}
diff --git a/src/xf86Wacom.h b/src/xf86Wacom.h
index 7b673fe..d72739b 100644
--- a/src/xf86Wacom.h
+++ b/src/xf86Wacom.h
@@ -143,7 +143,7 @@ struct _WacomModule
  * Don't overuse SYSCALL(): use it ONLY when you call low-level functions such
  * as ioctl(), read(), write() and such. Otherwise you can easily lock up X11,
  * for example: you pull out the USB tablet, the handle becomes invalid,
- * xf86WcmRead() returns -1 AND errno is left as EINTR from hell knows where.
+ * xf86ReadSerial() returns -1 AND errno is left as EINTR from hell knows where.
  * Then you'll loop forever, and even Ctrl+Alt+Backspace doesn't help.
  * xf86ReadSerial, WriteSerial, CloseSerial & company already use SYSCALL()
  * internally; there's no need to duplicate it outside the call.
-- 
1.6.6.1

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to