mirror of https://github.com/mpv-player/mpv
Move generic tests to a common place.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14737 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
d25c17a05a
commit
546e6316ac
|
@ -472,13 +472,6 @@ uninit(void)
|
|||
vo_x11_uninit();
|
||||
}
|
||||
|
||||
static int int_non_neg(int *sh)
|
||||
{
|
||||
if ( *sh < 0 )
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static opt_t subopts[] = {
|
||||
{"manyfmts", OPT_ARG_BOOL, &many_fmts, NULL},
|
||||
{"osd", OPT_ARG_BOOL, &use_osd, NULL},
|
||||
|
|
|
@ -103,16 +103,6 @@ void pnm_write_error(void) {
|
|||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
/** \brief Validation function for maxfiles
|
||||
*/
|
||||
|
||||
static int int_pos(int *mf)
|
||||
{
|
||||
if ( *mf > 0 )
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/** \brief Pre-initialisation.
|
||||
*
|
||||
* This function is called before initialising the video output driver. It
|
||||
|
|
|
@ -263,3 +263,21 @@ static char const * parse_str( char const * const str, strarg_t * const valp )
|
|||
|
||||
return match;
|
||||
}
|
||||
|
||||
|
||||
/*** common test functions ***/
|
||||
|
||||
/** \brief Test if i is not negative */
|
||||
int int_non_neg( int * i )
|
||||
{
|
||||
if ( *i < 0 ) { return 0; }
|
||||
|
||||
return 1;
|
||||
}
|
||||
/** \brief Test if i is positive. */
|
||||
int int_pos( int * i )
|
||||
{
|
||||
if ( *i > 0 ) { return 1; }
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -39,4 +39,8 @@ typedef struct strarg_s
|
|||
char const * str; ///< pointer to position inside the parse string
|
||||
} strarg_t;
|
||||
|
||||
|
||||
int int_non_neg( int * i );
|
||||
int int_pos( int * i );
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue