1 /*
2 ** Copyright (C) 2002-2006 Christophe Kalt
3 **
4 ** This file is part of shmux
5 ** see the LICENSE file for details on your rights.
6 **
7 ** $Id$
8 */
9
10 #if !defined(_TERM_H_)
11 # define _TERM_H_
12
13 void term_init(int, int, int, int, int, int);
14 void term_size(void);
15 int tty_fd(void);
16 void tty_restore(void);
17 int term_togglemsg(void);
18 int term_toggledbg(void);
19 void sprint(char *, ...)
20 # if ( __GNUC__ == 2 && __GNUC_MINOR__ >= 5 ) || __GNUC__ >= 3
21 __attribute__((__format__(__printf__, 1, 2)))
22 # endif
23 ;
24 void uprint(char *, ...)
25 # if ( __GNUC__ == 2 && __GNUC_MINOR__ >= 5 ) || __GNUC__ >= 3
26 __attribute__((__format__(__printf__, 1, 2)))
27 # endif
28 ;
29 char *uprompt(char *, ...)
30 # if ( __GNUC__ == 2 && __GNUC_MINOR__ >= 5 ) || __GNUC__ >= 3
31 __attribute__((__format__(__printf__, 1, 2)))
32 # endif
33 ;
34 void iprint(char *, ...)
35 # if ( __GNUC__ == 2 && __GNUC_MINOR__ >= 5 ) || __GNUC__ >= 3
36 __attribute__((__format__(__printf__, 1, 2)))
37 # endif
38 ;
39 void dprint(char *, ...)
40 # if ( __GNUC__ == 2 && __GNUC_MINOR__ >= 5 ) || __GNUC__ >= 3
41 __attribute__((__format__(__printf__, 1, 2)))
42 # endif
43 ;
44 void eprint(char *, ...)
45 # if ( __GNUC__ == 2 && __GNUC_MINOR__ >= 5 ) || __GNUC__ >= 3
46 __attribute__((__format__(__printf__, 1, 2)))
47 # endif
48 ;
49
50 # define MSG_DEBUG '$'
51 # define MSG_STDOUT ':'
52 # define MSG_STDOUTTRUNC '+'
shmux_signal(sig)53 # define MSG_STDERR '!'
54 # define MSG_STDERRTRUNC '*'
55
56 void tprint(char *, char, char *, ...)
57 # if ( __GNUC__ == 2 && __GNUC_MINOR__ >= 5 ) || __GNUC__ >= 3
58 __attribute__((__format__(__printf__, 3, 4)))
59 # endif
60 ;
61
62 void nprint(char *, ...)
63 # if ( __GNUC__ == 2 && __GNUC_MINOR__ >= 5 ) || __GNUC__ >= 3
64 __attribute__((__format__(__printf__, 1, 2)))
65 # endif
66 ;
67
68 #endif
69