extflat: integrate cb_extflat_visitdevs_t for EFVisitDevs()

This commit is contained in:
Darryl L. Miles
2025-08-06 22:58:30 +01:00
parent 6876c007f5
commit e1be3fe7d2
3 changed files with 18 additions and 13 deletions
+12 -11
View File
@@ -246,14 +246,15 @@ EFGetLengthAndWidth(dev, lptr, wptr)
* Visit all the devs in the circuit.
* Must be called after EFFlatBuild().
* For each dev in the circuit, call the user-supplied procedure
* (*devProc)(), which should be of the following form:
* (*devProc)(), which should be of the following form
* see also typedef cb_extflat_visitdevs_t:
*
* (*devProc)(dev, hierName, scale, cdata)
* Dev *dev;
* HierName *hierName;
* float scale;
* Transform *trans;
* ClientData cdata;
* int (*devProc)(
* Dev *dev,
* HierContext *hc,
* float scale,
* Transform *trans,
* ClientData cdata)
* {
* }
*
@@ -274,13 +275,13 @@ EFGetLengthAndWidth(dev, lptr, wptr)
*/
int
EFVisitDevs(devProc, cdata)
int (*devProc)();
ClientData cdata;
EFVisitDevs(
const cb_extflat_visitdevs_t devProc,
ClientData cdata)
{
CallArg ca;
ca.ca_proc = devProc;
ca.ca_proc = (int (*)()) devProc;
ca.ca_cdata = cdata;
return efVisitDevs(&efFlatContext, (ClientData) &ca);
}
+3 -2
View File
@@ -114,8 +114,9 @@ extern void EFFlatDone();
extern bool EFHNIsGND();
extern void EFInit();
extern bool EFReadFile();
extern int EFVisitDevs();
extern int efVisitDevs();
typedef int (*cb_extflat_visitdevs_t)(Dev *dev, HierContext *hc, float scale, Transform *trans, ClientData cdata);
extern int EFVisitDevs(const cb_extflat_visitdevs_t devProc, ClientData cdata);
extern int efVisitDevs(HierContext *hc, CallArg *ca);
extern bool efSymLook();
extern int efVisitResists();
extern int EFVisitResists();