security/nss/lib/freebl/mpi/tests/mptest-1.c

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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

mercurial