source: git/src/message.h @ ecbc6c18

RELEASE/1.1RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-datawalls-data-hanging-as-warning
Last change on this file since ecbc6c18 was ecbc6c18, checked in by Olly Betts <olly@…>, 14 years ago

src/: Update FSF address in licence notices.

git-svn-id: file:///home/survex-svn/survex/branches/survex-1_1@3417 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[106af12]1/* message.h
[9af1d7a]2 * Function prototypes for message.c
[b88b171]3 * Copyright (C) 1998-2003,2005 Olly Betts
[846746e]4 *
[89231c4]5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
[846746e]9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
[89231c4]12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 * GNU General Public License for more details.
[846746e]14 *
[89231c4]15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
[ecbc6c18]17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
[9af1d7a]18 */
19
20#ifndef MESSAGE_H /* only include once */
21#define MESSAGE_H
22
[8df22e9]23#ifdef __cplusplus
24extern "C" {
25#endif
26
[7f94ee7]27#include <stdarg.h>
28
[9af1d7a]29#include "osdepend.h"
30#include "osalloc.h"
31
[a420b49]32#define STDERR stdout
33
[f8e03f3]34#define CHARSET_BAD        -1
35#define CHARSET_USASCII     0
36#define CHARSET_ISO_8859_1  1
37#define CHARSET_DOSCP850    2
[2fdd67c]38//#define CHARSET_RISCOS31    3
[f8e03f3]39#define CHARSET_UTF8        4
40#define CHARSET_WINCP1252   5
41#define CHARSET_ISO_8859_15 6
[2fdd67c]42//#define CHARSET_DOSCP437    7
[f0a0b05]43#define CHARSET_ISO_8859_2  8
[4fa44e7]44#define CHARSET_WINCP1250   9
[6a4871e]45
[25ab06b]46extern int msg_warnings; /* keep track of how many warnings we've given */
47extern int msg_errors;   /* and how many (non-fatal) errors */
[a2f9d5c]48
[cf54765]49/* The language code - e.g. "en_GB" */
[25ab06b]50extern const char *msg_lang;
[cf54765]51/* If the language code has a country specific qualification, then this will
52 * be just the language code.  Otherwise it's NULL.  e.g. "en" */
[c0a9908]53extern const char *msg_lang2;
[f2a6ce4]54
[bdfe97f]55void msg_init(char *const *argv);
[9af1d7a]56
[25ab06b]57const char *msg_cfgpth(void);
[b88b171]58const char *msg_exepth(void);
[bdfe97f]59const char *msg_appname(void);
[9af1d7a]60
61/* Message may be overwritten by next call */
[25ab06b]62const char *msg(int en);
[9af1d7a]63/* Returns persistent copy of message */
[25ab06b]64const char *msgPerm(int en);
[9af1d7a]65/* Kill persistent copy of message */
[63dc4eb]66#define msgFree(S) (void)0
[a420b49]67
68void v_report(int severity, const char *fnm, int line, int en, va_list ap);
69
70void warning(int en, ...);
71void error(int en, ...);
72void fatalerror(int en, ...);
[9af1d7a]73
[a420b49]74void warning_in_file(const char *fnm, int line, int en, ...);
75void error_in_file(const char *fnm, int line, int en, ...);
76void fatalerror_in_file(const char *fnm, int line, int en, ...);
[9af1d7a]77
[a420b49]78int select_charset(int charset_code);
[9af1d7a]79
[8df22e9]80#ifdef __cplusplus
81}
82#endif
83
[9af1d7a]84#endif /* MESSAGE_H */
Note: See TracBrowser for help on using the repository browser.