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

Fix segfault with external programs when NOT running under curses... HOWEVER...

Fix segfault with external programs when NOT running under curses... HOWEVER the chat stuff is terrible and needs fixing...  it basically needs a complete re-write for ciolib... I'll get around to it eventually...
parent 399b343a
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,7 @@
* Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/
#undef getch
#include <curses.h>
typedef struct {
......
......@@ -35,9 +35,6 @@
* Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/
#include "sbbs.h"
#include "conwrap.h" /* this has to go BEFORE curses.h so getkey() can be macroed around */
#include <curses.h>
#include <signal.h>
#include <sys/types.h>
#include <time.h>
......@@ -47,6 +44,10 @@
#endif
#include <stdio.h>
#include <unistd.h>
#include "ciolib.h"
#define __COLORS /* Disable the colour macros in sbbsdefs.h ToDo */
#include "sbbs.h"
#include "genwrap.h"
#include "uifc.h"
#include "sbbsdefs.h"
......@@ -520,10 +521,23 @@ int view_logs(scfg_t *cfg)
int do_cmd(char *cmd)
{
int i;
struct text_info ti;
char *p;
#if 0
endwin();
#else
gettextinfo(&ti);
p=malloc(ti.screenheight*ti.screenwidth*2);
gettext(1,1,ti.screenwidth,ti.screenheight,p);
#endif
i=system(cmd);
#if 0
refresh();
#else
puttext(1,1,ti.screenwidth,ti.screenheight,p);
free(p);
#endif
return(i);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment