mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
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 a new issue