K&R extcheck/*.c: bulk function implementation conversion
This commit is contained in:
parent
b8170ea851
commit
05c242a28f
|
|
@ -62,8 +62,8 @@ int nodeVisit(), devVisit(), capVisit(), resistVisit();
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
main(argc, argv)
|
int
|
||||||
char *argv[];
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
char *inName;
|
char *inName;
|
||||||
|
|
||||||
|
|
@ -127,10 +127,10 @@ main(argc, argv)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
nodeVisit(node, res, cap)
|
nodeVisit(
|
||||||
EFNode *node;
|
EFNode *node,
|
||||||
int res;
|
int res,
|
||||||
double cap;
|
double cap)
|
||||||
{
|
{
|
||||||
cap = (cap + 500) / 1000;
|
cap = (cap + 500) / 1000;
|
||||||
res = (res + 500) / 1000;
|
res = (res + 500) / 1000;
|
||||||
|
|
@ -144,7 +144,7 @@ nodeVisit(node, res, cap)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
devVisit()
|
devVisit(void)
|
||||||
{
|
{
|
||||||
ecNumDevs++;
|
ecNumDevs++;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -152,9 +152,10 @@ devVisit()
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
int
|
int
|
||||||
capVisit(hn1, hn2, cap)
|
capVisit(
|
||||||
HierName *hn1, *hn2; /* UNUSED */
|
HierName *hn1,
|
||||||
double cap;
|
HierName *hn2, /* UNUSED */
|
||||||
|
double cap)
|
||||||
{
|
{
|
||||||
ecNumCaps++;
|
ecNumCaps++;
|
||||||
if ((cap / 1000.) > (double) EFCapThreshold) ecNumThreshCaps++;
|
if ((cap / 1000.) > (double) EFCapThreshold) ecNumThreshCaps++;
|
||||||
|
|
@ -163,9 +164,10 @@ capVisit(hn1, hn2, cap)
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
int
|
int
|
||||||
resistVisit(hn1, hn2, res)
|
resistVisit(
|
||||||
HierName *hn1, *hn2; /* UNUSED */
|
HierName *hn1,
|
||||||
float res;
|
HierName *hn2, /* UNUSED */
|
||||||
|
float res)
|
||||||
{
|
{
|
||||||
ecNumResists++;
|
ecNumResists++;
|
||||||
if ((res / 1000.) > EFResistThreshold) ecNumThreshResists++;
|
if ((res / 1000.) > EFResistThreshold) ecNumThreshResists++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue