Commit Graph

15 Commits

Author SHA1 Message Date
uau 21038d9e70 getch2: Fix incorrect test
Keycode length wasn't checked in one case because of missing
parentheses. This was accidentally broken in my previous commit to the
file. Most likely the error had no practical effect; the length checks
are unreliable in any case as they can be satisfied by unrelated
data corresponding to other keypresses.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24535 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-09-15 18:13:56 +00:00
uau 7eb3bc0cf8 Clean up getch2() code somewhat
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24150 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 04:28:09 +00:00
uau c51c1fc668 Make terminal input work more like VO key input
The Unix version of getch2() could either return an internally buffered
key or do a second-level select() in addition to the input.c one and
then read more data. Change getch2() to always add all read keys with
mplayer_put_key() (like video output window keyboard input does) and
remove the internal select() from the Unix version. Make input.c call
mplayer_get_key() directly.

The primary motivation for this change is to make combining multiple
event sources under one select() easier. Now getch2() only needs to be
called when the corresponding fd is readable, and it will be possible to
handle events from X-based VOs with the same code.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24149 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-08-25 04:28:08 +00:00
uau 208d4343ef "()" to "(void)" function param list fixes
patch from Stefan Huehner, stefan huehner org


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22904 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-01 21:59:54 +00:00
reimar a188335a33 Add code to detect and convert to console codepage on Windows.
Patch by Zuxy Meng [zuxy.meng at gmail com]


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22460 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-04 19:04:08 +00:00
reimar 653f6abd45 Always use tcgetattr/tcsetattr instead of #ifdef mess
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21605 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-12 20:36:38 +00:00
rathann e7db4ccf1a Patch by Stefan Huehner / stefan % huehner ! org \
patch replaces '()' for the correct '(void)' in function
declarations/prototypes which have no parameters. The '()' syntax tell
thats there is a variable list of arguments, so that the compiler cannot
check this. The extra CFLAG '-Wstrict-declarations' shows those cases.

Comments about a similar patch applied to ffmpeg:

That in C++ these mean the same, but in ANSI C the semantics are
different; function() is an (obsolete) K&R C style forward declaration,
it basically means that the function can have any number and any types
of parameters, effectively completely preventing the compiler from doing
any sort of type checking. -- Erik Slagter

Defining functions with unspecified arguments is allowed but bad.
With arguments unspecified the compiler can't report an error/warning
if the function is called with incorrect arguments. -- Måns Rullgård


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17567 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-02-09 14:08:03 +00:00
diego 2b1310abba AIX PPC port
patch by "Derek E. Lewis" < -- dlewis -- @ -- solnetworks -- . -- net -- >


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17265 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-12-29 18:01:22 +00:00
ods15 eaee93051a change erase to end of line, fall back to old behavior if no termcap found
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17259 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-12-29 11:27:22 +00:00
ods15 95db0aeb23 Use termcap "erase to end of line" character code instead of using spaces
to end of screen.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17241 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-12-25 18:26:35 +00:00
diego fb20d201d7 Unify include paths, -I.. is in CFLAGS.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16986 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-11-14 00:30:37 +00:00
diego 8308e63eb1 DragonFly BSD support
patch by Joerg Sonnenberger <joerg - at - britannica - dot - bec - dot - de>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15567 b3059339-0415-0410-9bf9-f77b7e298cf2
2005-05-25 08:48:32 +00:00
alex 2b4c901162 morphos support by Nicolas Det
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12123 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-04-05 21:33:08 +00:00
diego bfc0ecf9fa The attached patch fixes a minor build problem on GNU/k*BSD: getch2.c should
check for Glibc, not GNU.
patch by Robert Millan <zeratul2@wanadoo.es>


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12064 b3059339-0415-0410-9bf9-f77b7e298cf2
2004-03-24 17:51:35 +00:00
arpi 7ff83a7181 linux->osdep
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9381 b3059339-0415-0410-9bf9-f77b7e298cf2
2003-02-09 20:18:23 +00:00