[MPlayer-cvslog] r28863 - in trunk/libvo: vo_aa.c vo_directfb2.c vo_gif89a.c vo_gl.c vo_gl2.c vo_ivtv.c vo_jpeg.c vo_md5sum.c vo_png.c vo_pnm.c vo_sdl.c vo_v4l2.c vo_vdpau.c vo_xv.c vo_xvmc.c vo_yuv4mpeg.c vo_zr2.c

reimar subversion at mplayerhq.hu
Sat Mar 7 09:51:41 CET 2009


Author: reimar
Date: Sat Mar  7 09:51:40 2009
New Revision: 28863

Log:
Make data related to suboption parsing const in libvo

Modified:
   trunk/libvo/vo_aa.c
   trunk/libvo/vo_directfb2.c
   trunk/libvo/vo_gif89a.c
   trunk/libvo/vo_gl.c
   trunk/libvo/vo_gl2.c
   trunk/libvo/vo_ivtv.c
   trunk/libvo/vo_jpeg.c
   trunk/libvo/vo_md5sum.c
   trunk/libvo/vo_png.c
   trunk/libvo/vo_pnm.c
   trunk/libvo/vo_sdl.c
   trunk/libvo/vo_v4l2.c
   trunk/libvo/vo_vdpau.c
   trunk/libvo/vo_xv.c
   trunk/libvo/vo_xvmc.c
   trunk/libvo/vo_yuv4mpeg.c
   trunk/libvo/vo_zr2.c

