[Toxine-cvs] CVS: toxine/src/plugins vo_aa.c,1.16,1.17 vo_caca.c,1.2,1.3 vo_dxr3.c,1.20,1.21 vo_none
Brought to you by:
f1rmb
From: Daniel Caujolle-B. <f1...@us...> - 2004-05-27 00:27:51
|
Update of /cvsroot/toxine/toxine/src/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30316/plugins Modified Files: vo_aa.c vo_caca.c vo_dxr3.c vo_none.c vo_x11.c Log Message: preliminary implementation of return code. (now in script or stdin mode, any error is fatal). Index: vo_aa.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_aa.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- vo_aa.c 6 May 2004 19:18:34 -0000 1.16 +++ vo_aa.c 27 May 2004 00:27:40 -0000 1.17 @@ -46,13 +46,13 @@ private->context = aa_autoinit(&aa_defparams); if(private->context == NULL) { - fprintf(stderr,"Cannot initialize AA-lib. Sorry\n"); - exit(1); + perr("Cannot initialize AA-lib. Sorry\n"); + exit(TOX_ERR_VOP_FAILURE); } if(aa_autoinitkbd(private->context, 0) < 1) { - fprintf(stderr, "aa_autoinitkdb() failed.\n"); - exit(1); + perr("aa_autoinitkdb() failed.\n"); + exit(TOX_ERR_VOP_FAILURE); } aa_hidecursor(private->context); @@ -63,9 +63,8 @@ (void *) private->context); if(tox->video.port == NULL) { - fprintf(stderr, "xine_open_video_driver() failed to load '%s' driver.\n", - tox->video.name); - exit(1); + perr("xine_open_video_driver() failed to load '%s' driver.\n", tox->video.name); + exit(TOX_ERR_XINE_OPEN_VIDEO_DRIVER); } else pinfo("video driver '%s' successfully loaded.\n", tox->video.name); Index: vo_caca.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_caca.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- vo_caca.c 6 May 2004 19:18:34 -0000 1.2 +++ vo_caca.c 27 May 2004 00:27:40 -0000 1.3 @@ -78,9 +78,8 @@ tox->video.port = xine_open_video_driver(tox->xine, tox->video.name, XINE_VISUAL_TYPE_CACA, NULL); if(tox->video.port == NULL) { - fprintf(stderr, "xine_open_video_driver() failed to load '%s' driver.\n", - tox->video.name); - exit(1); + perr("xine_open_video_driver() failed to load '%s' driver.\n", tox->video.name); + exit(TOX_ERR_XINE_OPEN_VIDEO_DRIVER); } else pinfo("video driver '%s' successfully loaded.\n", tox->video.name); Index: vo_dxr3.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_dxr3.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- vo_dxr3.c 6 May 2004 19:18:34 -0000 1.20 +++ vo_dxr3.c 27 May 2004 00:27:40 -0000 1.21 @@ -54,7 +54,7 @@ /* First, we have to initialize the config entry */ (void *) xine_config_register_enum(tox->xine, "dxr3.videoout_mode", 0, videoout_modes, "Dxr3: videoout mode (tv or overlay)", - NULL, 0, NULL, NULL); + NULL, 0, NULL, NULL); /* Then, force it to TV mode */ toxine_config_update_num(tox, "dxr3.videoout_mode", mode); @@ -68,9 +68,8 @@ private->init = 1; if(tox->video.port == NULL) { - fprintf(stderr, "xine_load_video_output_plugin() failed to load '%s' driver.\n", - drivername); - exit(1); + perr("xine_load_video_output_plugin() failed to load '%s' driver.\n", drivername); + exit(TOX_ERR_XINE_OPEN_VIDEO_DRIVER); } else pinfo("video driver '%s' successfully loaded.\n", drivername); Index: vo_none.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_none.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- vo_none.c 6 May 2004 19:18:34 -0000 1.13 +++ vo_none.c 27 May 2004 00:27:40 -0000 1.14 @@ -39,9 +39,8 @@ private->init = 1; if(tox->video.port == NULL) { - fprintf(stderr, "xine_load_video_output_plugin() failed to load '%s' driver.\n", - tox->video.name); - exit(1); + perr("xine_load_video_output_plugin() failed to load '%s' driver.\n", tox->video.name); + exit(TOX_ERR_XINE_OPEN_VIDEO_DRIVER); } else pinfo("video driver '%s' successfully loaded.\n", tox->video.name); Index: vo_x11.c =================================================================== RCS file: /cvsroot/toxine/toxine/src/plugins/vo_x11.c,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- vo_x11.c 6 May 2004 19:18:34 -0000 1.30 +++ vo_x11.c 27 May 2004 00:27:40 -0000 1.31 @@ -459,8 +459,8 @@ xine_gui_send_vo_data(tox->stream, XINE_GUI_SEND_SELECT_VISUAL, (void *)&vinfo); if(vinfo != (XVisualInfo *) -1) { if(!vinfo) { - fprintf (stderr, "videowin: output driver cannot select a working visual\n"); - exit(1); + perr("Output driver cannot select a working visual\n"); + exit(TOX_ERR_VOP_FAILURE); } private->visual = vinfo->visual; @@ -500,7 +500,7 @@ if(!XInitThreads()) { perr("XInitThreads failed - looks like you don't have a " "thread-safe xlib.\n"); - exit(1); + exit(TOX_ERR_VOP_FAILURE); } private->fake_rate = xine_config_register_num(tox->xine, "tox.fake_rate", 10, @@ -544,8 +544,8 @@ private->wm_hint = XAllocWMHints(); if(!private->wm_hint) { - printf ("XAllocWMHints failed\n"); - exit (1); + perr("XAllocWMHints failed\n"); + exit(TOX_ERR_VOP_FAILURE); } private->wm_hint->input = True; private->wm_hint->initial_state = NormalState; @@ -740,9 +740,8 @@ XINE_VISUAL_TYPE_X11, (void *)&vis); if(tox->video.port == NULL) { - fprintf(stderr, "xine_open_video_driver() failed to load '%s' driver.\n", - drivername); - exit(1); + perr("xine_open_video_driver() failed to load '%s' driver.\n", drivername); + exit(TOX_ERR_XINE_OPEN_VIDEO_DRIVER); } else pinfo("video driver '%s' successfully loaded.\n", drivername); |