summaryrefslogtreecommitdiffstats
path: root/common/common.h
Commit message (Collapse)AuthorAgeFilesLines
* common: change MP_NOPTS_VALUE definitionwm42014-05-101-2/+2
| | | | | | | | | Use the exact floating point value, instead of a broken integer constant. The expression calculating the constant probably relied on undefined behavior, because it left-shifts a negative value. This also changes the type of the constant to double, which is perfectly fine, and maybe better than an integer constant.
* common: change mp_snprintf_append semanticswm42014-05-051-1/+1
| | | | | | | | Make it more suitable for chaining. This means a function formatting a value to a string using a static buffer can work exactly like mp_snprintf_append itself. Also rename it to mp_snprintf_cat, because that's shorter.
* common: add mp_snprintf_append() utility functionwm42014-04-291-0/+4
|
* common: add some helper macroswm42014-03-071-0/+3
|
* common: drop mp_append_utf8_buffer()wm42013-12-301-2/+0
|
* common: simplify and optimize string escape parsingwm42013-12-301-1/+7
| | | | | | | | | | | This code is shared between input.conf parser and option parser. Until now, the performance didn't really matter. But I want to use this code for JSON parsing too, and since JSON will have to be parsed a lot, it should probably try to avoid realloc'ing too much. This commit moves parsing of C-style escaped strings into a common function, and allows using it in a way realloc can be completely avoided, if the already allocated buffer is large enough.
* Don't include version.h from make options.cwm42013-12-221-2/+2
| | | | | | | | | I find this annoying. It's the reason common/version.c exists at all. options.c did this for the user agent, which contains the version number. Because not including version.h means you can't build the user agent and use it in mp_default_opts anymore, do something rather awkward in main.c to initialize the default user agent.
* Split mpvcore/ into common/, misc/, bstr/wm42013-12-171-0/+81