vf_vdpaupp: cosmetics: rename function
playlist: fix playlist_move on itself

A playlist_move command that moves an entry onto itself (both arguments
have the same index) should do nothing, but it did something broken. The
underlying reason is that it checks the prev pointer of the entry which
is temporarily removed for moving.
manpage: lua: cosmetic changes to mp.options section
lua: add some filesystem utility functions

We need this only because Lua's stdlib is so scarce. Lua doesn't intend
to include a complete stdlib - they confine themselves to standard C,
both for portability reasons and to keep the code minimal. But standard
C does not provide much either.

It would be possible to use Lua POSIX wrapper libraries, but that would
be a messy (and unobvious) dependency. It's better to implement the
missing functions ourselves, as long as they're small in number.
TOOLS: add a Lua script to autoload playlist entries

This will load other files in the same directory when a single file is
played. It's an often requested feature, but we definitely don't want it
in the core.
DOCS/coding-style: add a hint that new features should be documented
autoload.lua: fix autoloading of files to prepend

This used the wrong index variable, and thus didn't work.
command: add write_watch_later_config command

Closes #808.

Signed-off-by: wm4 <wm4@nowhere>
lua: fix compilation with lua 5.2

Commit e2e450f9 started making use of luaL_register(), but OF COURSE
this function disappeared in Lua 5.2, and was replaced with a 5.2-only
alternative, slightly different mechanism.

So just NIH our own function. This is actually slightly more correct,
since it forces the user to call "require" to actually make the module
visible for builtin C-only modules other than "mp". Fix autoload.lua
accordingly.
lua: add missing include files

These are actually already included in osdep/io.h, but I think it's
cleaner to repeat them in the file where they are actually needed.
(osdep/io.h needs to have them for other reasons.)
input: make combined commands repeatable

Binding multiple commands at once where always considered not
repeatable, because the MP_CMD_COMMAND_LIST wasn't considered
repeatable.

Fixes #807 (probably).
x11: fix datatype for _NET_WM_PID

Setting this property was added 12 years ago, and the code was always
incorrect. The underlying data type is "long", not "pid_t". It's well
possible that the data types are different, and the pointer to the pid
variable is directly passed to XChangeProperty, possibly invoking
undefined behavior.

It's funny, because in theory using pid_t for PIDs sounds more correct.
x11: fix restoring position when leaving fullscreen

Accidentally broken in commit 7163bf7d by inverting the condition.
vo_opengl: always dynamically load OpenGL symbols

Don't emit "hard" references to OpenGL functions. Always use the
platform specific function to lookup OpenGL functions, such as
glXGetProcAddress() with GLX (x11).

This actually fixes the build if only Wayland is enabled (e.g. using
--disable-gl-x11 on Linux).

Note that some sources claim that wglGetProcAddress() (win32) does not
return function pointers for OpenGL 1.1 functions (even if they are
valid and necessary in OpenGL 3.0). But if that happens, the fallback
employed in gl_w32.c/w32gpa() should catch this.
gl_w32: remove some non-sense

Really now...
gl_common: correct a type

We pass a pointer to a GLint to sscanf, using the %d format. That format
_always_ takes int, and not GLint (whatever the heck that is). If GLint
is always int, then it doesn't make a difference, but is still better
because it doesn't play russian roulette with pointers.
gl_common: minor cosmetic changes

Why are you reading this message.
lua: slightly nicer diagnostics output

When Lua itself prints errors such as:

  Error: [string "mp.defaults"]:387: syntax error near 'function'

It's unclear why the location is prefixed with "string ". And for some
reason, it disappears if you prefix the name with '@'. I suppose this is
done for the sake of luaL_loadstring. With the '@' prefix added, the
output is now:

  Error: mp.defaults:387: syntax error near 'function'
idet.sh: An alternative to ildetect.sh.

This script uses ffmpeg's "idet" filter for interlace detection. In the
long run this should replace ildetect.sh+ildetect.sh.
manpage: document write_watch_later_config command