1 /*
2 * latexencodings.h
3 *
4 * Copyright 2008-2012 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 */
21
22 #include <gtk/gtk.h>
23 #include "latex.h"
24 #include "encodings.h"
25 #include "latexencodings.h"
26
27 LaTeXEncodings latex_encodings[LATEX_ENCODINGS_MAX];
28
29 #define fill(Charset, Name, LaTeX, GeanyEnc) \
30 latex_encodings[Charset].charset = Charset; \
31 latex_encodings[Charset].name = Name; \
32 latex_encodings[Charset].latex = LaTeX; \
33 latex_encodings[Charset].geany_enc = GeanyEnc;
34
glatex_init_encodings_latex(void)35 void glatex_init_encodings_latex(void)
36 {
37 fill(LATEX_ENCODING_UTF_8, _("UTF-8"), "utf8", GEANY_ENCODING_UTF_8);
38 fill(LATEX_ENCODING_ASCII, _("US-ASCII"), "ascii", GEANY_ENCODING_ISO_8859_1);
39 fill(LATEX_ENCODING_ISO_8859_1, _("ISO-8859-1 (Latin-1)"), "latin1",
40 GEANY_ENCODING_ISO_8859_1);
41 fill(LATEX_ENCODING_ISO_8859_2, _("ISO-8859-2 (Latin-2)"), "latin2",
42 GEANY_ENCODING_ISO_8859_2);
43 fill(LATEX_ENCODING_ISO_8859_3, _("ISO-8859-3 (Latin-3)"), "latin3",
44 GEANY_ENCODING_ISO_8859_3);
45 fill(LATEX_ENCODING_ISO_8859_4, _("ISO-8859-4 (Latin-4)"), "latin4",
46 GEANY_ENCODING_ISO_8859_4);
47 fill(LATEX_ENCODING_ISO_8859_5, _("ISO-8859-5 (Latin-5)"), "latin5",
48 GEANY_ENCODING_ISO_8859_5);
49 fill(LATEX_ENCODING_ISO_8859_9, _("ISO-8859-9 (Latin-9)"), "latin9",
50 GEANY_ENCODING_ISO_8859_9);
51 fill(LATEX_ENCODING_ISO_8859_10, _("ISO-8859-10 (Latin-10)"), "latin10",
52 GEANY_ENCODING_ISO_8859_10);
53 fill(LATEX_ENCODING_IBM_850, _("IBM 850 code page"), "cp850",
54 GEANY_ENCODING_IBM_850);
55 fill(LATEX_ENCODING_IBM_852, _("IBM 852 code page"), "cp852",
56 GEANY_ENCODING_IBM_852);
57 fill(LATEX_ENCODING_NONE, _("Don't set any encoding"), NULL,
58 GEANY_ENCODING_NONE);
59 }
60