Mercurial > mplayer.hg
view get_path.c @ 9579:89d27a306886
*signed int vlc (needs only 5 lines of code so its no increase of complexity)
*moving subpacket shuffle type to the header
*encoding packet timestamps as signed difference from the msb_timestamp this is more flexible & cleaner
*optionally storing the keyframe flag for subpackets (in RLE)
*storing the timestamps differences for subpackets (in RLE)
*storing the signed differences of subpacket sizes instead of unsigned diff from some base size
*more compact encoding of common name/type for info packets
*removing fixed entries at the start of info packets (simpler)
*removing stuffing packet (uneeded, vlc itself allows padding)
*fixing sample code
author | michael |
---|---|
date | Thu, 13 Mar 2003 15:32:48 +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; }