xref: /aosp_15_r20/external/coreboot/payloads/libpayload/include/term.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* Public Domain Curses */
2 
3 /* $Id: term.h,v 1.16 2008/07/13 16:08:16 wmcbrine Exp $ */
4 
5 /* PDCurses doesn't operate with terminfo, but we need these functions for
6    compatibility, to allow some things (notably, interface libraries for
7    other languages) to be compiled. Anyone who tries to actually _use_
8    them will be disappointed, since they only return ERR. */
9 
10 #ifndef __PDCURSES_TERM_H__
11 #define __PDCURSES_TERM_H__ 1
12 
13 #include <curses.h>
14 
15 #if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
16 extern "C"
17 {
18 #endif
19 
20 typedef struct
21 {
22     const char *_termname;
23 } TERMINAL;
24 
25 #ifdef PDC_DLL_BUILD
26 # ifndef CURSES_LIBRARY
27 __declspec(dllimport)  TERMINAL *cur_term;
28 # else
29 __declspec(dllexport) extern TERMINAL *cur_term;
30 # endif
31 #else
32 extern TERMINAL *cur_term;
33 #endif
34 
35 int     del_curterm(TERMINAL *);
36 int     putp(const char *);
37 int     restartterm(const char *, int, int *);
38 TERMINAL *set_curterm(TERMINAL *);
39 int     setterm(const char *);
40 int     setupterm(const char *, int, int *);
41 int     tgetent(char *, const char *);
42 int     tgetflag(const char *);
43 int     tgetnum(const char *);
44 char   *tgetstr(const char *, char **);
45 char   *tgoto(const char *, int, int);
46 int     tigetflag(const char *);
47 int     tigetnum(const char *);
48 char   *tigetstr(const char *);
49 char   *tparm(const char *, long, long, long, long, long,
50               long, long, long, long);
51 int     tputs(const char *, int, int (*)(int));
52 
53 #if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
54 }
55 #endif
56 
57 #endif /* __PDCURSES_TERM_H__ */
58