[MPlayer-cvslog] CVS: main subopt-helper.c, 1.4, 1.5 subopt-helper.h, 1.3, 1.4

Alexander Strasser beastd syncmail at mplayerhq.hu
Sat Feb 19 21:14:02 CET 2005


CVS change done by Alexander Strasser (beastd)

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv19424

Modified Files:
	subopt-helper.c subopt-helper.h 
Log Message:
Move generic tests to a common place.


Index: subopt-helper.c
===================================================================
RCS file: /cvsroot/mplayer/main/subopt-helper.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- subopt-helper.c	22 Jan 2005 12:49:11 -0000	1.4
+++ subopt-helper.c	19 Feb 2005 20:14:00 -0000	1.5
@@ -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;
+}

Index: subopt-helper.h
===================================================================
RCS file: /cvsroot/mplayer/main/subopt-helper.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- subopt-helper.h	19 Jan 2005 17:10:20 -0000	1.3
+++ subopt-helper.h	19 Feb 2005 20:14:00 -0000	1.4
@@ -39,4 +39,8 @@
   char const * str;  ///< pointer to position inside the parse string
 } strarg_t;
 
+
+int int_non_neg( int * i );
+int int_pos( int * i );
+
 #endif




More information about the MPlayer-cvslog mailing list