mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-29 17:39:28 +02:00
extflat: integrate cb_extflat_visitdevs_t for EFVisitDevs()
This commit is contained in:
+12
-11
@@ -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
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user