Modified: trunk/libvo/vo_aa.c
==============================================================================
--- trunk/libvo/vo_aa.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_aa.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -578,19 +578,19 @@ static int parse_suboptions(const char *
     char *pseudoargv[4], *osdcolor = NULL, *subcolor = NULL, **strings,
          *helpmsg = NULL;
     int pseudoargc, displayhelp = 0, *booleans;
-    opt_t extra_opts[] = {
+    const opt_t extra_opts[] = {
             {"osdcolor", OPT_ARG_MSTRZ, &osdcolor,    NULL, 0},
             {"subcolor", OPT_ARG_MSTRZ, &subcolor,    NULL, 0},
             {"help",     OPT_ARG_BOOL,  &displayhelp, NULL, 0} };
     opt_t *subopts = NULL, *p;
-    char *strings_list[] = {"-driver", "-kbddriver", "-mousedriver", "-font",
+    char * const strings_list[] = {"-driver", "-kbddriver", "-mousedriver", "-font",
         "-width", "-height", "-minwidth", "-minheight", "-maxwidth",
         "-maxheight", "-recwidth", "-recheight", "-bright",  "-contrast",
         "-gamma",  "-dimmul", "-boldmul", "-random" };
-    char *booleans_list[] = {"-dim", "-bold", "-reverse", "-normal",
+    char * const booleans_list[] = {"-dim", "-bold", "-reverse", "-normal",
         "-boldfont", "-inverse", "-extended", "-eight", "-dither",
         "-floyd_steinberg", "-error_distribution"};
-    char *nobooleans_list[] = {"-nodim", "-nobold", "-noreverse", "-nonormal",
+    char * const nobooleans_list[] = {"-nodim", "-nobold", "-noreverse", "-nonormal",
         "-noboldfont", "-noinverse", "-noextended", "-noeight", "-nodither",
         "-nofloyd_steinberg", "-noerror_distribution"};
     const int nstrings = sizeof(strings_list) / sizeof(char*);

Modified: trunk/libvo/vo_directfb2.c
==============================================================================
--- trunk/libvo/vo_directfb2.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_directfb2.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -175,7 +175,7 @@ static int preinit(const char *arg)
     strarg_t mode_str = {0, NULL};
     strarg_t par_str = {0, NULL};
     strarg_t dfb_params = {0, NULL};
-    opt_t subopts[] = {
+    const opt_t subopts[] = {
       {"input",       OPT_ARG_BOOL, &use_input,  NULL},
       {"buffermode",  OPT_ARG_STR,  &mode_str,   check_mode},
       {"fieldparity", OPT_ARG_STR,  &par_str,    check_parity},

Modified: trunk/libvo/vo_gif89a.c
==============================================================================
--- trunk/libvo/vo_gif89a.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_gif89a.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -104,7 +104,7 @@ static char *gif_filename = NULL;
 // the default output filename
 #define DEFAULT_FILE "out.gif"
 
-static opt_t subopts[] = {
+static const opt_t subopts[] = {
   {"output",       OPT_ARG_MSTRZ, &gif_filename, NULL, 0},
   {"fps",          OPT_ARG_FLOAT, &target_fps,   NULL, 0},
   {NULL, 0, NULL, NULL, 0}

Modified: trunk/libvo/vo_gl.c
==============================================================================
--- trunk/libvo/vo_gl.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_gl.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -973,7 +973,7 @@ uninit(void)
   vo_uninit();
 }
 
-static opt_t subopts[] = {
+static const opt_t subopts[] = {
   {"manyfmts",     OPT_ARG_BOOL, &many_fmts,    NULL},
   {"osd",          OPT_ARG_BOOL, &use_osd,      NULL},
   {"scaled-osd",   OPT_ARG_BOOL, &scaled_osd,   NULL},

Modified: trunk/libvo/vo_gl2.c
==============================================================================
--- trunk/libvo/vo_gl2.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_gl2.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -844,7 +844,7 @@ uninit(void)
   vo_uninit();
 }
 
-static opt_t subopts[] = {
+static const opt_t subopts[] = {
   {"yuv",          OPT_ARG_INT,  &use_yuv,      (opt_test_f)int_non_neg},
   {"glfinish",     OPT_ARG_BOOL, &use_glFinish, NULL},
   {NULL}

Modified: trunk/libvo/vo_ivtv.c
==============================================================================
--- trunk/libvo/vo_ivtv.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_ivtv.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -59,7 +59,7 @@ static vo_mpegpes_t *pes;
 static int output = -1;
 static char *device = NULL;
 
-static opt_t subopts[] = {
+static const opt_t subopts[] = {
   {"output",   OPT_ARG_INT,       &output,       (opt_test_f)int_non_neg},
   {"device",   OPT_ARG_MSTRZ,     &device,       NULL},
   {NULL}

Modified: trunk/libvo/vo_jpeg.c
==============================================================================
--- trunk/libvo/vo_jpeg.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_jpeg.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -339,7 +339,7 @@ static int int_zero_hundred(int *val)
 
 static int preinit(const char *arg)
 {
-    opt_t subopts[] = {
+    const opt_t subopts[] = {
         {"progressive", OPT_ARG_BOOL,   &jpeg_progressive_mode, NULL, 0},
         {"baseline",    OPT_ARG_BOOL,   &jpeg_baseline,         NULL, 0},
         {"optimize",    OPT_ARG_INT,    &jpeg_optimize,

Modified: trunk/libvo/vo_md5sum.c
==============================================================================
--- trunk/libvo/vo_md5sum.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_md5sum.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -107,7 +107,7 @@ static void md5sum_write_error(void) {
 
 static int preinit(const char *arg)
 {
-    opt_t subopts[] = {
+    const opt_t subopts[] = {
         {"outfile",     OPT_ARG_MSTRZ,    &md5sum_outfile,   NULL, 0},
         {NULL, 0, NULL, NULL, 0}
     };

Modified: trunk/libvo/vo_png.c
==============================================================================
--- trunk/libvo/vo_png.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_png.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -290,7 +290,7 @@ static int int_zero_to_nine(int *sh)
     return 1;
 }
 
-static opt_t subopts[] = {
+static const opt_t subopts[] = {
     {"alpha", OPT_ARG_BOOL, &use_alpha, NULL, 0},
     {"z",   OPT_ARG_INT, &z_compression, (opt_test_f)int_zero_to_nine},
     {"outdir",      OPT_ARG_MSTRZ,  &png_outdir,           NULL, 0},

Modified: trunk/libvo/vo_pnm.c
==============================================================================
--- trunk/libvo/vo_pnm.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_pnm.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -120,7 +120,7 @@ static int preinit(const char *arg)
 {
     int ppm_type = 0, pgm_type = 0, pgmyuv_type = 0,
         raw_mode = 0, ascii_mode = 0;
-    opt_t subopts[] = {
+    const opt_t subopts[] = {
         {"ppm",         OPT_ARG_BOOL,   &ppm_type,      NULL, 0},
         {"pgm",         OPT_ARG_BOOL,   &pgm_type,      NULL, 0},
         {"pgmyuv",      OPT_ARG_BOOL,   &pgmyuv_type,   NULL, 0},

Modified: trunk/libvo/vo_sdl.c
==============================================================================
--- trunk/libvo/vo_sdl.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_sdl.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -1526,7 +1526,7 @@ static int preinit(const char *arg)
     char * sdl_driver = NULL;
     int sdl_hwaccel;
     int sdl_forcexv;
-    opt_t subopts[] = {
+    const opt_t subopts[] = {
 	    {"forcexv", OPT_ARG_BOOL,  &sdl_forcexv, NULL, 0},
 	    {"hwaccel", OPT_ARG_BOOL,  &sdl_hwaccel, NULL, 0},
 	    {"driver",  OPT_ARG_MSTRZ, &sdl_driver,  NULL, 0},

Modified: trunk/libvo/vo_v4l2.c
==============================================================================
--- trunk/libvo/vo_v4l2.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_v4l2.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -53,7 +53,7 @@ static vo_mpegpes_t *pes;
 static int output = -1;
 static char *device = NULL;
 
-static opt_t subopts[] = {
+static const opt_t subopts[] = {
   {"output",   OPT_ARG_INT,       &output,       (opt_test_f)int_non_neg},
   {"device",   OPT_ARG_MSTRZ,     &device,       NULL},
   {NULL}

Modified: trunk/libvo/vo_vdpau.c
==============================================================================
--- trunk/libvo/vo_vdpau.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_vdpau.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -949,7 +949,7 @@ static void uninit(void)
     dlclose(vdpau_lib_handle);
 }
 
-static opt_t subopts[] = {
+static const opt_t subopts[] = {
     {"deint",   OPT_ARG_INT,   &deint,   (opt_test_f)int_non_neg},
     {"pullup",  OPT_ARG_BOOL,  &pullup,  NULL},
     {"denoise", OPT_ARG_FLOAT, &denoise, NULL},

Modified: trunk/libvo/vo_xv.c
==============================================================================
--- trunk/libvo/vo_xv.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_xv.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -611,7 +611,7 @@ static int preinit(const char *arg)
     strarg_t ck_method_arg = { 0, NULL };
     int xv_adaptor = -1;
 
-    opt_t subopts[] =
+    const opt_t subopts[] =
     {  
       /* name         arg type     arg var         test */
       {  "port",      OPT_ARG_INT, &xv_port,       (opt_test_f)int_pos },

Modified: trunk/libvo/vo_xvmc.c
==============================================================================
--- trunk/libvo/vo_xvmc.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_xvmc.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -379,7 +379,7 @@ static int preinit(const char *arg){
     int mc_ver,mc_rev;
     strarg_t ck_src_arg = { 0, NULL };
     strarg_t ck_method_arg = { 0, NULL };
-    opt_t subopts [] =
+    const opt_t subopts [] =
     {
         /* name         arg type      arg var           test */
         {  "port",      OPT_ARG_INT,  &xv_port_request, (opt_test_f)int_pos },

Modified: trunk/libvo/vo_yuv4mpeg.c
==============================================================================
--- trunk/libvo/vo_yuv4mpeg.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_yuv4mpeg.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -513,7 +513,7 @@ static void check_events(void)
 static int preinit(const char *arg)
 {
   int il, il_bf;
-  opt_t subopts[] = {
+  const opt_t subopts[] = {
     {"interlaced",    OPT_ARG_BOOL, &il,    NULL},
     {"interlaced_bf", OPT_ARG_BOOL, &il_bf, NULL},
     {"file",          OPT_ARG_MSTRZ,  &yuv_filename,  NULL},

Modified: trunk/libvo/vo_zr2.c
==============================================================================
--- trunk/libvo/vo_zr2.c	Fri Mar  6 21:41:02 2009	(r28862)
+++ trunk/libvo/vo_zr2.c	Sat Mar  7 09:51:40 2009	(r28863)
@@ -209,7 +209,7 @@ static int preinit(const char *arg) {
 	const char *dev = NULL;
 	char *dev_arg = NULL, *norm_arg = NULL;
 	int norm = VIDEO_MODE_AUTO, prebuf = 0;
-	opt_t subopts[] = { /* don't want warnings with -Wall... */
+	const opt_t subopts[] = { /* don't want warnings with -Wall... */
 		{ "dev",    OPT_ARG_MSTRZ, &dev_arg,   NULL, 	        0 },
 		{ "prebuf", OPT_ARG_BOOL,  &prebuf,    (opt_test_f)pbc, 0 },
 		{ "norm",   OPT_ARG_MSTRZ, &norm_arg,  (opt_test_f)nc,  0 },



More information about the MPlayer-cvslog mailing list