summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2010-04-29 19:51:25 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2010-05-05 15:46:06 -0700
commit27b1aa82a3f0db7d20a303ba093d1ec52de39bff (patch)
treef030fa00cb56b036cb2a5b8d2dbf421575c79607
parent482b19329fac5e311fe0423e58f3e8c573b66114 (diff)
Constify function prototypes
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--A8Eq.c2
-rw-r--r--CA8.c2
-rw-r--r--CmpKey.c2
-rw-r--r--RR.c2
-rw-r--r--WA16.c2
-rw-r--r--WA32.c2
-rw-r--r--WA8.c2
-rw-r--r--Whead.c2
-rw-r--r--include/X11/Xdmcp.h18
9 files changed, 17 insertions, 17 deletions
diff --git a/A8Eq.c b/A8Eq.c
index d274f78..241d953 100644
--- a/A8Eq.c
+++ b/A8Eq.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xdmcp.h>
int
-XdmcpARRAY8Equal (ARRAY8Ptr array1, ARRAY8Ptr array2)
+XdmcpARRAY8Equal (const ARRAY8Ptr array1, const ARRAY8Ptr array2)
{
int i;
diff --git a/CA8.c b/CA8.c
index dc68c40..79ca6b3 100644
--- a/CA8.c
+++ b/CA8.c
@@ -37,7 +37,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xfuncs.h>
int
-XdmcpCopyARRAY8 (ARRAY8Ptr src, ARRAY8Ptr dst)
+XdmcpCopyARRAY8 (const ARRAY8Ptr src, ARRAY8Ptr dst)
{
dst->length = src->length;
dst->data = (CARD8 *) Xalloc (dst->length * sizeof (CARD8));
diff --git a/CmpKey.c b/CmpKey.c
index 112bc20..47c4d73 100644
--- a/CmpKey.c
+++ b/CmpKey.c
@@ -38,7 +38,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xdmcp.h>
int
-XdmcpCompareKeys (XdmAuthKeyPtr a, XdmAuthKeyPtr b)
+XdmcpCompareKeys (const XdmAuthKeyPtr a, const XdmAuthKeyPtr b)
{
int i;
diff --git a/RR.c b/RR.c
index 3f0c26a..956dd5b 100644
--- a/RR.c
+++ b/RR.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xdmcp.h>
int
-XdmcpReadRemaining (XdmcpBufferPtr buffer)
+XdmcpReadRemaining (const XdmcpBufferPtr buffer)
{
return buffer->count - buffer->pointer;
}
diff --git a/WA16.c b/WA16.c
index 8ad307b..c7a1a21 100644
--- a/WA16.c
+++ b/WA16.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xdmcp.h>
int
-XdmcpWriteARRAY16 (XdmcpBufferPtr buffer, ARRAY16Ptr array)
+XdmcpWriteARRAY16 (XdmcpBufferPtr buffer, const ARRAY16Ptr array)
{
int i;
diff --git a/WA32.c b/WA32.c
index b58ad25..98a466d 100644
--- a/WA32.c
+++ b/WA32.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xdmcp.h>
int
-XdmcpWriteARRAY32 (XdmcpBufferPtr buffer, ARRAY32Ptr array)
+XdmcpWriteARRAY32 (XdmcpBufferPtr buffer, const ARRAY32Ptr array)
{
int i;
diff --git a/WA8.c b/WA8.c
index 336d747..73e23b4 100644
--- a/WA8.c
+++ b/WA8.c
@@ -36,7 +36,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/Xdmcp.h>
int
-XdmcpWriteARRAY8 (XdmcpBufferPtr buffer, ARRAY8Ptr array)
+XdmcpWriteARRAY8 (XdmcpBufferPtr buffer, const ARRAY8Ptr array)
{
int i;
diff --git a/Whead.c b/Whead.c
index 82c55c9..eb76ef8 100644
--- a/Whead.c
+++ b/Whead.c
@@ -40,7 +40,7 @@ in this Software without prior written authorization from The Open Group.
int
XdmcpWriteHeader (
XdmcpBufferPtr buffer,
- XdmcpHeaderPtr header)
+ const XdmcpHeaderPtr header)
{
BYTE *newData;
diff --git a/include/X11/Xdmcp.h b/include/X11/Xdmcp.h
index 2548485..94d0cf7 100644
--- a/include/X11/Xdmcp.h
+++ b/include/X11/Xdmcp.h
@@ -121,14 +121,14 @@ typedef struct _XdmAuthKey {
typedef char *XdmcpNetaddr;
-extern int XdmcpWriteARRAY16(XdmcpBufferPtr buffer, ARRAY16Ptr array);
-extern int XdmcpWriteARRAY32(XdmcpBufferPtr buffer, ARRAY32Ptr array);
-extern int XdmcpWriteARRAY8(XdmcpBufferPtr buffer, ARRAY8Ptr array);
-extern int XdmcpWriteARRAYofARRAY8(XdmcpBufferPtr buffer, ARRAYofARRAY8Ptr array);
+extern int XdmcpWriteARRAY16(XdmcpBufferPtr buffer, const ARRAY16Ptr array);
+extern int XdmcpWriteARRAY32(XdmcpBufferPtr buffer, const ARRAY32Ptr array);
+extern int XdmcpWriteARRAY8(XdmcpBufferPtr buffer, const ARRAY8Ptr array);
+extern int XdmcpWriteARRAYofARRAY8(XdmcpBufferPtr buffer, const ARRAYofARRAY8Ptr array);
extern int XdmcpWriteCARD16(XdmcpBufferPtr buffer, unsigned value);
extern int XdmcpWriteCARD32(XdmcpBufferPtr buffer, unsigned value);
extern int XdmcpWriteCARD8(XdmcpBufferPtr buffer, unsigned value);
-extern int XdmcpWriteHeader(XdmcpBufferPtr buffer, XdmcpHeaderPtr header);
+extern int XdmcpWriteHeader(XdmcpBufferPtr buffer, const XdmcpHeaderPtr header);
extern int XdmcpFlush(int fd, XdmcpBufferPtr buffer, XdmcpNetaddr to, int tolen);
@@ -143,16 +143,16 @@ extern int XdmcpReadHeader(XdmcpBufferPtr buffer, XdmcpHeaderPtr header);
extern int XdmcpFill(int fd, XdmcpBufferPtr buffer, XdmcpNetaddr from, int *fromlen);
-extern int XdmcpReadRemaining(XdmcpBufferPtr buffer);
+extern int XdmcpReadRemaining(const XdmcpBufferPtr buffer);
extern void XdmcpDisposeARRAY8(ARRAY8Ptr array);
extern void XdmcpDisposeARRAY16(ARRAY16Ptr array);
extern void XdmcpDisposeARRAY32(ARRAY32Ptr array);
extern void XdmcpDisposeARRAYofARRAY8(ARRAYofARRAY8Ptr array);
-extern int XdmcpCopyARRAY8(ARRAY8Ptr src, ARRAY8Ptr dst);
+extern int XdmcpCopyARRAY8(const ARRAY8Ptr src, ARRAY8Ptr dst);
-extern int XdmcpARRAY8Equal(ARRAY8Ptr array1, ARRAY8Ptr array2);
+extern int XdmcpARRAY8Equal(const ARRAY8Ptr array1, const ARRAY8Ptr array2);
extern void XdmcpGenerateKey (XdmAuthKeyPtr key);
extern void XdmcpIncrementKey (XdmAuthKeyPtr key);
@@ -173,7 +173,7 @@ extern void *Xrealloc (void *old, unsigned long amount);
extern void Xfree(void *old);
#endif
-extern int XdmcpCompareKeys (XdmAuthKeyPtr a, XdmAuthKeyPtr b);
+extern int XdmcpCompareKeys (const XdmAuthKeyPtr a, const XdmAuthKeyPtr b);
extern int XdmcpAllocARRAY16 (ARRAY16Ptr array, int length);
extern int XdmcpAllocARRAY32 (ARRAY32Ptr array, int length);