More reorg.

This commit is contained in:
William McBrine
2019-08-18 09:16:39 -04:00
parent ef50b5ac33
commit ed6efbc669
2 changed files with 28 additions and 36 deletions

View File

@@ -1,34 +0,0 @@
/* PDCurses */
#include "pdcx11.h"
#include <errno.h>
#include <stdlib.h>
unsigned char *Xcurscr;
int XCursesLINES = 24;
int XCursesCOLS = 80;
#ifdef PDCDEBUG
void XC_say(const char *msg)
{
PDC_LOG(("%s:%s", XCLOGMSG, msg));
}
#endif
int XCursesInitscr(int argc, char *argv[])
{
XC_LOG(("XCursesInitscr() - called\n"));
if (ERR == XCursesSetupX(argc, argv))
return ERR;
XCursesLINES = SP->lines;
LINES = XCursesLINES - SP->linesrippedoff - SP->slklines;
XCursesCOLS = COLS = SP->cols;
atexit(XCursesExit);
return OK;
}

View File

@@ -197,8 +197,6 @@ static struct
{0, 0, 0, 0, 0, 0}
};
#define BITMAPDEPTH 1
static GC normal_gc, rect_cursor_gc, italic_gc, bold_gc, border_gc;
static int font_height, font_width, font_ascent, font_descent,
window_width, window_height;
@@ -225,6 +223,11 @@ static bool exposed = FALSE;
static char *program_name;
static bool blinked_off;
unsigned char *Xcurscr;
int XCursesLINES = 24;
int XCursesCOLS = 80;
bool xc_resize_now = FALSE;
char *xc_selection = NULL;
long xc_selection_len = 0;
@@ -384,6 +387,13 @@ static const char *default_translations =
"<BtnMotion>: XCursesButton()"
};
#ifdef PDCDEBUG
void XC_say(const char *msg)
{
PDC_LOG(("%s:%s", XCLOGMSG, msg));
}
#endif
static int _to_utf8(char *outcode, chtype code)
{
#ifdef PDC_WIDE
@@ -2554,3 +2564,19 @@ int XCursesSetupX(int argc, char *argv[])
return OK; /* will get here */
}
int XCursesInitscr(int argc, char *argv[])
{
XC_LOG(("XCursesInitscr() - called\n"));
if (ERR == XCursesSetupX(argc, argv))
return ERR;
XCursesLINES = SP->lines;
LINES = XCursesLINES - SP->linesrippedoff - SP->slklines;
XCursesCOLS = COLS = SP->cols;
atexit(XCursesExit);
return OK;
}