diff options
author | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-02-24 20:28:24 +0000 |
---|---|---|
committer | arpi_esp <arpi_esp@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-02-24 20:28:24 +0000 |
commit | d34041569e71fc9bd772354e94dc9d16061072a5 (patch) | |
tree | 8f481cae1c70f32d1756fbe5f39000577b73042d /TVout/fbset/modes.y | |
parent | e95a95ece09bac96bdfd37322f96c6f57ef79ebc (diff) | |
download | mpv-d34041569e71fc9bd772354e94dc9d16061072a5.tar.bz2 mpv-d34041569e71fc9bd772354e94dc9d16061072a5.tar.xz |
Initial revision
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'TVout/fbset/modes.y')
-rw-r--r-- | TVout/fbset/modes.y | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/TVout/fbset/modes.y b/TVout/fbset/modes.y new file mode 100644 index 0000000000..27b497a00b --- /dev/null +++ b/TVout/fbset/modes.y @@ -0,0 +1,175 @@ +/* + * Linux Frame Buffer Device Configuration + * + * © Copyright 1995-1998 by Geert Uytterhoeven + * (Geert.Uytterhoeven@cs.kuleuven.ac.be) + * + * -------------------------------------------------------------------------- + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file COPYING in the main directory of the Linux + * distribution for more details. + */ + + +%{ + +#define YYSTYPE long + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +#include "fb.h" +#include "fbset.h" + +extern int yylex(void); +extern void yyerror(const char *s); +extern int line; + + +static struct VideoMode VideoMode; + +static void ClearVideoMode(void) +{ + memset(&VideoMode, 0, sizeof(VideoMode)); + VideoMode.accel_flags = FB_ACCELF_TEXT; +} + +%} + +%start file + +%token MODE GEOMETRY TIMINGS HSYNC VSYNC CSYNC GSYNC EXTSYNC BCAST LACED DOUBLE + RGBA NONSTD ACCEL GRAYSCALE + ENDMODE POLARITY BOOLEAN STRING NUMBER + +%% + +file : vmodes + ; + + +vmodes : /* empty */ + | vmodes vmode + ; + +vmode : MODE STRING geometry timings options ENDMODE + { + VideoMode.name = (const char *)$2; + AddVideoMode(&VideoMode); + ClearVideoMode(); + } + ; + +geometry : GEOMETRY NUMBER NUMBER NUMBER NUMBER NUMBER + { + ClearVideoMode(); + VideoMode.xres = $2; + VideoMode.yres = $3; + VideoMode.vxres = $4; + VideoMode.vyres = $5; + VideoMode.depth = $6; + } + ; + +timings : TIMINGS NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER + { + VideoMode.pixclock = $2; + VideoMode.left = $3; + VideoMode.right = $4; + VideoMode.upper = $5; + VideoMode.lower = $6; + VideoMode.hslen = $7; + VideoMode.vslen = $8; + } + ; + +options : /* empty */ + | options hsync + | options vsync + | options csync + | options gsync + | options extsync + | options bcast + | options laced + | options double + | options rgba + | options nonstd + | options accel + | options grayscale + ; + +hsync : HSYNC POLARITY + { + VideoMode.hsync = $2; + } + ; + +vsync : VSYNC POLARITY + { + VideoMode.vsync = $2; + } + ; + +csync : CSYNC POLARITY + { + VideoMode.csync = $2; + } + ; + +gsync : GSYNC POLARITY + { + VideoMode.gsync = $2; + } + ; + +extsync : EXTSYNC BOOLEAN + { + VideoMode.extsync = $2; + } + ; + +bcast : BCAST BOOLEAN + { + VideoMode.bcast = $2; + } + ; + +laced : LACED BOOLEAN + { + VideoMode.laced = $2; + } + ; + +double : DOUBLE BOOLEAN + { + VideoMode.dblscan = $2; + } + ; + +rgba : RGBA STRING + { + makeRGBA(&VideoMode, (const char*)$2); + } + ; + +nonstd : NONSTD NUMBER + { + VideoMode.nonstd = $2; + } + ; + +accel : ACCEL BOOLEAN + { + VideoMode.accel_flags = $2; + } + ; + +grayscale : GRAYSCALE BOOLEAN + { + VideoMode.grayscale = $2; + } + ; + +%% |