summaryrefslogtreecommitdiff
path: root/src/misc.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2008-10-30 12:01:06 +0100
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2009-01-06 17:15:13 -0200
commitb01e82ce1deedb36c9696d4d27a3b9a5d5a52d08 (patch)
tree4e7d624bec961376da0ff497c2757699160d0483 /src/misc.c
parent2aba1bc0583aeb3ee6e26e3bfacd123abef744d9 (diff)
ANSI C
convert all old style function declarations see also: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> http://bugs.freedesktop.org/show_bug.cgi?id=14683 http://bugs.freedesktop.org/attachment.cgi?id=14582 see also: Magnus Kessler <Magnus.Kessler@gmx.net> http://lists.freedesktop.org/archives/xorg/2008-October/039799.html http://lists.freedesktop.org/archives/xorg/attachments/20081030/b2ea5b1c/attachment-0001.bin
Diffstat (limited to 'src/misc.c')
-rw-r--r--src/misc.c190
1 files changed, 84 insertions, 106 deletions
diff --git a/src/misc.c b/src/misc.c
index 304ae60..ea8bbde 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -49,11 +49,10 @@ Author: Ralph Mor, X Consortium
*/
char *
-IceAllocScratch (iceConn, size)
-
-IceConn iceConn;
-unsigned long size;
-
+IceAllocScratch (
+ IceConn iceConn,
+ unsigned long size
+)
{
if (!iceConn->scratch || size > iceConn->scratch_size)
{
@@ -74,10 +73,9 @@ unsigned long size;
*/
int
-IceFlush (iceConn)
-
-IceConn iceConn;
-
+IceFlush (
+ IceConn iceConn
+)
{
_IceWrite (iceConn,
(unsigned long) (iceConn->outbufptr - iceConn->outbuf),
@@ -89,20 +87,18 @@ IceConn iceConn;
int
-IceGetOutBufSize (iceConn)
-
-IceConn iceConn;
-
+IceGetOutBufSize (
+ IceConn iceConn
+)
{
return (iceConn->outbufmax - iceConn->outbuf);
}
int
-IceGetInBufSize (iceConn)
-
-IceConn iceConn;
-
+IceGetInBufSize (
+ IceConn iceConn
+)
{
return (iceConn->inbufmax - iceConn->inbuf);
}
@@ -114,70 +110,63 @@ IceConn iceConn;
*/
IceConnectStatus
-IceConnectionStatus (iceConn)
-
-IceConn iceConn;
-
+IceConnectionStatus (
+ IceConn iceConn
+)
{
return (iceConn->connection_status);
}
char *
-IceVendor (iceConn)
-
-IceConn iceConn;
-
+IceVendor (
+ IceConn iceConn
+)
{
return strdup(iceConn->vendor);
}
char *
-IceRelease (iceConn)
-
-IceConn iceConn;
-
+IceRelease (
+ IceConn iceConn
+)
{
return strdup(iceConn->release);
}
int
-IceProtocolVersion (iceConn)
-
-IceConn iceConn;
-
+IceProtocolVersion (
+ IceConn iceConn
+)
{
return (_IceVersions[iceConn->my_ice_version_index].major_version);
}
int
-IceProtocolRevision (iceConn)
-
-IceConn iceConn;
-
+IceProtocolRevision (
+ IceConn iceConn
+)
{
return (_IceVersions[iceConn->my_ice_version_index].minor_version);
}
int
-IceConnectionNumber (iceConn)
-
-IceConn iceConn;
-
+IceConnectionNumber (
+ IceConn iceConn
+)
{
return (_IceTransGetConnectionNumber (iceConn->trans_conn));
}
char *
-IceConnectionString (iceConn)
-
-IceConn iceConn;
-
+IceConnectionString (
+ IceConn iceConn
+)
{
if (iceConn->connection_string)
{
@@ -189,30 +178,27 @@ IceConn iceConn;
unsigned long
-IceLastSentSequenceNumber (iceConn)
-
-IceConn iceConn;
-
+IceLastSentSequenceNumber (
+ IceConn iceConn
+)
{
return (iceConn->send_sequence);
}
unsigned long
-IceLastReceivedSequenceNumber (iceConn)
-
-IceConn iceConn;
-
+IceLastReceivedSequenceNumber (
+ IceConn iceConn
+)
{
return (iceConn->receive_sequence);
}
Bool
-IceSwapping (iceConn)
-
-IceConn iceConn;
-
+IceSwapping (
+ IceConn iceConn
+)
{
return (iceConn->swap);
}
@@ -227,12 +213,11 @@ IceConn iceConn;
*/
Status
-_IceRead (iceConn, nbytes, ptr)
-
-register IceConn iceConn;
-unsigned long nbytes;
-register char *ptr;
-
+_IceRead (
+ register IceConn iceConn,
+ unsigned long nbytes,
+ register char *ptr
+)
{
register unsigned long nleft;
@@ -327,11 +312,10 @@ register char *ptr;
*/
void
-_IceReadSkip (iceConn, nbytes)
-
-register IceConn iceConn;
-register unsigned long nbytes;
-
+_IceReadSkip (
+ register IceConn iceConn,
+ register unsigned long nbytes
+)
{
char temp[512];
@@ -351,12 +335,11 @@ register unsigned long nbytes;
*/
void
-_IceWrite (iceConn, nbytes, ptr)
-
-register IceConn iceConn;
-unsigned long nbytes;
-register char *ptr;
-
+_IceWrite (
+ register IceConn iceConn,
+ unsigned long nbytes,
+ register char *ptr
+)
{
register unsigned long nleft;
@@ -427,12 +410,11 @@ register char *ptr;
#ifdef WORD64
-IceWriteData16 (iceConn, nbytes, data)
-
-IceConn iceConn;
-unsigned long nbytes;
-short *data;
-
+IceWriteData16 (
+ IceConn iceConn,
+ unsigned long nbytes,
+ short *data
+)
{
int numShorts = nbytes / 2;
int index = 0;
@@ -458,12 +440,11 @@ short *data;
}
-IceWriteData32 (iceConn, nbytes, data)
-
-IceConn iceConn;
-unsigned long nbytes;
-int *data;
-
+IceWriteData32 (
+ IceConn iceConn,
+ unsigned long nbytes,
+ int *data
+)
{
int numLongs = nbytes / 4;
int index = 0;
@@ -489,25 +470,23 @@ int *data;
}
-IceReadData16 (iceConn, swap, nbytes, data)
-
-IceConn iceConn;
-Bool swap;
-unsigned long nbytes;
-short *data;
-
+IceReadData16 (
+ IceConn iceConn,
+ Bool swap,
+ unsigned long nbytes,
+ short *data
+)
{
/* NOT IMPLEMENTED YET */
}
-IceReadData32 (iceConn, swap, nbytes, data)
-
-IceConn iceConn;
-Bool swap;
-unsigned long nbytes;
-int *data;
-
+IceReadData32 (
+ IceConn iceConn,
+ Bool swap,
+ unsigned long nbytes,
+ int *data
+)
{
/* NOT IMPLEMENTED YET */
}
@@ -517,12 +496,11 @@ int *data;
void
-_IceAddOpcodeMapping (iceConn, hisOpcode, myOpcode)
-
-IceConn iceConn;
-int hisOpcode;
-int myOpcode;
-
+_IceAddOpcodeMapping (
+ IceConn iceConn,
+ int hisOpcode,
+ int myOpcode
+)
{
if (hisOpcode <= 0 || hisOpcode > 255)
{