view get_path.c @ 7951:32ae0a9d06aa

Updated the DXR3 section to reflect command changes, prebuf replaced noprebuf and sync is a brand new command. Also indicates that prebuffering no longer is the default operation. Note regarding divx playback how you should set the lavc fps to 29.97 for proper playback on the em8300. I saw something on mplayer-dev-eng about everyone being allowed to commit doc-updates now. I hope this is valid, otherwise let me know.
author mswitch
date Tue, 29 Oct 2002 01:41:16 +0000
parents d21bae2028a6
children ad429d617df4
line wrap: on
line source


char *get_path(char *filename){
	char *homedir;
	char *buff;
	static char *config_dir = "/.mplayer";
	int len;

	if ((homedir = getenv("HOME")) == NULL)
		return NULL;
	len = strlen(homedir) + strlen(config_dir) + 1;
	if (filename == NULL) {
		if ((buff = (char *) malloc(len)) == NULL)
			return NULL;
		sprintf(buff, "%s%s", homedir, config_dir);
	} else {
		len += strlen(filename) + 1;
		if ((buff = (char *) malloc(len)) == NULL)
			return NULL;
		sprintf(buff, "%s%s/%s", homedir, config_dir, filename);
	}
	mp_msg(MSGT_GLOBAL,MSGL_V,"get_path('%s') -> '%s'\n",filename,buff);
	return buff;
}