Displaying 6 results from an estimated 6 matches for "geadddevice2".
2014 Sep 19
1
Pointer ownership with GECreateDevDesc/GEDestroyDevDesc
...e a pDevDesc structure that gets passed to GECreateDevDesc.
..elided...
pDevDesc dev;
/* Allocate and initialize the device driver data */
if (!(dev = (pDevDesc) calloc(1, sizeof(DevDesc)))) return 0;
/* or error() */
/* set up device driver or free ?dev? and error() */
gdd = GEcreateDevDesc(dev); GEaddDevice2(gdd, "dev_name");
...elided...
which indicates to me that the calling code owns the pDevDesc structure and
should be responsible for freeing it.
However, in GEdestroyDevDesc, that particular code calls free(dd->dev),
freeing the pointer.
In my case, I have a device implemented and cr...
2019 Apr 30
2
[FORGED] src/modules/X11/devX11.c, can we remove "#if BUG" yet
..., canvascolor, sfonts, res,
> xpos, ypos, title, useCairo, antialias, family)) {
> free(dev);
> errorcall(call, _("unable to start device %s"), devname);
> }
> dd = GEcreateDevDesc(dev);
> GEaddDevice2(dd, devname);
>
> i.e., we start the device driver, and if it fails, we throw away the "dev" structure and call it a day. If it succeeds, we proceed to create a device descriptor structure and add it to the list of open devices.
>
> This approach means that X11DeviceDriver()...
2019 May 02
1
[FORGED] src/modules/X11/devX11.c, can we remove "#if BUG" yet
...xpos, ypos, title, useCairo, antialias, family)) {
>>> free(dev);
>>> errorcall(call, _("unable to start device %s"), devname);
>>> }
>>> dd = GEcreateDevDesc(dev);
>>> GEaddDevice2(dd, devname);
>>> i.e., we start the device driver, and if it fails, we throw away the "dev" structure and call it a day. If it succeeds, we proceed to create a device descriptor structure and add it to the list of open devices.
>>> This approach means that X11DeviceDriv...
2019 Apr 27
0
[FORGED] src/modules/X11/devX11.c, can we remove "#if BUG" yet
...bgcolor, canvascolor, sfonts, res,
xpos, ypos, title, useCairo, antialias, family)) {
free(dev);
errorcall(call, _("unable to start device %s"), devname);
}
dd = GEcreateDevDesc(dev);
GEaddDevice2(dd, devname);
i.e., we start the device driver, and if it fails, we throw away the "dev" structure and call it a day. If it succeeds, we proceed to create a device descriptor structure and add it to the list of open devices.
This approach means that X11DeviceDriver() cannot do anything...
2019 May 02
0
[FORGED] src/modules/X11/devX11.c, can we remove "#if BUG" yet
...nts, res,
>> xpos, ypos, title, useCairo, antialias, family)) {
>> free(dev);
>> errorcall(call, _("unable to start device %s"), devname);
>> }
>> dd = GEcreateDevDesc(dev);
>> GEaddDevice2(dd, devname);
>> i.e., we start the device driver, and if it fails, we throw away the "dev" structure and call it a day. If it succeeds, we proceed to create a device descriptor structure and add it to the list of open devices.
>> This approach means that X11DeviceDriver() can...
2019 Apr 25
2
[FORGED] src/modules/X11/devX11.c, can we remove "#if BUG" yet
Thanks Professor Dalgard.
If you have a different way to fix the bug then I'd be happy to test
it.
Or whatever. I understand that maybe some data was being referenced
before it had been initialized. I could also support moving the
R_ProcessEvents call in another place, but it seems one would also
like to generate some kind of warning message, at the location of the
bad reference, rather than