~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_access.c

  • Committer: Monty Taylor
  • Date: 2008-07-05 19:00:59 UTC
  • mto: This revision was merged to the branch mainline in revision 63.
  • Revision ID: monty@inaugust.com-20080705190059-3vfbd3ebpmzaw5e5
Fixed unsigned long int, format specifiers and functions. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
#include "mysys_priv.h"
17
 
#include <mystrings/m_string.h>
 
17
#include <m_string.h>
18
18
 
19
19
/*
20
20
  List of file names that causes problem on windows
30
30
  "CON", "PRN", "AUX", "NUL",
31
31
  "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9",
32
32
  "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9",
33
 
  NULL
 
33
  NullS
34
34
};
35
35
 
 
36
#define MAX_RESERVED_NAME_LENGTH 6
 
37
 
36
38
 
37
39
/*
38
40
  Looks up a null-terminated string in a list,
52
54
  const char **name;
53
55
  for (name= list; *name; name++)
54
56
  {
55
 
    if (!my_strcasecmp(&my_charset_utf8_general_ci, *name, str))
 
57
    if (!my_strcasecmp(&my_charset_latin1, *name, str))
56
58
      return 1;
57
59
  }
58
60
  return 0;
107
109
 
108
110
int check_if_legal_tablename(const char *name)
109
111
{
110
 
  return((reserved_map[(unsigned char) name[0]] & 1) &&
111
 
              (reserved_map[(unsigned char) name[1]] & 2) &&
112
 
              (reserved_map[(unsigned char) name[2]] & 4) &&
 
112
  DBUG_ENTER("check_if_legal_tablename");
 
113
  DBUG_RETURN((reserved_map[(uchar) name[0]] & 1) &&
 
114
              (reserved_map[(uchar) name[1]] & 2) &&
 
115
              (reserved_map[(uchar) name[2]] & 4) &&
113
116
              str_list_find(&reserved_names[1], name));
114
117
}
115
118