gEDA-dev: [pcb] multiple hids in one .so

Igor2 igor2 at inno.bme.hu
Thu Oct 5 01:08:06 EDT 2006


On Mon, 2 Oct 2006, DJ Delorie wrote:

>
>> Hmm, I couldn't find where the GUI HID sets the exporter HID in a global
>> variable i could use, could you give me a file:line?
>
>It's at the bottom of draw.c in the expose callback wrapper.
>

Unfortunately it doesn't solve my problem. Here is the situation: I run
pcb in gdb and break ps_get_export_options, then draw something and export
to ps. At this point, in the scriptable HID, I nees to know which exporter
the user choosed (ps in this case). Global variable "gui" is set to the
gui hid, so that doesn't help any.

You said the modification I suggested was overkill. Did you mean it would
be too much work, or passing +1 pointer to those functions would slow the
program too much or would add too much bloat? In the first case, I could
prepare a patch. 

If adding the hid pointer to those calls is really that bad, why not
adding a new global variable called "current_exporter" which would be set
in the gui hids, before the first call to the exproter? It would be less
than 16 new lines in the code, I think :)





More information about the geda-dev mailing list