werror.h 1.5 KB
Newer Older
Niels Möller's avatar
Niels Möller committed
1
2
/* werror.h
 *
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 *
 *
 * $Id$ */

/* lsh, an implementation of the ssh protocol
 *
 * Copyright (C) 1998 Niels Möller
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program 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
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Niels Möller's avatar
Niels Möller committed
24
25
26
27
28
 */

#ifndef LSH_ERROR_H_INCLUDED
#define LSH_ERROR_H_INCLUDED

Niels Möller's avatar
Niels Möller committed
29
30
#include "lsh_types.h"

Niels Möller's avatar
Niels Möller committed
31
32
#include "bignum.h"

33
34
/* Global variables */
extern int debug_flag;
Niels Möller's avatar
Niels Möller committed
35
extern int quiet_flag;
36
extern int verbose_flag;
Niels Möller's avatar
Niels Möller committed
37
38

void werror(char *format, ...) PRINTF_STYLE(1,2);
39
void debug(char *format, ...) PRINTF_STYLE(1,2);
40
void verbose(char *format, ...) PRINTF_STYLE(1,2);
41
42
43
44

/* For outputting data recieved from the other end */
void werror_safe(UINT32 length, UINT8 *msg);
void debug_safe(UINT32 length, UINT8 *msg);
45
void verbose_safe(UINT32 length, UINT8 *msg);
46

47
48
void werror_safe_utf8(UINT32 length, UINT8 *msg);

Niels Möller's avatar
Niels Möller committed
49
50
void fatal(char *format, ...) PRINTF_STYLE(1,2) NORETURN;

Niels Möller's avatar
Niels Möller committed
51
52
void werror_mpz(mpz_t n);
     
Niels Möller's avatar
Niels Möller committed
53
#endif /* LSH_ERROR_H_INCLUDED */