~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mystrings/m_ctype.h

  • Committer: Eric Herman
  • Date: 2008-12-06 19:42:46 UTC
  • mto: (656.1.6 devel)
  • mto: This revision was merged to the branch mainline in revision 665.
  • Revision ID: eric@mysql.com-20081206194246-5cdexuu81i366eek
removed trailing whitespace with simple script:

for file in $(find . -name "*.c") $(find . -name "*.cc") $(find . -name "*.h"); do ruby -pe 'gsub(/\s+$/, $/)' < $file > $file.out; mv $file.out $file; done;

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
#define MY_CS_UNICODE   128    /* is a charset is full unicode   */
89
89
#define MY_CS_READY     256    /* if a charset is initialized    */
90
90
#define MY_CS_AVAILABLE 512    /* If either compiled-in or loaded*/
91
 
#define MY_CS_CSSORT    1024   /* if case sensitive sort order   */     
92
 
#define MY_CS_HIDDEN    2048   /* don't display in SHOW          */     
 
91
#define MY_CS_CSSORT    1024   /* if case sensitive sort order   */
 
92
#define MY_CS_HIDDEN    2048   /* don't display in SHOW          */
93
93
#define MY_CS_PUREASCII 4096   /* if a charset is pure ascii     */
94
94
#define MY_CS_NONASCII  8192   /* if not ASCII-compatible        */
95
95
#define MY_CHARSET_UNDEFINED 0
148
148
 
149
149
enum my_lex_states
150
150
{
151
 
  MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT, 
 
151
  MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT,
152
152
  MY_LEX_IDENT_SEP, MY_LEX_IDENT_START,
153
153
  MY_LEX_REAL, MY_LEX_HEX_NUMBER, MY_LEX_BIN_NUMBER,
154
154
  MY_LEX_CMP_OP, MY_LEX_LONG_CMP_OP, MY_LEX_STRING, MY_LEX_COMMENT, MY_LEX_END,
155
155
  MY_LEX_OPERATOR_OR_IDENT, MY_LEX_NUMBER_IDENT, MY_LEX_INT_OR_REAL,
156
 
  MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE, 
157
 
  MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON, 
158
 
  MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP, 
 
156
  MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE,
 
157
  MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON,
 
158
  MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP,
159
159
  MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR,
160
160
  MY_LEX_IDENT_OR_KEYWORD,
161
161
  MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN,
191
191
                     int escape,int w_one, int w_many);
192
192
 
193
193
  int  (*strcasecmp)(const struct charset_info_st * const, const char *, const char *);
194
 
  
 
194
 
195
195
  uint32_t (*instr)(const struct charset_info_st * const,
196
196
                const char *b, size_t b_length,
197
197
                const char *s, size_t s_length,
198
198
                my_match_t *match, uint32_t nmatch);
199
 
  
 
199
 
200
200
  /* Hash calculation */
201
201
  void (*hash_sort)(const struct charset_info_st *cs, const unsigned char *key, size_t len,
202
 
                    uint32_t *nr1, uint32_t *nr2); 
 
202
                    uint32_t *nr1, uint32_t *nr2);
203
203
  bool (*propagate)(const struct charset_info_st *cs, const unsigned char *str, size_t len);
204
204
} MY_COLLATION_HANDLER;
205
205
 
232
232
                             size_t nchars, int *error);
233
233
  size_t  (*lengthsp)(const struct charset_info_st * const, const char *ptr, size_t length);
234
234
  size_t  (*numcells)(const struct charset_info_st * const, const char *b, const char *e);
235
 
  
 
235
 
236
236
  /* Unicode conversion */
237
237
  my_charset_conv_mb_wc mb_wc;
238
238
  my_charset_conv_wc_mb wc_mb;
240
240
  /* CTYPE scanner */
241
241
  int (*ctype)(const struct charset_info_st *cs, int *ctype,
242
242
               const unsigned char *s, const unsigned char *e);
243
 
  
 
243
 
244
244
  /* Functions for case and sort conversion */
245
245
  size_t  (*caseup_str)(const struct charset_info_st * const, char *);
246
246
  size_t  (*casedn_str)(const struct charset_info_st * const, char *);
256
256
                          int radix, long int val);
