/** * Build a full pathname of <filename>. * <fullpath> = <currentdir>/<filename> */ static void buildFullPathname(string& fullpath, const char* filename) { char old[FAUST_PATH_MAX]; if (isAbsolutePathname(filename)) { fullpath = filename; } else { fullpath = getcwd (old, FAUST_PATH_MAX); fullpath += '/'; fullpath += filename; } }
/** * Build a full pathname of <filename>. * <fullpath> = <currentdir>/<filename> */ static void buildFullPathname(string& fullpath, const char* filename) { char old[FAUST_PATH_MAX]; if (isAbsolutePathname(filename)) { fullpath = filename; } else { char* newdir = getcwd(old, FAUST_PATH_MAX); if (!newdir) { cerr << "ERROR : getcwd '" << strerror(errno) << endl; return; } fullpath = newdir; fullpath += '/'; fullpath += filename; } }
/** * Build a full pathname of <filename>. * <fullpath> = <currentdir>/<filename> */ static void buildFullPathname(string& fullpath, const char* filename) { char old[FAUST_PATH_MAX]; if (isAbsolutePathname(filename)) { fullpath = filename; } else { char* newdir = getcwd(old, FAUST_PATH_MAX); if (!newdir) { stringstream error; error << "ERROR : getcwd '" << strerror(errno) << endl; throw faustexception(error.str()); } fullpath = newdir; fullpath += '/'; fullpath += filename; } }