1. braindamaged
  2. openbsd/xenocara

Commits

matthieu  committed 80660f2

Update to libICE 1.0.5.
Main change: ansification.
Bumped major since some symbols which were not part of the public API
have been changed to 'static'.

  • Participants
  • Parent commits 2bfcb20
  • Branches master

Comments (0)

Files changed (28)

File lib/libICE/ChangeLog

View file
  • Ignore whitespace
+commit ab9dff549534c6d7b33f440bff7a841d60c1206c
+Author: Peter Breitenlohner <peb@mppmu.mpg.de>
+Date:   Mon Dec 8 18:45:44 2008 +0100
+
+    bump to 1.0.5
+
+commit 71695c4bf7ae07228605683f6cdeca0457c8495a
+Author: Peter Breitenlohner <peb@mppmu.mpg.de>
+Date:   Mon Dec 8 18:44:26 2008 +0100
+
+    remove ChangeLog from EXTRA_DIST and CLEANFILES
+
+commit 653f659fe65ae8c2a9fe5b1fdbfc78da43f2cf90
+Author: Peter Breitenlohner <peb@mppmu.mpg.de>
+Date:   Mon Dec 8 18:41:34 2008 +0100
+
+    use memcmp instead of binaryEqual
+    
+    suggested by Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+    http://lists.freedesktop.org/archives/xorg/2008-December/041222.html
+
+commit bf138553afe6eecd0e6c218dc6ae4f63065e4196
+Author: Peter Breitenlohner <peb@mppmu.mpg.de>
+Date:   Tue Dec 2 22:06:15 2008 +0100
+
+    Use NULL, not zero, for pointers
+    
+    From 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
+
+commit b01e82ce1deedb36c9696d4d27a3b9a5d5a52d08
+Author: Peter Breitenlohner <peb@mppmu.mpg.de>
+Date:   Thu Oct 30 12:01:06 2008 +0100
+
+    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
+
+commit 2aba1bc0583aeb3ee6e26e3bfacd123abef744d9
+Author: Peter Breitenlohner <peb@mppmu.mpg.de>
+Date:   Mon Dec 1 23:06:22 2008 +0100
+
+    towards ANSI C
+    
+    make _IceProcessCoreMessage and default error handlers static
+
+commit 69a1b4b6d34291738dfbc3aa19d0ce3f2842ec8f
+Author: Peter Breitenlohner <peb@mppmu.mpg.de>
+Date:   Mon Dec 1 22:22:12 2008 +0100
+
+    Activate CWARNFLAGS with lots of gcc warnings
+
+commit 898ed95cad1133940a83dcf428865c5d3fb2c939
+Author: Peter Breitenlohner <peb@mppmu.mpg.de>
+Date:   Mon Dec 1 22:18:45 2008 +0100
+
+    use xorg-macros-1.2.1
+    
+    Use XORG_CHANGELOG for rule to generate ChangeLog from git log
+    Use XORG_CWARNFLAGS for compiler warning flags, leave CFLAGS to user
+
+commit a99fbad09ab850e65ddd57e4d4488e4726295e14
+Author: Peter Breitenlohner <peb@mppmu.mpg.de>
+Date:   Tue Oct 7 13:21:48 2008 -0700
+
+    Constify some arguments in libICE to clear warnings in libSM
+    
+    This patch avoids the gcc (3.4.6) warnings:
+     ../../libSM-1.0.3/src/sm_client.c:104: warning: passing arg 7 of `IceRegisterForProtocolSetup' from incompatible pointer type
+     ../../libSM-1.0.3/src/sm_manager.c:168: warning: passing arg 7 of `IceRegisterForProtocolReply' from incompatible pointer type
+    when compiling libSM
+
+commit 3bceaeb3192ca75a14854d614e1621d28fb82274
+Author: Peter Breitenlohner <peb@mppmu.mpg.de>
+Date:   Tue Oct 7 11:25:42 2008 -0700
+
+    define macros to 1 in icetrans.c to avoid redefined macro warnings
+    
+    X.Org Bug #17947 <http://bugs.freedesktop.org/show_bug.cgi?id=17947>
+    Patch #19444 <http://bugs.freedesktop.org/attachment.cgi?id=19444>
+    
+    Define as 1 (one) as done by autoconf and the command line
+    option, e.g. -DICE_t, not as empty.
+    
+    This avoids the gcc (3.4.6) warnings:
+     ../../libICE-1.0.4/src/icetrans.c:29:1: warning: "ICE_t" redefined
+     ../config.h:38:1: warning: this is the location of the previous definition
+     ../../libICE-1.0.4/src/icetrans.c:30:1: warning: "TRANS_CLIENT" redefined
+     <command line>:6:1: warning: this is the location of the previous definition
+     ../../libICE-1.0.4/src/icetrans.c:31:1: warning: "TRANS_SERVER" redefined
+     <command line>:7:1: warning: this is the location of the previous definition
+
+commit b707104f4dba0963ab17c1d6a29c1e3a848ea408
+Author: Alan Hourihane <alanh@tungstengraphics.com>
+Date:   Tue Apr 29 00:41:40 2008 +0100
+
+    silence warning
+
+commit e6b525aefc05b5203391699b00053ad52243cc6b
+Author: Colin Harrison <colin.harrison-at-virgin.net>
+Date:   Tue Apr 29 00:40:48 2008 +0100
+
+    include for sleep()
+
+commit ef58f37724b841ef2246757be27111775aa86559
+Author: Matthieu Herrb <matthieu.herrb@laas.fr>
+Date:   Sun Mar 9 09:02:40 2008 +0100
+
+    nuke RCS Ids
+
+commit 47d86e8343d3d0201166c4d75da2ec9c12638cc1
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Dec 6 15:51:13 2007 -0500
+
+    Add missing PHONY line for automatic ChangeLog generation
+
+commit f415da71dd26f128df7d550ecd7631f8888eb1d2
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Aug 20 13:21:07 2007 -0700
+
+    Version bump: 1.0.4
+
+commit 8e08d3e4b8f00151b3a8b7eb88015dc15170e154
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Jun 4 15:40:22 2007 -0700
+
+    Add $(AM_CFLAGS) to lint flags to get correct Xtrans flags
+
+commit cd900e40b5676874d076c35466fd7baa6a49b1f6
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Apr 5 15:05:52 2007 -0700
+
+    Replace many malloc(strlen()); strcpy() pairs with strdup()
+
+commit 27f9a9324d58c9a7472c724c62f5b7ea0e1f4681
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Apr 5 14:43:05 2007 -0700
+
+    Provide ANSI C prototypes for more static functions
+
+commit bb639803a779ceace05d183b653da88f010ab29c
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Apr 5 14:32:31 2007 -0700
+
+    Convert authutil.c static helpers to ANSI C prototypes to clear sparse warnings
+
+commit 2179b2d467d69e45559b8e4f161a904a21f05321
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Apr 5 14:28:06 2007 -0700
+
+    Add hooks for checking source code with lint/sparse/etc.
+
+commit 6b361c028b5ad931b61df86fae570f3ef9f41c15
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Apr 5 14:19:56 2007 -0700
+
+    Coverity #1086: Double free of pointer "*listenObjsRet"
+    
+    Same bug, different function.
+
+commit c9b3d016681d81aff32c74cdad75151bd538e6ab
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Apr 5 14:07:42 2007 -0700
+
+    Coverity #1085: Double free of pointer "*listenObjsRet"
+    
+    If malloc failed in the loop in IceListenForConnections, the error path
+    would free all previous allocations, then loop around and try again, and
+    if it failed again, free the previous allocations again.   On the other
+    hand, if it succeeded on the later tries, then the memory would just be
+    leaked, since the error would be returned and not the pointer to them.
+
+commit 6039e865470af23948b0fe7d5dc0ea72da436b0e
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Apr 5 14:04:01 2007 -0700
+
+    Add *~ to .gitignore to skip emacs/patch droppings
+
+commit bed718894bed98cbd45b02bd57fb7fc6fd5089aa
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Sat Dec 16 01:21:17 2006 +0200
+
+    bump to 1.0.3
+
+commit cac788981906186442ddfb57a41f45911eb8223b
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Wed Dec 6 18:58:09 2006 +0200
+
+    Makefile.am: make ChangeLog hook safer
+    Make ChangeLog hook as safe as possible.
+
+commit 011d632e8ef3f738b9158e66d6da6876e3b53905
+Author: Adam Jackson <ajax@benzedrine.nwnk.net>
+Date:   Fri Oct 13 15:49:52 2006 -0400
+
+    Bump to 1.0.2
+
 commit 445661cd714685009ee9ba2358a274351381eabf
 Author: Adam Jackson <ajax@benzedrine.nwnk.net>
 Date:   Thu Oct 12 18:37:57 2006 -0400