257
257
  size_t (*int64_t10_to_str)(const struct charset_info_st * const, char *to, size_t n,
258
258
                              int radix, int64_t val);
259
 
  
 
259
 
260
260
  void (*fill)(const struct charset_info_st * const, char *to, size_t len, int fill);
261
 
  
 
261
 
262
262
  /* String-to-number conversion routines */
263
263
  long        (*strntol)(const struct charset_info_st * const, const char *s, size_t l,
264
264
                         int base, char **e, int *err);
317
317
  bool   escape_with_backslash_is_dangerous;
318
318
  unsigned char     levels_for_compare;
319
319
  unsigned char     levels_for_order;
320
 
  
 
320
 
321
321
  MY_CHARSET_HANDLER *cset;
322
322
  MY_COLLATION_HANDLER *coll;
323
 
  
 
323
 
324
324
} CHARSET_INFO;
325
325
 
326
326
uint32_t strconvert(const CHARSET_INFO *from_cs, const char *from,
363
363
 
364
364
extern void my_hash_sort_simple(const CHARSET_INFO * const cs,
365
365
                                const unsigned char *key, size_t len,
366
 
                                uint32_t *nr1, uint32_t *nr2); 
 
366
                                uint32_t *nr1, uint32_t *nr2);
367
367
 
368
368
extern size_t my_lengthsp_8bit(const CHARSET_INFO * const cs, const char *ptr, size_t length);
369
369
 
412
412
 
413
413
int64_t my_strtoll10_8bit(const CHARSET_INFO * const cs,
414
414
                           const char *nptr, char **endptr, int *error);
415
 
int64_t my_strtoll10_ucs2(CHARSET_INFO *cs, 
 
415
int64_t my_strtoll10_ucs2(CHARSET_INFO *cs,
416
416
                           const char *nptr, char **endptr, int *error);
417
417
 
418
418
uint64_t my_strntoull10rnd_8bit(const CHARSET_INFO * const cs,
419
419
                                 const char *str, size_t length, int
420
420
                                 unsigned_fl, char **endptr, int *error);
421
 
uint64_t my_strntoull10rnd_ucs2(CHARSET_INFO *cs, 
 
421
uint64_t my_strntoull10rnd_ucs2(CHARSET_INFO *cs,
422
422
                                 const char *str, size_t length,
423
423
                                 int unsigned_fl, char **endptr, int *error);
424
424
 
576
576
my_strnxfrmlen_utf8mb3(const CHARSET_INFO * const cs, size_t len);
577
577
 
578
578
size_t my_strnxfrm_utf8mb3_bin(const CHARSET_INFO * const cs,
579
 
                               unsigned char *dst, size_t dstlen, 
 
579
                               unsigned char *dst, size_t dstlen,
580
580
                               uint32_t nweights, const unsigned char *src,
581
581
                               size_t srclen, uint32_t flags);
582
582
/*
647
647
 
648
648
unsigned int
649
649
my_mbcharlen_utf8mb3(const CHARSET_INFO * const, uint32_t c);
650
 
 
 
650
 
651
651
unsigned int my_ismbchar_utf8mb4(const CHARSET_INFO * const cs,                                  const char *b, const char *e);
652
652
unsigned int my_mbcharlen_utf8mb4(const CHARSET_INFO * const, uint32_t c);
653
653
 
712
712
                          const unsigned char *s, size_t slen,
713
713
                          uint32_t *n1, uint32_t *n2);
714
714
 
715
 
size_t my_strnxfrm_any_uca(const CHARSET_INFO * const cs,       
 
715
size_t my_strnxfrm_any_uca(const CHARSET_INFO * const cs,
716
716
                           unsigned char *dst, size_t dstlen, uint32_t nweights,
717
717
                           const unsigned char *src, size_t srclen,
718
718
                           uint32_t flags);
727
727
                          const unsigned char *t, size_t tlen,
728
728
                          bool t_is_prefix);
729
729
int my_strnncollsp_8bit_bin(const CHARSET_INFO * const,
730
 
                            const unsigned char *a, size_t a_length,       
 
730
                            const unsigned char *a, size_t a_length,
731
731
                            const unsigned char *b, size_t b_length,
732
732
                            bool diff_if_only_endspace_difference);
733
733
size_t my_case_str_bin(const CHARSET_INFO * const, char *);