summaryrefslogtreecommitdiffstats
path: root/bstr.h
Commit message (Collapse)AuthorAgeFilesLines
* options: change option parsing to use bstrUoti Urpala2011-07-291-10/+47
| | | | | | Using bstr allows simpler parsing code, especially because it avoids the need to modify or copy strings just to terminate extracted substrings.
* 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.
* input: fix input.conf parse errorsUoti Urpala2011-07-201-0/+2
| | | | | | | | | Commit df899f59be removing a write outside a buffer triggered another problem, as for some reason the code did not 0-terminate its read buffer in the specific case that it had encountered an EOF, and as a result could parse contents left in the buffer for a second time. Usually this resulted in parsing error messages. Fix the problem by rewriting the offending code in a less hacky form.
* bstr.h: change BSTR() from macro to inline functionUoti Urpala2011-04-241-2/+6
| | | | | | | | Change BSTR() from a macro producing a compound literal to an inline function returning the same value. This works for all existing uses, and avoids a warning from BSTR(NULL) (the macro expansion contained strlen(NULL); this was valid code because the strlen call was never evaluated, but still triggered a GCC warning).
* cleanup: find_subfiles.c: simplify (mainly using bstr)Uoti Urpala2011-04-201-1/+11
|
* subs: move vobsub loading logic down to find_subfiles.cUoti Urpala2011-04-201-0/+1
| | | | | | | Analogously to the previous commit, move path handling logic for loading external vobsub files from mplayer.c to find_subfiles.c. Based on a commit from Clément Bœsch but fixed and simplified.
* bstr.[ch], path.[ch]: add string and path handling functionsUoti Urpala2011-02-261-2/+34
| | | | | | | Add some new string and path handling functions to be used in following commits. Use new path handling functions to simplify find_files().
* bstr.[ch]: add new files for struct bstr related functionalityUoti Urpala2010-05-201-0/+39
Move "struct bstr" definition from ebml.h to its own header and add some utility functions/macros. Change length field type from int to size_t and adjust using code accordingly. Partially based on a patch from Anton Khirnov.