File lib/libICE/Makefile.am

View file
  • Ignore whitespace
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = ice.pc
 
-EXTRA_DIST=ice.pc.in ChangeLog
-CLEANFILES = ChangeLog
+EXTRA_DIST=ice.pc.in
 
-ChangeLog: FORCE
-	git-log > ChangeLog
-FORCE: ChangeLog
+.PHONY: ChangeLog
+
+ChangeLog:
+	$(CHANGELOG_CMD)
+
+dist-hook: ChangeLog
+
+if LINT
+lint:
+	(cd src && $(MAKE) $(MFLAGS) lint)
+endif LINT

File lib/libICE/Makefile.bsd-wrapper

View file
  • Ignore whitespace
-# $OpenBSD: Makefile.bsd-wrapper,v 1.1 2006/11/26 12:07:34 matthieu Exp $
+# $OpenBSD: Makefile.bsd-wrapper,v 1.2 2009/04/09 20:29:45 matthieu Exp $
 
-SHARED_LIBS=	ICE 8.1
+SHARED_LIBS=	ICE 9.0
 
 .include <bsd.xorg.mk>

File lib/libICE/configure.ac

View file
  • Ignore whitespace
 
 AC_PREREQ(2.57)
 AC_INIT([libICE],
-        1.0.2,
+        1.0.5,
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
         libICE)
 
 # Checks for header files.
 AC_HEADER_STDC
 
-if test "x$GCC" = "xyes"; then
-	GCC_WARNINGS="-Wall -Wpointer-arith -Wstrict-prototypes \
-	-Wmissing-prototypes -Wmissing-declarations \
-	-Wnested-externs -fno-strict-aliasing"
-	CFLAGS="$GCC_WARNINGS $CFLAGS"
-fi
+# Require xorg-macros at least 1.2.1
+XORG_MACROS_VERSION([1.2.1])
+m4_ifndef([XORG_MACROS_VERSION],
+	[AC_FATAL([must install xorg-macros 1.2.1 or later before running autoconf/autogen])])
+
+dnl Allow checking code with lint, sparse, etc.
+XORG_WITH_LINT
+XORG_LINT_LIBRARY([ICE])
+LINT_FLAGS="${LINT_FLAGS} ${ICE_CFLAGS} ${XTRANS_CFLAGS}"
+
+XORG_CHANGELOG
+
+XORG_CWARNFLAGS
 
 XORG_RELEASE_VERSION
 

File lib/libICE/include/X11/ICE/ICElib.h

View file
  • Ignore whitespace
     int				/* versionCount */,
     IcePoVersionRec *		/* versionRecs */,
     int				/* authCount */,
-    char **			/* authNames */,
+    const char **		/* authNames */,
     IcePoAuthProc *		/* authProcs */,
     IceIOErrorProc		/* IOErrorProc */
 );
     int				/* versionCount */,
     IcePaVersionRec *		/* versionRecs */,
     int				/* authCount */,
-    char **			/* authNames */,
+    const char **		/* authNames */,
     IcePaAuthProc *		/* authProcs */,
     IceHostBasedAuthProc	/* hostBasedAuthProc */,
     IceProtocolSetupProc	/* protocolSetupProc */,

File lib/libICE/include/X11/ICE/ICEmsg.h

View file
  • Ignore whitespace
     IcePointer		/* value */
 );
 
