Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/tools/wrc/wrc.h
4389 views
1
/*
2
* Main definitions and externals
3
*
4
* Copyright 1998 Bertho A. Stultiens (BS)
5
*
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Lesser General Public
8
* License as published by the Free Software Foundation; either
9
* version 2.1 of the License, or (at your option) any later version.
10
*
11
* This library 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 GNU
14
* Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public
17
* License along with this library; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19
*/
20
21
#ifndef __WRC_WRC_H
22
#define __WRC_WRC_H
23
24
#include "wrctypes.h"
25
26
/* From wrc.c */
27
extern int debuglevel;
28
#define DEBUGLEVEL_NONE 0x0000
29
#define DEBUGLEVEL_CHAT 0x0001
30
#define DEBUGLEVEL_DUMP 0x0002
31
#define DEBUGLEVEL_TRACE 0x0004
32
#define DEBUGLEVEL_PPMSG 0x0008
33
#define DEBUGLEVEL_PPLEX 0x0010
34
#define DEBUGLEVEL_PPTRACE 0x0020
35
36
extern int win32;
37
extern int extensions;
38
extern int pedantic;
39
extern int preprocess_only;
40
extern int no_preprocess;
41
extern int utf8_input;
42
extern int check_utf8;
43
44
extern const char *input_name;
45
extern const char *nlsdirs[];
46
47
extern int line_number;
48
extern int char_number;
49
50
extern resource_t *resource_top;
51
extern language_t currentlanguage;
52
53
void write_pot_file( const char *outname );
54
void write_po_files( const char *outname );
55
void add_translations( const char *po_dir );
56
void write_resfile(char *outname, resource_t *top);
57
58
static inline void set_location( location_t *loc )
59
{
60
loc->file = input_name;
61
loc->line = line_number;
62
loc->col = char_number;
63
}
64
65
static inline void print_location( const location_t *loc )
66
{
67
if (loc->file) fprintf(stderr, "%s:%d:%d: ", loc->file, loc->line, loc->col );
68
}
69
70
#endif
71
72