wrc.h 2.02 KB
Newer Older
Alexandre Julliard's avatar
Alexandre Julliard committed
1 2 3 4 5
/*
 * Main definitions and externals
 *
 * Copyright 1998 Bertho A. Stultiens (BS)
 *
6 7 8 9 10 11 12 13 14 15 16 17
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * 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
Alexandre Julliard's avatar
Alexandre Julliard committed
19 20 21 22 23
 */

#ifndef __WRC_WRC_H
#define __WRC_WRC_H

24 25
#include "wrctypes.h"

Alexandre Julliard's avatar
Alexandre Julliard committed
26 27 28 29 30 31
/* From wrc.c */
extern int debuglevel;
#define DEBUGLEVEL_NONE		0x0000
#define DEBUGLEVEL_CHAT		0x0001
#define DEBUGLEVEL_DUMP		0x0002
#define DEBUGLEVEL_TRACE	0x0004
32 33 34
#define DEBUGLEVEL_PPMSG	0x0008
#define DEBUGLEVEL_PPLEX	0x0010
#define DEBUGLEVEL_PPTRACE	0x0020
Alexandre Julliard's avatar
Alexandre Julliard committed
35 36 37 38

extern int win32;
extern int extensions;
extern int pedantic;
39
extern int byteorder;
40 41
extern int preprocess_only;
extern int no_preprocess;
42
extern int utf8_input;
43
extern int check_utf8;
Alexandre Julliard's avatar
Alexandre Julliard committed
44 45

extern char *input_name;
46
extern char *cmdline;
47

48 49
extern const char *nlsdirs[];

50 51
extern int line_number;
extern int char_number;
Alexandre Julliard's avatar
Alexandre Julliard committed
52 53 54 55

extern resource_t *resource_top;
extern language_t *currentlanguage;

56
void verify_translations(resource_t *top);
57 58
void write_pot_file( const char *outname );
void write_po_files( const char *outname );
59
void add_translations( const char *po_dir );
60 61
void write_resfile(char *outname, resource_t *top);

62 63 64 65 66 67 68 69 70 71 72 73
static inline void set_location( location_t *loc )
{
    loc->file = input_name;
    loc->line = line_number;
    loc->col  = char_number;
}

static inline void print_location( const location_t *loc )
{
    if (loc->file) fprintf(stderr, "%s:%d:%d: ", loc->file, loc->line, loc->col );
}

Alexandre Julliard's avatar
Alexandre Julliard committed
74
#endif