From a506267808a6ea73dd20f44f613f1c9d0b93941f Mon Sep 17 00:00:00 2001 From: Paulo Cesar Pereira de Andrade Date: Tue, 4 Mar 2008 17:41:18 -0300 Subject: [PATCH] libFS ansification. --- src/FSClServ.c | 3 +- src/FSCloseFt.c | 6 +- src/FSConnServ.c | 18 ++--- src/FSErrDis.c | 24 +++--- src/FSFlush.c | 3 +- src/FSFontInfo.c | 18 ++-- src/FSFtNames.c | 13 ++-- src/FSGetCats.c | 6 +- src/FSListCats.c | 13 ++-- src/FSListExt.c | 9 +- src/FSMisc.c | 3 +- src/FSNextEv.c | 6 +- src/FSOpenFont.c | 12 ++-- src/FSOpenServ.c | 12 +-- src/FSQGlyphs.c | 37 ++++----- src/FSQXExt.c | 28 +++--- src/FSQXInfo.c | 14 ++-- src/FSQuExt.c | 12 ++-- src/FSServName.c | 4 +- src/FSSetCats.c | 8 +- src/FSSync.c | 6 +- src/FSSynchro.c | 6 +- src/FSlibInt.c | 236 ++++++++++++++++++++++++++---------------------------- 23 files changed, 238 insertions(+), 259 deletions(-) diff --git a/src/FSClServ.c b/src/FSClServ.c index 1866cfc..3751c28 100644 --- a/src/FSClServ.c +++ b/src/FSClServ.c @@ -61,8 +61,7 @@ in this Software without prior written authorization from The Open Group. extern FSServer *_FSHeadOfServerList; int -FSCloseServer(svr) - FSServer *svr; +FSCloseServer(FSServer *svr) { _FSExtension *ext; FSServer **sv = &_FSHeadOfServerList; diff --git a/src/FSCloseFt.c b/src/FSCloseFt.c index 38ce7e6..9b0dce8 100644 --- a/src/FSCloseFt.c +++ b/src/FSCloseFt.c @@ -58,9 +58,9 @@ in this Software without prior written authorization from The Open Group. int -FSCloseFont(svr, fid) - FSServer *svr; - Font fid; +FSCloseFont( + FSServer *svr, + Font fid) { fsResourceReq *req; diff --git a/src/FSConnServ.c b/src/FSConnServ.c index 6a66d87..d4d1472 100644 --- a/src/FSConnServ.c +++ b/src/FSConnServ.c @@ -79,8 +79,7 @@ in this Software without prior written authorization from The Open Group. #define FS_CONNECTION_RETRIES 5 XtransConnInfo -_FSConnectServer(server_name) - char *server_name; +_FSConnectServer(char *server_name) { XtransConnInfo trans_conn = NULL; /* transport connection object */ int retry, connect_stat; @@ -135,8 +134,7 @@ _FSConnectServer(server_name) */ void -_FSDisconnectServer(trans_conn) - XtransConnInfo trans_conn; +_FSDisconnectServer(XtransConnInfo trans_conn) { (void) _FSTransClose(trans_conn); @@ -149,8 +147,7 @@ _FSDisconnectServer(trans_conn) * 2) if the connection can be read, must enqueue events and handle errors, * until the connection is writable. */ -void _FSWaitForWritable(svr) - FSServer *svr; +void _FSWaitForWritable(FSServer *svr) { fd_set r_mask; fd_set w_mask; @@ -212,8 +209,7 @@ void _FSWaitForWritable(svr) } -void _FSWaitForReadable(svr) - FSServer *svr; +void _FSWaitForReadable(FSServer *svr) { fd_set r_mask; int result; @@ -227,9 +223,9 @@ void _FSWaitForReadable(svr) } while (result <= 0); } -void _FSSendClientPrefix(svr, client) - FSServer *svr; - fsConnClientPrefix *client; +void _FSSendClientPrefix( + FSServer *svr, + fsConnClientPrefix *client) { struct iovec iovarray[5], *iov = iovarray; diff --git a/src/FSErrDis.c b/src/FSErrDis.c index cc4abf4..183f563 100644 --- a/src/FSErrDis.c +++ b/src/FSErrDis.c @@ -76,13 +76,13 @@ int FSErrorListSize = sizeof(FSErrorList); /* ARGSUSED */ -int FSGetErrorDatabaseText(svr, name, type, defaultp, buffer, nbytes) - register char *name, - *type; - char *defaultp; - FSServer *svr; - char *buffer; - int nbytes; +int FSGetErrorDatabaseText( + FSServer *svr, + register char *name, + register char *type, + char *defaultp, + char *buffer, + int nbytes) { if (nbytes == 0) return 0; @@ -92,11 +92,11 @@ int FSGetErrorDatabaseText(svr, name, type, defaultp, buffer, nbytes) return 1; } -int FSGetErrorText(svr, code, buffer, nbytes) - register int code; - register FSServer *svr; - char *buffer; - int nbytes; +int FSGetErrorText( + register FSServer *svr, + register int code, + char *buffer, + int nbytes) { char *defaultp = NULL; diff --git a/src/FSFlush.c b/src/FSFlush.c index e4b1439..924a0bb 100644 --- a/src/FSFlush.c +++ b/src/FSFlush.c @@ -55,8 +55,7 @@ in this Software without prior written authorization from The Open Group. #endif #include "FSlibint.h" -int FSFlush(svr) - FSServer *svr; +int FSFlush(FSServer *svr) { _FSFlush(svr); return 1; diff --git a/src/FSFontInfo.c b/src/FSFontInfo.c index d79ad9e..0b79613 100644 --- a/src/FSFontInfo.c +++ b/src/FSFontInfo.c @@ -56,15 +56,15 @@ in this Software without prior written authorization from The Open Group. #include "FSlibint.h" char ** -FSListFontsWithXInfo(svr, pattern, maxNames, count, info, pprops, offsets, prop_data) - FSServer *svr; - char *pattern; - int maxNames; - int *count; - FSXFontInfoHeader ***info; - FSPropInfo ***pprops; - FSPropOffset ***offsets; - unsigned char ***prop_data; +FSListFontsWithXInfo( + FSServer *svr, + char *pattern, + int maxNames, + int *count, + FSXFontInfoHeader ***info, + FSPropInfo ***pprops, + FSPropOffset ***offsets, + unsigned char ***prop_data) { long nbytes; int i, diff --git a/src/FSFtNames.c b/src/FSFtNames.c index 2d512e4..733da35 100644 --- a/src/FSFtNames.c +++ b/src/FSFtNames.c @@ -57,11 +57,11 @@ in this Software without prior written authorization from The Open Group. #include "FSlibint.h" char ** -FSListFonts(svr, pattern, maxNames, actualCount) - FSServer *svr; - char *pattern; - int maxNames; - int *actualCount; +FSListFonts( + FSServer *svr, + char *pattern, + int maxNames, + int *actualCount) { long nbytes; int i, @@ -120,8 +120,7 @@ FSListFonts(svr, pattern, maxNames, actualCount) } -int FSFreeFontNames(list) - char **list; +int FSFreeFontNames(char **list) { if (list) { FSfree(list[0] - 1); diff --git a/src/FSGetCats.c b/src/FSGetCats.c index 39792f6..36a134b 100644 --- a/src/FSGetCats.c +++ b/src/FSGetCats.c @@ -57,9 +57,9 @@ in this Software without prior written authorization from The Open Group. #include "FSlibint.h" char ** -FSGetCatalogues(svr, num) - FSServer *svr; - int *num; +FSGetCatalogues( + FSServer *svr, + int *num) { fsGetCataloguesReply rep; char **list; diff --git a/src/FSListCats.c b/src/FSListCats.c index 99b5400..36c5326 100644 --- a/src/FSListCats.c +++ b/src/FSListCats.c @@ -57,11 +57,11 @@ in this Software without prior written authorization from The Open Group. #include "FSlibint.h" char ** -FSListCatalogues(svr, pattern, maxNames, actualCount) - FSServer *svr; - char *pattern; - int maxNames; - int *actualCount; +FSListCatalogues( + FSServer *svr, + char *pattern, + int maxNames, + int *actualCount) { long nbytes; int i, @@ -121,8 +121,7 @@ FSListCatalogues(svr, pattern, maxNames, actualCount) } -int FSFreeCatalogues(list) - char **list; +int FSFreeCatalogues(char **list) { if (list) { FSfree(list[0] - 1); diff --git a/src/FSListExt.c b/src/FSListExt.c index 0f42f59..4eab13d 100644 --- a/src/FSListExt.c +++ b/src/FSListExt.c @@ -58,9 +58,9 @@ in this Software without prior written authorization from The Open Group. #include "FSlibint.h" char ** -FSListExtensions(svr, next) - FSServer *svr; - int *next; +FSListExtensions( + FSServer *svr, + int *next) { fsListExtensionsReply rep; char **list; @@ -114,8 +114,7 @@ FSListExtensions(svr, next) } -int FSFreeExtensionList(list) - char **list; +int FSFreeExtensionList(char **list) { if (list != NULL) { FSfree(list[0] - 1); diff --git a/src/FSMisc.c b/src/FSMisc.c index af0e78c..fd17440 100644 --- a/src/FSMisc.c +++ b/src/FSMisc.c @@ -57,8 +57,7 @@ in this Software without prior written authorization from The Open Group. #include "FSlibint.h" long -FSMaxRequestSize(svr) - FSServer *svr; +FSMaxRequestSize(FSServer *svr) { return svr->max_request_size; } diff --git a/src/FSNextEv.c b/src/FSNextEv.c index 69e009d..8a80fd9 100644 --- a/src/FSNextEv.c +++ b/src/FSNextEv.c @@ -58,9 +58,9 @@ in this Software without prior written authorization from The Open Group. extern _FSQEvent *_FSqfree; -int FSNextEvent(svr, event) - FSServer *svr; - FSEvent *event; +int FSNextEvent( + FSServer *svr, + FSEvent *event) { _FSQEvent *qelt; diff --git a/src/FSOpenFont.c b/src/FSOpenFont.c index da6889a..b2097fa 100644 --- a/src/FSOpenFont.c +++ b/src/FSOpenFont.c @@ -58,12 +58,12 @@ in this Software without prior written authorization from The Open Group. #include "FSlibint.h" Font -FSOpenBitmapFont(svr, hint, fmask, name, otherid) - FSServer *svr; - FSBitmapFormat hint; - FSBitmapFormatMask fmask; - char *name; - Font *otherid; +FSOpenBitmapFont( + FSServer *svr, + FSBitmapFormat hint, + FSBitmapFormatMask fmask, + char *name, + Font *otherid) { unsigned int nbytes; fsOpenBitmapFontReq *req; diff --git a/src/FSOpenServ.c b/src/FSOpenServ.c index 6625779..d547fa4 100644 --- a/src/FSOpenServ.c +++ b/src/FSOpenServ.c @@ -73,8 +73,7 @@ static void OutOfMemory ( FSServer *svr, char *setup ); FSServer *_FSHeadOfServerList = NULL; -void _FSFreeServerStructure(svr) - FSServer *svr; +void _FSFreeServerStructure(FSServer *svr) { if (svr->server_name) FSfree(svr->server_name); @@ -88,9 +87,9 @@ void _FSFreeServerStructure(svr) } static -void OutOfMemory(svr, setup) - FSServer *svr; - char *setup; +void OutOfMemory( + FSServer *svr, + char *setup) { _FSDisconnectServer(svr->trans_conn); @@ -105,8 +104,7 @@ void OutOfMemory(svr, setup) */ FSServer * -FSOpenServer(server) - char *server; +FSOpenServer(char *server) { FSServer *svr; int i; diff --git a/src/FSQGlyphs.c b/src/FSQGlyphs.c index 5ba2eb0..0b3b5bd 100644 --- a/src/FSQGlyphs.c +++ b/src/FSQGlyphs.c @@ -57,15 +57,15 @@ in this Software without prior written authorization from The Open Group. #include "FSlibint.h" int -FSQueryXBitmaps8(svr, fid, format, range_type, str, str_len, offsets, glyphdata) - FSServer *svr; - Font fid; - FSBitmapFormat format; - Bool range_type; - unsigned char *str; - unsigned long str_len; - FSOffset **offsets; - unsigned char **glyphdata; +FSQueryXBitmaps8( + FSServer *svr, + Font fid, + FSBitmapFormat format, + Bool range_type, + unsigned char *str, + unsigned long str_len, + FSOffset **offsets, + unsigned char **glyphdata) { fsQueryXBitmaps8Req *req; fsQueryXBitmaps8Reply reply; @@ -126,16 +126,15 @@ FSQueryXBitmaps8(svr, fid, format, range_type, str, str_len, offsets, glyphdata) } int -FSQueryXBitmaps16(svr, fid, format, range_type, str, str_len, - offsets, glyphdata) - FSServer *svr; - Font fid; - FSBitmapFormat format; - Bool range_type; - FSChar2b *str; - unsigned long str_len; - FSOffset **offsets; - unsigned char **glyphdata; +FSQueryXBitmaps16( + FSServer *svr, + Font fid, + FSBitmapFormat format, + Bool range_type, + FSChar2b *str, + unsigned long str_len, + FSOffset **offsets, + unsigned char **glyphdata) { fsQueryXBitmaps16Req *req; fsQueryXBitmaps16Reply reply; diff --git a/src/FSQXExt.c b/src/FSQXExt.c index e240d3a..fd182d3 100644 --- a/src/FSQXExt.c +++ b/src/FSQXExt.c @@ -69,13 +69,13 @@ _FS_convert_char_info(fsXCharInfo *src, FSXCharInfo *dst) } int -FSQueryXExtents8(svr, fid, range_type, str, str_len, extents) - FSServer *svr; - Font fid; - Bool range_type; - unsigned char *str; - unsigned long str_len; - FSXCharInfo **extents; +FSQueryXExtents8( + FSServer *svr, + Font fid, + Bool range_type, + unsigned char *str, + unsigned long str_len, + FSXCharInfo **extents) { fsQueryXExtents8Req *req; fsQueryXExtents8Reply reply; @@ -115,13 +115,13 @@ FSQueryXExtents8(svr, fid, range_type, str, str_len, extents) } int -FSQueryXExtents16(svr, fid, range_type, str, str_len, extents) - FSServer *svr; - Font fid; - Bool range_type; - FSChar2b *str; - unsigned long str_len; - FSXCharInfo **extents; +FSQueryXExtents16( + FSServer *svr, + Font fid, + Bool range_type, + FSChar2b *str, + unsigned long str_len, + FSXCharInfo **extents) { fsQueryXExtents16Req *req; fsQueryXExtents16Reply reply; diff --git a/src/FSQXInfo.c b/src/FSQXInfo.c index 083f95d..d3dabf4 100644 --- a/src/FSQXInfo.c +++ b/src/FSQXInfo.c @@ -62,13 +62,13 @@ in this Software without prior written authorization from The Open Group. */ int -FSQueryXInfo(svr, fid, info, props, offsets, prop_data) - FSServer *svr; - Font fid; - FSXFontInfoHeader *info; - FSPropInfo *props; - FSPropOffset **offsets; - unsigned char **prop_data; +FSQueryXInfo( + FSServer *svr, + Font fid, + FSXFontInfoHeader *info, + FSPropInfo *props, + FSPropOffset **offsets, + unsigned char **prop_data) { fsQueryXInfoReq *req; fsQueryXInfoReply reply; diff --git a/src/FSQuExt.c b/src/FSQuExt.c index 198bcee..8ba8080 100644 --- a/src/FSQuExt.c +++ b/src/FSQuExt.c @@ -57,12 +57,12 @@ in this Software without prior written authorization from The Open Group. #include "FSlibint.h" Bool -FSQueryExtension(svr, name, major_opcode, first_event, first_error) - FSServer *svr; - char *name; - int *major_opcode; - int *first_event; - int *first_error; +FSQueryExtension( + FSServer *svr, + char *name, + int *major_opcode, + int *first_event, + int *first_error) { fsQueryExtensionReply rep; fsQueryExtensionReq *req; diff --git a/src/FSServName.c b/src/FSServName.c index 886ffa5..7fadd9c 100644 --- a/src/FSServName.c +++ b/src/FSServName.c @@ -58,10 +58,10 @@ in this Software without prior written authorization from The Open Group. #include #include #include +#include "FSlib.h" char * -FSServerName(server) - char *server; +FSServerName(char *server) { char *s; diff --git a/src/FSSetCats.c b/src/FSSetCats.c index 194ce45..a2c0142 100644 --- a/src/FSSetCats.c +++ b/src/FSSetCats.c @@ -58,10 +58,10 @@ in this Software without prior written authorization from The Open Group. #include "FSlibint.h" int -FSSetCatalogues(svr, num, cats) - FSServer *svr; - int num; - char **cats; +FSSetCatalogues( + FSServer *svr, + int num, + char **cats) { int nbytes; fsSetCataloguesReq *req; diff --git a/src/FSSync.c b/src/FSSync.c index eefd031..4991bd3 100644 --- a/src/FSSync.c +++ b/src/FSSync.c @@ -60,9 +60,9 @@ extern _FSQEvent *_FSqfree; /* synchronize with errors and events */ -int FSSync(svr, discard) - FSServer *svr; - Bool discard; +int FSSync( + FSServer *svr, + Bool discard) { fsListExtensionsReply rep; fsReq *req; diff --git a/src/FSSynchro.c b/src/FSSynchro.c index c1c2d31..79c0f40 100644 --- a/src/FSSynchro.c +++ b/src/FSSynchro.c @@ -79,9 +79,9 @@ FSSynchronize(FSServer *svr, int onoff) } FSSyncHandler -FSSetAfterFunction(svr, func) - FSServer *svr; - FSSyncHandler func; +FSSetAfterFunction( + FSServer *svr, + FSSyncHandler func) { FSSyncHandler temp; diff --git a/src/FSlibInt.c b/src/FSlibInt.c index 3e1ac54..f4e7230 100644 --- a/src/FSlibInt.c +++ b/src/FSlibInt.c @@ -131,8 +131,7 @@ static fsReq _dummy_request = { * This routine may have to be reworked if int < long. */ void -_FSFlush(svr) - register FSServer *svr; +_FSFlush(register FSServer *svr) { register long size, todo; @@ -177,9 +176,9 @@ _FSFlush(svr) } int -_FSEventsQueued(svr, mode) - register FSServer *svr; - int mode; +_FSEventsQueued( + register FSServer *svr, + int mode) { register BytesReadable_t len; BytesReadable_t pend; @@ -216,8 +215,7 @@ _FSEventsQueued(svr, mode) * then read as many events as possible (but at least 1) and enqueue them */ void -_FSReadEvents(svr) - register FSServer *svr; +_FSReadEvents(register FSServer *svr) { char buf[BUFSIZE]; BytesReadable_t pend_not_register; /* because can't "&" a register @@ -274,10 +272,10 @@ _FSReadEvents(svr) * reads. This routine may have to be reworked if int < long. */ void -_FSRead(svr, data, size) - register FSServer *svr; - register char *data; - register long size; +_FSRead( + register FSServer *svr, + register char *data, + register long size) { register long bytes_read; #if defined(SVR4) && defined(i386) @@ -349,11 +347,11 @@ _FSRead(svr, data, size) * */ static void -_doFSRead32(svr, data, size, packbuffer) - register FSServer *svr; - register long *data; - register long size; - register char *packbuffer; +_doFSRead32( + register FSServer *svr, + register long *data, + register long size, + register char *packbuffer) { long *lpack, *lp; @@ -381,10 +379,10 @@ _doFSRead32(svr, data, size, packbuffer) } void -_FSRead32(svr, data, len) - FSServer *svr; - long *data; - long len; +_FSRead32( + FSServer *svr, + long *data, + long len) { char packbuffer[PACKBUFFERSIZE]; unsigned nwords = (PACKBUFFERSIZE >> 2); /* bytes to CARD32 */ @@ -403,11 +401,11 @@ _FSRead32(svr, data, len) * */ static void -_doFSRead16(svr, data, size, packbuffer) - register FSServer *svr; - register short *data; - register long size; - char *packbuffer; +_doFSRead16( + register FSServer *svr, + register short *data, + register long size, + char *packbuffer) { long *lpack, *lp; @@ -435,10 +433,10 @@ _doFSRead16(svr, data, size, packbuffer) } void -_FSRead16(svr, data, len) - FSServer *svr; - short *data; - long len; +_FSRead16( + FSServer *svr, + short *data, + long len) { char packbuffer[PACKBUFFERSIZE]; unsigned nwords = (PACKBUFFERSIZE >> 1); /* bytes to CARD16 */ @@ -450,10 +448,10 @@ _FSRead16(svr, data, len) } void -_FSRead16Pad(svr, data, size) - FSServer *svr; - short *data; - long size; +_FSRead16Pad( + FSServer *svr, + short *data, + long size) { int slop = (size & 3); short slopbuf[3]; @@ -473,10 +471,10 @@ _FSRead16Pad(svr, data, size) * bytes. This routine may have to be reworked if int < long. */ void -_FSReadPad(svr, data, size) - register FSServer *svr; - register char *data; - register long size; +_FSReadPad( + register FSServer *svr, + register char *data, + register long size) { register long bytes_read; struct iovec iov[2]; @@ -539,10 +537,10 @@ _FSReadPad(svr, data, size) * This routine may have to be reworked if int < long; */ void -_FSSend(svr, data, size) - register FSServer *svr; - char *data; - register long size; +_FSSend( + register FSServer *svr, + char *data, + register long size) { struct iovec iov[3]; static char pad[3] = {0, 0, 0}; @@ -634,8 +632,7 @@ _FSSend(svr, data, size) * follow the rules. */ FSID -_FSAllocID(svr) - register FSServer *svr; +_FSAllocID(register FSServer *svr) { return (svr->resource_base + (svr->resource_id++ << svr->resource_shift)); } @@ -652,9 +649,9 @@ _FSAllocID(svr) */ unsigned long -_FSSetLastRequestRead(svr, rep) - register FSServer *svr; - register fsGenericReply *rep; +_FSSetLastRequestRead( + register FSServer *svr, + register fsGenericReply *rep) { register unsigned long newseq, lastseq; @@ -684,13 +681,13 @@ _FSSetLastRequestRead(svr, rep) * we may encounter. */ Status -_FSReply(svr, rep, extra, discard) - register FSServer *svr; - register fsReply *rep; - int extra; /* number of 32-bit words expected after the - * reply */ - Bool discard; /* should I discard data followind "extra" - * words? */ +_FSReply( + register FSServer *svr, + register fsReply *rep, + int extra, /* number of 32-bit words expected after the + * reply */ + Bool discard)/* should I discard data followind "extra" + * words? */ { /* * Pull out the serial number now, so that (currently illegal) requests @@ -808,9 +805,9 @@ _FSReply(svr, rep, extra, discard) /* Read and discard "n" 8-bit bytes of data */ void -_FSEatData(svr, n) - FSServer *svr; - register unsigned long n; +_FSEatData( + FSServer *svr, + register unsigned long n) { #define SCRATCHSIZE 2048 char buf[SCRATCHSIZE]; @@ -828,9 +825,9 @@ _FSEatData(svr, n) /* Read and discard "n" 32-bit words. */ static void -_EatData32(svr, n) - FSServer *svr; - unsigned long n; +_EatData32( + FSServer *svr, + unsigned long n) { _FSEatData(svr, n << 2); } @@ -842,9 +839,9 @@ _EatData32(svr, n) * is pointer motion hints.... */ void -_FSEnq(svr, event) - register FSServer *svr; - register fsEvent *event; +_FSEnq( + register FSServer *svr, + register fsEvent *event) { register _FSQEvent *qelt; @@ -881,11 +878,11 @@ _FSEnq(svr, event) /*ARGSUSED*/ Bool -_FSUnknownWireEvent(svr, re, event) - register FSServer *svr; /* pointer to display structure */ - register FSEvent *re; /* pointer to where event should be +_FSUnknownWireEvent( + register FSServer *svr, /* pointer to display structure */ + register FSEvent *re, /* pointer to where event should be * reformatted */ - register fsEvent *event; /* wire protocol event */ + register fsEvent *event) /* wire protocol event */ { #ifdef notdef @@ -899,11 +896,11 @@ _FSUnknownWireEvent(svr, re, event) /*ARGSUSED*/ Status -_FSUnknownNativeEvent(svr, re, event) - register FSServer *svr; /* pointer to display structure */ - register FSEvent *re; /* pointer to where event should be +_FSUnknownNativeEvent( + register FSServer *svr, /* pointer to display structure */ + register FSEvent *re, /* pointer to where event should be * reformatted */ - register fsEvent *event; /* wire protocol event */ + register fsEvent *event) /* wire protocol event */ { #ifdef notdef @@ -919,11 +916,11 @@ _FSUnknownNativeEvent(svr, re, event) * reformat a wire event into an FSEvent structure of the right type. */ Bool -_FSWireToEvent(svr, re, event) - register FSServer *svr; /* pointer to display structure */ - register FSEvent *re; /* pointer to where event should be +_FSWireToEvent( + register FSServer *svr, /* pointer to display structure */ + register FSEvent *re, /* pointer to where event should be * reformatted */ - register fsEvent *event; /* wire protocol event */ + register fsEvent *event) /* wire protocol event */ { re->type = event->type & 0x7f; @@ -945,8 +942,7 @@ _FSWireToEvent(svr, re, event) static char * -_SysErrorMsg(n) - int n; +_SysErrorMsg(int n) { char *s = strerror(n); @@ -958,8 +954,7 @@ _SysErrorMsg(n) * when an X internal system error is encountered. */ int -_FSDefaultIOError(svr) - FSServer *svr; +_FSDefaultIOError(FSServer *svr) { (void) fprintf(stderr, "FSIO: fatal IO error %d (%s) on font server \"%s\"\r\n", @@ -988,9 +983,9 @@ _FSDefaultIOError(svr) * FS_Error packet is encountered in the input stream. */ int -_FSError(svr, rep) - FSServer *svr; - fsError *rep; +_FSError( + FSServer *svr, + fsError *rep) { FSErrorEvent event; @@ -1013,10 +1008,10 @@ _FSError(svr, rep) } int -_FSPrintDefaultError(svr, event, fp) - FSServer *svr; - FSErrorEvent *event; - FILE *fp; +_FSPrintDefaultError( + FSServer *svr, + FSErrorEvent *event, + FILE *fp) { char buffer[BUFSIZ]; char mesg[BUFSIZ]; @@ -1071,9 +1066,9 @@ _FSPrintDefaultError(svr, event, fp) } int -_FSDefaultError(svr, event) - FSServer *svr; - FSErrorEvent *event; +_FSDefaultError( + FSServer *svr, + FSErrorEvent *event) { if (_FSPrintDefaultError(svr, event, stderr) == 0) return 0; @@ -1091,9 +1086,9 @@ FSErrorHandler _FSErrorFunction = _FSDefaultError; * each time, unless the library needs a large scratch space. */ char * -_FSAllocScratch(svr, nbytes) - register FSServer *svr; - unsigned long nbytes; +_FSAllocScratch( + register FSServer *svr, + unsigned long nbytes) { if (nbytes > svr->scratch_length) { if (svr->scratch_buffer != NULL) @@ -1105,26 +1100,24 @@ _FSAllocScratch(svr, nbytes) } int -FSFree(data) - char *data; +FSFree(char *data) { FSfree(data); return 1; } unsigned char * -FSMalloc(size) - unsigned size; +FSMalloc(unsigned size) { return (unsigned char *) FSmalloc(size); } #ifdef DataRoutineIsProcedure void -Data(svr, data, len) - FSServer *svr; - char *data; - long len; +Data( + FSServer *svr, + char *data, + long len) { if (svr->bufptr + (len) <= svr->bufmax) { bcopy(data, svr->bufptr, (int) len); @@ -1152,11 +1145,11 @@ Data(svr, data, len) */ static void -doData16(svr, data, len, packbuffer) - register FSServer *svr; - short *data; - unsigned len; - char *packbuffer; +doData16( + register FSServer *svr, + short *data, + unsigned len, + char *packbuffer) { long *lp, *lpack; @@ -1191,9 +1184,9 @@ doData16(svr, data, len, packbuffer) void Data16(svr, data, len) - FSServer *svr; - short *data; - unsigned len; + FSServer *svr, + short *data, + unsigned len) { char packbuffer[PACKBUFFERSIZE]; unsigned nwords = (PACKBUFFERSIZE >> 1); /* bytes to CARD16 */ @@ -1213,11 +1206,11 @@ Data16(svr, data, len) */ static -doData32(svr, data, len, packbuffer) - register FSServer *svr; - long *data; - unsigned len; - char *packbuffer; +doData32( + register FSServer *svr, + long *data, + unsigned len, + char *packbuffer) { long *lp, *lpack; @@ -1251,10 +1244,10 @@ doData32(svr, data, len, packbuffer) } void -Data32(svr, data, len) - FSServer *svr; - short *data; - unsigned len; +Data32( + FSServer *svr, + short *data, + unsigned len) { char packbuffer[PACKBUFFERSIZE]; unsigned nwords = (PACKBUFFERSIZE >> 2); /* bytes to CARD32 */ @@ -1275,7 +1268,7 @@ Data32(svr, data, len) */ void -_FSFreeQ() +_FSFreeQ(void) { register _FSQEvent *qelt = _FSqfree; @@ -1315,9 +1308,9 @@ _FSFreeQ() * _FSGetHostname - similar to gethostname but allows special processing. */ int -_FSGetHostname(buf, maxlen) - char *buf; - int maxlen; +_FSGetHostname( + char *buf, + int maxlen) { int len; @@ -1347,8 +1340,7 @@ _FSGetHostname(buf, maxlen) /* * This is not always a macro. */ -_FSANYSET(src) - long *src; +_FSANYSET(long *src) { int i; -- 1.5.4.3