1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Refactoring to avoid code duplication.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4344 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2006-09-12 17:23:46 +00:00 committed by exg
parent 9cdea0d608
commit f57b551a86
4 changed files with 19 additions and 33 deletions

View File

@ -1,23 +1,10 @@
#ifndef __CUIX_API_H
#define __CUIX_API_H
#if defined(USE_NCURSES) && !defined(RENAMED_NCURSES)
# include <ncurses.h>
#else
# include <curses.h>
#endif
#include <form.h>
#include <panel.h>
#include "term-curses.h"
#define MAX_FIELD_SIZE 64
/* Should be updated if the one in term-curses.c changes */
struct _TERM_WINDOW {
int x, y;
int width, height;
WINDOW *win;
};
WINDOW *cuix_win;
PANEL *p_main;
PANEL *p_cuix;

View File

@ -1,13 +1,6 @@
#ifndef __CUIX_LIB_H
#define __CUIX_LIB_H
#if defined(USE_NCURSES) && !defined(RENAMED_NCURSES)
# include <ncurses.h>
#else
# include <curses.h>
#endif
#include <form.h>
#include <panel.h>
#include "cuix-api.h"
int home_menu (char *);

View File

@ -26,13 +26,9 @@
#ifdef HAVE_CUIX
#include "cuix.h"
#endif
#include "panel.h"
#if defined(USE_NCURSES) && !defined(RENAMED_NCURSES)
# include <ncurses.h>
#else
# include <curses.h>
#endif
#include "term-curses.h"
#include <termios.h>
#include <signal.h>
@ -48,12 +44,6 @@
# define _POSIX_VDISABLE 0
#endif
struct _TERM_WINDOW {
int x, y;
int width, height;
WINDOW *win;
};
TERM_WINDOW *root_window;
static int curs_x, curs_y;

16
src/fe-text/term-curses.h Normal file
View File

@ -0,0 +1,16 @@
#if defined(USE_NCURSES) && !defined(RENAMED_NCURSES)
# include <ncurses.h>
#else
# include <curses.h>
#endif
#ifdef HAVE_CUIX
#include <form.h>
#include <panel.h>
#endif
struct _TERM_WINDOW {
int x, y;
int width, height;
WINDOW *win;
};