Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* |
michael@0 | 2 | * Simple test driver for MPI library |
michael@0 | 3 | * |
michael@0 | 4 | * Test 1: Simple input test (drives single-digit multiply and add, |
michael@0 | 5 | * as well as I/O routines) |
michael@0 | 6 | * |
michael@0 | 7 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 8 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 9 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 10 | |
michael@0 | 11 | #include <stdio.h> |
michael@0 | 12 | #include <stdlib.h> |
michael@0 | 13 | #include <string.h> |
michael@0 | 14 | #include <ctype.h> |
michael@0 | 15 | #include <limits.h> |
michael@0 | 16 | |
michael@0 | 17 | #ifdef MAC_CW_SIOUX |
michael@0 | 18 | #include <console.h> |
michael@0 | 19 | #endif |
michael@0 | 20 | |
michael@0 | 21 | #include "mpi.h" |
michael@0 | 22 | |
michael@0 | 23 | int main(int argc, char *argv[]) |
michael@0 | 24 | { |
michael@0 | 25 | int ix; |
michael@0 | 26 | mp_int mp; |
michael@0 | 27 | |
michael@0 | 28 | #ifdef MAC_CW_SIOUX |
michael@0 | 29 | argc = ccommand(&argv); |
michael@0 | 30 | #endif |
michael@0 | 31 | |
michael@0 | 32 | mp_init(&mp); |
michael@0 | 33 | |
michael@0 | 34 | for(ix = 1; ix < argc; ix++) { |
michael@0 | 35 | mp_read_radix(&mp, argv[ix], 10); |
michael@0 | 36 | mp_print(&mp, stdout); |
michael@0 | 37 | fputc('\n', stdout); |
michael@0 | 38 | } |
michael@0 | 39 | |
michael@0 | 40 | mp_clear(&mp); |
michael@0 | 41 | return 0; |
michael@0 | 42 | } |