dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / lib / libcrypto / man / BN_set_negative.3
blob29cb2d95cfa79d5428200cc1afb3f33e93b11c99
1 .\"     $OpenBSD: BN_set_negative.3,v 1.3 2016/12/10 21:13:25 schwarze Exp $
2 .\"
3 .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
4 .\"
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
8 .\"
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .\"
17 .Dd $Mdocdate: December 10 2016 $
18 .Dt BN_SET_NEGATIVE 3
19 .Os
20 .Sh NAME
21 .Nm BN_set_negative ,
22 .Nm BN_is_negative
23 .Nd change and inspect the sign of a BIGNUM
24 .Sh SYNOPSIS
25 .Ft void
26 .Fo BN_set_negative
27 .Fa "BIGNUM *b"
28 .Fa "int n"
29 .Fc
30 .Ft int
31 .Fo BN_is_negative
32 .Fa "const BIGNUM *b"
33 .Fc
34 .Sh DESCRIPTION
35 .Fn BN_set_negative
36 sets
37 .Fa b
38 to negative if both
39 .Fa b
40 and
41 .Fa n
42 are non-zero, otherwise it sets it to positive.
43 .Pp
44 .Fn BN_is_negative
45 tests the sign of
46 .Fa b .
47 It is currently implemented as a macro.
48 .Sh RETURN VALUES
49 .Fn BN_is_negative
50 returns 1 if
51 .Fa b
52 is negative or 0 otherwise.
53 .Sh SEE ALSO
54 .Xr BN_add 3 ,
55 .Xr BN_new 3 ,
56 .Xr BN_set_bit 3 ,
57 .Xr BN_zero 3