[PD-dev] loading externals/abstractions containing non-alphanumerics

IOhannes m zmoelnig zmoelnig at iem.at
Sun Sep 11 19:07:49 CEST 2005


hi all

problem:
========
when i split the zexy-library into single externals i came to a point
where it didn't work at all: with objects that contain non-alphanumeric
characters.

the only exception that currently works with pd are the ~-objects: if pd
is searching for an object [foo~] and it finds a library foo~.pd_linux
it will then try to jump to the function "foo_tilde_setup()" (instead of
"foo~_setup()" which is illegal)

unfortunately this does not work with other characters, so there is
currently no way to do an object "my+" as an external (all compilers
will have problems with the "my+_setup()"-function).
of course we could replace "+" by "plus" when calling the
setup()-function but i think, this only moves the problem and does not
solve it.

another (similar) problem is, that certain crude filesystems don't like
certain non-ascii characters at all: e.g. ">~.pd" is quite impossible to
 create (and access) on certain systems.

proposal:
=========
so what i would like would be as simple as an alternative way of loading
externals/abstractions that uses only standard alphanumeric characters
for encoding the objects name.

e.g. the "my+"-external could have a setup-function
"setupHex_0x6d792b()" (with "6D 79 2B" being hexadecimal representations
of "m y +")
pd would then try to call "setupHex_0x6d792b()" if "my+_setup()" fails.

similar, pd would try to find "3e7e.pd" (and prior to that
"3e7e.pd_linux") if it wasn't able to find either ">~.pd_linux" or ">~.pd".

i know this is not a very elegant solution, but i cannot think of a
better one. anyone else ?


mfg,a,sdr
IOhannes




More information about the Pd-dev mailing list