src/stdlib/path.c
/*===========================================
 * fopenpath -- Open file using path variable
 *  pfname: [OUT]  stdalloc'd copy of full path found
 *=========================================*/
- Open file using path variable
pfname: [OUT]  stdalloc'd copy of full path found
- Open file using path variable pfname : [ OUT ] stdalloc ' d copy of full path found
FILE *
fopenpath (CNSTRING name, STRING mode, STRING path, STRING ext, INT utf8
	, STRING *pfname)
{
	FILE * fp;
	STRING str;
	if(pfname) *pfname = NULL;
	if (!(str = filepath(name, mode, path, ext, utf8))) return NULL;
	if(pfname) {
		*pfname = str;
	}
	fp = fopen(str, mode);
	if (!pfname) stdfree(str);
	return fp;
}
FILE * fopenpath ( CNSTRING name , STRING mode , STRING path , STRING ext , INT utf8 , STRING * pfname ) { FILE * fp ; STRING str ; if ( pfname ) * pfname = NULL ; if ( ! ( str = filepath ( name , mode , path , ext , utf8 ) ) ) return NULL ; if ( pfname ) { * pfname = str ; } fp = fopen ( str , mode ) ; if ( ! pfname ) stdfree ( str ) ; return fp ; }
fopenpath -- Open file using path variable
  pfname: [OUT]  stdalloc'd copy of full path found
fopenpath -- Open file using path variable pfname : [ OUT ] stdalloc ' d copy of full path found