diff --git a/libvo/vo_gl.c b/libvo/vo_gl.c index 0614dbe844..f84065d868 100644 --- a/libvo/vo_gl.c +++ b/libvo/vo_gl.c @@ -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}, diff --git a/libvo/vo_pnm.c b/libvo/vo_pnm.c index 68d4866a08..f4e04c39dc 100644 --- a/libvo/vo_pnm.c +++ b/libvo/vo_pnm.c @@ -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 diff --git a/subopt-helper.c b/subopt-helper.c index de103e1126..611af73e1f 100644 --- a/subopt-helper.c +++ b/subopt-helper.c @@ -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; +} diff --git a/subopt-helper.h b/subopt-helper.h index 5891b8c0c8..9a8c828199 100644 --- a/subopt-helper.h +++ b/subopt-helper.h @@ -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