~ubuntu-branches/ubuntu/karmic/mysql-dfsg-5.1/karmic

« back to all changes in this revision

Viewing changes to mysys/my_getopt.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2009-02-10 16:42:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090210164205-ej41ocvm4z1s14nq
Tags: 5.1.31-1ubuntu1
* Merge from debian experimental, remaining changes: 
  - debian/mysql-server-5.1.config: ask for MySQL root password at priority
    high instead of medium so that the password prompt is seen on a default
    install. (LP: #319843)
  - debian/control: 
    + Don't build mysql-server, mysql-client, mysql-common and 
      libmysqlclient15-dev binary packages since they're still provided 
      by mysql-dfsg-5.0.
    + Rename libmysqlclient-dev package to libmysqlclient16-dev (LP: #316280).
      Make it conflict with libmysqlclient15-dev.
    + Make mysql-{client,server}-5.1 packages conflict and
      replace mysql-{client,server}-5.0, but not provide 
      mysql-{client,server}.
    + Depend on a specific version of mysql-common rather than the src 
      version of mysql-dfsg-5.1 since mysql-common is currently part of
      mysql-dfsg-5.0.
  - debian/rules: added -fno-strict-aliasing to CFLAGS to get
    around mysql testsuite build failures.
* debian/patches/92_ssl_test_cert.dpatch: certificate expiration in 
  test suite (LP: #323755).
* Dropped changes:
  - all of the changes made to support both 5.0 and 5.1 installed at the
    same time have been dropped now that amarok doesn't depend on
    mysql-server-5.1 anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
397
397
                                       my_progname, optp->name, optend);
398
398
              continue;
399
399
            }
400
 
            get_one_option(optp->id, optp,
401
 
                           *((my_bool*) value) ?
402
 
                           (char*) "1" : disabled_my_option);
 
400
            if (get_one_option(optp->id, optp,
 
401
                               *((my_bool*) value) ?
 
402
                               (char*) "1" : disabled_my_option))
 
403
              return EXIT_ARGUMENT_INVALID;
403
404
            continue;
404
405
          }
405
406
          argument= optend;
457
458
                  optp->arg_type == NO_ARG)
458
459
              {
459
460
                *((my_bool*) optp->value)= (my_bool) 1;
460
 
                get_one_option(optp->id, optp, argument);
 
461
                if (get_one_option(optp->id, optp, argument))
 
462
                  return EXIT_UNSPECIFIED_ERROR;
461
463
                continue;
462
464
              }
463
465
              else if (optp->arg_type == REQUIRED_ARG ||
476
478
                  {
477
479
                    if (optp->var_type == GET_BOOL)
478
480
                      *((my_bool*) optp->value)= (my_bool) 1;
479
 
                    get_one_option(optp->id, optp, argument);
 
481
                    if (get_one_option(optp->id, optp, argument))
 
482
                      return EXIT_UNSPECIFIED_ERROR;
480
483
                    continue;
481
484
                  }
482
485
                  /* Check if there are more arguments after this one */
501
504
                                         my_progname, argument, optp->name);
502
505
                return error;
503
506
              }
504
 
              get_one_option(optp->id, optp, argument);
 
507
              if (get_one_option(optp->id, optp, argument))
 
508
                return EXIT_UNSPECIFIED_ERROR;
505
509
              break;
506
510
            }
507
511
          }
524
528
                                 my_progname, argument, optp->name);
525
529
        return error;
526
530
      }
527
 
      get_one_option(optp->id, optp, argument);
 
531
      if (get_one_option(optp->id, optp, argument))
 
532
        return EXIT_UNSPECIFIED_ERROR;
528
533
 
529
534
      (*argc)--; /* option handled (short or long), decrease argument count */
530
535
    }
971
976
    *((my_bool*) variable)= (my_bool) value;
972
977
    break;
973
978
  case GET_INT:
974
 
    *((int*) variable)= (int) value;
 
979
    *((int*) variable)= (int) getopt_ll_limit_value((int) value, option, NULL);
975
980
    break;
976
 
  case GET_UINT:
977
981
  case GET_ENUM:
978
982
    *((uint*) variable)= (uint) value;
979
983
    break;
 
984
  case GET_UINT:
 
985
    *((uint*) variable)= (uint) getopt_ull_limit_value((uint) value, option, NULL);
 
986
    break;
980
987
  case GET_LONG:
981
 
    *((long*) variable)= (long) value;
 
988
    *((long*) variable)= (long) getopt_ll_limit_value((long) value, option, NULL);
982
989
    break;
983
990
  case GET_ULONG:
984
 
    *((ulong*) variable)= (ulong) value;
 
991
    *((ulong*) variable)= (ulong) getopt_ull_limit_value((ulong) value, option, NULL);
985
992
    break;
986
993
  case GET_LL:
987
 
    *((longlong*) variable)= (longlong) value;
 
994
    *((longlong*) variable)= (longlong) getopt_ll_limit_value((longlong) value, option, NULL);
988
995
    break;
989
996
  case GET_ULL:
990
997
  case GET_SET:
991
 
    *((ulonglong*) variable)=  (ulonglong) value;
 
998
    *((ulonglong*) variable)= (ulonglong) getopt_ull_limit_value((ulonglong) value, option, NULL);
992
999
    break;
993
1000
  case GET_DOUBLE:
994
1001
    *((double*) variable)=  (double) value;