1 /* xgettext C/C++/ObjectiveC backend.
2 Copyright (C) 2001-2003, 2006, 2009, 2015 Free Software Foundation,
4 Written by Bruno Haible <haible@clisp.cons.org>, 2001.
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 3 of the License, or
9 (at your option) any later version.
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.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>. */
31 #define EXTENSIONS_C \
42 { "m", "ObjectiveC" }, \
47 &formatstring_c, NULL, \
49 { "C++", extract_cxx, \
51 &formatstring_c, NULL, \
53 { "ObjectiveC", extract_objc, \
55 &formatstring_c, &formatstring_objc, \
57 { "GCC-source", extract_c, \
58 &flag_table_gcc_internal, \
59 &formatstring_gcc_internal, &formatstring_gfc_internal, \
62 /* Scan a C file and add its translatable strings to mdlp. */
63 extern void extract_c (FILE *fp, const char *real_filename,
64 const char *logical_filename,
65 flag_context_list_table_ty *flag_table,
66 msgdomain_list_ty *mdlp);
67 /* Scan a C++ file and add its translatable strings to mdlp. */
68 extern void extract_cxx (FILE *fp, const char *real_filename,
69 const char *logical_filename,
70 flag_context_list_table_ty *flag_table,
71 msgdomain_list_ty *mdlp);
72 /* Scan an ObjectiveC file and add its translatable strings to mdlp. */
73 extern void extract_objc (FILE *fp, const char *real_filename,
74 const char *logical_filename,
75 flag_context_list_table_ty *flag_table,
76 msgdomain_list_ty *mdlp);
79 /* Handling of options specific to this language. */
81 extern void x_c_extract_all (void);
83 extern void x_c_keyword (const char *name);
84 extern void x_objc_keyword (const char *name);
86 extern void x_c_trigraphs (void);
88 extern void activate_additional_keywords_kde (void);
90 extern void init_flag_table_c (void);
91 extern void init_flag_table_objc (void);
92 extern void init_flag_table_gcc_internal (void);
93 extern void init_flag_table_kde (void);
96 extern struct literalstring_parser literalstring_c;