Added qmin and qmax functions to deal with quad_t's.

This commit is contained in:
David Greenman 1994-08-30 18:19:47 +00:00
parent e66defe8ab
commit 147db1cbab
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2412
2 changed files with 28 additions and 2 deletions

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)libkern.h 8.1 (Berkeley) 6/10/93
* $Id$
* $Id: libkern.h,v 1.2 1994/08/02 07:44:03 davidg Exp $
*/
#include <sys/types.h>
@ -85,6 +85,19 @@ ulmin(a, b)
return (a < b ? a : b);
}
static inline quad_t
qmax(a, b)
quad_t a, b;
{
return (a > b ? a : b);
}
static inline quad_t
qmin(a, b)
quad_t a, b;
{
return (a < b ? a : b);
}
/* Prototypes for non-quad routines. */
int bcmp __P((const void *, const void *, size_t));
int ffs __P((int));

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)libkern.h 8.1 (Berkeley) 6/10/93
* $Id$
* $Id: libkern.h,v 1.2 1994/08/02 07:44:03 davidg Exp $
*/
#include <sys/types.h>
@ -85,6 +85,19 @@ ulmin(a, b)
return (a < b ? a : b);
}
static inline quad_t
qmax(a, b)
quad_t a, b;
{
return (a > b ? a : b);
}
static inline quad_t
qmin(a, b)
quad_t a, b;
{
return (a < b ? a : b);
}
/* Prototypes for non-quad routines. */
int bcmp __P((const void *, const void *, size_t));
int ffs __P((int));