X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=host%2Fgf256_table_gen.c;h=b3594116d95b78fb2260d19eb901fcf0ef3d452d;hb=206e5aa6d34ac3fb32bdf9e6affc153547e189d8;hp=0d55db48f44acaa66954151ae676f1166129f436;hpb=398d0518495db71641bb0676b716002ac0ffd5da;p=avr-crypto-lib.git diff --git a/host/gf256_table_gen.c b/host/gf256_table_gen.c index 0d55db4..b359411 100644 --- a/host/gf256_table_gen.c +++ b/host/gf256_table_gen.c @@ -1,6 +1,6 @@ /* gf256_table_gen.c */ /* - This file is part of the Crypto-avr-lib/microcrypt-lib. + This file is part of the AVR-Crypto-Lib. Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de) This program is free software: you can redistribute it and/or modify @@ -58,6 +58,7 @@ void print_help(void){ " -u max upper limit value for multiplication table (default: 255)\n" " -f formatstring string for formating the output of a singel multiplicxation\n" " -o file outputfile\n" +); } int main(int argc, char** argv){ @@ -99,7 +100,7 @@ int main(int argc, char** argv){ char** eptr; FILE* of = stdout; while(c!=-1){ - c = getopt_long(argc, argv,"cCbBdhoaApPr:l:u:f:", + c = getopt_long(argc, argv,"cCbBdh8aApPr:l:u:f:", long_options, &option_index); switch(c){ case 'c': print_header=1; break; @@ -135,13 +136,16 @@ int main(int argc, char** argv){ } break; case 'f': fmt = optarg; break; + case -1: break; case '?': default: + printf ("unknown option '%c' (%2.2X) !\n\t", c, c); print_help(); + return 0; break; } } - if(!reducer = ul_reducer&0xff){ + if(!(reducer = ul_reducer&0xff)){ fprintf(stderr, "You must specify a reductionpolynomial!\n", argv[i]); return -1; }