mirror of
https://github.com/irssi/irssi.git
synced 2026-08-08 19:30:15 +02:00
include curses.h when needed
This commit is contained in:
parent
fca3e83e68
commit
7bac5eb762
3 changed files with 31 additions and 4 deletions
|
|
@ -31,6 +31,9 @@
|
|||
#include <stdio.h>
|
||||
|
||||
#ifdef HAVE_TERM_H
|
||||
#ifdef NEED_CURSES_H
|
||||
#include <curses.h>
|
||||
#endif
|
||||
#include <term.h>
|
||||
#else
|
||||
/* TODO: This needs arguments, starting with C2X. */
|
||||
|
|
@ -40,14 +43,13 @@ int tputs();
|
|||
/* returns number of characters in the beginning of the buffer being a
|
||||
a single character, or -1 if more input is needed. The character will be
|
||||
saved in result */
|
||||
typedef int (*TERM_INPUT_FUNC)(const unsigned char *buffer, int size,
|
||||
unichar *result);
|
||||
typedef int (*TERM_INPUT_FUNC)(const unsigned char *buffer, int size, unichar *result);
|
||||
|
||||
struct _TERM_WINDOW {
|
||||
/* Terminal to use for window */
|
||||
/* Terminal to use for window */
|
||||
TERM_REC *term;
|
||||
|
||||
/* Area for window in terminal */
|
||||
/* Area for window in terminal */
|
||||
int x, y;
|
||||
int width, height;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@ inline static int term_putchar(int c)
|
|||
}
|
||||
|
||||
#ifdef HAVE_TERM_H
|
||||
#ifdef NEED_CURSES_H
|
||||
#include <curses.h>
|
||||
#endif
|
||||
#include <term.h>
|
||||
#else
|
||||
/* Don't bother including curses.h because of these -
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue