lotto.c
changeset 85 9568a180fc43
parent 77 49e0babccb23
equal deleted inserted replaced
84:f59d8a8e786f 85:9568a180fc43
   157     verbose = wide = 0;
   157     verbose = wide = 0;
   158     end = 49;
   158     end = 49;
   159     num = 6;
   159     num = 6;
   160     max = ONESECOND;
   160     max = ONESECOND;
   161 
   161 
   162     while ((i = getopt (argc, argv, "m:e:n:vwh")) >= 0) {
   162     struct option options[] = {
       
   163         {"max", 1, 0, 'm'},
       
   164         {"end", 1, 0, 'e'},
       
   165         {"numbers", 1, 0, 'n'},
       
   166         {"verbose", 0, 0, 'v'},
       
   167         {"wide", 0, 0, 'w'},
       
   168         {"help", 0, 0, 'h'},
       
   169     };
       
   170 
       
   171     while ((i = getopt_long_only (argc, argv, "m:e:n:vwh", options, NULL)) != -1) {
   163         switch (i) {
   172         switch (i) {
   164         case 'm':
   173         case 'm':
   165             max = atol (optarg);
   174             max = atol (optarg);
   166             break;
   175             break;
   167         case 'e':
   176         case 'e':