diff options
author | Kevin Ryde <user42@zip.com.au> | 2000-04-23 18:07:46 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2000-04-23 18:07:46 +0200 |
commit | e9cb85d8301963e1bc5e6dd60a8b5f5f31c218c4 (patch) | |
tree | 67fafc10cb14e5583822551fb39fa5c6e9d57e4a /INSTALL | |
parent | 93a631eed82709b36754b9dc4b1e9f123f7f419a (diff) | |
download | gmp-e9cb85d8301963e1bc5e6dd60a8b5f5f31c218c4.tar.gz |
* INSTALL: Add arg count check to example programs.
Diffstat (limited to 'INSTALL')
-rw-r--r-- | INSTALL | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -33,6 +33,9 @@ command line, multiplies them, and prints the result to stdout. { mpz_t a, b, p; + /* Expect 2 command line parameters */ + if (argc < 3) exit (1); + /* Initialize variables */ mpz_init (a); mpz_init (b); @@ -70,6 +73,9 @@ MP user: { mpz_t a, b, p; + /* Expect 2 command line parameters */ + if (argc < 3) exit (1); + /* Initialize and assign a and b from base 10 strings in argv */ mpz_init_set_str (a, argv[1], 10); mpz_init_set_str (b, argv[2], 10); |