summaryrefslogtreecommitdiffstats
path: root/path.c
Commit message (Collapse)AuthorAgeFilesLines
* bstr: rename bstr() function to bstr0(), and typedef bstr to struct bstrwm42012-07-281-1/+1
| | | | | Replace all uses of bstr() with bstr0(). Also remove the ridiculous C++ workaround.
* win32: get_path(): fix undefined behaviorMartin Herkt2012-04-281-3/+5
| | | | | | | MSWindows-specific code in get_path() declared a stack array (exedir[]) in an inner scope, then kept a reference to the array beyond the end of the that scope. Fix. This caused visible breakage with GCC 4.7.
* build: remove OS/2 supportUoti Urpala2012-04-061-20/+0
|
* windows support: unicode filenameswm42012-03-091-2/+16
| | | | | | | | | | | | | | | | | | | Windows uses a legacy codepage for char* / runtime functions accepting char *. Using UTF-8 as the codepage with setlocale() is explicitly forbidden. Work this around by overriding the MSVCRT functions with wrapper macros, that assume UTF-8 and use "proper" API calls like _wopen etc. to deal with unicode filenames. All code that uses standard functions that take or return filenames must now include osdep/io.h. stat() can't be overridden, because MinGW-w64 itself defines "stat" as a macro. Change code to use use mp_stat() instead. This is not perfectly clean, but still somewhat sane, and much better than littering the rest of the mplayer code with MinGW specific hacks. It's also a bit fragile, but that's actually little different from the previous situation. Also, MinGW is unlikely to ever include a nice way of dealing with this.
* bstr: rename BSTR() -> bstr()Uoti Urpala2011-07-271-1/+1
| | | | | | Rename the BSTR() function to bstr(). The former caused a conflict with some Windows OS name, and it's no longer a macro so uppercase naming is less appropriate.
* cleanup: remove useless set_codec_path() functionUoti Urpala2011-07-061-16/+0
| | | | | | | | This function was left over from older logic to manipulate the "codec_path" global variable. Now that variable is fully handled by the general option system, so that the only effect of the function was to introduce memory leaks in some circumstances. Delete the useless function.
* bstr.[ch], path.[ch]: add string and path handling functionsUoti Urpala2011-02-261-2/+41
| | | | | | | Add some new string and path handling functions to be used in following commits. Use new path handling functions to simplify find_files().
* path.c: add function for mp_basename, remove duplicated macroscboesch2010-12-161-0/+16
| | | | | | | | | | | | | | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32630 b3059339-0415-0410-9bf9-f77b7e298cf2 Fix crash on path without directories. Regression introduced in r32630. Patch by Yuriy Kaminskiy yumkam at mail ru. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32631 b3059339-0415-0410-9bf9-f77b7e298cf2 Handle correctly paths with mixed '/' and '\' in it. Patch by Yuriy Kaminskiy (yumkam at mail ru) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32632 b3059339-0415-0410-9bf9-f77b7e298cf2 Handle ':' on systems with DOS paths: it allows paths like C:foo.avi. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32642 b3059339-0415-0410-9bf9-f77b7e298cf2
* Get rid of pointless def_path variable; use codec_path directly instead.diego2010-03-231-5/+5
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30949 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename SetCodecPath() --> set_codec_path().diego2010-03-211-1/+1
| | | | | | | This keeps the naming of all path-related functions consistent. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30944 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename get_path.[ch] --> path.[ch].diego2010-03-201-0/+195
These files now contain different functions related to path handling. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30943 b3059339-0415-0410-9bf9-f77b7e298cf2