extcheck: use strict callback prototypes
This commit is contained in:
parent
22ffeee2a4
commit
ddc0adcb41
|
|
@ -38,6 +38,7 @@ static const char rcsid[] = "$Header: /usr/cvsroot/magic-8.0/extcheck/extcheck.c
|
||||||
#include "utils/pathvisit.h"
|
#include "utils/pathvisit.h"
|
||||||
#include "extflat/extflat.h"
|
#include "extflat/extflat.h"
|
||||||
#include "utils/runstats.h"
|
#include "utils/runstats.h"
|
||||||
|
#include "extflat/EFint.h" /* HierContext */
|
||||||
|
|
||||||
int ecNumDevs;
|
int ecNumDevs;
|
||||||
int ecNumCaps;
|
int ecNumCaps;
|
||||||
|
|
@ -50,10 +51,10 @@ int ecNumNodeCaps;
|
||||||
int ecNumNodeResists;
|
int ecNumNodeResists;
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
int nodeVisit(EFNode *node, int res, double cap);
|
int nodeVisit(EFNode *node, int res, double cap, ClientData cdata); /* @typedef cb_extflat_visitnodes_t (UNUSED) */
|
||||||
int devVisit(void);
|
int devVisit(Dev *dev, HierContext *hc, float scale, Transform *trans, ClientData cdata); /* @typedef cb_extflat_visitdevs_t (UNUSED) */
|
||||||
int capVisit(HierName *hn1, HierName *hn2, double cap);
|
int capVisit(HierName *hn1, HierName *hn2, double cap, ClientData cdata); /* @typedef cb_extflat_visitcaps_t (UNUSED) */
|
||||||
int resistVisit(HierName *hn1, HierName *hn2, float res);
|
int resistVisit(HierName *hn1, HierName *hn2, float res, ClientData cdata); /* @typedef cb_extflat_visitresists_t (UNUSED) */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
|
|
@ -129,11 +130,13 @@ main(int argc, char *argv[])
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* @typedef cb_extflat_visitnodes_t (UNUSED) */
|
||||||
int
|
int
|
||||||
nodeVisit(
|
nodeVisit(
|
||||||
EFNode *node,
|
EFNode *node,
|
||||||
int res,
|
int res,
|
||||||
double cap)
|
double cap,
|
||||||
|
ClientData cdata) /* unused */
|
||||||
{
|
{
|
||||||
cap = (cap + 500) / 1000;
|
cap = (cap + 500) / 1000;
|
||||||
res = (res + 500) / 1000;
|
res = (res + 500) / 1000;
|
||||||
|
|
@ -146,31 +149,42 @@ nodeVisit(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*ARGSUSED*/
|
||||||
|
/* @typedef cb_extflat_visitdevs_t (UNUSED) */
|
||||||
int
|
int
|
||||||
devVisit(void)
|
devVisit(
|
||||||
|
Dev *dev,
|
||||||
|
HierContext *hc,
|
||||||
|
float scale,
|
||||||
|
Transform *trans,
|
||||||
|
ClientData cdata) /* UNUSED */
|
||||||
{
|
{
|
||||||
ecNumDevs++;
|
ecNumDevs++;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
|
/* @typedef cb_extflat_visitcaps_t (UNUSED) */
|
||||||
int
|
int
|
||||||
capVisit(
|
capVisit(
|
||||||
HierName *hn1,
|
HierName *hn1,
|
||||||
HierName *hn2, /* UNUSED */
|
HierName *hn2, /* UNUSED */
|
||||||
double cap)
|
double cap,
|
||||||
|
ClientData cdata) /* UNUSED */
|
||||||
{
|
{
|
||||||
ecNumCaps++;
|
ecNumCaps++;
|
||||||
if ((cap / 1000.) > (double) EFCapThreshold) ecNumThreshCaps++;
|
if ((cap / 1000.) > (double) EFCapThreshold) ecNumThreshCaps++;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
|
/* @typedef cb_extflat_visitresists_t (UNUSED) */
|
||||||
int
|
int
|
||||||
resistVisit(
|
resistVisit(
|
||||||
HierName *hn1,
|
HierName *hn1,
|
||||||
HierName *hn2, /* UNUSED */
|
HierName *hn2, /* UNUSED */
|
||||||
float res)
|
float res,
|
||||||
|
ClientData cdata) /* UNUSED */
|
||||||
{
|
{
|
||||||
ecNumResists++;
|
ecNumResists++;
|
||||||
if ((res / 1000.) > EFResistThreshold) ecNumThreshResists++;
|
if ((res / 1000.) > EFResistThreshold) ecNumThreshResists++;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue