Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31612
Modified Files: Tag: desiredata s_loader.c Log Message: fix missing character in hexmunged name
Index: s_loader.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/s_loader.c,v retrieving revision 1.4.4.5.2.10.2.4 retrieving revision 1.4.4.5.2.10.2.5 diff -C2 -d -r1.4.4.5.2.10.2.4 -r1.4.4.5.2.10.2.5 *** s_loader.c 28 Jun 2007 05:53:58 -0000 1.4.4.5.2.10.2.4 --- s_loader.c 18 Jul 2007 20:19:40 -0000 1.4.4.5.2.10.2.5 *************** *** 96,118 **** char c = *nameptr; if ((c>='0' && c<='9') || (c>='A' && c<='Z') || (c>='a' && c<='z' )|| c == '_') { ! symname[i] = c; ! i++; ! } ! /* trailing tilde becomes "_tilde" */ ! else if (c == '~' && nameptr[1] == 0) { strcpy(symname+i, "_tilde"); i += strlen(symname+i); } else { /* anything you can't put in a C symbol is sprintf'ed in hex */ sprintf(symname+i, "0x%02x", c); ! i += strlen(symname+i); hexmunge = 1; } } symname[i] = 0; if (hexmunge) { ! memmove(symname+6, symname, strlen(symname+1)); strncpy(symname, "setup_", 6); ! } ! else strcat(symname, "_setup"); #if 0 fprintf(stderr, "lib: %s\n", classname); --- 96,116 ---- char c = *nameptr; if ((c>='0' && c<='9') || (c>='A' && c<='Z') || (c>='a' && c<='z' )|| c == '_') { ! symname[i++] = c; ! } else if (c == '~' && nameptr[1] == 0) { /* trailing tilde becomes "_tilde" */ strcpy(symname+i, "_tilde"); i += strlen(symname+i); } else { /* anything you can't put in a C symbol is sprintf'ed in hex */ sprintf(symname+i, "0x%02x", c); ! i+=4; hexmunge = 1; } } symname[i] = 0; + post("symname=%s",symname); if (hexmunge) { ! memmove(symname+6, symname, strlen(symname)+1); strncpy(symname, "setup_", 6); ! } else strcat(symname, "_setup"); ! post("symname=%s",symname); #if 0 fprintf(stderr, "lib: %s\n", classname);