summaryrefslogtreecommitdiff
path: root/os/osdep.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-03-21 12:55:09 -0700
committerKeith Packard <keithp@keithp.com>2012-03-21 13:54:42 -0700
commit9838b7032ea9792bec21af424c53c07078636d21 (patch)
treeb72d0827dac50f0f3b8eab29b3b7639546d735d7 /os/osdep.h
parent75199129c603fc8567185ac31866c9518193cb78 (diff)
Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'os/osdep.h')
-rw-r--r--os/osdep.h116
1 files changed, 55 insertions, 61 deletions
diff --git a/os/osdep.h b/os/osdep.h
index 70e2a0726..fff088701 100644
--- a/os/osdep.h
+++ b/os/osdep.h
@@ -22,7 +22,6 @@ Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
-
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
@@ -102,17 +101,17 @@ SOFTWARE.
#include <stddef.h>
#if defined(XDMCP) || defined(HASXDMAUTH)
-typedef Bool (*ValidatorFunc)(ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type);
-typedef Bool (*GeneratorFunc)(ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type);
-typedef Bool (*AddAuthorFunc)(unsigned name_length, const char *name,
- unsigned data_length, char *data);
+typedef Bool (*ValidatorFunc) (ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type);
+typedef Bool (*GeneratorFunc) (ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type);
+typedef Bool (*AddAuthorFunc) (unsigned name_length, const char *name,
+ unsigned data_length, char *data);
#endif
typedef struct _connectionInput {
struct _connectionInput *next;
char *buffer; /* contains current client input */
char *bufptr; /* pointer to current start of data */
- int bufcnt; /* count of bytes in buffer */
+ int bufcnt; /* count of bytes in buffer */
int lenLastReq;
int size;
unsigned int ignoreBytes; /* bytes to ignore before the next request */
@@ -151,30 +150,29 @@ typedef int (*AuthRstCFunc) (AuthRstCArgs);
#define AuthToIDArgs unsigned short data_length, char *data
typedef XID (*AuthToIDFunc) (AuthToIDArgs);
-typedef void (*OsCloseFunc)(ClientPtr);
+typedef void (*OsCloseFunc) (ClientPtr);
-typedef int (*OsFlushFunc)(ClientPtr who, struct _osComm * oc, char* extraBuf, int extraCount);
+typedef int (*OsFlushFunc) (ClientPtr who, struct _osComm * oc, char *extraBuf,
+ int extraCount);
typedef struct _osComm {
int fd;
ConnectionInputPtr input;
ConnectionOutputPtr output;
- XID auth_id; /* authorization id */
- CARD32 conn_time; /* timestamp if not established, else 0 */
+ XID auth_id; /* authorization id */
+ CARD32 conn_time; /* timestamp if not established, else 0 */
struct _XtransConnInfo *trans_conn; /* transport connection object */
Bool local_client;
} OsCommRec, *OsCommPtr;
-extern int FlushClient(
- ClientPtr /*who*/,
- OsCommPtr /*oc*/,
- const void * /*extraBuf*/,
- int /*extraCount*/
-);
+extern int FlushClient(ClientPtr /*who */ ,
+ OsCommPtr /*oc */ ,
+ const void * /*extraBuf */ ,
+ int /*extraCount */
+ );
-extern void FreeOsBuffers(
- OsCommPtr /*oc*/
-);
+extern void FreeOsBuffers(OsCommPtr /*oc */
+ );
#include "dix.h"
@@ -195,7 +193,7 @@ extern int GetConnectionTranslation(int conn);
extern void SetConnectionTranslation(int conn, int client);
extern void ClearConnectionTranslation(void);
#endif
-
+
extern Bool NewOutputPending;
extern Bool AnyClientsWriteBlocked;
@@ -212,67 +210,63 @@ extern int mffs(fd_mask);
extern Bool ComputeLocalClient(ClientPtr client);
/* in auth.c */
-extern void GenerateRandomData (int len, char *buf);
+extern void GenerateRandomData(int len, char *buf);
/* in mitauth.c */
-extern XID MitCheckCookie (AuthCheckArgs);
-extern XID MitGenerateCookie (AuthGenCArgs);
-extern XID MitToID (AuthToIDArgs);
-extern int MitAddCookie (AuthAddCArgs);
-extern int MitFromID (AuthFromIDArgs);
-extern int MitRemoveCookie (AuthRemCArgs);
-extern int MitResetCookie (AuthRstCArgs);
+extern XID MitCheckCookie(AuthCheckArgs);
+extern XID MitGenerateCookie(AuthGenCArgs);
+extern XID MitToID(AuthToIDArgs);
+extern int MitAddCookie(AuthAddCArgs);
+extern int MitFromID(AuthFromIDArgs);
+extern int MitRemoveCookie(AuthRemCArgs);
+extern int MitResetCookie(AuthRstCArgs);
/* in xdmauth.c */
#ifdef HASXDMAUTH
-extern XID XdmCheckCookie (AuthCheckArgs);
-extern XID XdmToID (AuthToIDArgs);
-extern int XdmAddCookie (AuthAddCArgs);
-extern int XdmFromID (AuthFromIDArgs);
-extern int XdmRemoveCookie (AuthRemCArgs);
-extern int XdmResetCookie (AuthRstCArgs);
+extern XID XdmCheckCookie(AuthCheckArgs);
+extern XID XdmToID(AuthToIDArgs);
+extern int XdmAddCookie(AuthAddCArgs);
+extern int XdmFromID(AuthFromIDArgs);
+extern int XdmRemoveCookie(AuthRemCArgs);
+extern int XdmResetCookie(AuthRstCArgs);
#endif
/* in rpcauth.c */
#ifdef SECURE_RPC
-extern void SecureRPCInit (AuthInitArgs);
-extern XID SecureRPCCheck (AuthCheckArgs);
-extern XID SecureRPCToID (AuthToIDArgs);
-extern int SecureRPCAdd (AuthAddCArgs);
-extern int SecureRPCFromID (AuthFromIDArgs);
-extern int SecureRPCRemove (AuthRemCArgs);
-extern int SecureRPCReset (AuthRstCArgs);
+extern void SecureRPCInit(AuthInitArgs);
+extern XID SecureRPCCheck(AuthCheckArgs);
+extern XID SecureRPCToID(AuthToIDArgs);
+extern int SecureRPCAdd(AuthAddCArgs);
+extern int SecureRPCFromID(AuthFromIDArgs);
+extern int SecureRPCRemove(AuthRemCArgs);
+extern int SecureRPCReset(AuthRstCArgs);
#endif
#ifdef XDMCP
/* in xdmcp.c */
-extern void XdmcpUseMsg (void);
+extern void XdmcpUseMsg(void);
extern int XdmcpOptions(int argc, char **argv, int i);
-extern void XdmcpRegisterConnection (
- int type,
- const char *address,
- int addrlen);
-extern void XdmcpRegisterAuthorizations (void);
-extern void XdmcpRegisterAuthorization (const char *name, int namelen);
-extern void XdmcpInit (void);
-extern void XdmcpReset (void);
+extern void XdmcpRegisterConnection(int type, const char *address, int addrlen);
+extern void XdmcpRegisterAuthorizations(void);
+extern void XdmcpRegisterAuthorization(const char *name, int namelen);
+extern void XdmcpInit(void);
+extern void XdmcpReset(void);
extern void XdmcpOpenDisplay(int sock);
extern void XdmcpCloseDisplay(int sock);
-extern void XdmcpRegisterAuthentication (
- const char *name,
- int namelen,
- const char *data,
- int datalen,
- ValidatorFunc Validator,
- GeneratorFunc Generator,
- AddAuthorFunc AddAuth);
+extern void XdmcpRegisterAuthentication(const char *name,
+ int namelen,
+ const char *data,
+ int datalen,
+ ValidatorFunc Validator,
+ GeneratorFunc Generator,
+ AddAuthorFunc AddAuth);
struct sockaddr_in;
-extern void XdmcpRegisterBroadcastAddress (const struct sockaddr_in *addr);
+extern void XdmcpRegisterBroadcastAddress(const struct sockaddr_in *addr);
#endif
#ifdef HASXDMAUTH
-extern void XdmAuthenticationInit (const char *cookie, int cookie_length);
+extern void XdmAuthenticationInit(const char *cookie, int cookie_length);
#endif
-#endif /* _OSDEP_H_ */
+#endif /* _OSDEP_H_ */