コード例 #1
0
ファイル: enrobage.cpp プロジェクト: gauravchawla03/Stanford
/**
 * 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;
	}
}
コード例 #2
0
ファイル: enrobage.cpp プロジェクト: OpenDAWN/faudiostream
/**
 * 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;
	}
}
コード例 #3
0
ファイル: enrobage.cpp プロジェクト: onukore/radium
/**
 * 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;
	}
}