Browse Source

convert K&R function definitions to ansi style

pre-master-46
rlar 16 years ago
parent
commit
d4946a6e81
  1. 4
      ChangeLog
  2. 8
      src/maths/misc/randnumb.c
  3. 25
      src/xspice/ipc/ipcstdio.c

4
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 2010-09-07 Robert Larice
* src/xspice/ipc/ipcstdio.c : * src/xspice/ipc/ipcstdio.c :
convert K&R function definitions to ansi style convert K&R function definitions to ansi style

8
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: [0.0 .. 1.0[ by calls to CombLCGTaus() like:
double randvar = CombLCGTaus(); double randvar = CombLCGTaus();
*/ */
double CombLCGTaus()
double CombLCGTaus(void)
{ {
return 2.3283064365387e-10 * ( return 2.3283064365387e-10 * (
TauS(&CombState1, 13, 19, 12, 4294967294UL) ^ TauS(&CombState1, 13, 19, 12, 4294967294UL) ^
@ -154,7 +154,7 @@ double CombLCGTaus()
[0 .. 4294967296[ (32 bit unsigned int) by calls to CombLCGTausInt() like: [0 .. 4294967296[ (32 bit unsigned int) by calls to CombLCGTausInt() like:
unsigned int randvarint = CombLCGTausInt(); unsigned int randvarint = CombLCGTausInt();
*/ */
unsigned int CombLCGTausInt()
unsigned int CombLCGTausInt(void)
{ {
return ( return (
TauS(&CombState5, 13, 19, 12, 4294967294UL) ^ TauS(&CombState5, 13, 19, 12, 4294967294UL) ^
@ -165,7 +165,7 @@ unsigned int CombLCGTausInt()
} }
/* test versions of the generators listed above */ /* test versions of the generators listed above */
float CombLCGTaus2()
float CombLCGTaus2(void)
{ {
unsigned long b; unsigned long b;
b = (((CombState1 << 13) ^ CombState1) >> 19); b = (((CombState1 << 13) ^ CombState1) >> 19);
@ -179,7 +179,7 @@ float CombLCGTaus2()
} }
unsigned int CombLCGTausInt2()
unsigned int CombLCGTausInt2(void)
{ {
unsigned long b; unsigned long b;
b = (((CombState5 << 13) ^ CombState5) >> 19); b = (((CombState5 << 13) ^ CombState5) >> 19);

25
src/xspice/ipc/ipcstdio.c

@ -21,12 +21,11 @@
#include <assert.h> /* 12/1/97 jg */ #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); assert (m == IPC_MODE_INTERACTIVE);
printf ("INITIALIZE_SERVER\n"); 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"); printf ("GET_LINE\n");
gets (str); 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; int i;

Loading…
Cancel
Save