[nas] [patch] correct old-style function declarations

Stefan Huehner stefan at huehner.org
Sat Jul 8 08:35:33 MDT 2006


Hi,

attached patch updates (most of) the old (K&R) style function
declarations to modern c.

Please review and consider applying.

OT: Is there a developement repository available with the current
developement code?

Regards,
Stefan


-------------- next part --------------
diff -ur nas-1.8.orig/server/dia/audispatch.c nas-1.8/server/dia/audispatch.c
--- nas-1.8.orig/server/dia/audispatch.c	1999-09-05 04:43:11.000000000 +0200
+++ nas-1.8/server/dia/audispatch.c	2006-07-08 15:47:31.000000000 +0200
@@ -103,15 +103,13 @@
 /* REQUESTS */
 
 int
-ProcAuNotImplemented(client)
-ClientPtr       client;
+ProcAuNotImplemented(ClientPtr client)
 {
     AU_ERROR(AuBadImplementation, 0);
 }
 
 int
-ProcAuListDevices(client)
-ClientPtr       client;
+ProcAuListDevices(ClientPtr client)
 {
     REQUEST(auReq);
     auListDevicesReply rep;
@@ -204,8 +202,7 @@
 }
 
 int
-ProcAuGetDeviceAttributes(client)
-ClientPtr       client;
+ProcAuGetDeviceAttributes(ClientPtr client)
 {
     REQUEST(auResourceReq);
     auGetDeviceAttributesReply rep;
@@ -251,8 +248,7 @@
 }
 
 int
-ProcAuSetDeviceAttributes(client)
-ClientPtr       client;
+ProcAuSetDeviceAttributes(ClientPtr client)
 {
     REQUEST(auResourceReq);
     ComponentPtr    c;
@@ -295,8 +291,7 @@
 }
 
 int
-ProcAuCreateBucket(client)
-ClientPtr       client;
+ProcAuCreateBucket(ClientPtr client)
 {
     REQUEST(auResourceReq);
     ComponentPtr    c;
@@ -361,8 +356,7 @@
 }
 
 int
-ProcAuDestroyBucket(client)
-ClientPtr       client;
+ProcAuDestroyBucket(ClientPtr client)
 {
     REQUEST(auResourceReq);
     ComponentPtr    c;
@@ -383,8 +377,7 @@
 }
 
 int
-ProcAuListBuckets(client)
-ClientPtr       client;
+ProcAuListBuckets(ClientPtr client)
 {
     REQUEST(auReq);
     auListBucketsReply rep;
@@ -457,8 +450,7 @@
 }
 
 int
-ProcAuGetBucketAttributes(client)
-ClientPtr       client;
+ProcAuGetBucketAttributes(ClientPtr client)
 {
     REQUEST(auResourceReq);
     auGetBucketAttributesReply rep;
@@ -485,8 +477,7 @@
 }
 
 int
-ProcAuCreateFlow(client)
-ClientPtr       client;
+ProcAuCreateFlow(ClientPtr client)
 {
     REQUEST(auResourceReq);
     FlowPtr         flow;
@@ -507,8 +498,7 @@
 }
 
 int
-ProcAuDestroyFlow(client)
-ClientPtr       client;
+ProcAuDestroyFlow(ClientPtr client)
 {
     REQUEST(auResourceReq);
     FlowPtr         flow;
@@ -524,8 +514,7 @@
 }
 
 int
-ProcAuGetElements(client)
-ClientPtr       client;
+ProcAuGetElements(ClientPtr client)
 {
     REQUEST(auResourceReq);
     auGetElementsReply rep;
@@ -597,8 +586,7 @@
 }
 
 int
-ProcAuSetElements(client)
-ClientPtr       client;
+ProcAuSetElements(ClientPtr client)
 {
     REQUEST(auSetElementsReq);
     FlowPtr         flow;
@@ -983,8 +971,7 @@
 }
 
 int
-ProcAuSetElementStates(client)
-ClientPtr       client;
+ProcAuSetElementStates(ClientPtr client)
 {
     REQUEST(auSetElementStatesReq);
     int             i;
@@ -1037,8 +1024,7 @@
 }
 
 int
-ProcAuGetElementStates(client)
-ClientPtr       client;
+ProcAuGetElementStates(ClientPtr client)
 {
     REQUEST(auGetElementStatesReq);
     auGetElementStatesReply rep;
@@ -1131,8 +1117,7 @@
 }
 
 int
-ProcAuSetElementParameters(client)
-ClientPtr       client;
+ProcAuSetElementParameters(ClientPtr client)
 {
     REQUEST(auSetElementParametersReq);
     FlowPtr         flow;
@@ -1255,8 +1240,7 @@
      (s) == AuTransferStateEnd)
 
 int
-ProcAuWriteElement(client)
-ClientPtr       client;
+ProcAuWriteElement(ClientPtr client)
 {
     REQUEST(auWriteElementReq);
     FlowPtr         flow;
@@ -1363,8 +1347,7 @@
 }
 
 int
-ProcAuReadElement(client)
-ClientPtr       client;
+ProcAuReadElement(ClientPtr client)
 {
     REQUEST(auReadElementReq);
     FlowPtr         flow;
@@ -1487,8 +1470,7 @@
 }
 
 int
-ProcAuGetServerTime(client)
-ClientPtr       client;
+ProcAuGetServerTime(ClientPtr client)
 {
     REQUEST(auReq);
     auGetServerTimeReply rep;
@@ -1507,8 +1489,7 @@
 }
 
 int
-ProcAuGetCloseDownMode(client)
-ClientPtr       client;
+ProcAuGetCloseDownMode(ClientPtr client)
 {
     REQUEST(auReq);
     auGetCloseDownModeReply rep;
@@ -1525,8 +1506,7 @@
 }
 
 int
