convert K&R function definitions to ansi style

This commit is contained in:
rlar 2010-09-07 20:11:13 +00:00
parent 59e775c497
commit d4946a6e81
3 changed files with 20 additions and 17 deletions

View File

@ -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

View File

@ -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);

View File

@ -21,12 +21,11 @@
#include <assert.h> /* 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;