~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/gen_lex_hash.cc

Merged build changes from Antony.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
*/
78
78
 
79
79
#define NO_YACC_SYMBOLS
80
 
#include "my_global.h"
81
 
#include "my_sys.h"
82
 
#include "m_string.h"
 
80
#include "global.h"
 
81
#include <mysys/my_sys.h>
 
82
#include <mystrings/m_string.h>
83
83
#ifndef __GNU_LIBRARY__
84
84
#define __GNU_LIBRARY__                         // Skip warnings in getopt.h
85
85
#endif
86
 
#include <my_getopt.h>
87
 
#include "drizzle_version.h"
 
86
#include <mysys/my_getopt.h>
 
87
#include <drizzled/version.h>
88
88
#include "lex.h"
89
89
 
90
90
const char *default_dbug_option="d:t:o,/tmp/gen_lex_hash.trace";
261
261
                                     st->first_char == 0 ? 0 : st->last_char);
262
262
  if (st->first_char == -1)
263
263
  {
264
 
    hash_map[size_hash_map-2]= ((unsigned int)(int16)st->iresult)&255;
265
 
    hash_map[size_hash_map-1]= ((unsigned int)(int16)st->iresult)>>8;
 
264
    hash_map[size_hash_map-2]= ((unsigned int)(int16_t)st->iresult)&255;
 
265
    hash_map[size_hash_map-1]= ((unsigned int)(int16_t)st->iresult)>>8;
266
266
  }
267
267
  else if (st->first_char == 0)
268
268
  {
269
 
    hash_map[size_hash_map-2]= ((unsigned int)(int16)array_elements_func(symbols))&255;
270
 
    hash_map[size_hash_map-1]= ((unsigned int)(int16)array_elements(symbols))>>8;
 
269
    hash_map[size_hash_map-2]= ((unsigned int)(int16_t)array_elements_func(symbols))&255;
 
270
    hash_map[size_hash_map-1]= ((unsigned int)(int16_t)array_elements(symbols))>>8;
271
271
  }
272
272
}
273
273
 
497
497
  if (function){\n\
498
498
    if (len>sql_functions_max_len) return 0;\n\
499
499
    hash_map= sql_functions_map;\n\
500
 
    register uint32 cur_struct= uint4korr(hash_map+((len-1)*4));\n\
 
500
    register uint32_t cur_struct= uint4korr(hash_map+((len-1)*4));\n\
501
501
\n\
502
502
    for (;;){\n\
503
503
      register uchar first_char= (uchar)cur_struct;\n\
504
504
\n\
505
505
      if (first_char == 0)\n\
506
506
      {\n\
507
 
        register int16 ires= (int16)(cur_struct>>16);\n\
 
507
        register int16_t ires= (int16_t)(cur_struct>>16);\n\
508
508
        if (ires==array_elements(symbols)) return 0;\n\
509
509
        register SYMBOL *res;\n\
510
510
        if (ires>=0) \n\
522
522
\n\
523
523
      cur_struct>>=8;\n\
524
524
      cur_struct= uint4korr(hash_map+\n\
525
 
                        (((uint16)cur_struct + cur_char - first_char)*4));\n\
 
525
                        (((uint16_t)cur_struct + cur_char - first_char)*4));\n\
526
526
      cur_str++;\n\
527
527
    }\n"
528
528
);
531
531
  }else{\n\
532
532
    if (len>symbols_max_len) return 0;\n\
533
533
    hash_map= symbols_map;\n\
534
 
    register uint32 cur_struct= uint4korr(hash_map+((len-1)*4));\n\
 
534
    register uint32_t cur_struct= uint4korr(hash_map+((len-1)*4));\n\
535
535
\n\
536
536
    for (;;){\n\
537
537
      register uchar first_char= (uchar)cur_struct;\n\
538
538
\n\
539
539
      if (first_char==0){\n\
540
 
        register int16 ires= (int16)(cur_struct>>16);\n\
 
540
        register int16_t ires= (int16_t)(cur_struct>>16);\n\
541
541
        if (ires==array_elements(symbols)) return 0;\n\
542
542
        register SYMBOL *res= symbols+ires;\n\
543
543
        register uint count= cur_str-s;\n\
551
551
\n\
552
552
      cur_struct>>=8;\n\
553
553
      cur_struct= uint4korr(hash_map+\n\
554
 
                        (((uint16)cur_struct + cur_char - first_char)*4));\n\
 
554
                        (((uint16_t)cur_struct + cur_char - first_char)*4));\n\
555
555
      cur_str++;\n\
556
556
    }\n\
557
557
  }\n\