aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser-mpcmd.c
Commit message (Collapse)AuthorAge
* options: change -v parsingGravatar Uoti Urpala2012-05-07
| | | | | | | | | | | | | Handle -v flags as a special case in command line preparsing stage, and change the option entry into a dummy one. Specifying "v" in config file no longer works (and the dummy entry shows an error in this case); "msglevel" can still be used for that purpose. Because the flag is now interpreted at an earlier parsing stage, it now affects the printing of some early messages that were only affected by the MPLAYER_VERBOSE environment variable before. The main motivation for this change is to get rid of the last CONF_TYPE_FUNC option.
* options: commandline: support "--no-opt" for flag optionsGravatar Uoti Urpala2011-09-01
| | | | | | | | | | | | | | | When parsing the command line, map "--no-foo" to "--foo=no" if an option named "foo" exists and is a flag option. Non-empty parameters are not allowed with this syntax ("--no-foo=no" is invalid). This implementation is different from the existing "--nofoo" variants for most flag options. Those are implemented as completely separate options; there's an option named "fs" and a separate option named "nofs" (thus "--no-nofs" actually works after this change...). The reason for adding the new syntax is to support the much more standard "--no-" prefix and to allow eventually cleaning up the option handling (though the "nofoo" variants of existing options can't be removed soon due to backwards compatibility).
* options: commandline: don't set bogus playtree option paramsGravatar Uoti Urpala2011-07-31
| | | | | | | | | | | | | | The command line parsing code recorded the next commandline argument, if any, as the parameter of any option recorded to playtree. Thus a command line like "mplayer file -fs -aid 1" would record option "-fs" with a bogus argument "-aid". Historically this triggered no visible problems because such bogus arguments were silently ignored when interpreting the options later. However after recent commit 507fa7e2c2 ("options: indicate ambiguous option parameters explicitly") parameters to flag options are no longer ignored, and the bogus values now triggered parsing errors. Add a check to stop recording parameters for old-style single-dash options if m_config_check_option() says the option did not consume any arguments.
* options: commandline: print error type for parse failuresGravatar Uoti Urpala2011-07-29
| | | | | | | | | | | | If parsing an option fails, print a string corresponding to the parse function return value (M_OPT_MISSING_PARAM etc). The primary motivation is that the parsing code already outputs messages explaining most problems, but does not itself print anything in the missing parameter case. Before double-dash --options such errors were rare (or rather they resulted in the next commandline argument being silently misinterpreted as an argument to the previous option instead); but now an argument like "--ss" should give a better indication about the problem than just "Error parsing option".
* options: commandline: accept --foo=xyz style optionsGravatar Uoti Urpala2011-07-29
| | | | | | | | | | | | Allow writing commandline options with two leading dashes. In this mode a parameter for the option, if any, follows after a '='; following separate commandline arguments are never consumed as a parameter to a previous double-dash option. Flag options may omit parameter and behave like old single-dash syntax. "--fs=yes", "--fs=no" and "--fs" are all valid; the first two behave like configuration file "fs=yes" and "fs=no", and last is the same as old "-fs" (same effect as "--fs=yes").
* options: commandline: allow "--" without filenames after itGravatar Uoti Urpala2011-07-29
| | | | | | | | | A "--" argument on the command line is used to indicate that all following arguments should be interpreted as filenames, not options. Specifying it as the last argument was considered an error. I see no particular reason to forbid the following filename list to be empty, nor do other programs with similar functionalitly I know about treat it that way. So just ignore a "--" with no more arguments.
* options: change option parsing to use bstrGravatar Uoti Urpala2011-07-29
| | | | | | Using bstr allows simpler parsing code, especially because it avoids the need to modify or copy strings just to terminate extracted substrings.
* options: indicate ambiguous option parameters explicitlyGravatar Uoti Urpala2011-07-29
| | | | | | | | Command line options like "-foo xyz" are ambiguous: "xyz" may be a parameter to the option "foo" or an unrelated argument. Instead of relying on the struct m_config mode field (commandline/file) pass parameters to specify ambiguous mode explicitly. Meant for "--foo" options which are never ambiguous on command line either.
* options: move command line preparse together with parseGravatar Uoti Urpala2011-07-26
|
* cleanup: reformat parser-mpcmd.cGravatar Uoti Urpala2011-07-26
| | | | Also remove some redundant code.
* Delete things related to old translation systemGravatar Uoti Urpala2010-03-10
| | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* Merge svn changes up to r30732Gravatar Uoti Urpala2010-03-10
|\
* \ Merge svn changes up to r30475Gravatar Uoti Urpala2010-03-09
|\ \
| | * Add header for macosx_finder_args() instead of forward declaring it.Gravatar diego2010-02-23
| |/ | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30717 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Add license header to all top-level files missing them.Gravatar diego2010-01-30
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30471 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r29912Gravatar Uoti Urpala2009-11-16
|\|
| * Support the range syntax (like dvd://2-5) also for dvdnav.Gravatar reimar2009-11-11
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29892 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Remove trailing whitespace from most filesGravatar Uoti Urpala2009-07-07
| |
* | Translation system changes part 2: replace macros by stringsGravatar Amar Takhar2009-07-07
| | | | | | | | | | Replace all MSGTR_ macros in the source by the corresponding English string.
* | Translation system changes part 1: wrap translated stringsGravatar Amar Takhar2009-07-07
| | | | | | | | | | Replace mp_msg() calls which have a translated string as the format argument with mp_tmsg and add _() around all other translated strings.
| * whitespace cosmetics: Remove all trailing whitespace.Gravatar diego2009-05-13
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r28087Gravatar Uoti Urpala2008-12-04
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: command.c libao2/ao_ivtv.c libao2/ao_v4l2.c libmpcodecs/dec_video.h libvo/aspect.h libvo/sub.c libvo/sub.h libvo/vo_directx.c libvo/vo_macosx.m libvo/vo_quartz.c mp_core.h mplayer.c mplayer.h osdep/getch2.h osdep/timer.h
| * Get rid of pointless 'extern' keywords.Gravatar diego2008-12-03
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28085 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Merge svn changes up to r27441Gravatar Uoti Urpala2008-08-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cfg-common-opts.h command.c configure input/input.c libmpcodecs/dec_video.c libmpcodecs/vd.c libmpdemux/stheader.h libvo/sub.c libvo/video_out.c libvo/vo_xv.c libvo/vosub_vidix.c libvo/x11_common.c libvo/x11_common.h mp_core.h mplayer.c stream/stream.h
| * Give a CONFIG_ prefix to preprocessor directives that lacked one andGravatar diego2008-08-07
| | | | | | | | | | | | | | change arbitrary prefixes to CONFIG_. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27429 b3059339-0415-0410-9bf9-f77b7e298cf2
| * Ahem, the MACOSX_FINDER_SUPPORT directive was renamed to MACOSX_FINDER.Gravatar diego2008-08-07
| | | | | | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27426 b3059339-0415-0410-9bf9-f77b7e298cf2
* | Move global mconfig to mpctxGravatar Uoti Urpala2008-04-26
|/ | | | | | | | | | | The global was used in the function cfg_include which handles the -include option. Make the address available in that function by creating a new dynamically allocated option in m_config_new that has the address in the option's private data. asxparser.c also used the global. Making it available through all ways the code could get called required a number of relatively straightforward changes to playtree and menu code.
* Include some .h files in corresponding .c filesGravatar uau2008-03-28
| | | | | | | | | Include the corresponding .h file in command.c, parser-cfg.c and parser-mpcmd.c. This allows the compiler to check that the declarations in the .h file match the actual defition. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26295 b3059339-0415-0410-9bf9-f77b7e298cf2
* Mark more m_option_t uses as constGravatar reimar2007-12-02
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25255 b3059339-0415-0410-9bf9-f77b7e298cf2
* localization of parser-m*cmd.c messagesGravatar ptt2006-11-27
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21328 b3059339-0415-0410-9bf9-f77b7e298cf2
* Doxygen Attack! - Chapter 3Gravatar albeu2006-04-25
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18266 b3059339-0415-0410-9bf9-f77b7e298cf2
* Small fix, incorrect MSGL at fatal errorGravatar reynaldo2006-04-22
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18210 b3059339-0415-0410-9bf9-f77b7e298cf2
* also print an error when parsing fails with M_OPT_INVALID or M_OPT_PARSER_ERR.Gravatar reimar2006-04-19
| | | | | | | fixes MPlayer exiting without message for e.g. "mplayer -ao" git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18149 b3059339-0415-0410-9bf9-f77b7e298cf2
* avoid crash when running "mplayer -loop" (dereferencing uninitialize pointer).Gravatar reimar2006-04-14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18098 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make -list-options work in both MPlayer and MEncoder.Gravatar albeu2006-01-24
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17473 b3059339-0415-0410-9bf9-f77b7e298cf2
* allow multiple help clauses on the command line, Patch by kiriuja " ↵Gravatar gpoirier2005-09-02
| | | | | | | | | | | | | | | | | mplayer-patches AH en-directo POUM net " This one makes mplayer -vo help -ao help -ac help -vc help -pphelp -af help -vfm help -vf help -afm help -fstype help produce the desired output. From the thread: Date: Jul 16, 2005 8:25 PM Subject: [MPlayer-dev-eng] [PATCH] allow multiple help clauses on the command line git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@16346 b3059339-0415-0410-9bf9-f77b7e298cf2
* when somebody specifies e.g. --loop, the message says that a -loop optionGravatar reimar2005-06-17
| | | | | | | does not exist. So add an extra - to the message. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15743 b3059339-0415-0410-9bf9-f77b7e298cf2
* Make "mplayer -- --a" play the file --a instead of bailing out with a uselessGravatar reimar2005-04-23
| | | | | | | error message git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15246 b3059339-0415-0410-9bf9-f77b7e298cf2
* Clarify confusing error message.Gravatar diego2005-01-19
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14542 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix: when doing -loop 0 -shuffle, the arg after shuffle was skippedGravatar reimar2004-11-14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13933 b3059339-0415-0410-9bf9-f77b7e298cf2
* add support for macosx finder argument support (let you bundle mplayer to be ↵Gravatar nplourde2004-11-10
| | | | | | a finder compliant .app) patch by Chris Roccati <roccati@pobox.com> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13910 b3059339-0415-0410-9bf9-f77b7e298cf2
* -use-stdin renamed to -noconsolecontrols.Gravatar diego2004-07-14
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12817 b3059339-0415-0410-9bf9-f77b7e298cf2
* Support dvd://start_title-end_title as requested on wishlistGravatar rtognimp2004-06-07
| | | | | | | Patch by adland git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12544 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fail if empty or nonexitant playlistGravatar rtognimp2004-04-24
| | | | | | | Patch by adland git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12268 b3059339-0415-0410-9bf9-f77b7e298cf2
* 100l to albeu for his english grammar, and 10l to me becouse I noticed that ↵Gravatar alex2003-08-13
| | | | | | lately (my backward compatibilty macro uses M_OPT_UNKNOWN) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10596 b3059339-0415-0410-9bf9-f77b7e298cf2
* Removed the historic cfgparser and switched full to the new config parser ↵Gravatar alex2003-08-13
| | | | | | (altought some macros still remain for compatibility). As a side effect 90% of the warning messages are gone from the core. Things should be cleaner now and less confusing for newbies. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10595 b3059339-0415-0410-9bf9-f77b7e298cf2
* fix the bug where only the last file of the command line is foundGravatar pl2003-08-08
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10543 b3059339-0415-0410-9bf9-f77b7e298cf2
* c vs c++ syntaxGravatar alex2003-08-03
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10514 b3059339-0415-0410-9bf9-f77b7e298cf2
* output typo fixes: unknow --> unknownGravatar diego2003-07-09
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10398 b3059339-0415-0410-9bf9-f77b7e298cf2
* Exit when the option parser return M_OPT_EXITGravatar albeu2003-04-02
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9793 b3059339-0415-0410-9bf9-f77b7e298cf2