~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/option.cc

  • Committer: Brian Aker
  • Date: 2010-12-17 00:08:06 UTC
  • mfrom: (2002.1.4 clean)
  • Revision ID: brian@tangent.org-20101217000806-fa6kmggjnhsl4q85
Rollup for field encapsulation, monty fix for bzrignore, and Andrew bug
fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
15
 
16
 
#include <config.h>
17
 
#include <drizzled/internal/my_sys.h>
 
16
#include "config.h"
 
17
#include "drizzled/internal/my_sys.h"
18
18
#include <drizzled/gettext.h>
19
19
 
20
 
#include <drizzled/internal/m_string.h>
21
 
#include <drizzled/internal/my_sys.h>
22
 
#include <drizzled/error.h>
23
 
#include <drizzled/option.h>
24
 
#include <drizzled/typelib.h>
 
20
#include "drizzled/internal/m_string.h"
 
21
#include "drizzled/internal/my_sys.h"
 
22
#include "drizzled/error.h"
 
23
#include "drizzled/option.h"
25
24
 
26
25
#include <stdio.h>
27
26
#include <stdlib.h>
644
643
            return EXIT_OUT_OF_MEMORY;
645
644
          break;
646
645
        case GET_ENUM:
647
 
          if (((*(int*)result_pos)= opts->typelib->find_type(argument, 2) - 1) < 0)
 
646
          if (((*(int*)result_pos)= find_type(argument, opts->typelib, 2) - 1) < 0)
648
647
            return EXIT_ARGUMENT_INVALID;
649
648
          break;
650
649
        case GET_SET:
651
 
          *((uint64_t*)result_pos)= opts->typelib->find_typeset(argument, &err);
 
650
          *((uint64_t*)result_pos)= find_typeset(argument, opts->typelib, &err);
652
651
          if (err)
653
652
            return EXIT_ARGUMENT_INVALID;
654
653
          break;
724
723
2.) Returns -1 if strings differ, 0 if they are equal
725
724
   */
726
725
 
727
 
  bool getopt_compare_strings(const char *s, const char *t,
 
726
  bool getopt_compare_strings(register const char *s, register const char *t,
728
727
      uint32_t length)
729
728
  {
730
729
    char const *end= s + length;
1235
1234
                if (!(bit & llvalue))
1236
1235
                  continue;
1237
1236
                llvalue&= ~bit;
1238
 
                printf( llvalue ? "%s," : "%s\n", optp->typelib->get_type(nr));
 
1237
                printf( llvalue ? "%s," : "%s\n", get_type(optp->typelib, nr));
1239
1238
              }
1240
1239
            break;
1241
1240
          case GET_ENUM:
1242
 
            printf("%s\n", optp->typelib->get_type(*(uint*) value));
 
1241
            printf("%s\n", get_type(optp->typelib, *(uint*) value));
1243
1242
            break;
1244
1243
          case GET_STR:
1245
1244
          case GET_STR_ALLOC:                    /* fall through */