mirror of
https://github.com/VARCem/PDCurses.git
synced 2026-09-24 15:55:14 +00:00
Replaced most of the embedded externs with curspriv.h declarations. I
think this is sufficiently isolated, and a lot less redundant.
This commit is contained in:
8
curses.h
8
curses.h
@@ -15,7 +15,7 @@
|
||||
* See the file maintain.er for details of the current maintainer. *
|
||||
************************************************************************/
|
||||
|
||||
/* $Id: curses.h,v 1.194 2006/07/13 21:13:51 wmcbrine Exp $ */
|
||||
/* $Id: curses.h,v 1.195 2006/07/14 03:21:16 wmcbrine Exp $ */
|
||||
|
||||
/*----------------------------------------------------------------------*
|
||||
* PDCurses *
|
||||
@@ -1636,6 +1636,8 @@ int win_wchstr(WINDOW *, cchar_t *);
|
||||
wchar_t *wunctrl(cchar_t *);
|
||||
int wvline_set(WINDOW *, const cchar_t *, int);
|
||||
|
||||
/* Not implemented yet */
|
||||
|
||||
int getn_wstr(wint_t *, int);
|
||||
int get_wch(wint_t *);
|
||||
int get_wstr(wint_t *);
|
||||
@@ -1649,8 +1651,8 @@ int wgetn_wstr(WINDOW *, wint_t *, int);
|
||||
int wget_wch(WINDOW *, wint_t *);
|
||||
int wget_wstr(WINDOW *, wint_t *);
|
||||
|
||||
int slk_wset(int, const wchar_t *, int);
|
||||
int unget_wch(const wchar_t);
|
||||
int slk_wset(int, const wchar_t *, int);
|
||||
int unget_wch(const wchar_t);
|
||||
#endif
|
||||
|
||||
/* Quasi-standard */
|
||||
|
||||
12
curspriv.h
12
curspriv.h
@@ -15,7 +15,7 @@
|
||||
* See the file maintain.er for details of the current maintainer. *
|
||||
************************************************************************/
|
||||
|
||||
/* $Id: curspriv.h,v 1.74 2006/07/07 13:19:31 wmcbrine Exp $ */
|
||||
/* $Id: curspriv.h,v 1.75 2006/07/14 03:21:16 wmcbrine Exp $ */
|
||||
|
||||
/* CURSPRIV.H
|
||||
|
||||
@@ -198,6 +198,16 @@ enum
|
||||
_FONT16
|
||||
};
|
||||
|
||||
extern int c_pindex; /* putter index */
|
||||
extern int c_gindex; /* getter index */
|
||||
extern int c_ungind; /* ungetch() push index */
|
||||
extern int c_ungch[NUNGETCH]; /* array of ungotten chars */
|
||||
extern WINDOW *_getch_win_;
|
||||
|
||||
extern void *(*mallc)(size_t);
|
||||
extern void *(*callc)(size_t, size_t);
|
||||
extern void (*fre)(void *);
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* ANSI C prototypes.
|
||||
*/
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#define CURSES_LIBRARY 1
|
||||
#include <curses.h>
|
||||
|
||||
RCSID("$Id: pdckbd.c,v 1.25 2006/07/07 00:00:52 wmcbrine Exp $");
|
||||
RCSID("$Id: pdckbd.c,v 1.26 2006/07/14 03:21:16 wmcbrine Exp $");
|
||||
|
||||
/************************************************************************
|
||||
* Table for key code translation of function keys in keypad mode *
|
||||
@@ -366,7 +366,6 @@ bool PDC_get_ctrl_break(void)
|
||||
|
||||
int PDC_rawgetch(void)
|
||||
{
|
||||
extern WINDOW *_getch_win_;
|
||||
int c, oldc;
|
||||
|
||||
PDC_LOG(("PDC_rawgetch() - called\n"));
|
||||
@@ -466,7 +465,6 @@ int PDC_set_ctrl_break(bool setting)
|
||||
|
||||
int PDC_sysgetch(void)
|
||||
{
|
||||
extern WINDOW *_getch_win_;
|
||||
int c;
|
||||
|
||||
PDC_LOG(("PDC_sysgetch() - called\n"));
|
||||
@@ -521,7 +519,6 @@ int PDC_sysgetch(void)
|
||||
|
||||
int PDC_validchar(int c)
|
||||
{
|
||||
extern WINDOW *_getch_win_;
|
||||
int *scanp;
|
||||
|
||||
PDC_LOG(("PDC_validchar() - called\n"));
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
# include <termios.h>
|
||||
#endif
|
||||
|
||||
RCSID("$Id: pdckbd.c,v 1.25 2006/07/06 23:50:12 wmcbrine Exp $");
|
||||
RCSID("$Id: pdckbd.c,v 1.26 2006/07/14 03:21:16 wmcbrine Exp $");
|
||||
|
||||
/************************************************************************
|
||||
* Table for key code translation of function keys in keypad mode *
|
||||
@@ -474,7 +474,6 @@ bool PDC_get_ctrl_break(void)
|
||||
|
||||
int PDC_rawgetch(void)
|
||||
{
|
||||
extern WINDOW *_getch_win_;
|
||||
int c, oldc;
|
||||
|
||||
PDC_LOG(("PDC_rawgetch() - called\n"));
|
||||
@@ -576,7 +575,6 @@ int PDC_set_ctrl_break(bool setting)
|
||||
|
||||
int PDC_sysgetch(void)
|
||||
{
|
||||
extern WINDOW *_getch_win_;
|
||||
int c;
|
||||
|
||||
PDC_LOG(("PDC_sysgetch() - called\n"));
|
||||
@@ -631,7 +629,6 @@ int PDC_sysgetch(void)
|
||||
|
||||
int PDC_validchar(int c)
|
||||
{
|
||||
extern WINDOW *_getch_win_;
|
||||
int *scanp;
|
||||
|
||||
PDC_LOG(("PDC_validchar() - called. c: %d\n", c));
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
# undef wmove
|
||||
#endif
|
||||
|
||||
RCSID("$Id: getch.c,v 1.27 2006/03/29 20:06:40 wmcbrine Exp $");
|
||||
RCSID("$Id: getch.c,v 1.28 2006/07/14 03:21:16 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -116,12 +116,6 @@ int PDC_getch(void)
|
||||
|
||||
int wgetch(WINDOW *win)
|
||||
{
|
||||
extern int c_pindex; /* putter index */
|
||||
extern int c_gindex; /* getter index */
|
||||
extern int c_ungind; /* ungetch() push index */
|
||||
extern int c_ungch[NUNGETCH]; /* array of ungotten chars */
|
||||
extern WINDOW *_getch_win_;
|
||||
|
||||
static int buffer[_INBUFSIZ]; /* character buffer */
|
||||
int key, display_key, waitcount;
|
||||
|
||||
@@ -269,9 +263,6 @@ int mvwgetch(WINDOW *win, int y, int x)
|
||||
|
||||
int PDC_ungetch(int ch)
|
||||
{
|
||||
extern int c_ungind; /* ungetch() push index */
|
||||
extern int c_ungch[NUNGETCH]; /* array of ungotten chars */
|
||||
|
||||
PDC_LOG(("ungetch() - called\n"));
|
||||
|
||||
if (c_ungind >= NUNGETCH) /* pushback stack full */
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
# undef doupdate
|
||||
#endif
|
||||
|
||||
RCSID("$Id: pad.c,v 1.24 2006/07/12 16:19:57 wmcbrine Exp $");
|
||||
RCSID("$Id: pad.c,v 1.25 2006/07/14 03:21:16 wmcbrine Exp $");
|
||||
|
||||
/* save values for pechochar() */
|
||||
|
||||
@@ -115,9 +115,6 @@ static int save_sminrow, save_smincol, save_smaxrow, save_smaxcol;
|
||||
|
||||
WINDOW *newpad(int nlines, int ncols)
|
||||
{
|
||||
extern void *(*callc)(size_t, size_t);
|
||||
extern void (*fre)(void *);
|
||||
|
||||
WINDOW *win;
|
||||
chtype *ptr;
|
||||
int i, j;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#define CURSES_LIBRARY 1
|
||||
#include <curses.h>
|
||||
|
||||
RCSID("$Id: pdckey.c,v 1.1 2006/07/07 02:53:07 wmcbrine Exp $");
|
||||
RCSID("$Id: pdckey.c,v 1.2 2006/07/14 03:21:16 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -39,9 +39,6 @@ RCSID("$Id: pdckey.c,v 1.1 2006/07/07 02:53:07 wmcbrine Exp $");
|
||||
|
||||
bool PDC_breakout(void)
|
||||
{
|
||||
extern int c_pindex; /* putter index */
|
||||
extern int c_gindex; /* getter index */
|
||||
extern int c_ungind; /* wungetch() push index */
|
||||
bool rc;
|
||||
|
||||
PDC_LOG(("PDC_breakout() - called\n"));
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <curses.h>
|
||||
#include <string.h>
|
||||
|
||||
RCSID("$Id: pdcwin.c,v 1.40 2006/07/05 20:20:48 wmcbrine Exp $");
|
||||
RCSID("$Id: pdcwin.c,v 1.41 2006/07/14 03:21:16 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -140,10 +140,6 @@ int PDC_copy_win(const WINDOW *src_w, WINDOW *dst_w, int src_tr,
|
||||
|
||||
WINDOW *PDC_makenew(int num_lines, int num_columns, int begy, int begx)
|
||||
{
|
||||
extern void *(*mallc)(size_t);
|
||||
extern void *(*callc)(size_t, size_t);
|
||||
extern void (*fre)(void *);
|
||||
|
||||
int i;
|
||||
WINDOW *win;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#undef delay_output
|
||||
#undef flushinp
|
||||
|
||||
RCSID("$Id: util.c,v 1.44 2006/07/13 21:13:51 wmcbrine Exp $");
|
||||
RCSID("$Id: util.c,v 1.45 2006/07/14 03:21:16 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -224,10 +224,6 @@ int delay_output(int ms)
|
||||
|
||||
int flushinp(void)
|
||||
{
|
||||
extern int c_pindex; /* putter index */
|
||||
extern int c_gindex; /* getter index */
|
||||
extern int c_ungind; /* wungetch() push index */
|
||||
|
||||
PDC_LOG(("flushinp() - called\n"));
|
||||
|
||||
PDC_flushinp();
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
# undef wclrtobot
|
||||
#endif
|
||||
|
||||
RCSID("$Id: window.c,v 1.30 2006/07/05 20:20:49 wmcbrine Exp $");
|
||||
RCSID("$Id: window.c,v 1.31 2006/07/14 03:21:16 wmcbrine Exp $");
|
||||
|
||||
/*man-start**************************************************************
|
||||
|
||||
@@ -153,9 +153,6 @@ RCSID("$Id: window.c,v 1.30 2006/07/05 20:20:49 wmcbrine Exp $");
|
||||
|
||||
WINDOW *newwin(int nlines, int ncols, int begy, int begx)
|
||||
{
|
||||
extern void *(*callc)(size_t, size_t);
|
||||
extern void (*fre)(void *);
|
||||
|
||||
WINDOW *win;
|
||||
chtype *ptr;
|
||||
int i, j;
|
||||
@@ -204,8 +201,6 @@ WINDOW *newwin(int nlines, int ncols, int begy, int begx)
|
||||
|
||||
int delwin(WINDOW *win)
|
||||
{
|
||||
extern void (*fre)(void*);
|
||||
|
||||
int i;
|
||||
|
||||
PDC_LOG(("delwin() - called\n"));
|
||||
@@ -326,9 +321,6 @@ int mvderwin(WINDOW *win, int par_y, int par_x)
|
||||
|
||||
WINDOW *dupwin(WINDOW *win)
|
||||
{
|
||||
extern void *(*callc)(size_t, size_t);
|
||||
extern void (*fre)(void *);
|
||||
|
||||
WINDOW *new;
|
||||
chtype *ptr, *ptr1;
|
||||
int nlines, ncols, begy, begx, i, j;
|
||||
@@ -411,9 +403,6 @@ WINDOW *dupwin(WINDOW *win)
|
||||
|
||||
WINDOW *resize_window(WINDOW *win, int lins, int cols)
|
||||
{
|
||||
extern void *(*callc)(size_t, size_t);
|
||||
extern void (*fre)(void *);
|
||||
|
||||
WINDOW *new;
|
||||
int i, j, save_cury, save_curx;
|
||||
int new_begy, new_begx;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#define INCLUDE_WINDOWS_H
|
||||
#include <curses.h>
|
||||
|
||||
RCSID("$Id: pdckbd.c,v 1.45 2006/07/06 23:50:13 wmcbrine Exp $");
|
||||
RCSID("$Id: pdckbd.c,v 1.46 2006/07/14 03:21:16 wmcbrine Exp $");
|
||||
|
||||
#define KEY_STATE TRUE
|
||||
#define MS_MOUSE_MOVED 1
|
||||
@@ -853,7 +853,6 @@ bool PDC_get_ctrl_break(void)
|
||||
|
||||
int PDC_rawgetch(void)
|
||||
{
|
||||
extern WINDOW *_getch_win_;
|
||||
int c, oldc;
|
||||
|
||||
PDC_LOG(("PDC_rawgetch() - called\n"));
|
||||
@@ -936,7 +935,6 @@ int PDC_set_ctrl_break(bool setting)
|
||||
|
||||
int PDC_sysgetch(void)
|
||||
{
|
||||
extern WINDOW *_getch_win_;
|
||||
int c;
|
||||
|
||||
PDC_LOG(("PDC_sysgetch() - called\n"));
|
||||
@@ -992,8 +990,6 @@ int PDC_sysgetch(void)
|
||||
|
||||
int PDC_validchar(int c)
|
||||
{
|
||||
extern WINDOW *_getch_win_;
|
||||
|
||||
PDC_LOG(("PDC_validchar() - called\n"));
|
||||
|
||||
/* skip special keys if !keypad mode */
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#include "pdcx11.h"
|
||||
|
||||
RCSID("$Id: pdckbd.c,v 1.24 2006/07/07 16:20:28 wmcbrine Exp $");
|
||||
RCSID("$Id: pdckbd.c,v 1.25 2006/07/14 03:21:16 wmcbrine Exp $");
|
||||
|
||||
bool XCurses_kbhit(void)
|
||||
{
|
||||
@@ -211,8 +211,6 @@ bool PDC_get_ctrl_break(void)
|
||||
|
||||
int PDC_rawgetch(void)
|
||||
{
|
||||
extern WINDOW *_getch_win_;
|
||||
|
||||
PDC_LOG(("PDC_rawgetch() - called\n"));
|
||||
|
||||
if (_getch_win_ == (WINDOW *)NULL)
|
||||
|
||||
Reference in New Issue
Block a user