[PATCH] xkb: Document XkbWriteCountedString.

Peter Hutterer peter.hutterer at who-t.net
Tue Mar 15 17:35:13 PDT 2011


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 xkb/xkb.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/xkb/xkb.c b/xkb/xkb.c
index bdd67a2..ae8a395 100644
--- a/xkb/xkb.c
+++ b/xkb/xkb.c
@@ -4307,6 +4307,17 @@ ProcXkbSetNames(ClientPtr client)
 
 #define	XkbSizeCountedString(s)  ((s)?((((2+strlen(s))+3)/4)*4):4)
 
+/**
+ * Write the zero-terminated string str into wire as a pascal string with a
+ * 16-bit length field prefixed before the actual string.
+ *
+ * @param wire The destination array, usually the wire struct
+ * @param str The source string as zero-terminated C string
+ * @param swap If TRUE, the length field is swapped.
+ *
+ * @return The input string in the format <string length><string> with a
+ * (swapped) 16 bit string length, non-zero terminated.
+ */
 static char *
 XkbWriteCountedString(char *wire,char *str,Bool swap)
 {
-- 
1.7.4



More information about the xorg-devel mailing list