~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to client/drizzle.cc

  • Committer: Brian Aker
  • Date: 2008-10-06 05:57:49 UTC
  • Revision ID: brian@tangent.org-20081006055749-svg700gciuqi0zu1
Remove all of uchar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1686
1686
        you save the file using "Unicode UTF-8" format.
1687
1687
      */
1688
1688
      if (!line_number &&
1689
 
          (uchar) line[0] == 0xEF &&
1690
 
          (uchar) line[1] == 0xBB &&
1691
 
          (uchar) line[2] == 0xBF)
 
1689
          (unsigned char) line[0] == 0xEF &&
 
1690
          (unsigned char) line[1] == 0xBB &&
 
1691
          (unsigned char) line[2] == 0xBF)
1692
1692
        line+= 3;
1693
1693
      line_number++;
1694
1694
      if (!glob_buffer->empty())
1782
1782
    if (strstr(name, "\\g") || (strstr(name, delimiter) &&
1783
1783
                                !(strlen(name) >= 9 &&
1784
1784
                                  !my_strnncoll(charset_info,
1785
 
                                                (uchar*) name, 9,
1786
 
                                                (const uchar*) "delimiter",
 
1785
                                                (unsigned char*) name, 9,
 
1786
                                                (const unsigned char*) "delimiter",
1787
1787
                                                9))))
1788
1788
      return((COMMANDS *) 0);
1789
1789
    if ((end=strcont(name," \t")))
1801
1801
  for (uint i= 0; commands[i].name; i++)
1802
1802
  {
1803
1803
    if (commands[i].func &&
1804
 
        ((name && !my_strnncoll(charset_info,(const uchar*)name,len, (const uchar*)commands[i].name,len) && !commands[i].name[len] && (!end || (end && commands[i].takes_params))) || (!name && commands[i].cmd_char == cmd_char)))
 
1804
        ((name && !my_strnncoll(charset_info,(const unsigned char*)name,len, (const unsigned char*)commands[i].name,len) && !commands[i].name[len] && (!end || (end && commands[i].takes_params))) || (!name && commands[i].cmd_char == cmd_char)))
1805
1805
    {
1806
1806
      return(&commands[i]);
1807
1807
    }
1813
1813
static bool add_line(string *buffer, char *line, char *in_string,
1814
1814
                        bool *ml_comment)
1815
1815
{
1816
 
  uchar inchar;
 
1816
  unsigned char inchar;
1817
1817
  char buff[80], *pos, *out;
1818
1818
  COMMANDS *com;
1819
1819
  bool need_space= 0;
1826
1826
    add_history(line);
1827
1827
  char *end_of_line=line+(uint) strlen(line);
1828
1828
 
1829
 
  for (pos=out=line ; (inchar= (uchar) *pos) ; pos++)
 
1829
  for (pos=out=line ; (inchar= (unsigned char) *pos) ; pos++)
1830
1830
  {
1831
1831
    if (!preserve_comments)
1832
1832
    {
1858
1858
    {
1859
1859
      // Found possbile one character command like \c
1860
1860
 
1861
 
      if (!(inchar = (uchar) *++pos))
 
1861
      if (!(inchar = (unsigned char) *++pos))
1862
1862
        break;        // readline adds one '\'
1863
1863
      if (*in_string || inchar == 'N')  // \N is short for NULL
1864
1864
      {          // Don't allow commands in string
1915
1915
    }
1916
1916
    else if (!*ml_comment && !*in_string &&
1917
1917
             (end_of_line - pos) >= 10 &&
1918
 
             !my_strnncoll(charset_info, (uchar*) pos, 10,
1919
 
                           (const uchar*) "delimiter ", 10))
 
1918
             !my_strnncoll(charset_info, (unsigned char*) pos, 10,
 
1919
                           (const unsigned char*) "delimiter ", 10))
1920
1920
    {
1921
1921
      // Flush previously accepted characters
1922
1922
      if (out != line)