~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mystrings/ctype.c

  • Committer: Andrey Hristov
  • Date: 2008-08-06 00:04:45 UTC
  • mto: (264.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 266.
  • Revision ID: ahristov@mysql.com-20080806000445-84urmltikgwk9v5d
Constify the usage of CHARSET_INFO almost to the last place in the code.
99% of the parameters are const CHARSET_INFO * const cs.
Wherever possible stack variables are also double consted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
310
310
  Check repertoire: detect pure ascii strings
311
311
*/
312
312
uint
313
 
my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong length)
 
313
my_string_repertoire(const CHARSET_INFO * const cs, const char *str, ulong length)
314
314
{
315
315
  const char *strend= str + length;
316
316
  if (cs->mbminlen == 1)
362
362
  to introduce new tricky character sets between 5.0 and 5.2.
363
363
*/
364
364
my_bool
365
 
my_charset_is_ascii_based(CHARSET_INFO *cs)
 
365
my_charset_is_ascii_based(const CHARSET_INFO * const cs)
366
366
{
367
367
  return 
368
368
    (cs->mbmaxlen == 1 && cs->tab_to_uni && cs->tab_to_uni['{'] == '{') ||
378
378
  and dynamic charsets loader in "mysqld".
379
379
*/
380
380
my_bool
381
 
my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs)
 
381
my_charset_is_8bit_pure_ascii(const CHARSET_INFO * const cs)
382
382
{
383
383
  size_t code;
384
384
  if (!cs->tab_to_uni)
398
398
  ascii on the range 0x00..0x7F.
399
399
*/
400
400
my_bool
401
 
my_charset_is_ascii_compatible(CHARSET_INFO *cs)
 
401
my_charset_is_ascii_compatible(const CHARSET_INFO * const cs)
402
402
{
403
403
  uint i;
404
404
  if (!cs->tab_to_uni)