Mercurial > mplayer.hg
diff subopt-helper.c @ 14736:2ef20aa3623b
Move generic tests to a common place.
author | al |
---|---|
date | Sat, 19 Feb 2005 20:14:00 +0000 |
parents | cfe2bbf96000 |
children | e678e306068e |
line wrap: on
line diff
--- a/subopt-helper.c Sat Feb 19 14:58:39 2005 +0000 +++ b/subopt-helper.c Sat Feb 19 20:14:00 2005 +0000 @@ -263,3 +263,21 @@ 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; +}