Added qmin and qmax functions to deal with quad_t's.
This commit is contained in:
parent
e66defe8ab
commit
147db1cbab
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2412
@ -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));
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user