+extern IcePoAuthStatus _IcePoMagicCookie1Proc (
+    IceConn		/* iceConn */,
+    IcePointer *	/* authStatePtr */,
+    Bool 		/* cleanUp */,
+    Bool		/* swap */,
+    int     		/* authDataLen */,
+    IcePointer		/* authData */,
+    int *		/* replyDataLenRet */,
+    IcePointer *	/* replyDataRet */,
+    char **		/* errorStringRet */
+);
+
+extern IcePaAuthStatus _IcePaMagicCookie1Proc (
+    IceConn		/* iceConn */,
+    IcePointer *	/* authStatePtr */,
+    Bool		/* swap */,
+    int     		/* authDataLen */,
+    IcePointer		/* authData */,
+    int *		/* replyDataLenRet */,
+    IcePointer *	/* replyDataRet */,
+    char **		/* errorStringRet */
+);
+
 
 /*
  * Macro to check if IO operations are valid on an ICE connection.

File lib/libICE/src/ICElibint.h

View file
  • Ignore whitespace
 #include <X11/ICE/ICEproto.h>
 #include <X11/ICE/ICEconn.h>
 #include <X11/ICE/ICEmsg.h>
+#ifdef WIN32
+#include <X11/Xwindows.h>
+#endif
 
 #include <stdlib.h>
 #include <stddef.h>

File lib/libICE/src/Makefile.am

View file
  • Ignore whitespace
 lib_LTLIBRARIES=libICE.la
 
 AM_CFLAGS= -I${top_srcdir}/include $(ICE_CFLAGS) $(XTRANS_CFLAGS) \
-	-DICE_t -DTRANS_CLIENT -DTRANS_SERVER
+	-DICE_t -DTRANS_CLIENT -DTRANS_SERVER $(CWARNFLAGS)
 
 libICE_la_LDFLAGS = -version-number 6:3:0 -no-undefined
 
 	$(top_srcdir)/include/X11/ICE/ICEmsg.h \
 	$(top_srcdir)/include/X11/ICE/ICEproto.h \
 	$(top_srcdir)/include/X11/ICE/ICEutil.h
+
+if LINT
+ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+		$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS)
+
+lint:
+	$(LINT) $(ALL_LINT_FLAGS) $(libICE_la_SOURCES) $(XINERAMA_LIBS)
+endif LINT

File lib/libICE/src/accept.c

View file
  • Ignore whitespace
 
 
 IceConn
-IceAcceptConnection (listenObj, statusRet)
-
-IceListenObj 	listenObj;
-IceAcceptStatus	*statusRet;
-
+IceAcceptConnection (
+	IceListenObj 	listenObj,
+	IceAcceptStatus	*statusRet
+)
 {
     IceConn    		iceConn;
     XtransConnInfo	newconn;
      * Accept the connection.
      */
 
