Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6308
Modified Files: Tag: desiredata desire.c Log Message: fixed canvas_open about new 0.40 file lookup
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.217.2.121 retrieving revision 1.1.2.217.2.122 diff -C2 -d -r1.1.2.217.2.121 -r1.1.2.217.2.122 *** desire.c 11 Jan 2007 17:31:11 -0000 1.1.2.217.2.121 --- desire.c 11 Jan 2007 17:36:04 -0000 1.1.2.217.2.122 *************** *** 7239,7251 **** /* first check if "name" is absolute (and if so, try to open) */ if (sys_open_absolute(name, ext, dirresult, nameresult, size, bin, &fd)) return fd; ! ! /* otherwise "name" is relative; start trying in directories named ! in this and parent environments */ for (t_canvas *y=x; y; y = y->owner) if (y->env) { - t_namelist *nl; t_canvas *x2 = x; while (x2 && x2->owner) x2 = x2->owner; const char *dir = x2 ? canvas_getdir(x2)->name : "."; ! for (nl = y->env->path; nl; nl = nl->nl_next) { char realname[MAXPDSTRING]; strncpy(realname, dir, MAXPDSTRING); --- 7239,7248 ---- /* first check if "name" is absolute (and if so, try to open) */ if (sys_open_absolute(name, ext, dirresult, nameresult, size, bin, &fd)) return fd; ! /* otherwise "name" is relative; start trying in directories named in this and parent environments */ for (t_canvas *y=x; y; y = y->owner) if (y->env) { t_canvas *x2 = x; while (x2 && x2->owner) x2 = x2->owner; const char *dir = x2 ? canvas_getdir(x2)->name : "."; ! for (t_namelist *nl = y->env->path; nl; nl = nl->nl_next) { char realname[MAXPDSTRING]; strncpy(realname, dir, MAXPDSTRING); *************** *** 7254,7263 **** strncat(realname, nl->nl_string, MAXPDSTRING-strlen(realname)); realname[MAXPDSTRING-1] = 0; ! /*FIXME: undefined symbol */ ! /*if ((fd = sys_trytoopenone(realname, name, ext, dirresult, nameresult, size, bin)) >= 0) return fd;*/ } } ! return (open_via_path((x ? canvas_getdir(x)->name : "."), name, ext, ! dirresult, nameresult, size, bin)); } /* end miller 0.40 */ --- 7251,7258 ---- strncat(realname, nl->nl_string, MAXPDSTRING-strlen(realname)); realname[MAXPDSTRING-1] = 0; ! if ((fd = sys_trytoopenone(realname, name, ext, dirresult, nameresult, size, bin)) >= 0) return fd; } } ! return open_via_path((x ? canvas_getdir(x)->name : "."), name, ext, dirresult, nameresult, size, bin); } /* end miller 0.40 */