~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_access.c

  • Committer: Brian Aker
  • Date: 2008-11-04 15:39:09 UTC
  • mfrom: (575.1.2 devel)
  • Revision ID: brian@tangent.org-20081104153909-c72hn65udxs1ccal
Merge of Monty's work

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
  NullS
 
33
  NULL
34
34
};
35
35
 
36
 
#define MAX_RESERVED_NAME_LENGTH 6
37
 
 
38
36
 
39
37
/*
40
38
  Looks up a null-terminated string in a list,
109
107
 
110
108
int check_if_legal_tablename(const char *name)
111
109
{
112
 
  return((reserved_map[(uchar) name[0]] & 1) &&
113
 
              (reserved_map[(uchar) name[1]] & 2) &&
114
 
              (reserved_map[(uchar) name[2]] & 4) &&
 
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) &&
115
113
              str_list_find(&reserved_names[1], name));
116
114
}
117
115