[Mplayer-cvslog] CVS: main/libvo vo_fbdev.c,1.42,1.43

Szabolcs Berecz szabii at users.sourceforge.net
Mon Jun 4 01:24:33 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv11863

Modified Files:
	vo_fbdev.c 
Log Message:
small fix

Index: vo_fbdev.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fbdev.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -r1.42 -r1.43
*** vo_fbdev.c	2001/06/02 20:48:16	1.42
--- vo_fbdev.c	2001/06/03 23:24:31	1.43
***************
*** 141,146 ****
--- 141,155 ----
  static int parse_fbmode_cfg(char *cfgfile)
  {
+ #define CHECK_IN_MODE_DEF\
+ 	do {\
+ 	if (!in_mode_def) {\
+ 		printf("'needs 'mode' first");\
+ 		goto err_out_print_linenum;\
+ 	}\
+ 	} while (0)
+ 
  	fb_mode_t *mode = NULL;
  	char *endptr;	// strtoul()...
+ 	int in_mode_def = 0;
  	int tmp, i;
  
***************
*** 173,176 ****
--- 182,189 ----
  			continue;
  		if (!strcmp(token[0], "mode")) {
+ 			if (in_mode_def) {
+ 				printf("'endmode' required");
+ 				goto err_out_print_linenum;
+ 			}
  			if (!validate_mode(mode))
  				goto err_out_not_valid;
***************
*** 198,202 ****
--- 211,217 ----
  				goto err_out;
  			}
+ 			in_mode_def = 1;
  		} else if (!strcmp(token[0], "geometry")) {
+ 			CHECK_IN_MODE_DEF;
  			if (get_token(5) < 0)
  				goto err_out_parse_error;
***************
*** 217,220 ****
--- 232,236 ----
  				goto err_out_parse_error;
  		} else if (!strcmp(token[0], "timings")) {
+ 			CHECK_IN_MODE_DEF;
  			if (get_token(7) < 0)
  				goto err_out_parse_error;
***************
*** 241,246 ****
  				goto err_out_parse_error;
  		} else if (!strcmp(token[0], "endmode")) {
! 			/* FIXME NOTHING for now*/
  		} else if (!strcmp(token[0], "accel")) {
  			if (get_token(1) < 0)
  				goto err_out_parse_error;
--- 257,264 ----
  				goto err_out_parse_error;
  		} else if (!strcmp(token[0], "endmode")) {
! 			CHECK_IN_MODE_DEF;
! 			in_mode_def = 0;
  		} else if (!strcmp(token[0], "accel")) {
+ 			CHECK_IN_MODE_DEF;
  			if (get_token(1) < 0)
  				goto err_out_parse_error;
***************
*** 250,253 ****
--- 268,272 ----
  			 */
  		} else if (!strcmp(token[0], "hsync")) {
+ 			CHECK_IN_MODE_DEF;
  			if (get_token(1) < 0)
  				goto err_out_parse_error;
***************
*** 259,262 ****
--- 278,282 ----
  				goto err_out_parse_error;
  		} else if (!strcmp(token[0], "vsync")) {
+ 			CHECK_IN_MODE_DEF;
  			if (get_token(1) < 0)
  				goto err_out_parse_error;
***************
*** 268,271 ****
--- 288,292 ----
  				goto err_out_parse_error;
  		} else if (!strcmp(token[0], "csync")) {
+ 			CHECK_IN_MODE_DEF;
  			if (get_token(1) < 0)
  				goto err_out_parse_error;
***************
*** 277,280 ****
--- 298,302 ----
  				goto err_out_parse_error;
  		} else if (!strcmp(token[0], "extsync")) {
+ 			CHECK_IN_MODE_DEF;
  			if (get_token(1) < 0)
  				goto err_out_parse_error;
***************
*** 286,289 ****
--- 308,312 ----
  				goto err_out_parse_error;
  		} else if (!strcmp(token[0], "laced")) {
+ 			CHECK_IN_MODE_DEF;
  			if (get_token(1) < 0)
  				goto err_out_parse_error;
***************
*** 295,298 ****
--- 318,322 ----
  				goto err_out_parse_error;
  		} else if (!strcmp(token[0], "double")) {
+ 			CHECK_IN_MODE_DEF;
  			if (get_token(1) < 0)
  				goto err_out_parse_error;


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list