diff options
author | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-28 18:48:47 -0200 |
---|---|---|
committer | Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> | 2009-01-28 18:48:47 -0200 |
commit | 896aeb5dd128fc8e489106fa7aaa5cee1e589106 (patch) | |
tree | dcf6ac4ad7a91fc2b668f79e98aa257593d869c2 /src/sm_client.c | |
parent | 1dcf5502137efe36d01b30169d4387438ad47be0 (diff) |
Janitor: ansification, make distcheck, compiler warnings.
Diffstat (limited to 'src/sm_client.c')
-rw-r--r-- | src/sm_client.c | 126 |
1 files changed, 38 insertions, 88 deletions
diff --git a/src/sm_client.c b/src/sm_client.c index de79452..a5c714f 100644 --- a/src/sm_client.c +++ b/src/sm_client.c @@ -33,29 +33,32 @@ in this Software without prior written authorization from The Open Group. #endif #include <X11/SM/SMlib.h> #include "SMlibint.h" -#include "globals.h" -extern IcePoAuthStatus _IcePoMagicCookie1Proc (); -extern void _SmcProcessMessage (); -static void set_callbacks(); +int _SmcOpcode = 0; +int _SmsOpcode = 0; + +#ifndef __UNIXOS2__ +SmsNewClientProc _SmsNewClientProc; +SmPointer _SmsNewClientData; +#else +SmsNewClientProc _SmsNewClientProc = 0; +SmPointer _SmsNewClientData = 0; +#endif + +SmcErrorHandler _SmcErrorHandler = _SmcDefaultErrorHandler; +SmsErrorHandler _SmsErrorHandler = _SmsDefaultErrorHandler; + + +static void +set_callbacks(SmcConn smcConn, unsigned long mask, SmcCallbacks *callbacks); SmcConn -SmcOpenConnection (networkIdsList, context, - xsmpMajorRev, xsmpMinorRev, mask, callbacks, - previousId, clientIdRet, errorLength, errorStringRet) - -char *networkIdsList; -SmPointer context; -int xsmpMajorRev; -int xsmpMinorRev; -unsigned long mask; -SmcCallbacks *callbacks; -char *previousId; -char **clientIdRet; -int errorLength; -char *errorStringRet; - +SmcOpenConnection(char *networkIdsList, SmPointer context, + int xsmpMajorRev, int xsmpMinorRev, + unsigned long mask, SmcCallbacks *callbacks, + char *previousId, char **clientIdRet, + int errorLength, char *errorStringRet) { SmcConn smcConn; IceConn iceConn; @@ -283,12 +286,7 @@ char *errorStringRet; SmcCloseStatus -SmcCloseConnection (smcConn, count, reasonMsgs) - -SmcConn smcConn; -int count; -char **reasonMsgs; - +SmcCloseConnection(SmcConn smcConn, int count, char **reasonMsgs) { IceConn iceConn = smcConn->iceConn; smCloseConnectionMsg *pMsg; @@ -356,12 +354,7 @@ char **reasonMsgs; void -SmcModifyCallbacks (smcConn, mask, callbacks) - -SmcConn smcConn; -unsigned long mask; -SmcCallbacks *callbacks; - +SmcModifyCallbacks(SmcConn smcConn, unsigned long mask, SmcCallbacks *callbacks) { set_callbacks (smcConn, mask, callbacks); } @@ -369,12 +362,7 @@ SmcCallbacks *callbacks; void -SmcSetProperties (smcConn, numProps, props) - -SmcConn smcConn; -int numProps; -SmProp **props; - +SmcSetProperties(SmcConn smcConn, int numProps, SmProp **props) { IceConn iceConn = smcConn->iceConn; smSetPropertiesMsg *pMsg; @@ -400,12 +388,7 @@ SmProp **props; void -SmcDeleteProperties (smcConn, numProps, propNames) - -SmcConn smcConn; -int numProps; -char **propNames; - +SmcDeleteProperties(SmcConn smcConn, int numProps, char **propNames) { IceConn iceConn = smcConn->iceConn; smDeletePropertiesMsg *pMsg; @@ -433,12 +416,8 @@ char **propNames; Status -SmcGetProperties (smcConn, propReplyProc, clientData) - -SmcConn smcConn; -SmcPropReplyProc propReplyProc; -SmPointer clientData; - +SmcGetProperties(SmcConn smcConn, SmcPropReplyProc propReplyProc, + SmPointer clientData) { IceConn iceConn = smcConn->iceConn; _SmcPropReplyWait *wait, *ptr; @@ -471,13 +450,8 @@ SmPointer clientData; Status -SmcInteractRequest (smcConn, dialogType, interactProc, clientData) - -SmcConn smcConn; -int dialogType; -SmcInteractProc interactProc; -SmPointer clientData; - +SmcInteractRequest(SmcConn smcConn, int dialogType, + SmcInteractProc interactProc, SmPointer clientData) { IceConn iceConn = smcConn->iceConn; smInteractRequestMsg *pMsg; @@ -515,11 +489,7 @@ SmPointer clientData; void -SmcInteractDone (smcConn, cancelShutdown) - -SmcConn smcConn; -Bool cancelShutdown; - +SmcInteractDone(SmcConn smcConn, Bool cancelShutdown) { IceConn iceConn = smcConn->iceConn; smInteractDoneMsg *pMsg; @@ -535,16 +505,8 @@ Bool cancelShutdown; void -SmcRequestSaveYourself (smcConn, saveType, shutdown, interactStyle, - fast, global) - -SmcConn smcConn; -int saveType; -Bool shutdown; -int interactStyle; -Bool fast; -Bool global; - +SmcRequestSaveYourself(SmcConn smcConn, int saveType, Bool shutdown, + int interactStyle, Bool fast, Bool global) { IceConn iceConn = smcConn->iceConn; smSaveYourselfRequestMsg *pMsg; @@ -564,12 +526,9 @@ Bool global; Status -SmcRequestSaveYourselfPhase2 (smcConn, saveYourselfPhase2Proc, clientData) - -SmcConn smcConn; -SmcSaveYourselfPhase2Proc saveYourselfPhase2Proc; -SmPointer clientData; - +SmcRequestSaveYourselfPhase2(SmcConn smcConn, + SmcSaveYourselfPhase2Proc saveYourselfPhase2Proc, + SmPointer clientData) { IceConn iceConn = smcConn->iceConn; _SmcPhase2Wait *wait; @@ -599,11 +558,7 @@ SmPointer clientData; void -SmcSaveYourselfDone (smcConn, success) - -SmcConn smcConn; -Bool success; - +SmcSaveYourselfDone(SmcConn smcConn, Bool success) { IceConn iceConn = smcConn->iceConn; smSaveYourselfDoneMsg *pMsg; @@ -619,12 +574,7 @@ Bool success; static void -set_callbacks (smcConn, mask, callbacks) - -SmcConn smcConn; -unsigned long mask; -SmcCallbacks *callbacks; - +set_callbacks(SmcConn smcConn, unsigned long mask, SmcCallbacks *callbacks) { if (mask & SmcSaveYourselfProcMask) { |