~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/charset.cc

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
15
 
16
16
#include "config.h"
17
17
 
22
22
#include <drizzled/configmake.h>
23
23
#include <vector>
24
24
 
 
25
#include "drizzled/visibility.h"
 
26
 
25
27
using namespace std;
26
28
 
27
29
namespace drizzled
56
58
       cs < all_charsets+array_elements(all_charsets)-1 ;
57
59
       cs++)
58
60
  {
59
 
    if ( cs[0] && cs[0]->name &&
60
 
         !my_strcasecmp(&my_charset_utf8_general_ci, cs[0]->name, name))
 
61
    if ( cs[0] && cs[0]->name && !my_strcasecmp(&my_charset_utf8_general_ci, cs[0]->name, name))
 
62
    {
61
63
      return cs[0]->number;
 
64
    }
62
65
  }
63
66
  return 0;
64
67
}
128
131
 
129
132
static bool charset_initialized= false;
130
133
 
131
 
CHARSET_INFO *all_charsets[256];
132
 
const CHARSET_INFO *default_charset_info = &my_charset_utf8_general_ci;
 
134
DRIZZLED_API CHARSET_INFO *all_charsets[256];
 
135
const DRIZZLED_API CHARSET_INFO *default_charset_info = &my_charset_utf8_general_ci;
133
136
 
134
137
void add_compiled_collation(CHARSET_INFO * cs)
135
138
{
213
216
       cs < all_charsets+array_elements(all_charsets)-1 ;
214
217
       cs++)
215
218
  {
216
 
    if ( cs[0] && cs[0]->csname && (cs[0]->state & cs_flags) &&
217
 
         !my_strcasecmp(&my_charset_utf8_general_ci, cs[0]->csname, charset_name))
 
219
    if ( cs[0] && cs[0]->csname && (cs[0]->state & cs_flags) && !my_strcasecmp(&my_charset_utf8_general_ci, cs[0]->csname, charset_name))
218
220
      return cs[0]->number;
219
221
  }
220
222
  return 0;