#include "config.h"
#include "tools.h"
+#ifndef DISABLE_CURSES
#if defined(HAVE_CURSES_H) || defined(HAVE_NCURSES_H)
-
#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#else
#include <curses.h>
#endif
-
+#endif
#endif
#define MAXSETUP 3 /* How many setup questions to ask */
void cleanup(int exitcode)
{
-#ifdef HAVE_CURSES_H
+#if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
if (setup_type == UI_CURSES) {
clear();
refresh();
/* Where on the screen to start */
/* Pointer to string buffer */
/* Maximum length - if negative, no-show */
-#ifdef HAVE_CURSES_H
+#if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
void getlin(int yp, int xp, char *string, int lim) {
int a, b;
char flag;
{
char junk[5];
-#ifdef HAVE_CURSES_H
+#if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
if (setup_type == UI_CURSES) {
mvprintw(20, 0, "Press any key to continue... ");
refresh();
} while ((answer < 0) || (answer > 1));
break;
-#ifdef HAVE_CURSES_H
+#if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
case UI_CURSES:
do {
clear();
hit_any_key();
break;
-#ifdef HAVE_CURSES_H
+#if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
case UI_CURSES:
clear();
move(1, 20);
}
break;
-#ifdef HAVE_CURSES_H
+#if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
case UI_CURSES:
if (curr == 0) {
clear();
if (strlen(buf) != 0)
strcpy(str, buf);
break;
-#ifdef HAVE_CURSES_H
+#if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
case UI_CURSES:
clear();
move(1, ((80 - strlen(setup_titles[msgpos])) / 2));
int discover_ui(void)
{
-#ifdef HAVE_CURSES_H
+#if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
return UI_CURSES;
#endif
return UI_TEXT;
if (setup_type < 0) {
setup_type = discover_ui();
}
-#ifdef HAVE_CURSES_H
+#if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
if (setup_type == UI_CURSES) {
initscr();
raw();