mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
Add functions mp_max and mp_max_into.
These are easy, and just like the existing mp_min family; I just hadn't needed them before now.
This commit is contained in:
5
mpint.h
5
mpint.h
@ -152,10 +152,13 @@ unsigned mp_hs_integer(mp_int *x, uintmax_t n);
|
||||
unsigned mp_eq_integer(mp_int *x, uintmax_t n);
|
||||
|
||||
/*
|
||||
* Take the minimum of two mp_ints, without using a conditional branch.
|
||||
* Take the minimum or maximum of two mp_ints, without using a
|
||||
* conditional branch.
|
||||
*/
|
||||
void mp_min_into(mp_int *r, mp_int *x, mp_int *y);
|
||||
void mp_max_into(mp_int *r, mp_int *x, mp_int *y);
|
||||
mp_int *mp_min(mp_int *x, mp_int *y);
|
||||
mp_int *mp_max(mp_int *x, mp_int *y);
|
||||
|
||||
/*
|
||||
* Diagnostic function. Writes out x in hex to the supplied stdio
|
||||
|
Reference in New Issue
Block a user