[MPlayer-dev-eng] [PATCH] -geometry option: support negative coordinates in 0x0+0+0 and +0+0 notation

Attila Kinali attila at kinali.ch
Fri Mar 5 12:12:14 CET 2010


On Mon, 22 Feb 2010 15:09:33 +0100
Melchior FRANZ <mfranz at aon.at> wrote:

> the mplayer manpage says: "It also supports the standard X11 -geometry option
> format." But that's not the whole truth. In fact it only supports a subset.
> The standard X11 option also accepts negative offsets:
> 
>   http://www.x.org/archive/X11R6.8.1/doc/X.7.html#sect6
> 
> Note that in -XOFF XOFF may be negative, so the following is also allowed (and
> useful!):  --100--100

Hmm.. Either i missed this case when i implemented that code,
or it has been added later.


> [geometry.diff  text/x-patch (1.8KB)]
> Index: libvo/geometry.c
> ===================================================================
> --- libvo/geometry.c	(revision 30696)
> +++ libvo/geometry.c	(working copy)
> @@ -30,7 +30,7 @@
>  int geometry_wh_changed;
>  int geometry_xy_changed;
>  
> -#define RESET_GEOMETRY width = height = xoff = yoff = xper = yper = INT_MIN;
> +#define RESET_GEOMETRY width = height = xoff = yoff = xper = yper = INT_MIN, *xsign = *ysign = ' ';

This looks wrong. The comma should be replaced by a semicolon.
Does this even compile?

>  
>  // xpos,ypos: position of the left upper corner
>  // widw,widh: width and height of the window
> @@ -38,17 +38,18 @@
>  int geometry(int *xpos, int *ypos, int *widw, int *widh, int scrw, int scrh)
>  {
>          int width, height, xoff, yoff, xper, yper;
> +	char xsign[2] = " ", ysign[2] = " ";

Please use the same indentation style.

Otherwise i'd say it's ok.

			Attila Kinali

-- 
If you want to walk fast, walk alone.
If you want to walk far, walk together.
		-- African proverb



More information about the MPlayer-dev-eng mailing list