~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/option.cc

  • Committer: Lee Bieber
  • Date: 2011-02-09 21:35:27 UTC
  • mfrom: (2152.1.3 build)
  • Revision ID: kalebral@gmail.com-20110209213527-r209zc2yziiyh9zk
Merge Monty - Don't die on warnings in tarballs
Merge Olaf - TYPELIB instances need to be replaced with some STL or Boost datastructure
Merge Vijay - 715312: make test-dbqp should also run 'check'    

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include "drizzled/internal/my_sys.h"
22
22
#include "drizzled/error.h"
23
23
#include "drizzled/option.h"
 
24
#include "drizzled/typelib.h"
24
25
 
25
26
#include <stdio.h>
26
27
#include <stdlib.h>
643
644
            return EXIT_OUT_OF_MEMORY;
644
645
          break;
645
646
        case GET_ENUM:
646
 
          if (((*(int*)result_pos)= find_type(argument, opts->typelib, 2) - 1) < 0)
 
647
          if (((*(int*)result_pos)= opts->typelib->find_type(argument, 2) - 1) < 0)
647
648
            return EXIT_ARGUMENT_INVALID;
648
649
          break;
649
650
        case GET_SET:
650
 
          *((uint64_t*)result_pos)= find_typeset(argument, opts->typelib, &err);
 
651
          *((uint64_t*)result_pos)= opts->typelib->find_typeset(argument, &err);
651
652
          if (err)
652
653
            return EXIT_ARGUMENT_INVALID;
653
654
          break;
1234
1235
                if (!(bit & llvalue))
1235
1236
                  continue;
1236
1237
                llvalue&= ~bit;
1237
 
                printf( llvalue ? "%s," : "%s\n", get_type(optp->typelib, nr));
 
1238
                printf( llvalue ? "%s," : "%s\n", optp->typelib->get_type(nr));
1238
1239
              }
1239
1240
            break;
1240
1241
          case GET_ENUM:
1241
 
            printf("%s\n", get_type(optp->typelib, *(uint*) value));
 
1242
            printf("%s\n", optp->typelib->get_type(*(uint*) value));
1242
1243
            break;
1243
1244
          case GET_STR:
1244
1245
          case GET_STR_ALLOC:                    /* fall through */