-ProcAuSetCloseDownMode(client)
-ClientPtr       client;
+ProcAuSetCloseDownMode(ClientPtr client)
 {
     REQUEST(auSetCloseDownModeReq);
 
@@ -1551,8 +1531,7 @@
  */
 
 int
-ProcAuKillClient(client)
-ClientPtr       client;
+ProcAuKillClient(ClientPtr client)
 {
     REQUEST(auResourceReq);
 
@@ -1595,8 +1574,7 @@
 }
 
 int
-ProcAuNoOperation(client)
-ClientPtr       client;
+ProcAuNoOperation(ClientPtr client)
 {
     return AuSuccess;
 }
@@ -1642,8 +1620,7 @@
 
 /* sends return init packet */
 int
-AuSendInitResponse(client)
-ClientPtr       client;
+AuSendInitResponse(ClientPtr client)
 {
     extern ComponentPtr *auServerDevices,	/* array of devices */
                    *auServerBuckets,		/* array of server owned
@@ -1726,12 +1703,7 @@
 
 /* XXX - could probably toss this and just use SendErrorToClient */
 void
-SendAuErrorToClient(client, majorCode, minorCode, resId, errorCode)
-ClientPtr       client;
-unsigned        majorCode;
-unsigned short  minorCode;
-AuID             resId;
-int             errorCode;
+SendAuErrorToClient(ClientPtr client, unsigned majorCode, unsigned short minorCode, AuID resId, int errorCode)
 {
     auError         rep;
 
diff -ur nas-1.8.orig/server/dia/auevents.c nas-1.8/server/dia/auevents.c
--- nas-1.8.orig/server/dia/auevents.c	2004-06-20 22:44:15.000000000 +0200
+++ nas-1.8/server/dia/auevents.c	2006-07-08 15:48:56.000000000 +0200
@@ -71,10 +71,7 @@
 }
 
 static void
-WriteAuEventsToClient(pClient, count, events)
-ClientPtr       pClient;
-int             count;
-auEvent        *events;
+WriteAuEventsToClient(ClientPtr pClient, int count, auEvent *events)
 {
     /* pebl: check whether client is still there */
     if (pClient->clientGone == FALSE)
@@ -82,11 +79,7 @@
 }
 
 static void
-fillInEvent(kind, reason, el, ev)
-int             kind,
-                reason;
-FlowElementPtr  el;
-auEvent        *ev;
+fillInEvent(int kind, int reason, FlowElementPtr el, auEvent *ev)
 {
     AuUint32           numBytes = 0;
     ComponentPtr    c = el->component;
@@ -165,10 +158,7 @@
 }
 
 void
-AuRequestElementNotifyEvent(kind, reason, el)
-int             kind,
-                reason;
-FlowElementPtr  el;
+AuRequestElementNotifyEvent(int kind, int reason, FlowElementPtr el)
 {
     EventQueuePtr   p;
 
@@ -194,9 +184,7 @@
 #define MONITOR_EVENT_DATA_SPACE	12
 
 void
-AuRequestMonitorNotifyEvent(el, data)
-FlowElementPtr  el;
-AuUint8          *data;
+AuRequestMonitorNotifyEvent(FlowElementPtr el, AuUint8 *data)
 {
     EventQueuePtr   p;
     auEvent        *ev;
@@ -243,8 +231,7 @@
 }
 
 void
-AuDequeueEvents(flow)
-FlowPtr         flow;
+AuDequeueEvents(FlowPtr flow)
 {
     AuBlock           l;
     EventQueuePtr   p,
diff -ur nas-1.8.orig/server/dia/auprocess.c nas-1.8/server/dia/auprocess.c
--- nas-1.8.orig/server/dia/auprocess.c	2005-04-07 21:08:14.000000000 +0200
+++ nas-1.8/server/dia/auprocess.c	2006-07-08 16:22:12.000000000 +0200
@@ -117,10 +117,7 @@
 #endif						/* AU_OPTIMIZE_SINGLE_SAMPLE */
 
 void
-AuULAW8ToNative(p, tracks, numSamples)
-AuUint8        *p;
-AuInt32         tracks,
-                numSamples;
+AuULAW8ToNative(AuUint8 *p, AuInt32 tracks, AuInt32 numSamples)
 {
     AuUint8        *s;
     AuInt16         i,
@@ -164,10 +161,7 @@
 						 * 16 bit samples */
 
 void
-AuNativeToULAW8(s, tracks, numSamples)
-AuInt16        *s;
-AuInt32         tracks,
-                numSamples;
+AuNativeToULAW8(AuInt16 *s, AuInt32 tracks, AuInt32 numSamples)
 {
     static AuInt32  exp_lut[256] =
     {
@@ -225,10 +219,7 @@
 }
 
 void
-AuSigned8ToNative(p, tracks, numSamples)
-AuUint8        *p;
-AuInt32         tracks,
-                numSamples;
+AuSigned8ToNative(AuInt8 *p, AuInt32 tracks, AuInt32 numSamples)
 {
     AuUint8        *s;
     AuInt16        *d;
@@ -242,10 +233,7 @@
 }
 
 void
-AuNativeToSigned8(s, tracks, numSamples)
-AuUint16       *s;
-AuInt32         tracks,
-                numSamples;
+AuNativeToSigned8(AuUint16 *s, AuInt32 tracks, AuInt32 numSamples)
 {
     AuUint8        *d = (AuUint8 *) s;
     AuInt32         i;
@@ -255,10 +243,7 @@
 }
 
 void
-AuUnsigned8ToNative(p, tracks, numSamples)
-AuUint8        *p;
-AuInt32         tracks,
-                numSamples;
+AuUnsigned8ToNative(AuUint8 *p, AuInt32 tracks, AuInt32 numSamples)
 {
     AuUint8        *s;
     AuInt16        *d;
@@ -272,10 +257,7 @@
 }
 
 void
-AuNativeToUnsigned8(s, tracks, numSamples)
-AuInt16        *s;
-AuInt32         tracks,
-                numSamples;
+AuNativeToUnsigned8(AuInt16 *s, AuInt32 tracks, AuInt32 numSamples)
 {
     AuInt32         i;
     AuUint8        *d = (AuUint8 *) s;
@@ -285,10 +267,7 @@
 }
 
 void
-changeSign(p, tracks, numSamples)
-AuUint16       *p;
-AuInt32         tracks,
-                numSamples;
+changeSign(AuUint16 *p, AuInt32 tracks, AuInt32 numSamples)
 {
     AuInt32         i;
 
@@ -297,10 +276,7 @@
 }
 
 void
-AuNeg16LSBTo16MSB(p, tracks, numSamples)
-AuUint16       *p;
-AuInt32         tracks,
-                numSamples;
+AuNeg16LSBTo16MSB(AuUint16 *p, AuInt32 tracks, AuInt32 numSamples)
 {
     AuInt32         i;
     AuUint8         x;
@@ -314,10 +290,7 @@
 }
 
 void
-AuNeg16MSBto16LSB(p, tracks, numSamples)
-AuInt16        *p;
-AuInt32         tracks,
-                numSamples;
+AuNeg16MSBto16LSB(AuInt16 *p, AuInt32 tracks, AuInt32 numSamples)
 {
     AuInt32         i;
     AuUint8         x;
@@ -331,10 +304,7 @@
 }
 
 void
-byteSwap(p, tracks, numSamples)
-AuUint16       *p;
-AuInt32         tracks,
-                numSamples;
+byteSwap(AuUint16 *p, AuInt32 tracks, AuInt32 numSamples)
 {
     AuInt32         i;
     AuUint8         x;
@@ -349,9 +319,7 @@
 
 /* returns AuTrue if a flow was started */
 AuBool
-AuStartFlow(newFlow, pOldFlow)
-CompiledFlowPtr newFlow,
-               *pOldFlow;
+AuStartFlow(CompiledFlowPtr newFlow, CompiledFlowPtr *pOldFlow)
 {
     AuBool          status;
     AuBlock         l;
@@ -408,8 +376,7 @@
 }
 
 static AuBool
-readWaveForm(input)
-CompiledFlowInputPtr input;
+readWaveForm(CompiledFlowInputPtr input)
 {
     ComponentPtr    c = input->component;
     FlowElementPtr  flowEl = input->flowEl;
@@ -488,8 +455,7 @@
 }
 
 static AuBool
-readBucket(input)
-CompiledFlowInputPtr input;
+readBucket(CompiledFlowInputPtr input)
 {
     ComponentPtr    c = input->component;
     FlowElementPtr  flowEl = input->flowEl;
@@ -543,8 +509,7 @@
 }
 
 static AuBool
-readClient(input)
-CompiledFlowInputPtr input;
+readClient(CompiledFlowInputPtr input)
 {
     ComponentPtr    c = input->component;
     FlowElementPtr  flowEl = input->flowEl;
@@ -640,8 +605,7 @@
 }
 
 static AuBool
-readDevice(input)
-CompiledFlowInputPtr input;
+readDevice(CompiledFlowInputPtr input)
 {
     FlowElementPtr  flowEl = input->flowEl;
 
@@ -656,8 +620,7 @@
 }
 
 static AuBool
-readInput(input)
-CompiledFlowInputPtr input;
+readInput(CompiledFlowInputPtr input)
 {
     AuBool          flowStateChanged;
     FlowElementPtr  flowEl = input->flowEl;
@@ -674,8 +637,7 @@
 }
 
 static AuBool
-writeClient(output)
-CompiledFlowOutputPtr output;
+writeClient(CompiledFlowOutputPtr output)
 {
     ComponentPtr    c = output->component;
     FlowElementPtr  flowEl = output->flowEl;
@@ -742,8 +704,7 @@
 }
 
 static AuBool
-writeBucket(output)
-CompiledFlowOutputPtr output;
+writeBucket(CompiledFlowOutputPtr output)
 {
     ComponentPtr    c = output->component;
     FlowElementPtr  flowEl = output->flowEl;
@@ -794,8 +755,7 @@
 
 
 static AuBool
-writeMonitor(output)
-CompiledFlowOutputPtr output;
+writeMonitor(CompiledFlowOutputPtr output)
 {
     AuInt32         n;
 
@@ -831,8 +791,7 @@
 }
 
 static AuBool
-writeDevice(output)
-CompiledFlowOutputPtr output;
+writeDevice(CompiledFlowOutputPtr output)
 {
     FlowElementPtr  flowEl = output->flowEl;
     ComponentPtr    c = output->component;
@@ -852,8 +811,7 @@
 }
 
 static AuBool
-writeOutput(output)
-CompiledFlowOutputPtr output;
+writeOutput(CompiledFlowOutputPtr output)
 {
     FlowElementPtr  flowEl = output->flowEl;
 #ifdef OUTPUT_RANGE_CHECK
@@ -877,9 +835,7 @@
 }
 
 static void
-accumulateOutput(input, output)
-CompiledFlowInputPtr input;
-CompiledFlowOutputPtr output;
+accumulateOutput(CompiledFlowInputPtr input, CompiledFlowOutputPtr output)
 {
     AuInt16        *in = (AuInt16 *) input->flowEl->minibuf;
     AuUint32        i,
@@ -941,9 +897,7 @@
 }
 
 static void
-accumulateOutputSimpleMono(input, output)
-CompiledFlowInputPtr input;
-CompiledFlowOutputPtr output;
+accumulateOutputSimpleMono(CompiledFlowInputPtr input, CompiledFlowOutputPtr output)
 {
     AuUint32        i;
     AuInt16        *in = (AuInt16 *) input->flowEl->minibuf;
@@ -976,9 +930,7 @@
 }
 
 static void
-accumulateOutputSimpleStereo(input, output)
-CompiledFlowInputPtr input;
-CompiledFlowOutputPtr output;
+accumulateOutputSimpleStereo(CompiledFlowInputPtr input, CompiledFlowOutputPtr output)
 {
     AuUint32        i;
     AuInt16        *in = (AuInt16 *) input->flowEl->minibuf;
@@ -1012,9 +964,7 @@
 
 /* process an audio flow */
 void
-AuProcessFlow(fl, clocked)
-CompiledFlowPtr fl;
-AuBool          clocked;
+AuProcessFlow(CompiledFlowPtr fl, AuBool clocked)
 {
     AuInt32         i,
                     j;
@@ -1099,17 +1049,13 @@
 }
 
 void
-AuSetInputGainAndLineMode(gain, lineMode)
-AuFixedPoint    gain;
-AuUint8         lineMode;
+AuSetInputGainAndLineMode(AuFixedPoint gain, AuUint8 lineMode)
 {
     AuCallback(AuSetPhysicalInputGainAndLineModeCB, (gain, lineMode));
 }
 
 void
-AuSetOutputGainAndMode(gain, mode)
-AuFixedPoint    gain;
-AuUint8         mode;
+AuSetOutputGainAndMode(AuFixedPoint gain, AuUint8 mode)
 {
     desiredOutputGain = gain;
 
@@ -1121,16 +1067,13 @@
 }
 
 void
-AuSetFeedbackGain(gain)
-AuFixedPoint    gain;
+AuSetFeedbackGain(AuFixedPoint gain)
 {
     AuCallbackIf(AuSetPhysicalFeedbackGainCB, (gain));
 }
 
 void
-AuGetOutputGainAndMode(gainp, modep)
-AuFixedPoint    *gainp;
-AuUint8         *modep;
+AuGetOutputGainAndMode(AuFixedPoint *gainp, AuUint8 *modep)
 {
     *gainp = AuCallback(AuGetPhysicalOutputGainCB, ());
     *modep = CallbackExists(AuGetPhysicalOutputModeCB)
@@ -1139,32 +1082,28 @@
 }
 
 void
-AuGetInputGain(gainp)
-AuFixedPoint    *gainp;
+AuGetInputGain(AuFixedPoint *gainp)
 {
     if (CallbackExists(AuGetPhysicalInputGainCB))
        *gainp = AuCallback(AuGetPhysicalInputGainCB, ());
 }
 
 void
-AuGetInputMode(modep)
-AuUint8    *modep;
+AuGetInputMode(AuUint8 *modep)
 {
     if (CallbackExists(AuGetPhysicalInputModeCB))
        *modep = AuCallback(AuGetPhysicalInputModeCB, ());
 }
 
 void
-AuGetFeedbackGain(gainp)
-AuFixedPoint    *gainp;
+AuGetFeedbackGain(AuFixedPoint *gainp)
 {
     if (CallbackExists(AuGetPhysicalFeedbackGainCB))
        *gainp = AuCallback(AuGetPhysicalFeedbackGainCB, ());
 }
 
 void
-AuSetMaxOutputGain(gain)
-AuFixedPoint    gain;
+AuSetMaxOutputGain(AuFixedPoint gain)
 {
     AuUint8         mode;
     AuFixedPoint    g;
@@ -1260,9 +1199,7 @@
 }
 
 void
-AuSetupCompiledFlow(fl, rate)
-CompiledFlowPtr fl;
-AuUint32        rate;
+AuSetupCompiledFlow(CompiledFlowPtr fl, AuUint32 rate)
 {
     CompiledFlowOutputPtr output;
     CompiledFlowInputPtr input;
@@ -1471,13 +1408,7 @@
 rc_x(rc_n, bps, aucopy(s, d, bps))
 
 static AuUint32
-rcNull(el, src, dst, want, avail, in)
-FlowElementPtr  el;
-AuUint8        *src,
-               *dst;
-AuInt32         want,
-                avail;
-AuUint32       *in;
+rcNull(FlowElementPtr el, AuUint8 *src, AuUint8 *dst, AuInt32 want, AuInt32 avail, AuUint32 *in)
 {
     AuUint32        size = aumin(want, avail);
 
diff -ur nas-1.8.orig/server/dia/auswap.c nas-1.8/server/dia/auswap.c
--- nas-1.8.orig/server/dia/auswap.c	1999-05-08 20:47:37.000000000 +0200
+++ nas-1.8/server/dia/auswap.c	2006-07-08 16:00:30.000000000 +0200
@@ -39,8 +39,7 @@
 /* audio request/reply swappers */
 
 int
-SProcAuSimpleReq(client)
-ClientPtr       client;
+SProcAuSimpleReq(ClientPtr client)
 {
     char            n;
 
@@ -50,8 +49,7 @@
 }
 
 int
-SProcAuResourceReq(client)
-ClientPtr       client;
+SProcAuResourceReq(ClientPtr client)
 {
     char            n;
 
@@ -63,8 +61,7 @@
 }
 
 int
-SProcAuSetDeviceAttributes(client)
-ClientPtr       client;
+SProcAuSetDeviceAttributes(ClientPtr client)
 {
     char            n;
 
@@ -77,8 +74,7 @@
 }
 
 int
-SProcAuCreateBucket(client)
-ClientPtr       client;
+SProcAuCreateBucket(ClientPtr client)
 {
     char            n;
 
@@ -91,8 +87,7 @@
 }
 
 int
-SProcAuListBuckets(client)
-ClientPtr       client;
+SProcAuListBuckets(ClientPtr client)
 {
     char            n;
 
@@ -104,8 +99,7 @@
 }
 
 int
-SProcAuListDevices(client)
-ClientPtr       client;
+SProcAuListDevices(ClientPtr client)
 {
     char            n;
 
@@ -117,9 +111,7 @@
 }
 
 static auElement *
-SwapElement(e, incoming)
-auElement      *e;
-AuBool          incoming;
+SwapElement(auElement *e, AuBool incoming)
 {
     char            n;
     int             na = 0;
@@ -260,8 +252,7 @@
 }
 
 int
-SProcAuSetElements(client)
-ClientPtr       client;
+SProcAuSetElements(ClientPtr client)
 {
     char            n;
     int             i;
@@ -284,8 +275,7 @@
 
 /* NOTE: this is also used for GetElementStates */
 int
-SProcAuSetElementStates(client)
-ClientPtr       client;
+SProcAuSetElementStates(ClientPtr client)
 {
     char            n;
     int             i;
@@ -306,8 +296,7 @@
 }
 
 int
-SProcAuSetElementParameters(client)
-ClientPtr       client;
+SProcAuSetElementParameters(ClientPtr client)
 {
     char            n;
     int             i;
@@ -334,8 +323,7 @@
 }
 
 int
-SProcAuWriteElement(client)
-ClientPtr       client;
+SProcAuWriteElement(ClientPtr client)
 {
     char            n;
 
@@ -348,8 +336,7 @@
 }
 
 int
-SProcAuReadElement(client)
-ClientPtr       client;
+SProcAuReadElement(ClientPtr client)
 {
     char            n;
 
@@ -364,10 +351,7 @@
 /* replies */
 
 void
-SAuGetDeviceAttributesReply(client, size, pRep)
-ClientPtr       client;
-int             size;
-auGetDeviceAttributesReply *pRep;
+SAuGetDeviceAttributesReply(ClientPtr client, int size, auGetDeviceAttributesReply *pRep)
 {
     char            n;
 
@@ -378,10 +362,7 @@
 }
 
 void
-SAuListBucketsReply(client, size, pRep)
-ClientPtr       client;
-int             size;
-auListBucketsReply *pRep;
+SAuListBucketsReply(ClientPtr client, int size, auListBucketsReply *pRep)
 {
     char            n;
 
@@ -393,10 +374,7 @@
 }
 
 void
-SAuListDevicesReply(client, size, pRep)
-ClientPtr       client;
-int             size;
-auListDevicesReply *pRep;
+SAuListDevicesReply(ClientPtr client, int size, auListDevicesReply *pRep)
 {
     char            n;
 
@@ -408,10 +386,7 @@
 }
 
 void
-SAuGetBucketAttributesReply(client, size, pRep)
-ClientPtr       client;
-int             size;
-auGetBucketAttributesReply *pRep;
+SAuGetBucketAttributesReply(ClientPtr client, int size, auGetBucketAttributesReply *pRep)
 {
     char            n;
 
@@ -422,10 +397,7 @@
 }
 
 void
-SAuReadElementReply(client, size, pRep)
-ClientPtr       client;
-int             size;
-auReadElementReply *pRep;
+SAuReadElementReply(ClientPtr client, int size, auReadElementReply *pRep)
 {
     char            n;
 
@@ -437,10 +409,7 @@
 }
 
 void
-SAuGetElementsReply(client, size, pRep)
-ClientPtr       client;
-int             size;
-auGetElementsReply *pRep;
+SAuGetElementsReply(ClientPtr client, int size, auGetElementsReply *pRep)
 {
     char            n;
 
@@ -453,10 +422,7 @@
 }
 
 void
-SAuGetElementStatesReply(client, size, pRep)
-ClientPtr       client;
-int             size;
-auGetElementStatesReply *pRep;
+SAuGetElementStatesReply(ClientPtr client, int size, auGetElementStatesReply *pRep)
 {
     char            n;
 
@@ -468,10 +434,7 @@
 }
 
 void
-SAuGetCloseDownModeReply(client, size, pRep)
-ClientPtr       client;
-int             size;
-auGetCloseDownModeReply *pRep;
+SAuGetCloseDownModeReply(ClientPtr client, int size, auGetCloseDownModeReply *pRep)
 {
     char            n;
 
@@ -482,10 +445,7 @@
 }
 
 void
-SAuGetServerTimeReply(client, size, pRep)
-ClientPtr       client;
-int             size;
-auGetServerTimeReply *pRep;
+SAuGetServerTimeReply(ClientPtr client, int size, auGetServerTimeReply *pRep)
 {
     char            n;
 
@@ -497,8 +457,7 @@
 }
 
 static void
-SwapCommonAttributes(p)
-auCommonPart   *p;
+SwapCommonAttributes(auCommonPart *p)
 {
     char            n;
 
@@ -510,8 +469,7 @@
 }
 
 static void
-SwapDeviceAttributes(p)
-auDeviceAttributes *p;
+SwapDeviceAttributes(auDeviceAttributes *p)
 {
     char            n;
 
@@ -524,18 +482,14 @@
 }
 
 void
-AuSwapDeviceAttributesWrite(client, size, p)
-ClientPtr       client;
-int             size;
-auDeviceAttributes *p;
+AuSwapDeviceAttributesWrite(ClientPtr client, int size, auDeviceAttributes *p)
 {
     SwapDeviceAttributes(p);
     (void) WriteToClient(client, size, (char *) p);
 }
 
 static void
-SwapBucketAttributes(p)
-auBucketAttributes *p;
+SwapBucketAttributes(auBucketAttributes *p)
 {
     char            n;
 
@@ -546,20 +500,14 @@
 }
 
 void
-AuSwapBucketAttributesWrite(client, size, p)
-ClientPtr       client;
-int             size;
-auBucketAttributes *p;
+AuSwapBucketAttributesWrite(ClientPtr client, int size, auBucketAttributes *p)
 {
     SwapBucketAttributes(p);
     (void) WriteToClient(client, size, (char *) p);
 }
 
 void
-AuSwapSetupPrefix(client, size, p)
-ClientPtr       client;
-int             size;
-auConnSetupPrefix *p;
+AuSwapSetupPrefix(ClientPtr client, int size, auConnSetupPrefix *p)
 {
     auConnSetupPrefix sp;
 
@@ -573,10 +521,7 @@
 }
 
 void
-AuSwapSetup(client, size, p)
-ClientPtr       client;
-int             size;
-auConnSetup    *p;
+AuSwapSetup(ClientPtr client, int size, auConnSetup *p)
 {
     auConnSetup     sp;
 
@@ -593,10 +538,7 @@
 }
 
 void
-AuCopySwapElementWrite(client, size, p)
-ClientPtr       client;
-int             size;
-auElement      *p;
+AuCopySwapElementWrite(ClientPtr client, int size, auElement *p)
 {
     auElement      *e;
 
@@ -611,10 +553,7 @@
 }
 
 void
-AuSwapElementStateWrite(client, size, p)
-ClientPtr       client;
-int             size;
-auElementState *p;
+AuSwapElementStateWrite(ClientPtr client, int size, auElementState *p)
 {
     char            n;
 
@@ -625,9 +564,7 @@
 /* events */
 
 void
-SAuElementNotifyEvent(from, to)
-auEvent        *from,
-               *to;
+SAuElementNotifyEvent(auEvent *from, auEvent *to)
 {
     to->u.u.type = from->u.u.type;
     to->u.u.detail = from->u.u.detail;
@@ -644,9 +581,7 @@
 }
 
 void
-SAuMonitorNotifyEvent(from, to)
-auEvent        *from,
-               *to;
+SAuMonitorNotifyEvent(auEvent *from, auEvent *to)
 {
     to->u.u.type = from->u.u.type;
     to->u.u.detail = from->u.u.detail;
@@ -665,9 +600,7 @@
 }
 
 void
-SAuErrorEvent(from, to)
-auError        *from,
-               *to;
+SAuErrorEvent(auError *from, auError *to)
 {
     to->type = Au_Error;
     to->errorCode = from->errorCode;
diff -ur nas-1.8.orig/server/dia/auutil.c nas-1.8/server/dia/auutil.c
--- nas-1.8.orig/server/dia/auutil.c	2005-11-03 04:06:14.000000000 +0100
+++ nas-1.8/server/dia/auutil.c	2006-07-08 16:11:00.000000000 +0200
@@ -61,8 +61,7 @@
 };
 
 void
-AuFreeComponent(c)
-ComponentPtr    c;
+AuFreeComponent(ComponentPtr c)
 {
     if (!c->refCnt--)
     {
@@ -82,8 +81,7 @@
 }
 
 static void
-freeCompiledFlow(cmp)
-CompiledFlowPtr cmp;
+freeCompiledFlow(CompiledFlowPtr cmp)
 {
     int             i;
 
@@ -135,8 +133,7 @@
 }
 
 void
-AuFreeFlowElements(flow)
-FlowPtr         flow;
+AuFreeFlowElements(FlowPtr flow)
 {
     /* stop the flow if it's running */
     if (flow->state != AuStateStop)
@@ -159,8 +156,7 @@
 }
 
 static void
-freeFlow(flow)
-FlowPtr         flow;
+freeFlow(FlowPtr flow)
 {
     if (flow->elements)
 	AuFreeFlowElements(flow);
@@ -177,9 +173,7 @@
 }
 
 AuPointer
-aucalloc(nelem, elsize)
-AuUint32        nelem,
-                elsize;
+aucalloc(AuUint32 nelem, AuUint32 elsize)
 {
     AuPointer       p;
 
@@ -190,8 +184,7 @@
 }
 
 AuPointer
-auProtectedAlloc(size)
-AuUint32        size;
+auProtectedAlloc(AuUint32 size)
 {
     AuBlock         l = AuBlockAudio();
     AuPointer       p;
@@ -202,9 +195,7 @@
 }
 
 AuPointer
-auProtectedRealloc(p, size)
-AuPointer       p;
-AuUint32        size;
+auProtectedRealloc(AuPointer p, AuUint32 size)
 {
     AuBlock         l = AuBlockAudio();
 
@@ -214,8 +205,7 @@
 }
 
 void
-auProtectedFree(p)
-AuPointer       p;
+auProtectedFree(AuPointer p)
 {
     AuBlock         l = AuBlockAudio();
 
@@ -225,13 +215,7 @@
 
 /* create an import or export */
 static          ComponentPtr
-createPort(format, numTracks, numSamples, lowWater, highWater, discard)
-AuUint32        format,
-                numTracks,
-                numSamples,
-                lowWater,
-                highWater;
-AuBool          discard;
+createPort(AuUint32 format, AuUint32 numTracks, AuUint32 numSamples, AuUint32 lowWater, AuUint32 highWater, AuBool discard)
 {
     ComponentPtr    port;
     AuUint32        dataSize,
@@ -269,9 +253,7 @@
 
 /* create a monitor export */
 static          ComponentPtr
-createMonitor(format, numTracks)
-AuUint32        format,
-                numTracks;
+createMonitor(AuUint32 format, AuUint32 numTracks)
 {
     ComponentPtr    c;
     AuUint32        minibufSize;
@@ -298,8 +280,7 @@
 
 /* create a wave form import */
 static          ComponentPtr
-createWaveForm(form)
-int             form;
+createWaveForm(int form)
 {
     ComponentPtr    c;
     AuUint32        minibufSize, n;
@@ -377,20 +358,8 @@
 }
 
 static int
-compileInputs(client, elements, output, inputNum, multiplyConstant, addConstant,
-	      numTracks, inTracks, firstOutTrack, recompile, inputCnt)
-ClientPtr       client;
-FlowElementPtr  elements;
-CompiledFlowOutputPtr output;
-AuUint32        inputNum,
-               *inputCnt;
-AuFixedPoint    multiplyConstant,
-                addConstant;
-AuBool          recompile;
-AuUint8         numTracks,
-               *inTracks,
-                firstOutTrack;
-
+compileInputs(ClientPtr client, FlowElementPtr elements, CompiledFlowOutputPtr output, AuUint32 inputNum, AuFixedPoint multiplyConstant, AuFixedPoint addConstant,
+	      AuUint8 numTracks, AuUint8 *inTracks, AuUint8 firstOutTrack, AuBool recompile, AuUint32 *inputCnt)
 {
     auElement      *el = elements[inputNum].raw;
     int             status = AuSuccess;
@@ -592,9 +561,7 @@
 }
 
 int
-AuCompileFlow(client, flow)
-ClientPtr       client;
-FlowPtr         flow;
+AuCompileFlow(ClientPtr client, FlowPtr flow)
 {
     AuUint32        i,
                     outputCnt = 0,
@@ -731,8 +698,7 @@
 }
 
 static          CompiledFlowPtr
-AuProcessFlows(fl)
-FlowPtr         fl;
+AuProcessFlows(FlowPtr fl)
 {
     FlowPtr         flow,
                     f;
@@ -982,8 +948,7 @@
 }
 
 static void
-setFlowState(flow)
-FlowPtr         flow;
+setFlowState(FlowPtr flow)
 {
     int             i,
                     stop,
@@ -1021,10 +986,7 @@
 #define CHECK_REASON(t, r) ((t) == AuReasonAny || (t) == (r))
 
 static void
-checkForTriggeredActions(el, processFlow, reason)
-FlowElementPtr  el;
-AuBool          processFlow;
-int             reason;
+checkForTriggeredActions(FlowElementPtr el, AuBool processFlow, int reason)
 {
     int             i,
                     state = el->state,		/* so these don't get changed */
@@ -1056,12 +1018,7 @@
 
 /* could be called at audio interrupt level */
 AuBool
-AuChangeElementState(flow, elementNum, newState, processFlow, reason)
-FlowPtr         flow;
-AuUint32        elementNum,
-                newState;
-AuBool          processFlow;
-int             reason;
+AuChangeElementState(FlowPtr flow, AuUint32 elementNum, AuUint32 newState, AuUint32 processFlow, int reason)
 {
     AuBlock         l;
     FlowElementPtr  el;
@@ -1245,10 +1202,7 @@
 }
 
 void
-AuProcessStateChanges(numStates, states, flows)
-AuUint32        numStates;
-auElementState *states;
-FlowPtr        *flows;
+AuProcessStateChanges(AuUint32 numStates, auElementState *states, FlowPtr *flows)
 {
     while (numStates--)
     {
@@ -1267,10 +1221,7 @@
 #define BUCKET(x)	((auBucketAttributes *) a)->bucket.x
 
 int
-AuSetComponentAttributes(a, c, varData)
-AuUint8        *a,
-               *varData;
-ComponentPtr    c;
+AuSetComponentAttributes(AuUint8 *a, ComponentPtr c, AuUint8 *varData)
 {
     AuUint32        mask,
                     i;
@@ -1405,10 +1356,7 @@
 #define COMPARE_DEVICE_MASK(x, y)    if (!(c->x & DEVICE(y))) 	return AuFalse
 
 AuBool
-AuMatchAttributes(a, c, varData)
-AuUint8        *a,
-               *varData;
-ComponentPtr    c;
+AuMatchAttributes(AuUint8 *a, ComponentPtr c, AuUint8 *varData)
 {
     AuUint32        mask,
                     i;
@@ -1553,9 +1501,7 @@
 }
 
 AuFixedPoint
-AuFixedPointMultiply(m1, m2)
-AuFixedPoint    m1,
-                m2;
+AuFixedPointMultiply(AuFixedPoint m1, AuFixedPoint m2)
 {
     AuBool          negative = AuFalse;
     AuFixedPoint    result;
diff -ur nas-1.8.orig/server/dia/dispatch.c nas-1.8/server/dia/dispatch.c
--- nas-1.8.orig/server/dia/dispatch.c	2002-03-16 20:29:05.000000000 +0100
+++ nas-1.8/server/dia/dispatch.c	2006-07-08 15:37:46.000000000 +0200
@@ -218,8 +218,7 @@
 
 /*ARGSUSED*/
 int
-ProcBadRequest(client)
-    ClientPtr client;
+ProcBadRequest(ClientPtr client)
 {
     return (AuBadRequest);
 }
@@ -254,8 +253,7 @@
 Bool terminateAtReset = FALSE;
 
 void
-CloseDownClient(client)
-    register ClientPtr client;
+CloseDownClient(register ClientPtr client)
 {
     if (!client->clientGone)
     {
@@ -336,10 +334,7 @@
     }
 }
 
-void InitClient(client, i, ospriv)
-    ClientPtr client;
-    int i;
-    pointer ospriv;
+void InitClient(ClientPtr client, int i, pointer ospriv)
 {
     client->index = i;
     client->sequence = 0; 
@@ -366,8 +361,7 @@
  *************************/
 
 ClientPtr
-NextAvailableClient(ospriv)
-    pointer ospriv;
+NextAvailableClient(pointer ospriv)
 {
     register int i;
     register ClientPtr client;
@@ -401,8 +395,7 @@
 }
 
 int
-ProcInitialConnection(client)
-    register ClientPtr client;
+ProcInitialConnection(register ClientPtr client)
 {
     REQUEST(auReq);
     register auConnClientPrefix *prefix;
@@ -429,8 +422,7 @@
 }
 
 int
-ProcEstablishConnection(client)
-    register ClientPtr client;
+ProcEstablishConnection(register ClientPtr client)
 {
     char *reason, *auth_proto, *auth_string;
     register auConnClientPrefix *prefix;
@@ -476,8 +468,7 @@
 }
 
 void
-MarkClientException(client)
-    ClientPtr client;
+MarkClientException(ClientPtr client)
 {
     client->noClientException = -1;
 }
diff -ur nas-1.8.orig/server/dia/dixutils.c nas-1.8/server/dia/dixutils.c
--- nas-1.8.orig/server/dia/dixutils.c	1999-05-08 20:47:38.000000000 +0200
+++ nas-1.8/server/dia/dixutils.c	2006-07-08 15:38:51.000000000 +0200
@@ -60,8 +60,7 @@
  */
 
 int
-CompareTimeStamps(a, b)
-    TimeStamp a, b;
+CompareTimeStamps(TimeStamp a, TimeStamp b)
 {
     if (a.months < b.months)
 	return EARLIER;
@@ -81,8 +80,7 @@
 
 #define HALFMONTH ((unsigned long) 1<<31)
 TimeStamp
-ClientTimeToServerTime(c)
-     CARD32 c;
+ClientTimeToServerTime(CARD32 c)
 {
     TimeStamp ts;
     if (c == CurrentTime)
@@ -234,8 +232,7 @@
 }
 
 void
-ClientWakeup (client)
-    ClientPtr	client;
+ClientWakeup (ClientPtr client)
 {
     SleepQueuePtr   q, *prev;
 
@@ -255,8 +252,7 @@
 }
 
 Bool
-ClientIsAsleep (client)
-    ClientPtr	client;
+ClientIsAsleep (ClientPtr client)
 {
     SleepQueuePtr   q;
 
diff -ur nas-1.8.orig/server/dia/events.c nas-1.8/server/dia/events.c
--- nas-1.8.orig/server/dia/events.c	1999-05-08 20:47:38.000000000 +0200
+++ nas-1.8/server/dia/events.c	2006-07-08 15:39:32.000000000 +0200
@@ -57,10 +57,7 @@
 extern int (* AuEventSwapVector[256]) ();
 
 void
-WriteEventsToClient(pClient, count, events)
-    ClientPtr	pClient;
-    int		count;
-    auEvent	*events;
+WriteEventsToClient(ClientPtr pClient, int count, auEvent *events)
 {
     if(pClient->swapped)
     {
diff -ur nas-1.8.orig/server/dia/main.c nas-1.8/server/dia/main.c
--- nas-1.8.orig/server/dia/main.c	2005-04-10 23:20:56.000000000 +0200
+++ nas-1.8/server/dia/main.c	2006-07-08 15:40:06.000000000 +0200
@@ -102,9 +102,7 @@
 
 
 int
-main(argc, argv)
-    int		argc;
-    char	*argv[];
+main(int argc, char *argv[])
 {
     int		i;
     char    *config_file;
diff -ur nas-1.8.orig/server/dia/resource.c nas-1.8/server/dia/resource.c
--- nas-1.8.orig/server/dia/resource.c	1999-05-08 20:47:38.000000000 +0200
+++ nas-1.8/server/dia/resource.c	2006-07-08 15:42:46.000000000 +0200
@@ -114,8 +114,7 @@
 static DeleteType *DeleteFuncs = (DeleteType *)NULL;
 
 RESTYPE
-CreateNewResourceType(deleteFunc)
-    DeleteType deleteFunc;
+CreateNewResourceType(DeleteType deleteFunc)
 {
     RESTYPE next = lastResourceType + 1;
     DeleteType *funcs;
@@ -153,8 +152,7 @@
  *****************/
 
 Bool
-InitClientResources(client)
-    ClientPtr client;
+InitClientResources(ClientPtr client)
 {
     register int i, j;
  
@@ -195,9 +193,7 @@
 }
 
 static int
-Hash(client, id)
-    int client;
-    register AuID id;
+Hash(int client, register AuID id)
 {
     id &= RESOURCE_ID_MASK;
     switch (clientTable[client].hashsize)
@@ -219,9 +215,7 @@
 }
 
 static AuID
-AvailableID(client, id, maxid, goodid)
-    register int client;
-    register AuID id, maxid, goodid;
+AvailableID(register int client, register AuID id, register AuID maxid, register AuID goodid)
 {
     register ResourcePtr res;
 
@@ -247,8 +241,7 @@
  */
 
 AuID
-FakeClientID(client)
-    register int client;
+FakeClientID(register int client)
 {
     register AuID id, maxid;
     register ResourcePtr *resp;
@@ -290,10 +283,7 @@
 }
 
 Bool
-AddResource(id, type, value)
-    AuID id;
-    RESTYPE type;
-    pointer value;
+AddResource(AuID id, RESTYPE type, pointer value)
 {
     int client;
     register ClientResourceRec *rrec;
@@ -329,8 +319,7 @@
 }
 
 static void
-RebuildTable(client)
-    int client;
+RebuildTable(int client)
 {
     register int j;
     register ResourcePtr res, next;
@@ -379,9 +368,7 @@
 }
 
 void
-FreeResource(id, skipDeleteFuncType)
-    AuID id;
-    RESTYPE skipDeleteFuncType;
+FreeResource(AuID id, RESTYPE skipDeleteFuncType)
 {
     int		cid;
     register    ResourcePtr res;
@@ -418,10 +405,7 @@
 	FatalError("Freeing resource id=%X which isn't there", id);
 }
 void
-FreeResourceByType(id, type, skipFree)
-    AuID id;
-    RESTYPE type;
-    Bool    skipFree;
+FreeResourceByType(AuID id, RESTYPE type, Bool skipFree)
 {
     int		cid;
     register    ResourcePtr res;
@@ -455,10 +439,7 @@
  */
 
 Bool
-ChangeResourceValue (id, rtype, value)
-    AuID	id;
-    RESTYPE rtype;
-    pointer value;
+ChangeResourceValue (AuID id, RESTYPE rtype, pointer value)
 {
     int    cid;
     register    ResourcePtr res;
@@ -478,8 +459,7 @@
 }
 
 void
-FreeClientResources(client)
-    ClientPtr client;
+FreeClientResources(ClientPtr client)
 {
     register ResourcePtr *resources;
     register ResourcePtr this;
@@ -532,9 +512,7 @@
 }
 
 Bool
-LegalNewID(id, client)
-    AuID id;
-    register ClientPtr client;
+LegalNewID(AuID id, register ClientPtr client)
 {
     return ((client->clientAsMask == (id & ~RESOURCE_ID_MASK)) &&
 	    ((clientTable[client->index].expectID <= id) ||
@@ -545,9 +523,7 @@
  *  LookupIDByType returns the object with the given id and type, else NULL.
  */ 
 pointer
-LookupIDByType(id, rtype)
-    AuID id;
-    RESTYPE rtype;
+LookupIDByType(AuID id, RESTYPE rtype)
 {
     int    cid;
     register    ResourcePtr res;
@@ -568,9 +544,7 @@
  *  given classes, else NULL.
  */ 
 pointer
-LookupIDByClass(id, classes)
-    AuID id;
-    RESTYPE classes;
+LookupIDByClass(AuID id, RESTYPE classes)
 {
     int    cid;
     register    ResourcePtr res;
diff -ur nas-1.8.orig/server/dia/swapreq.c nas-1.8/server/dia/swapreq.c
--- nas-1.8.orig/server/dia/swapreq.c	1999-05-08 20:47:38.000000000 +0200
+++ nas-1.8/server/dia/swapreq.c	2006-07-08 15:43:35.000000000 +0200
@@ -55,9 +55,7 @@
 /* Byte swap a list of longs */
 
 void
-SwapLongs (list, count)
-	register long *list;
-	register unsigned long count;
+SwapLongs (register long *list, register unsigned long count)
 {
 	register char n;
 
@@ -84,9 +82,7 @@
 /* Byte swap a list of shorts */
 
 void
-SwapShorts (list, count)
-	register short *list;
-	register unsigned long count;
+SwapShorts (register short *list, register unsigned long count)
 {
 	register char n;
 
@@ -119,8 +115,7 @@
 }
 
 void
-SwapConnClientPrefix(pCCP)
-    auConnClientPrefix	*pCCP;
+SwapConnClientPrefix(auConnClientPrefix *pCCP)
 {
     register char n;
 


More information about the Nas mailing list