/* $Id$ */ /* * Cantus Tag Editor * Copyright © 2002-2004 by Samuel Abels * Copyright © 2007 by Tim Huetz * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see **/ /* * The main part of this sourcefile was written by Håvard Kvålen and * was simplyfied by Samuel Abels. * * Copyright © 1999-2001 Håvard Kvålen **/ #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif /* * Standard gettext macros. */ #ifdef ENABLE_NLS # include # define _(String) gettext (String) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define N_(String) (String) #endif #ifndef DLL_H #define DLL_H typedef struct DLL_s { void *prev; void *data; void *next; } DLL; #endif #ifndef __CHARSET_H__ #define __CHARSET_H__ /*************** * Declaration * ***************/ typedef struct { char *charset_title; char *charset_name; } CharsetInfo; /* translated charset titles */ extern const CharsetInfo charset_trans_array[]; /************** * Prototypes * **************/ char *get_current_charset(void); char* convert_to_utf8 (const char *string); char* convert_from_utf8 (const char *string); char *convert_string_to(const char *string, const char *encoding); char *convert_string_from(const char *string, const char *encoding); char *convert_string(const char *string, const char *from, const char *to); char* convert_from_file_to_user (const char *string); char* convert_from_user_to_file (const char *string); DLL *Charset_Create_List (void); char *Charset_Get_Name_From_Title (char *charset_title); char *Charset_Get_Title_From_Name (char *charset_name); short int test_conversion_charset (char *from, char *to); #endif /* __CHARSET_H__ */