diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2005-11-16 05:36:52 +0000 |
---|---|---|
committer | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2005-11-16 05:36:52 +0000 |
commit | 7760c8d054f739c5d891e9da5e89026415ba2fb3 (patch) | |
tree | 68bbde328fe371db033edb587550e584da635ee8 /packages/darwin_app | |
parent | d9ff296af317ce481f43f24e37b935bcd7e96c02 (diff) |
a quick hack to allow + - * . ^ in setup functions
svn path=/trunk/; revision=3932
Diffstat (limited to 'packages/darwin_app')
-rw-r--r-- | packages/darwin_app/patches/special_chars_hack.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/packages/darwin_app/patches/special_chars_hack.patch b/packages/darwin_app/patches/special_chars_hack.patch new file mode 100644 index 00000000..63effe65 --- /dev/null +++ b/packages/darwin_app/patches/special_chars_hack.patch @@ -0,0 +1,58 @@ +Index: s_loader.c +=================================================================== +RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v +retrieving revision 1.6 +diff -u -w -r1.6 s_loader.c +--- s_loader.c 30 May 2005 03:04:19 -0000 1.6 ++++ s_loader.c 15 Nov 2005 22:28:41 -0000 +@@ -49,7 +49,7 @@ + int sys_load_lib(char *dirname, char *classname) + { + char symname[MAXPDSTRING], filename[MAXPDSTRING], dirbuf[MAXPDSTRING], +- classname2[MAXPDSTRING], *nameptr, *lastdot; ++ classname2[MAXPDSTRING], *nameptr, *lastdot, tmptildestr[MAXPDSTRING]; + void *dlobj; + t_xxx makeout = NULL; + int fd; +@@ -96,9 +96,40 @@ + #else + strcpy(symname, nameptr); + #endif ++ /* ++ * this is a quick hack to get the matrix externals working as single ++ * files. This should be done with hex translation of special characters ++ * <hans@at.or.at> ++ */ + /* if the last character is a tilde, replace with "_tilde" */ + if (symname[strlen(symname) - 1] == '~') +- strcpy(symname + (strlen(symname) - 1), "_tilde"); ++ { ++ strcpy(symname + (strlen(symname) - 1), ""); ++ strcpy(tmptildestr, "_tilde"); ++ } ++ else ++ { ++ strcpy(tmptildestr, ""); ++ } ++ switch (symname[strlen(symname) - 1]) ++ { ++ case '.': ++ strcpy(symname + (strlen(symname) - 1), "_dot"); ++ break; ++ case '+': ++ strcpy(symname + (strlen(symname) - 1), "_plus"); ++ break; ++ case '-': ++ strcpy(symname + (strlen(symname) - 1), "_hyphen"); ++ break; ++ case '*': ++ strcpy(symname + (strlen(symname) - 1), "_asterisk"); ++ break; ++ case '^': ++ strcpy(symname + (strlen(symname) - 1), "_caret"); ++ break; ++ } ++ strcat(symname, tmptildestr); + /* and append _setup to form the C setup function name */ + strcat(symname, "_setup"); + #ifdef DL_OPEN |