Skip to content
Snippets Groups Projects
Commit 1e29cbf1 authored by deuce's avatar deuce
Browse files

Add a CMakeList and clean up some curses direct usage hacks.

parent d52bebb3
No related branches found
No related tags found
No related merge requests found
project (UEdit C)
cmake_minimum_required(VERSION 2.8.11)
INCLUDE (../../build/SynchronetMacros.cmake)
INCLUDE (FindCurses)
add_executable(uedit
../ars.c
../dat_rec.c
../date_str.c
../getmail.c
../getstats.c
../load_cfg.c
../nopen.c
../sbbs_ini.c
../scfglib1.c
../scfglib2.c
../str_util.c
../userdat.c
uedit.c
)
double_require_lib(uedit xpdev)
double_require_lib_dir(uedit ciolib conio)
double_require_lib(uedit smblib)
double_require_lib(uedit uifc)
target_include_directories(uedit PRIVATE ..)
if(CURSES_FOUND)
target_compile_definitions(uedit PRIVATE HAS_CURSES)
endif()
...@@ -22,7 +22,7 @@ endif ...@@ -22,7 +22,7 @@ endif
vpath %.c .. vpath %.c ..
CFLAGS += -I.. -I../../comio $(SMBLIB_CFLAGS) $(UIFC-MT_CFLAGS) $(CIOLIB-MT_CFLAGS) $(XPDEV-MT_CFLAGS) CFLAGS += -DHAS_CURSES -I.. -I../../comio $(SMBLIB_CFLAGS) $(UIFC-MT_CFLAGS) $(CIOLIB-MT_CFLAGS) $(XPDEV-MT_CFLAGS)
LDFLAGS += $(SMBLIB_LDFLAGS) $(UIFC-MT_LDFLAGS) $(CIOLIB-MT_LDFLAGS) $(XPDEV-MT_LDFLAGS) $(MT_LDFLAGS) LDFLAGS += $(SMBLIB_LDFLAGS) $(UIFC-MT_LDFLAGS) $(CIOLIB-MT_LDFLAGS) $(XPDEV-MT_LDFLAGS) $(MT_LDFLAGS)
$(UEDIT): $(OBJS) $(UEDIT): $(OBJS)
......
...@@ -35,8 +35,6 @@ ...@@ -35,8 +35,6 @@
* Note: If this box doesn't appear square, then you need to fix your tabs. * * Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/ ****************************************************************************/
#include "ciolib.h"
#include "sbbs.h"
#include <sys/types.h> #include <sys/types.h>
#include <time.h> #include <time.h>
#ifdef __QNX__ #ifdef __QNX__
...@@ -49,6 +47,9 @@ ...@@ -49,6 +47,9 @@
#include <signal.h> #include <signal.h>
#endif #endif
#include "ciolib.h"
#include "sbbs.h"
#include "genwrap.h" #include "genwrap.h"
#include "uifc.h" #include "uifc.h"
#include "sbbsdefs.h" #include "sbbsdefs.h"
...@@ -201,12 +202,14 @@ int do_cmd(char *cmd) ...@@ -201,12 +202,14 @@ int do_cmd(char *cmd)
{ {
int i; int i;
#ifdef __unix__ #ifdef HAS_CURSES
endwin(); if(cio_api.mode == CIOLIB_MODE_CURSES || cio_api.mode == CIOLIB_MODE_CURSES_IBM)
endwin();
#endif #endif
i=system(cmd); i=system(cmd);
#ifdef __unix__ #ifdef HAS_CURSES
refresh(); if(cio_api.mode == CIOLIB_MODE_CURSES || cio_api.mode == CIOLIB_MODE_CURSES_IBM)
refresh();
#endif #endif
return(i); return(i);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment