Skip to content

Commit 8503e78

Browse files
nijtmanssjaeckel
authored andcommitted
Doc fixes: Using %lu/%ld formatter for int32_t is not portable across platforms.
1 parent df8c708 commit 8503e78

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/bn.tex

+4-3
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ \subsection{Int32 and Int64 Constants}
863863
/* set the number to 654321 (note this is bigger than 127) */
864864
mp_set_u32(&number, 654321);
865865
866-
printf("number == \%lu", mp_get_i32(&number));
866+
printf("number == \%" PRIi32, mp_get_i32(&number));
867867
868868
/* we're done with it. */
869869
mp_clear(&number);
@@ -894,6 +894,7 @@ \subsection{Long Constants - platform dependant}
894894
\begin{alltt}
895895
long mp_get_l (mp_int * a);
896896
unsigned long mp_get_ul (mp_int * a);
897+
unsigned long mp_get_magl (mp_int * a);
897898
\end{alltt}
898899

899900
This will return the least significant bits of the mp\_int $a$ that fit into a ``long''.
@@ -930,7 +931,7 @@ \subsection{Initialize and Setting Constants}
930931
\}
931932
932933
/* display */
933-
printf("Number1, Number2 == \%lu, \%lu",
934+
printf("Number1, Number2 == \%" PRIi32 ", \%" PRIi32,
934935
mp_get_i32(&number1), mp_get_i32(&number2));
935936
936937
/* clear */
@@ -1377,7 +1378,7 @@ \section{Multiplication}
13771378
\}
13781379
13791380
/* display */
1380-
printf("number1 * number2 == \%lu", mp_get_i32(&number1));
1381+
printf("number1 * number2 == \%" PRIi32, mp_get_i32(&number1));
13811382
13821383
/* free terms and return */
13831384
mp_clear_multi(&number1, &number2, NULL);

0 commit comments

Comments
 (0)