[GEM-dev] strings are 1 of my big weakness's
IOhannes m zmoelnig
zmoelnig at iem.at
Wed Feb 15 21:58:19 CET 2006
james tittle wrote:
> ...I've been trying to get [pix_freeframe] to work, but no luck: I
> keep get bad memory accesses! I just don't know much in the way of
> unix string tricks :-( Here's what I was trying:
>
> char *extension=
> #ifdef __WIN32__
> ".dll";
> #elif defined __APPLE__
> ".frf";
> #else
> ".so";
> #endif
i have committed a version that is working (on my machine).
let's see if it likes bundles
>
> int fd=-1;
>
> // Hoops to jump thru for apple's bundle structure :-(
> #ifdef __APPLE__
> strcat(extension, "/");
> strcat(extension, pluginname);
> #endif
i don't know what's so cool with strcat()...i prefer sprintf()
> if ((fd=open_via_path(canvas_getdir(getCanvas())->s_name, pluginname,
> extension, buf2, &bufptr, MAXPDSTRING, 1))>=0){
oh, i just noticed that i used extension="" and set
pluginname="name.frf/name".
so this might still not work with the bundle (but it might as well work)
- left as an excercise for th adept programmer..;-)
mfg.a
IOhannes
More information about the GEM-dev
mailing list