From d4946a6e815fa86e77b02ecfb7212f942a2f8415 Mon Sep 17 00:00:00 2001 From: rlar Date: Tue, 7 Sep 2010 20:11:13 +0000 Subject: [PATCH] convert K&R function definitions to ansi style --- ChangeLog | 4 ++++ src/maths/misc/randnumb.c | 8 ++++---- src/xspice/ipc/ipcstdio.c | 25 ++++++++++++------------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index d500854fb..f01d4e527 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-09-07 Robert Larice + * ng-spice-rework/src/maths/misc/randnumb.c : + convert K&R function definitions to ansi style + 2010-09-07 Robert Larice * src/xspice/ipc/ipcstdio.c : convert K&R function definitions to ansi style diff --git a/src/maths/misc/randnumb.c b/src/maths/misc/randnumb.c index 126493725..32e8548c0 100644 --- a/src/maths/misc/randnumb.c +++ b/src/maths/misc/randnumb.c @@ -140,7 +140,7 @@ static unsigned LGCS(unsigned *state, unsigned A1, unsigned A2) [0.0 .. 1.0[ by calls to CombLCGTaus() like: double randvar = CombLCGTaus(); */ -double CombLCGTaus() +double CombLCGTaus(void) { return 2.3283064365387e-10 * ( TauS(&CombState1, 13, 19, 12, 4294967294UL) ^ @@ -154,7 +154,7 @@ double CombLCGTaus() [0 .. 4294967296[ (32 bit unsigned int) by calls to CombLCGTausInt() like: unsigned int randvarint = CombLCGTausInt(); */ -unsigned int CombLCGTausInt() +unsigned int CombLCGTausInt(void) { return ( TauS(&CombState5, 13, 19, 12, 4294967294UL) ^ @@ -165,7 +165,7 @@ unsigned int CombLCGTausInt() } /* test versions of the generators listed above */ -float CombLCGTaus2() +float CombLCGTaus2(void) { unsigned long b; b = (((CombState1 << 13) ^ CombState1) >> 19); @@ -179,7 +179,7 @@ float CombLCGTaus2() } -unsigned int CombLCGTausInt2() +unsigned int CombLCGTausInt2(void) { unsigned long b; b = (((CombState5 << 13) ^ CombState5) >> 19); diff --git a/src/xspice/ipc/ipcstdio.c b/src/xspice/ipc/ipcstdio.c index 87859db03..8b7241900 100755 --- a/src/xspice/ipc/ipcstdio.c +++ b/src/xspice/ipc/ipcstdio.c @@ -21,12 +21,11 @@ #include /* 12/1/97 jg */ /*---------------------------------------------------------------------------*/ -Ipc_Status_t ipc_transport_initialize_server (server_name, m, p, - batch_filename) - char *server_name; - Ipc_Mode_t m; - Ipc_Protocol_t p; - char *batch_filename; +Ipc_Status_t ipc_transport_initialize_server ( + char *server_name, + Ipc_Mode_t m, + Ipc_Protocol_t p, + char *batch_filename ) { assert (m == IPC_MODE_INTERACTIVE); printf ("INITIALIZE_SERVER\n"); @@ -34,10 +33,10 @@ Ipc_Status_t ipc_transport_initialize_server (server_name, m, p, } /*---------------------------------------------------------------------------*/ -Ipc_Status_t ipc_transport_get_line (str, len, wait) - char *str; - int *len; - Ipc_Wait_t wait; +Ipc_Status_t ipc_transport_get_line ( + char *str, + int *len, + Ipc_Wait_t wait ) { printf ("GET_LINE\n"); gets (str); @@ -46,9 +45,9 @@ Ipc_Status_t ipc_transport_get_line (str, len, wait) } /*---------------------------------------------------------------------------*/ -Ipc_Status_t ipc_transport_send_line (str, len) - char *str; - int len; +Ipc_Status_t ipc_transport_send_line ( + char *str, + int len ) { int i;