-    if ((newconn = _IceTransAccept (listenObj->trans_conn, &status)) == 0)
+    if ((newconn = _IceTransAccept (listenObj->trans_conn, &status)) == NULL)
     {
 	if (status == TRANS_ACCEPT_BAD_MALLOC)
 	    *statusRet = IceAcceptBadMalloc;
     iceConn->send_sequence = 0;
     iceConn->receive_sequence = 0;
 
-    iceConn->connection_string = (char *) malloc (
-	strlen (listenObj->network_id) + 1);
+    iceConn->connection_string = strdup(listenObj->network_id);
 
     if (iceConn->connection_string == NULL)
     {
 	*statusRet = IceAcceptBadMalloc;
 	return (NULL);
     }
-    else
-	strcpy (iceConn->connection_string, listenObj->network_id);
 
     iceConn->vendor = NULL;
     iceConn->release = NULL;

File lib/libICE/src/authutil.c

View file
  • Ignore whitespace
 #endif
 #endif
 
-static Status read_short ();
-static Status read_string ();
-static Status read_counted_string ();
-static Status write_short ();
-static Status write_string ();
-static Status write_counted_string ();
+static Status read_short (FILE *file, unsigned short *shortp);
+static Status read_string (FILE *file, char **stringp);
+static Status read_counted_string (FILE *file, unsigned short *countp, char **stringp);
+static Status write_short (FILE *file, unsigned short s);
+static Status write_string (FILE *file, char *string);
+static Status write_counted_string (FILE *file, unsigned short count, char *string);
 
 
 
  */
 
 char *
-IceAuthFileName ()
-
+IceAuthFileName (void)
 {
     static char slashDotICEauthority[] = "/.ICEauthority";
     char    	*name;
     if ((ptr1 = getenv("HOMEDRIVE")) && (ptr2 = getenv("HOMEDIR"))) {
 	len1 = strlen (ptr1);
 	len2 = strlen (ptr2);
-    } else if (ptr2 = getenv("USERNAME")) {
+    } else if ((ptr2 = getenv("USERNAME"))) {
 	len1 = strlen (ptr1 = "/users/");
 	len2 = strlen (ptr2);
     }
 
 
 int
-IceLockAuthFile (file_name, retries, timeout, dead)
-
-char	*file_name;
-int	retries;
-int	timeout;
-long	dead;
-
+IceLockAuthFile (
+	char	*file_name,
+	int	retries,
+	int	timeout,
+	long	dead
+)
 {
     char	creat_name[1025], link_name[1025];
     struct stat	statb;
 
 
 void
-IceUnlockAuthFile (file_name)
-
-char	*file_name;
-
+IceUnlockAuthFile (
+	char	*file_name
+)
 {
 #ifndef WIN32
     char	creat_name[1025];
 
 
 IceAuthFileEntry *
-IceReadAuthFileEntry (auth_file)
-
-FILE	*auth_file;
-
+IceReadAuthFileEntry (
+	FILE	*auth_file
+)
 {
     IceAuthFileEntry   	local;
     IceAuthFileEntry   	*ret;
 
 
 void
-IceFreeAuthFileEntry (auth)
-
-IceAuthFileEntry	*auth;
-
+IceFreeAuthFileEntry (
+	IceAuthFileEntry	*auth
+)
 {
     if (auth)
     {
 
 
 Status
-IceWriteAuthFileEntry (auth_file, auth)
-
-FILE			*auth_file;
-IceAuthFileEntry	*auth;
-
+IceWriteAuthFileEntry (
+	FILE			*auth_file,
+	IceAuthFileEntry	*auth
+)
 {
     if (!write_string (auth_file, auth->protocol_name))
 	return (0);
 
 
 IceAuthFileEntry *
-IceGetAuthFileEntry (protocol_name, network_id, auth_name)
-
-char	*protocol_name;
-char	*network_id;
-char	*auth_name;
-
+IceGetAuthFileEntry (
+	char	*protocol_name,
+	char	*network_id,
+	char	*auth_name
+)
 {
     FILE    		*auth_file;
     char    		*filename;
  */
 
 static Status
-read_short (file, shortp)
-
-FILE		*file;
-unsigned short	*shortp;
-
+read_short (FILE *file, unsigned short *shortp)
 {
     unsigned char   file_short[2];
 
 
 
 static Status
-read_string (file, stringp)
-
-FILE	*file;
-char	**stringp;
+read_string (FILE *file, char **stringp)
 
 {
     unsigned short  len;
 
 
 static Status
-read_counted_string (file, countp, stringp)
-
-FILE	*file;
-unsigned short	*countp;
-char	**stringp;
-
+read_counted_string (FILE *file, unsigned short	*countp, char **stringp)
 {
     unsigned short  len;
     char	    *data;
 
     if (len == 0)
     {
-	data = 0;
+	data = NULL;
     }
     else
     {
 
 
 static Status
-write_short (file, s)
-
-FILE		*file;
-unsigned short	s;
-
+write_short (FILE *file, unsigned short s)
 {
     unsigned char   file_short[2];
 
 
 
 static Status
-write_string (file, string)
-
-FILE		*file;
-char		*string;
-
+write_string (FILE *file, char *string)
 {
     unsigned short count = strlen (string);
 
 
 
 static Status
-write_counted_string (file, count, string)
-
-FILE		*file;
-unsigned short	count;
-char		*string;
-
+write_counted_string (FILE *file, unsigned short count, char *string)
 {
     if (!write_short (file, count))
 	return (0);

File lib/libICE/src/connect.c

View file
  • Ignore whitespace
 #include <X11/Xtrans/Xtrans.h>
 #include "globals.h"
 
-static XtransConnInfo ConnectToPeer();
+static XtransConnInfo ConnectToPeer(char *networkIdsList,
+				    char **actualConnectionRet);
 
 #define Strstr strstr
 
 IceConn
-IceOpenConnection (networkIdsList, context, mustAuthenticate, majorOpcodeCheck,
-    errorLength, errorStringRet)
-
-char 	   *networkIdsList;
-IcePointer context;
-Bool 	   mustAuthenticate;
-int  	   majorOpcodeCheck;
-int  	   errorLength;
-char 	   *errorStringRet;
-
+IceOpenConnection (
+	char 	   *networkIdsList,
+	IcePointer context,
+	Bool 	   mustAuthenticate,
+	int  	   majorOpcodeCheck,
+	int  	   errorLength,
+	char 	   *errorStringRet
+)
 {
     IceConn			iceConn;
     int				extra, i, j;
 
 
 IcePointer
-IceGetConnectionContext (iceConn)
-
-IceConn    iceConn;
-
+IceGetConnectionContext (
+	IceConn    iceConn
+)
 {
     return (iceConn->context);
 }
 
 
 static XtransConnInfo
-ConnectToPeer (networkIdsList, actualConnectionRet)
-
-char *networkIdsList;
-char **actualConnectionRet;
-
+ConnectToPeer (char *networkIdsList, char **actualConnectionRet)
 {
     char addrbuf[256];
     char* address;
 	 * We need to return the actual network connection string
 	 */
 
-	*actualConnectionRet = (char *) malloc (strlen (address) + 1);
-	strcpy (*actualConnectionRet, address);
-
+	*actualConnectionRet = strdup(address);
 	
 	/*
 	 * Return the file descriptor

File lib/libICE/src/error.c

View file
  • Ignore whitespace
 
 
 void
-_IceErrorBadMinor (iceConn, majorOpcode, offendingMinor, severity)
-
-IceConn	iceConn;
-int	majorOpcode;
-int	offendingMinor;
-int	severity;
-
+_IceErrorBadMinor (
+	IceConn	iceConn,
+	int	majorOpcode,
+	int	offendingMinor,
+	int	severity
+)
 {
     IceErrorHeader (iceConn,
 	majorOpcode, offendingMinor,
 
 
 void
-_IceErrorBadState (iceConn, majorOpcode, offendingMinor, severity)
-
-IceConn	iceConn;
-int	majorOpcode;
-int	offendingMinor;
-int	severity;
-
+_IceErrorBadState (
+	IceConn	iceConn,
+	int	majorOpcode,
+	int	offendingMinor,
+	int	severity
+)
 {
     IceErrorHeader (iceConn,
 	majorOpcode, offendingMinor,
 
 
 void
-_IceErrorBadLength (iceConn, majorOpcode, offendingMinor, severity)
-
-IceConn	iceConn;
-int	majorOpcode;
-int	offendingMinor;
-int	severity;
-
+_IceErrorBadLength (
+	IceConn	iceConn,
+	int	majorOpcode,
+	int	offendingMinor,
+	int	severity
+)
 {
     IceErrorHeader (iceConn,
 	majorOpcode, offendingMinor,
 
 
 void
-_IceErrorBadValue (iceConn, majorOpcode, offendingMinor, offset, length, value)
-
-IceConn		iceConn;
-int		majorOpcode;
-int		offendingMinor;
-int		offset;
-int		length;		/* in bytes */
-IcePointer	value;
-
+_IceErrorBadValue (
+	IceConn		iceConn,
+	int		majorOpcode,
+	int		offendingMinor,
+	int		offset,
+	int		length,		/* in bytes */
+	IcePointer	value
+)
 {
     IceErrorHeader (iceConn,
 	majorOpcode, offendingMinor,
 
 
 void
-_IceErrorNoAuthentication (iceConn, offendingMinor)
-
-IceConn	iceConn;
-int	offendingMinor;
-
+_IceErrorNoAuthentication (
+	IceConn	iceConn,
+	int	offendingMinor
+)
 {
     int severity = (offendingMinor == ICE_ConnectionSetup) ?
 	IceFatalToConnection : IceFatalToProtocol;
 
 
 void
-_IceErrorNoVersion (iceConn, offendingMinor)
-
-IceConn	iceConn;
-int	offendingMinor;
-
+_IceErrorNoVersion (
+	IceConn	iceConn,
+	int	offendingMinor
+)
 {
     int severity = (offendingMinor == ICE_ConnectionSetup) ?
 	IceFatalToConnection : IceFatalToProtocol;
 
 
 void
-_IceErrorSetupFailed (iceConn, offendingMinor, reason)
-
-IceConn	iceConn;
-int	offendingMinor;
-char	*reason;
-
+_IceErrorSetupFailed (
+	IceConn	iceConn,
+	int	offendingMinor,
+	char	*reason
+)
 {
     char *pBuf, *pStart;
     int bytes;
 
 
 void
-_IceErrorAuthenticationRejected (iceConn, offendingMinor, reason)
-
-IceConn	iceConn;
-int	offendingMinor;
-char	*reason;
-
+_IceErrorAuthenticationRejected (
+	IceConn	iceConn,
+	int	offendingMinor,
+	char	*reason
+)
 {
     char *pBuf, *pStart;
     int bytes;
 
 
 void
-_IceErrorAuthenticationFailed (iceConn, offendingMinor, reason)
-
-IceConn	iceConn;
-int	offendingMinor;
-char	*reason;
-
+_IceErrorAuthenticationFailed (
+	IceConn	iceConn,
+	int	offendingMinor,
+	char	*reason
+)
 {
     char *pBuf, *pStart;
     int bytes;
 
 
 void
-_IceErrorProtocolDuplicate (iceConn, protocolName)
-
-IceConn	iceConn;
-char	*protocolName;
-
+_IceErrorProtocolDuplicate (
+	IceConn	iceConn,
+	char	*protocolName
+)
 {
     char *pBuf, *pStart;
     int bytes;
 
 
 void
-_IceErrorMajorOpcodeDuplicate (iceConn, majorOpcode)
-
-IceConn	iceConn;
-int	majorOpcode;
-
+_IceErrorMajorOpcodeDuplicate (
+	IceConn	iceConn,
+	int	majorOpcode
+)
 {
     char mOp = (char) majorOpcode;
 
 
 
 void
-_IceErrorUnknownProtocol (iceConn, protocolName)
-
-IceConn	iceConn;
-char	*protocolName;
-
+_IceErrorUnknownProtocol (
+	IceConn	iceConn,
+	char	*protocolName
+)
 {
     char *pBuf, *pStart;
     int bytes;
 
 
 void
-_IceErrorBadMajor (iceConn, offendingMajor, offendingMinor, severity)
-
-IceConn	iceConn;
-int     offendingMajor;
-int     offendingMinor;
-int	severity;
-
+_IceErrorBadMajor (
+	IceConn	iceConn,
+	int     offendingMajor,
+	int     offendingMinor,
+	int	severity
+)
 {
     char maj = (char) offendingMajor;
 
  * Default error handler.
  */
 
-void
-_IceDefaultErrorHandler (iceConn, swap,
-    offendingMinorOpcode, offendingSequence, errorClass, severity, values)
-
-IceConn		iceConn;
-Bool		swap;
-int		offendingMinorOpcode;
-unsigned long	offendingSequence;
-int 		errorClass;
-int		severity;
-IcePointer	values;
-
+static void
+_IceDefaultErrorHandler (
+	IceConn		iceConn,
+	Bool		swap,
+	int		offendingMinorOpcode,
+	unsigned long	offendingSequence,
+	int 		errorClass,
+	int		severity,
+	IcePointer	values
+)
 {
     char *str;
     char *pData = (char *) values;
 	exit (1);
 }
 
+IceErrorHandler   _IceErrorHandler   = _IceDefaultErrorHandler;
 
 
 /* 
  */
  
 IceErrorHandler
-IceSetErrorHandler (handler)
-
-IceErrorHandler handler;
-
+IceSetErrorHandler (
+	IceErrorHandler handler
+)
 {
     IceErrorHandler oldHandler = _IceErrorHandler;
 
  * Default IO error handler.
  */
 
-void
-_IceDefaultIOErrorHandler (iceConn)
-
-IceConn iceConn;
-
+static void
+_IceDefaultIOErrorHandler (
+	IceConn		iceConn
+)
 {
     fprintf (stderr,
 	"ICE default IO error handler doing an exit(), pid = %ld, errno = %d\n",
     exit (1);
 }
 
+IceIOErrorHandler _IceIOErrorHandler = _IceDefaultIOErrorHandler;
 
 
 /* 
  */
  
 IceIOErrorHandler
-IceSetIOErrorHandler (handler)
-
-IceIOErrorHandler handler;
-
+IceSetIOErrorHandler (
+	IceIOErrorHandler handler
+)
 {
     IceIOErrorHandler oldHandler = _IceIOErrorHandler;
 

File lib/libICE/src/getauth.c

View file
  • Ignore whitespace
 #include "ICElibint.h"
 #include <X11/ICE/ICEutil.h>
 
-static Bool auth_valid ();
+static Bool auth_valid (const char *auth_name, int num_auth_names,
+			char **auth_names, int *index_ret);
 
 extern int		_IcePaAuthDataEntryCount;
 extern IceAuthDataEntry _IcePaAuthDataEntries[];
  */
 
 void
-_IceGetPoAuthData (protocolName, networkId, authName,
-    authDataLenRet, authDataRet)
-
-char		*protocolName;
-char		*networkId;
-char		*authName;
-unsigned short	*authDataLenRet;
-char		**authDataRet;
-
+_IceGetPoAuthData (
+	char		*protocolName,
+	char		*networkId,
+	char		*authName,
+	unsigned short	*authDataLenRet,
+	char		**authDataRet
+)
 {
     IceAuthFileEntry    *entry;
 
 
 
 void
-_IceGetPaAuthData (protocolName, networkId, authName,
-    authDataLenRet, authDataRet)
-
-char		*protocolName;
-char		*networkId;
-char		*authName;
-unsigned short	*authDataLenRet;
-char		**authDataRet;
-
+_IceGetPaAuthData (
+	char		*protocolName,
+	char		*networkId,
+	char		*authName,
+	unsigned short	*authDataLenRet,
+	char		**authDataRet
+)
 {
     IceAuthDataEntry	*entry = NULL;
     int			found = 0;
 
 
 void
-_IceGetPoValidAuthIndices (protocol_name, network_id,
-    num_auth_names, auth_names, num_indices_ret, indices_ret)
-
-char	*protocol_name;
-char	*network_id;
-int	num_auth_names;
-char	**auth_names;
-int	*num_indices_ret;
-int	*indices_ret;		/* in/out arg */
-
+_IceGetPoValidAuthIndices (
+	char	*protocol_name,
+	char	*network_id,
+	int	num_auth_names,
+	char	**auth_names,
+	int	*num_indices_ret,
+	int	*indices_ret		/* in/out arg */
+)
 {
     FILE    		*auth_file;
     char    		*filename;
 
 
 void
-_IceGetPaValidAuthIndices (protocol_name, network_id,
-    num_auth_names, auth_names, num_indices_ret, indices_ret)
-
-char	*protocol_name;
-char	*network_id;
-int	num_auth_names;
-char	**auth_names;
-int	*num_indices_ret;
-int	*indices_ret;		/* in/out arg */
-
+_IceGetPaValidAuthIndices (
+	char	*protocol_name,
+	char	*network_id,
+	int	num_auth_names,
+	char	**auth_names,
+	int	*num_indices_ret,
+	int	*indices_ret		/* in/out arg */
+)
 {
     int			index_ret;
     int			i, j;
  */
 
 static Bool
-auth_valid (auth_name, num_auth_names, auth_names, index_ret)
-
-char	*auth_name;
-int	num_auth_names;
-char	**auth_names;
-int	*index_ret;
+auth_valid (const char *auth_name, int num_auth_names,
+	    char **auth_names, int *index_ret)
 
 {
     /*

File lib/libICE/src/globals.h

View file
  • Ignore whitespace
 ******************************************************************************/
 /* $XFree86: xc/lib/ICE/globals.h,v 1.4 2001/12/14 19:53:35 dawes Exp $ */
 
-extern void _IceDefaultErrorHandler ();
-extern void _IceDefaultIOErrorHandler ();
-
-extern IcePoAuthStatus _IcePoMagicCookie1Proc ();
-extern IcePaAuthStatus _IcePaMagicCookie1Proc ();
-
-extern void _IceProcessCoreMessage ();
-
 #ifndef __UNIXOS2__
 IceConn     	_IceConnectionObjs[256];
 char	    	*_IceConnectionStrings[256];
 
 int		_IceAuthCount = 1;
 char		*_IceAuthNames[] = {"MIT-MAGIC-COOKIE-1"};
-IcePoAuthProc	_IcePoAuthProcs[] = {_IcePoMagicCookie1Proc};
-IcePaAuthProc	_IcePaAuthProcs[] = {_IcePaMagicCookie1Proc};
-
-int		_IceVersionCount = 1;
-_IceVersion	_IceVersions[] = {
-	  	    {IceProtoMajor, IceProtoMinor, _IceProcessCoreMessage}};
 
 _IceWatchProc	*_IceWatchProcs = NULL;
-
-IceErrorHandler   _IceErrorHandler   = _IceDefaultErrorHandler;
-IceIOErrorHandler _IceIOErrorHandler = _IceDefaultIOErrorHandler;

File lib/libICE/src/iceauth.c

View file
  • Ignore whitespace
 #include <time.h>
 #define Time_t time_t
 
-static int binaryEqual ();
-
 static int was_called_state;
 
 /*
 
 
 char *
-IceGenerateMagicCookie (len)
-
-int len;
-
+IceGenerateMagicCookie (
+	int len
+)
 {
     char    *auth;
     long    ldata[2];
 
 
 IcePoAuthStatus
-_IcePoMagicCookie1Proc (iceConn, authStatePtr, cleanUp, swap,
-    authDataLen, authData, replyDataLenRet, replyDataRet, errorStringRet)
-
-IceConn		iceConn;
-IcePointer	*authStatePtr;
-Bool 		cleanUp;
-Bool		swap;
-int     	authDataLen;
-IcePointer	authData;
-int 		*replyDataLenRet;
-IcePointer	*replyDataRet;
-char    	**errorStringRet;
-
+_IcePoMagicCookie1Proc (
+	IceConn		iceConn,
+	IcePointer	*authStatePtr,
+	Bool 		cleanUp,
+	Bool		swap,
+	int     	authDataLen,
+	IcePointer	authData,
+	int 		*replyDataLenRet,
+	IcePointer	*replyDataRet,
+	char    	**errorStringRet
+)
 {
     if (cleanUp)
     {
 
 	if (!data)
 	{
-	    char *tempstr =
+	    const char *tempstr =
 		"Could not find correct MIT-MAGIC-COOKIE-1 authentication";
 
-	    *errorStringRet = (char *) malloc (strlen (tempstr) + 1);
-	    if (*errorStringRet)
-		strcpy (*errorStringRet, tempstr);
+	    *errorStringRet = strdup(tempstr);
 
 	    return (IcePoAuthFailed);
 	}
 	 * a single pass authentication method.
 	 */
 
-	char *tempstr = "MIT-MAGIC-COOKIE-1 authentication internal error";
+	const char *tempstr =
+	    "MIT-MAGIC-COOKIE-1 authentication internal error";
 
-	*errorStringRet = (char *) malloc (strlen (tempstr) + 1);
-	if (*errorStringRet)
-	    strcpy (*errorStringRet, tempstr);
+	*errorStringRet = strdup(tempstr);
 
 	return (IcePoAuthFailed);
     }
 }
 
+IcePoAuthProc	_IcePoAuthProcs[] = {_IcePoMagicCookie1Proc};
 
 
 IcePaAuthStatus
-_IcePaMagicCookie1Proc (iceConn, authStatePtr, swap,
-    authDataLen, authData, replyDataLenRet, replyDataRet, errorStringRet)
-
-IceConn		iceConn;
-IcePointer	*authStatePtr;
-Bool		swap;
-int     	authDataLen;
-IcePointer	authData;
-int 		*replyDataLenRet;
-IcePointer	*replyDataRet;
-char    	**errorStringRet;
-
+_IcePaMagicCookie1Proc (
+	IceConn		iceConn,
+	IcePointer	*authStatePtr,
+	Bool		swap,
+	int     	authDataLen,
+	IcePointer	authData,
+	int 		*replyDataLenRet,
+	IcePointer	*replyDataRet,
+	char    	**errorStringRet
+)
 {
     *errorStringRet = NULL;
     *replyDataLenRet = 0;
 	    IcePaAuthStatus stat;
 
 	    if (authDataLen == length &&
-	        binaryEqual ((char *) authData, data, authDataLen))
+	        memcmp (authData, data, authDataLen) == 0)
 	    {
 		stat = IcePaAuthAccepted;
 	    }
 	    else
 	    {
-		char *tempstr = "MIT-MAGIC-COOKIE-1 authentication rejected";
+		const char *tempstr
+		    = "MIT-MAGIC-COOKIE-1 authentication rejected";
 
-		*errorStringRet = (char *) malloc (strlen (tempstr) + 1);
-		if (*errorStringRet)
-		    strcpy (*errorStringRet, tempstr);
+		*errorStringRet = strdup(tempstr);
 
 		stat = IcePaAuthRejected;
 	    }
 	     * always find a valid entry.
 	     */
 
-	    char *tempstr =
+	    const char *tempstr =
 		"MIT-MAGIC-COOKIE-1 authentication internal error";
 
-	    *errorStringRet = (char *) malloc (strlen (tempstr) + 1);
-	    if (*errorStringRet)
-		strcpy (*errorStringRet, tempstr);
+	    *errorStringRet = strdup(tempstr);
 
 	    return (IcePaAuthFailed);
 	}
     }
 }
 
-
-
-/*
- * local routines
- */
-
-static int
-binaryEqual (a, b, len)
-
-register char		*a, *b;
-register unsigned	len;
-
-{
-    while (len--)
-	if (*a++ != *b++)
-	    return 0;
-    return 1;
-}
+IcePaAuthProc	_IcePaAuthProcs[] = {_IcePaMagicCookie1Proc};

File lib/libICE/src/icetrans.c

View file
  • Ignore whitespace
 /*
- * $Id: icetrans.c,v 1.1 2006/11/25 16:45:58 matthieu Exp $
- *
  * Copyright © 2003 Keith Packard
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
 #include <config.h>
 #endif
 
-#define ICE_t
-#define TRANS_CLIENT
-#define TRANS_SERVER
+#define ICE_t 1
+#define TRANS_CLIENT 1
+#define TRANS_SERVER 1
 
 #include <X11/Xtrans/transport.c>

File lib/libICE/src/listen.c

View file
  • Ignore whitespace
 
 
 Status
-IceListenForConnections (countRet, listenObjsRet, errorLength, errorStringRet)
-
-int		*countRet;
-IceListenObj	**listenObjsRet;
-int		errorLength;
-char		*errorStringRet;
-
+IceListenForConnections (
+	int		*countRet,
+	IceListenObj	**listenObjsRet,
+	int		errorLength,
+	char		*errorStringRet
+)
 {
     struct _IceListenObj	*listenObjs;
     char			*networkId;
 			free ((char *) (*listenObjsRet)[j]);
 
 		    free ((char *) *listenObjsRet);
+		    *listenObjsRet = NULL;
 
 		    status = 0;
+		    break;
 		}
 		else
 		{
 
 
 int
-IceGetListenConnectionNumber (listenObj)
-
-IceListenObj listenObj;
-
+IceGetListenConnectionNumber (
+	IceListenObj listenObj
+)
 {
     return (_IceTransGetConnectionNumber (listenObj->trans_conn));
 }
 
 
 char *
-IceGetListenConnectionString (listenObj)
-
-IceListenObj listenObj;
-
+IceGetListenConnectionString (
+	IceListenObj listenObj
+)
 {
-    char *networkId;
-
-    networkId = (char *) malloc (strlen (listenObj->network_id) + 1);
-
-    if (networkId)
-	strcpy (networkId, listenObj->network_id);
-
-    return (networkId);
+    return strdup(listenObj->network_id);
 }
 
 
 
 char *
-IceComposeNetworkIdList (count, listenObjs)
-
-int		count;
-IceListenObj	*listenObjs;
-
+IceComposeNetworkIdList (
+	int		count,
+	IceListenObj	*listenObjs
+)
 {
     char *list;
     int len = 0;
 
 
 void
-IceFreeListenObjs (count, listenObjs)
-
-int	     count;
-IceListenObj *listenObjs;
-
+IceFreeListenObjs (
+	int	     count,
+	IceListenObj *listenObjs
+)
 {
     int i;
 
  */
 
 void
-IceSetHostBasedAuthProc (listenObj, hostBasedAuthProc)
-
-IceListenObj		listenObj;
-IceHostBasedAuthProc	hostBasedAuthProc;
-
+IceSetHostBasedAuthProc (
+	IceListenObj		listenObj,
+	IceHostBasedAuthProc	hostBasedAuthProc
+)
 {
     listenObj->host_based_auth_proc = hostBasedAuthProc;
 }

File lib/libICE/src/listenwk.c

View file
  • Ignore whitespace
 
 
 Status
-IceListenForWellKnownConnections (port, countRet, listenObjsRet, errorLength, errorStringRet)
-
-char		*port;
-int		*countRet;
-IceListenObj	**listenObjsRet;
-int		errorLength;
-char		*errorStringRet;
-
+IceListenForWellKnownConnections (
+	char		*port,
+	int		*countRet,
+	IceListenObj	**listenObjsRet,
+	int		errorLength,
+	char		*errorStringRet
+)
 {
     struct _IceListenObj	*listenObjs;
     char			*networkId;
 			free ((char *) (*listenObjsRet)[j]);
 
 		    free ((char *) *listenObjsRet);
+		    *listenObjsRet = NULL;
 
 		    status = 0;
+		    break;
 		}
 		else
 		{

File lib/libICE/src/locking.c

View file
  • Ignore whitespace
 
 
 Status
-IceInitThreads ()
-
+IceInitThreads (
+	void
+)
 {
     return (0);
 }
 
 
 void
-IceAppLockConn (iceConn)
-
-IceConn iceConn;
-
+IceAppLockConn (
+	IceConn	iceConn
+)
 {
     IceLockConn (iceConn);
 }
 
 
 void
-IceAppUnlockConn (iceConn)
-
-IceConn iceConn;
-
+IceAppUnlockConn (
+	IceConn iceConn
+)
 {
     IceUnlockConn (iceConn);
 }

File lib/libICE/src/misc.c

View file
  • Ignore whitespace
  */
 
 char *
-IceAllocScratch (iceConn, size)
-
-IceConn		iceConn;
-unsigned long	size;
-
+IceAllocScratch (
+	IceConn		iceConn,
+	unsigned long	size
+)
 {
     if (!iceConn->scratch || size > iceConn->scratch_size)
     {
  */
 
 int
-IceFlush (iceConn)
-     
-IceConn iceConn;
-
+IceFlush (
+	IceConn iceConn
+)
 {
     _IceWrite (iceConn,
 	(unsigned long) (iceConn->outbufptr - iceConn->outbuf),
 
 
 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);
 }
  */
 
 IceConnectStatus
-IceConnectionStatus (iceConn)
-
-IceConn iceConn;
-
+IceConnectionStatus (
+	IceConn iceConn
+)
 {
     return (iceConn->connection_status);
 }
 
 
 char *
-IceVendor (iceConn)
-
-IceConn iceConn;
-
+IceVendor (
+	IceConn iceConn
+)
 {
-    char *string = (char *) malloc (strlen (iceConn->vendor) + 1);
-
-    if (string)
-	strcpy (string, iceConn->vendor);
-
-    return (string);
+    return strdup(iceConn->vendor);
 }
 
 
 char *
-IceRelease (iceConn)
-
-IceConn iceConn;
-
+IceRelease (
+	IceConn iceConn
+)
 {
-    char *string = (char *) malloc (strlen (iceConn->release) + 1);
-
-    if (string)
-	strcpy (string, iceConn->release);
-
-    return (string);
+    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)
     {
-	char *string = (char *) malloc (
-	    strlen (iceConn->connection_string) + 1);
-
-	if (string)
-	    strcpy (string, iceConn->connection_string);
-
-	return (string);
+	return strdup(iceConn->connection_string);
     }
     else
 	return (NULL);
 
 
 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);
 }
  */
 
 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;
 
  */
 
 void
-_IceReadSkip (iceConn, nbytes)
-
-register IceConn	iceConn;
-register unsigned long	nbytes;
-
+_IceReadSkip (
+	register IceConn	iceConn,
+	register unsigned long	nbytes
+)
 {
     char temp[512];
 
  */
 
 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;
 
 
 #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;
 }
 
 
-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;
 }
 
 
-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 */
 }
 
 
 void
-_IceAddOpcodeMapping (iceConn, hisOpcode, myOpcode)
-
-IceConn	iceConn;
-int 	hisOpcode;
-int 	myOpcode;
-
+_IceAddOpcodeMapping (
+	IceConn	iceConn,
+	int 	hisOpcode,
+	int 	myOpcode
+)
 {
     if (hisOpcode <= 0 || hisOpcode > 255)
     {

File lib/libICE/src/ping.c

View file
  • Ignore whitespace
 #include "ICElibint.h"
 
 Status
-IcePing (iceConn, pingReplyProc, clientData)
-
-IceConn		 iceConn;
-IcePingReplyProc pingReplyProc;
-IcePointer	 clientData;
-
+IcePing (
+	IceConn		 iceConn,
+	IcePingReplyProc pingReplyProc,
+	IcePointer	 clientData
+)
 {
     _IcePingWait *newping = (_IcePingWait *) malloc (sizeof (_IcePingWait));
     _IcePingWait *ptr = iceConn->ping_waits;

File lib/libICE/src/process.c

View file
  • Ignore whitespace
  */
 
 IceProcessMessagesStatus
-IceProcessMessages (iceConn, replyWait, replyReadyRet)
-
-IceConn		 iceConn;
-IceReplyWaitInfo *replyWait;
-Bool		 *replyReadyRet;
-
+IceProcessMessages (
+	IceConn		 iceConn,
+	IceReplyWaitInfo *replyWait,
+	Bool		 *replyReadyRet
+)
 {
     iceMsg		*header;
     Bool		replyReady = False;
 
 
 static void
-AuthRequired (iceConn, authIndex, authDataLen, authData)
-
-IceConn		iceConn;
-int  		authIndex;
-int  		authDataLen;
-IcePointer	authData;
-
+AuthRequired (
+	IceConn		iceConn,
+	int  		authIndex,
+	int  		authDataLen,
+	IcePointer	authData
+)
 {
     iceAuthRequiredMsg *pMsg;
 
 
 
 static void
-AuthReply (iceConn, authDataLen, authData)
-
-IceConn		iceConn;
-int 		authDataLen;
-IcePointer	authData;
-
+AuthReply (
+	IceConn		iceConn,
+	int 		authDataLen,
+	IcePointer	authData
+)
 {
     iceAuthReplyMsg *pMsg;
 
 
 
 static void
-AuthNextPhase (iceConn, authDataLen, authData)
-
-IceConn		iceConn;
-int  		authDataLen;
-IcePointer	authData;
-
+AuthNextPhase (
+	IceConn		iceConn,
+	int  		authDataLen,
+	IcePointer	authData
+)
 {
     iceAuthNextPhaseMsg *pMsg;
 
 
 
 static void
-AcceptConnection (iceConn, versionIndex)
-
-IceConn iceConn;
-int 	versionIndex;
-
+AcceptConnection (
+	IceConn iceConn,
+	int 	versionIndex
+)
 {
     iceConnectionReplyMsg	*pMsg;
     char			*pData;
 
 
 static void
-AcceptProtocol (iceConn, hisOpcode, myOpcode, versionIndex, vendor, release)
-
-IceConn iceConn;
-int  	hisOpcode;
-int  	myOpcode;
-int  	versionIndex;
-char 	*vendor;
-char 	*release;
-
+AcceptProtocol (
+	IceConn iceConn,
+	int  	hisOpcode,
+	int  	myOpcode,
+	int  	versionIndex,
+	char 	*vendor,
+	char 	*release
+)
 {