curses 1.4.5 → 1.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/push_gem.yml +48 -0
- data/History.md +3 -0
- data/curses.gemspec +1 -1
- metadata +8 -247
- data/vendor/PDCurses/.gitignore +0 -47
- data/vendor/PDCurses/.travis.yml +0 -49
- data/vendor/PDCurses/CMakeLists.txt +0 -68
- data/vendor/PDCurses/HISTORY.md +0 -2036
- data/vendor/PDCurses/IMPLEMNT.md +0 -327
- data/vendor/PDCurses/Makefile +0 -27
- data/vendor/PDCurses/README.md +0 -77
- data/vendor/PDCurses/acs_defs.h +0 -265
- data/vendor/PDCurses/appveyor.yml +0 -218
- data/vendor/PDCurses/cmake/README.md +0 -71
- data/vendor/PDCurses/cmake/build_dependencies.cmake +0 -178
- data/vendor/PDCurses/cmake/build_options.cmake +0 -25
- data/vendor/PDCurses/cmake/dll_version.cmake +0 -26
- data/vendor/PDCurses/cmake/gen_config_header.cmake +0 -43
- data/vendor/PDCurses/cmake/get_version.cmake +0 -17
- data/vendor/PDCurses/cmake/make_uninstall.cmake +0 -19
- data/vendor/PDCurses/cmake/project_common.cmake +0 -121
- data/vendor/PDCurses/cmake/resource.in.cmake +0 -52
- data/vendor/PDCurses/cmake/sdl2_ttf/CMakeLists.txt +0 -83
- data/vendor/PDCurses/cmake/target_arch.cmake +0 -36
- data/vendor/PDCurses/cmake/version.in.cmake +0 -73
- data/vendor/PDCurses/cmake/watcom_open_dos16_toolchain.cmake +0 -96
- data/vendor/PDCurses/cmake/watcom_open_dos32_toolchain.cmake +0 -106
- data/vendor/PDCurses/cmake/watcom_open_os2v2_toolchain.cmake +0 -105
- data/vendor/PDCurses/curses.h +0 -1846
- data/vendor/PDCurses/curspriv.h +0 -134
- data/vendor/PDCurses/demos/README.md +0 -25
- data/vendor/PDCurses/demos/firework.c +0 -144
- data/vendor/PDCurses/demos/newtest.c +0 -581
- data/vendor/PDCurses/demos/ozdemo.c +0 -447
- data/vendor/PDCurses/demos/ptest.c +0 -283
- data/vendor/PDCurses/demos/rain.c +0 -157
- data/vendor/PDCurses/demos/testcurs.c +0 -1607
- data/vendor/PDCurses/demos/tui.c +0 -1048
- data/vendor/PDCurses/demos/tui.h +0 -65
- data/vendor/PDCurses/demos/tuidemo.c +0 -233
- data/vendor/PDCurses/demos/version.c +0 -61
- data/vendor/PDCurses/demos/worm.c +0 -432
- data/vendor/PDCurses/demos/xmas.c +0 -955
- data/vendor/PDCurses/dos/CMakeLists.txt +0 -47
- data/vendor/PDCurses/dos/Makefile +0 -105
- data/vendor/PDCurses/dos/Makefile.bcc +0 -83
- data/vendor/PDCurses/dos/Makefile.dmc +0 -257
- data/vendor/PDCurses/dos/Makefile.msc +0 -113
- data/vendor/PDCurses/dos/Makefile.wcc +0 -107
- data/vendor/PDCurses/dos/README.md +0 -51
- data/vendor/PDCurses/dos/bccdos.lrf +0 -9
- data/vendor/PDCurses/dos/mscdos.lrf +0 -50
- data/vendor/PDCurses/dos/pdcclip.c +0 -132
- data/vendor/PDCurses/dos/pdcdisp.c +0 -135
- data/vendor/PDCurses/dos/pdcdos.h +0 -194
- data/vendor/PDCurses/dos/pdcgetsc.c +0 -98
- data/vendor/PDCurses/dos/pdckbd.c +0 -513
- data/vendor/PDCurses/dos/pdcscrn.c +0 -785
- data/vendor/PDCurses/dos/pdcsetsc.c +0 -101
- data/vendor/PDCurses/dos/pdcutil.c +0 -212
- data/vendor/PDCurses/libobjs.mif +0 -26
- data/vendor/PDCurses/makedist.mif +0 -20
- data/vendor/PDCurses/man/Makefile +0 -37
- data/vendor/PDCurses/man/README.md +0 -21
- data/vendor/PDCurses/man/intro.md +0 -361
- data/vendor/PDCurses/man/manext.c +0 -119
- data/vendor/PDCurses/man/sdl.md +0 -152
- data/vendor/PDCurses/man/sdl2.md +0 -58
- data/vendor/PDCurses/man/x11.md +0 -407
- data/vendor/PDCurses/ncurses/CMakeLists.txt +0 -66
- data/vendor/PDCurses/ncurses/README.md +0 -26
- data/vendor/PDCurses/ncurses/makefile +0 -29
- data/vendor/PDCurses/os2/CMakeLists.txt +0 -41
- data/vendor/PDCurses/os2/Makefile +0 -132
- data/vendor/PDCurses/os2/Makefile.bcc +0 -90
- data/vendor/PDCurses/os2/Makefile.wcc +0 -43
- data/vendor/PDCurses/os2/README.md +0 -43
- data/vendor/PDCurses/os2/iccos2.lrf +0 -50
- data/vendor/PDCurses/os2/iccos2.mak +0 -256
- data/vendor/PDCurses/os2/pdcclip.c +0 -188
- data/vendor/PDCurses/os2/pdcdisp.c +0 -93
- data/vendor/PDCurses/os2/pdcgetsc.c +0 -89
- data/vendor/PDCurses/os2/pdckbd.c +0 -521
- data/vendor/PDCurses/os2/pdcos2.h +0 -55
- data/vendor/PDCurses/os2/pdcscrn.c +0 -449
- data/vendor/PDCurses/os2/pdcsetsc.c +0 -112
- data/vendor/PDCurses/os2/pdcutil.c +0 -52
- data/vendor/PDCurses/panel.h +0 -56
- data/vendor/PDCurses/pdcurses/README.md +0 -25
- data/vendor/PDCurses/pdcurses/addch.c +0 -693
- data/vendor/PDCurses/pdcurses/addchstr.c +0 -245
- data/vendor/PDCurses/pdcurses/addstr.c +0 -240
- data/vendor/PDCurses/pdcurses/attr.c +0 -359
- data/vendor/PDCurses/pdcurses/beep.c +0 -68
- data/vendor/PDCurses/pdcurses/bkgd.c +0 -223
- data/vendor/PDCurses/pdcurses/border.c +0 -411
- data/vendor/PDCurses/pdcurses/clear.c +0 -159
- data/vendor/PDCurses/pdcurses/color.c +0 -298
- data/vendor/PDCurses/pdcurses/debug.c +0 -109
- data/vendor/PDCurses/pdcurses/delch.c +0 -96
- data/vendor/PDCurses/pdcurses/deleteln.c +0 -211
- data/vendor/PDCurses/pdcurses/deprec.c +0 -27
- data/vendor/PDCurses/pdcurses/getch.c +0 -417
- data/vendor/PDCurses/pdcurses/getstr.c +0 -474
- data/vendor/PDCurses/pdcurses/getyx.c +0 -139
- data/vendor/PDCurses/pdcurses/inch.c +0 -127
- data/vendor/PDCurses/pdcurses/inchstr.c +0 -214
- data/vendor/PDCurses/pdcurses/initscr.c +0 -367
- data/vendor/PDCurses/pdcurses/inopts.c +0 -324
- data/vendor/PDCurses/pdcurses/insch.c +0 -271
- data/vendor/PDCurses/pdcurses/insstr.c +0 -264
- data/vendor/PDCurses/pdcurses/instr.c +0 -246
- data/vendor/PDCurses/pdcurses/kernel.c +0 -259
- data/vendor/PDCurses/pdcurses/keyname.c +0 -157
- data/vendor/PDCurses/pdcurses/mouse.c +0 -438
- data/vendor/PDCurses/pdcurses/move.c +0 -57
- data/vendor/PDCurses/pdcurses/outopts.c +0 -159
- data/vendor/PDCurses/pdcurses/overlay.c +0 -214
- data/vendor/PDCurses/pdcurses/pad.c +0 -260
- data/vendor/PDCurses/pdcurses/panel.c +0 -633
- data/vendor/PDCurses/pdcurses/printw.c +0 -126
- data/vendor/PDCurses/pdcurses/refresh.c +0 -279
- data/vendor/PDCurses/pdcurses/scanw.c +0 -578
- data/vendor/PDCurses/pdcurses/scr_dump.c +0 -213
- data/vendor/PDCurses/pdcurses/scroll.c +0 -101
- data/vendor/PDCurses/pdcurses/slk.c +0 -591
- data/vendor/PDCurses/pdcurses/termattr.c +0 -182
- data/vendor/PDCurses/pdcurses/terminfo.c +0 -217
- data/vendor/PDCurses/pdcurses/touch.c +0 -163
- data/vendor/PDCurses/pdcurses/util.c +0 -312
- data/vendor/PDCurses/pdcurses/window.c +0 -569
- data/vendor/PDCurses/sdl1/Makefile +0 -129
- data/vendor/PDCurses/sdl1/Makefile.mng +0 -110
- data/vendor/PDCurses/sdl1/README.md +0 -31
- data/vendor/PDCurses/sdl1/deffont.h +0 -385
- data/vendor/PDCurses/sdl1/deficon.h +0 -23
- data/vendor/PDCurses/sdl1/pdcclip.c +0 -131
- data/vendor/PDCurses/sdl1/pdcdisp.c +0 -373
- data/vendor/PDCurses/sdl1/pdcgetsc.c +0 -30
- data/vendor/PDCurses/sdl1/pdckbd.c +0 -405
- data/vendor/PDCurses/sdl1/pdcscrn.c +0 -414
- data/vendor/PDCurses/sdl1/pdcsdl.h +0 -31
- data/vendor/PDCurses/sdl1/pdcsetsc.c +0 -64
- data/vendor/PDCurses/sdl1/pdcutil.c +0 -40
- data/vendor/PDCurses/sdl1/sdltest.c +0 -79
- data/vendor/PDCurses/sdl2/CMakeLists.txt +0 -76
- data/vendor/PDCurses/sdl2/Makefile +0 -135
- data/vendor/PDCurses/sdl2/Makefile.vc +0 -164
- data/vendor/PDCurses/sdl2/README.md +0 -34
- data/vendor/PDCurses/sdl2/deffont.h +0 -385
- data/vendor/PDCurses/sdl2/deficon.h +0 -23
- data/vendor/PDCurses/sdl2/pdcclip.c +0 -93
- data/vendor/PDCurses/sdl2/pdcdisp.c +0 -534
- data/vendor/PDCurses/sdl2/pdcgetsc.c +0 -30
- data/vendor/PDCurses/sdl2/pdckbd.c +0 -480
- data/vendor/PDCurses/sdl2/pdcscrn.c +0 -443
- data/vendor/PDCurses/sdl2/pdcsdl.h +0 -33
- data/vendor/PDCurses/sdl2/pdcsetsc.c +0 -67
- data/vendor/PDCurses/sdl2/pdcutil.c +0 -39
- data/vendor/PDCurses/sdl2/sdltest.c +0 -81
- data/vendor/PDCurses/term.h +0 -48
- data/vendor/PDCurses/version.mif +0 -7
- data/vendor/PDCurses/vt/CMakeLists.txt +0 -28
- data/vendor/PDCurses/vt/Makefile +0 -135
- data/vendor/PDCurses/vt/Makefile.bcc +0 -111
- data/vendor/PDCurses/vt/Makefile.dmc +0 -258
- data/vendor/PDCurses/vt/Makefile.vc +0 -144
- data/vendor/PDCurses/vt/Makefile.wcc +0 -107
- data/vendor/PDCurses/vt/README.md +0 -64
- data/vendor/PDCurses/vt/pdcclip.c +0 -20
- data/vendor/PDCurses/vt/pdcdisp.c +0 -284
- data/vendor/PDCurses/vt/pdcgetsc.c +0 -27
- data/vendor/PDCurses/vt/pdckbd.c +0 -394
- data/vendor/PDCurses/vt/pdcscrn.c +0 -434
- data/vendor/PDCurses/vt/pdcsetsc.c +0 -45
- data/vendor/PDCurses/vt/pdcutil.c +0 -43
- data/vendor/PDCurses/vt/pdcvt.h +0 -16
- data/vendor/PDCurses/watcom.mif +0 -68
- data/vendor/PDCurses/wincon/CMakeLists.txt +0 -27
- data/vendor/PDCurses/wincon/Makefile.bcc +0 -88
- data/vendor/PDCurses/wincon/Makefile.dmc +0 -256
- data/vendor/PDCurses/wincon/Makefile.lcc +0 -273
- data/vendor/PDCurses/wincon/Makefile.mng +0 -176
- data/vendor/PDCurses/wincon/Makefile.vc +0 -144
- data/vendor/PDCurses/wincon/Makefile.wcc +0 -51
- data/vendor/PDCurses/wincon/README.md +0 -85
- data/vendor/PDCurses/wincon/pdcclip.c +0 -174
- data/vendor/PDCurses/wincon/pdcdisp.c +0 -143
- data/vendor/PDCurses/wincon/pdcgetsc.c +0 -55
- data/vendor/PDCurses/wincon/pdckbd.c +0 -786
- data/vendor/PDCurses/wincon/pdcscrn.c +0 -717
- data/vendor/PDCurses/wincon/pdcsetsc.c +0 -91
- data/vendor/PDCurses/wincon/pdcurses.ico +0 -0
- data/vendor/PDCurses/wincon/pdcurses.rc +0 -28
- data/vendor/PDCurses/wincon/pdcutil.c +0 -41
- data/vendor/PDCurses/wincon/pdcwin.h +0 -31
- data/vendor/PDCurses/wingui/CMakeLists.txt +0 -27
- data/vendor/PDCurses/wingui/Makefile.bcc +0 -85
- data/vendor/PDCurses/wingui/Makefile.dmc +0 -259
- data/vendor/PDCurses/wingui/Makefile.lcc +0 -273
- data/vendor/PDCurses/wingui/Makefile.mng +0 -171
- data/vendor/PDCurses/wingui/Makefile.vc +0 -144
- data/vendor/PDCurses/wingui/Makefile.wcc +0 -51
- data/vendor/PDCurses/wingui/README.md +0 -93
- data/vendor/PDCurses/wingui/pdcclip.c +0 -174
- data/vendor/PDCurses/wingui/pdcdisp.c +0 -718
- data/vendor/PDCurses/wingui/pdcgetsc.c +0 -30
- data/vendor/PDCurses/wingui/pdckbd.c +0 -143
- data/vendor/PDCurses/wingui/pdcscrn.c +0 -2797
- data/vendor/PDCurses/wingui/pdcsetsc.c +0 -89
- data/vendor/PDCurses/wingui/pdcurses.ico +0 -0
- data/vendor/PDCurses/wingui/pdcurses.rc +0 -28
- data/vendor/PDCurses/wingui/pdcutil.c +0 -61
- data/vendor/PDCurses/wingui/pdcwin.h +0 -122
- data/vendor/PDCurses/x11/Makefile.in +0 -754
- data/vendor/PDCurses/x11/PDCurses.spec +0 -82
- data/vendor/PDCurses/x11/README.md +0 -62
- data/vendor/PDCurses/x11/ScrollBox.c +0 -319
- data/vendor/PDCurses/x11/ScrollBox.h +0 -51
- data/vendor/PDCurses/x11/ScrollBoxP.h +0 -70
- data/vendor/PDCurses/x11/aclocal.m4 +0 -994
- data/vendor/PDCurses/x11/big_icon.xbm +0 -46
- data/vendor/PDCurses/x11/compose.h +0 -201
- data/vendor/PDCurses/x11/config.guess +0 -1500
- data/vendor/PDCurses/x11/config.h.in +0 -100
- data/vendor/PDCurses/x11/config.sub +0 -1616
- data/vendor/PDCurses/x11/configure +0 -6700
- data/vendor/PDCurses/x11/configure.ac +0 -295
- data/vendor/PDCurses/x11/debian/changelog +0 -6
- data/vendor/PDCurses/x11/debian/compat +0 -1
- data/vendor/PDCurses/x11/debian/control +0 -11
- data/vendor/PDCurses/x11/debian/copyright +0 -27
- data/vendor/PDCurses/x11/debian/rules +0 -98
- data/vendor/PDCurses/x11/install-sh +0 -253
- data/vendor/PDCurses/x11/little_icon.xbm +0 -14
- data/vendor/PDCurses/x11/ncurses_cfg.h +0 -45
- data/vendor/PDCurses/x11/pdcclip.c +0 -173
- data/vendor/PDCurses/x11/pdcdisp.c +0 -85
- data/vendor/PDCurses/x11/pdcgetsc.c +0 -28
- data/vendor/PDCurses/x11/pdckbd.c +0 -104
- data/vendor/PDCurses/x11/pdcscrn.c +0 -258
- data/vendor/PDCurses/x11/pdcsetsc.c +0 -95
- data/vendor/PDCurses/x11/pdcutil.c +0 -52
- data/vendor/PDCurses/x11/pdcx11.c +0 -316
- data/vendor/PDCurses/x11/pdcx11.h +0 -191
- data/vendor/PDCurses/x11/sb.c +0 -155
- data/vendor/PDCurses/x11/x11.c +0 -3686
- data/vendor/PDCurses/x11/xcurses-config.in +0 -81
@@ -1,411 +0,0 @@
|
|
1
|
-
/* Public Domain Curses */
|
2
|
-
|
3
|
-
#include <curspriv.h>
|
4
|
-
|
5
|
-
/*man-start**************************************************************
|
6
|
-
|
7
|
-
border
|
8
|
-
------
|
9
|
-
|
10
|
-
### Synopsis
|
11
|
-
|
12
|
-
int border(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl,
|
13
|
-
chtype tr, chtype bl, chtype br);
|
14
|
-
int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts,
|
15
|
-
chtype bs, chtype tl, chtype tr, chtype bl, chtype br);
|
16
|
-
int box(WINDOW *win, chtype verch, chtype horch);
|
17
|
-
int hline(chtype ch, int n);
|
18
|
-
int vline(chtype ch, int n);
|
19
|
-
int whline(WINDOW *win, chtype ch, int n);
|
20
|
-
int wvline(WINDOW *win, chtype ch, int n);
|
21
|
-
int mvhline(int y, int x, chtype ch, int n);
|
22
|
-
int mvvline(int y, int x, chtype ch, int n);
|
23
|
-
int mvwhline(WINDOW *win, int y, int x, chtype ch, int n);
|
24
|
-
int mvwvline(WINDOW *win, int y, int x, chtype ch, int n);
|
25
|
-
|
26
|
-
int border_set(const cchar_t *ls, const cchar_t *rs,
|
27
|
-
const cchar_t *ts, const cchar_t *bs,
|
28
|
-
const cchar_t *tl, const cchar_t *tr,
|
29
|
-
const cchar_t *bl, const cchar_t *br);
|
30
|
-
int wborder_set(WINDOW *win, const cchar_t *ls, const cchar_t *rs,
|
31
|
-
const cchar_t *ts, const cchar_t *bs,
|
32
|
-
const cchar_t *tl, const cchar_t *tr,
|
33
|
-
const cchar_t *bl, const cchar_t *br);
|
34
|
-
int box_set(WINDOW *win, const cchar_t *verch, const cchar_t *horch);
|
35
|
-
int hline_set(const cchar_t *wch, int n);
|
36
|
-
int vline_set(const cchar_t *wch, int n);
|
37
|
-
int whline_set(WINDOW *win, const cchar_t *wch, int n);
|
38
|
-
int wvline_set(WINDOW *win, const cchar_t *wch, int n);
|
39
|
-
int mvhline_set(int y, int x, const cchar_t *wch, int n);
|
40
|
-
int mvvline_set(int y, int x, const cchar_t *wch, int n);
|
41
|
-
int mvwhline_set(WINDOW *win, int y, int x, const cchar_t *wch, int n);
|
42
|
-
int mvwvline_set(WINDOW *win, int y, int x, const cchar_t *wch, int n);
|
43
|
-
|
44
|
-
### Description
|
45
|
-
|
46
|
-
border(), wborder(), and box() draw a border around the edge of
|
47
|
-
the window. If any argument is zero, an appropriate default is
|
48
|
-
used:
|
49
|
-
|
50
|
-
ls left side of border ACS_VLINE
|
51
|
-
rs right side of border ACS_VLINE
|
52
|
-
ts top side of border ACS_HLINE
|
53
|
-
bs bottom side of border ACS_HLINE
|
54
|
-
tl top left corner of border ACS_ULCORNER
|
55
|
-
tr top right corner of border ACS_URCORNER
|
56
|
-
bl bottom left corner of border ACS_LLCORNER
|
57
|
-
br bottom right corner of border ACS_LRCORNER
|
58
|
-
|
59
|
-
hline() and whline() draw a horizontal line, using ch, starting
|
60
|
-
from the current cursor position. The cursor position does not
|
61
|
-
change. The line is at most n characters long, or as many as
|
62
|
-
will fit in the window.
|
63
|
-
|
64
|
-
vline() and wvline() draw a vertical line, using ch, starting
|
65
|
-
from the current cursor position. The cursor position does not
|
66
|
-
change. The line is at most n characters long, or as many as
|
67
|
-
will fit in the window.
|
68
|
-
|
69
|
-
### Return Value
|
70
|
-
|
71
|
-
These functions return OK on success and ERR on error.
|
72
|
-
|
73
|
-
### Portability
|
74
|
-
X/Open BSD SYS V
|
75
|
-
border Y - 4.0
|
76
|
-
wborder Y - 4.0
|
77
|
-
box Y Y Y
|
78
|
-
hline Y - 4.0
|
79
|
-
vline Y - 4.0
|
80
|
-
whline Y - 4.0
|
81
|
-
wvline Y - 4.0
|
82
|
-
mvhline Y
|
83
|
-
mvvline Y
|
84
|
-
mvwhline Y
|
85
|
-
mvwvline Y
|
86
|
-
border_set Y
|
87
|
-
wborder_set Y
|
88
|
-
box_set Y
|
89
|
-
hline_set Y
|
90
|
-
vline_set Y
|
91
|
-
whline_set Y
|
92
|
-
wvline_set Y
|
93
|
-
mvhline_set Y
|
94
|
-
mvvline_set Y
|
95
|
-
mvwhline_set Y
|
96
|
-
mvwvline_set Y
|
97
|
-
|
98
|
-
**man-end****************************************************************/
|
99
|
-
|
100
|
-
/* _attr_passthru() -- Takes a single chtype 'ch' and checks if the
|
101
|
-
current attribute of window 'win', as set by wattrset(), and/or the
|
102
|
-
current background of win, as set by wbkgd(), should by combined with
|
103
|
-
it. Attributes set explicitly in ch take precedence. */
|
104
|
-
|
105
|
-
static chtype _attr_passthru(WINDOW *win, chtype ch)
|
106
|
-
{
|
107
|
-
chtype attr;
|
108
|
-
|
109
|
-
/* If the incoming character doesn't have its own attribute, then
|
110
|
-
use the current attributes for the window. If the incoming
|
111
|
-
character has attributes, but not a color component, OR the
|
112
|
-
attributes to the current attributes for the window. If the
|
113
|
-
incoming character has a color component, use only the attributes
|
114
|
-
from the incoming character. */
|
115
|
-
|
116
|
-
attr = ch & A_ATTRIBUTES;
|
117
|
-
if (!(attr & A_COLOR))
|
118
|
-
attr |= win->_attrs;
|
119
|
-
|
120
|
-
/* wrs (4/10/93) -- Apply the same sort of logic for the window
|
121
|
-
background, in that it only takes precedence if other color
|
122
|
-
attributes are not there. */
|
123
|
-
|
124
|
-
if (!(attr & A_COLOR))
|
125
|
-
attr |= win->_bkgd & A_ATTRIBUTES;
|
126
|
-
else
|
127
|
-
attr |= win->_bkgd & (A_ATTRIBUTES ^ A_COLOR);
|
128
|
-
|
129
|
-
ch = (ch & A_CHARTEXT) | attr;
|
130
|
-
|
131
|
-
return ch;
|
132
|
-
}
|
133
|
-
|
134
|
-
int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts, chtype bs,
|
135
|
-
chtype tl, chtype tr, chtype bl, chtype br)
|
136
|
-
{
|
137
|
-
int i, ymax, xmax;
|
138
|
-
|
139
|
-
PDC_LOG(("wborder() - called\n"));
|
140
|
-
|
141
|
-
if (!win)
|
142
|
-
return ERR;
|
143
|
-
|
144
|
-
ymax = win->_maxy - 1;
|
145
|
-
xmax = win->_maxx - 1;
|
146
|
-
|
147
|
-
ls = _attr_passthru(win, ls ? ls : ACS_VLINE);
|
148
|
-
rs = _attr_passthru(win, rs ? rs : ACS_VLINE);
|
149
|
-
ts = _attr_passthru(win, ts ? ts : ACS_HLINE);
|
150
|
-
bs = _attr_passthru(win, bs ? bs : ACS_HLINE);
|
151
|
-
tl = _attr_passthru(win, tl ? tl : ACS_ULCORNER);
|
152
|
-
tr = _attr_passthru(win, tr ? tr : ACS_URCORNER);
|
153
|
-
bl = _attr_passthru(win, bl ? bl : ACS_LLCORNER);
|
154
|
-
br = _attr_passthru(win, br ? br : ACS_LRCORNER);
|
155
|
-
|
156
|
-
for (i = 1; i < xmax; i++)
|
157
|
-
{
|
158
|
-
win->_y[0][i] = ts;
|
159
|
-
win->_y[ymax][i] = bs;
|
160
|
-
}
|
161
|
-
|
162
|
-
for (i = 1; i < ymax; i++)
|
163
|
-
{
|
164
|
-
win->_y[i][0] = ls;
|
165
|
-
win->_y[i][xmax] = rs;
|
166
|
-
}
|
167
|
-
|
168
|
-
win->_y[0][0] = tl;
|
169
|
-
win->_y[0][xmax] = tr;
|
170
|
-
win->_y[ymax][0] = bl;
|
171
|
-
win->_y[ymax][xmax] = br;
|
172
|
-
|
173
|
-
for (i = 0; i <= ymax; i++)
|
174
|
-
{
|
175
|
-
win->_firstch[i] = 0;
|
176
|
-
win->_lastch[i] = xmax;
|
177
|
-
}
|
178
|
-
|
179
|
-
PDC_sync(win);
|
180
|
-
|
181
|
-
return OK;
|
182
|
-
}
|
183
|
-
|
184
|
-
int border(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl,
|
185
|
-
chtype tr, chtype bl, chtype br)
|
186
|
-
{
|
187
|
-
PDC_LOG(("border() - called\n"));
|
188
|
-
|
189
|
-
return wborder(stdscr, ls, rs, ts, bs, tl, tr, bl, br);
|
190
|
-
}
|
191
|
-
|
192
|
-
int box(WINDOW *win, chtype verch, chtype horch)
|
193
|
-
{
|
194
|
-
PDC_LOG(("box() - called\n"));
|
195
|
-
|
196
|
-
return wborder(win, verch, verch, horch, horch, 0, 0, 0, 0);
|
197
|
-
}
|
198
|
-
|
199
|
-
int whline(WINDOW *win, chtype ch, int n)
|
200
|
-
{
|
201
|
-
chtype *dest;
|
202
|
-
int startpos, endpos;
|
203
|
-
|
204
|
-
PDC_LOG(("whline() - called\n"));
|
205
|
-
|
206
|
-
if (!win || n < 1)
|
207
|
-
return ERR;
|
208
|
-
|
209
|
-
startpos = win->_curx;
|
210
|
-
endpos = min(startpos + n, win->_maxx) - 1;
|
211
|
-
dest = win->_y[win->_cury];
|
212
|
-
ch = _attr_passthru(win, ch ? ch : ACS_HLINE);
|
213
|
-
|
214
|
-
for (n = startpos; n <= endpos; n++)
|
215
|
-
dest[n] = ch;
|
216
|
-
|
217
|
-
n = win->_cury;
|
218
|
-
|
219
|
-
if (startpos < win->_firstch[n] || win->_firstch[n] == _NO_CHANGE)
|
220
|
-
win->_firstch[n] = startpos;
|
221
|
-
|
222
|
-
if (endpos > win->_lastch[n])
|
223
|
-
win->_lastch[n] = endpos;
|
224
|
-
|
225
|
-
PDC_sync(win);
|
226
|
-
|
227
|
-
return OK;
|
228
|
-
}
|
229
|
-
|
230
|
-
int hline(chtype ch, int n)
|
231
|
-
{
|
232
|
-
PDC_LOG(("hline() - called\n"));
|
233
|
-
|
234
|
-
return whline(stdscr, ch, n);
|
235
|
-
}
|
236
|
-
|
237
|
-
int mvhline(int y, int x, chtype ch, int n)
|
238
|
-
{
|
239
|
-
PDC_LOG(("mvhline() - called\n"));
|
240
|
-
|
241
|
-
if (move(y, x) == ERR)
|
242
|
-
return ERR;
|
243
|
-
|
244
|
-
return whline(stdscr, ch, n);
|
245
|
-
}
|
246
|
-
|
247
|
-
int mvwhline(WINDOW *win, int y, int x, chtype ch, int n)
|
248
|
-
{
|
249
|
-
PDC_LOG(("mvwhline() - called\n"));
|
250
|
-
|
251
|
-
if (wmove(win, y, x) == ERR)
|
252
|
-
return ERR;
|
253
|
-
|
254
|
-
return whline(win, ch, n);
|
255
|
-
}
|
256
|
-
|
257
|
-
int wvline(WINDOW *win, chtype ch, int n)
|
258
|
-
{
|
259
|
-
int endpos, x;
|
260
|
-
|
261
|
-
PDC_LOG(("wvline() - called\n"));
|
262
|
-
|
263
|
-
if (!win || n < 1)
|
264
|
-
return ERR;
|
265
|
-
|
266
|
-
endpos = min(win->_cury + n, win->_maxy);
|
267
|
-
x = win->_curx;
|
268
|
-
|
269
|
-
ch = _attr_passthru(win, ch ? ch : ACS_VLINE);
|
270
|
-
|
271
|
-
for (n = win->_cury; n < endpos; n++)
|
272
|
-
{
|
273
|
-
win->_y[n][x] = ch;
|
274
|
-
|
275
|
-
if (x < win->_firstch[n] || win->_firstch[n] == _NO_CHANGE)
|
276
|
-
win->_firstch[n] = x;
|
277
|
-
|
278
|
-
if (x > win->_lastch[n])
|
279
|
-
win->_lastch[n] = x;
|
280
|
-
}
|
281
|
-
|
282
|
-
PDC_sync(win);
|
283
|
-
|
284
|
-
return OK;
|
285
|
-
}
|
286
|
-
|
287
|
-
int vline(chtype ch, int n)
|
288
|
-
{
|
289
|
-
PDC_LOG(("vline() - called\n"));
|
290
|
-
|
291
|
-
return wvline(stdscr, ch, n);
|
292
|
-
}
|
293
|
-
|
294
|
-
int mvvline(int y, int x, chtype ch, int n)
|
295
|
-
{
|
296
|
-
PDC_LOG(("mvvline() - called\n"));
|
297
|
-
|
298
|
-
if (move(y, x) == ERR)
|
299
|
-
return ERR;
|
300
|
-
|
301
|
-
return wvline(stdscr, ch, n);
|
302
|
-
}
|
303
|
-
|
304
|
-
int mvwvline(WINDOW *win, int y, int x, chtype ch, int n)
|
305
|
-
{
|
306
|
-
PDC_LOG(("mvwvline() - called\n"));
|
307
|
-
|
308
|
-
if (wmove(win, y, x) == ERR)
|
309
|
-
return ERR;
|
310
|
-
|
311
|
-
return wvline(win, ch, n);
|
312
|
-
}
|
313
|
-
|
314
|
-
#ifdef PDC_WIDE
|
315
|
-
int wborder_set(WINDOW *win, const cchar_t *ls, const cchar_t *rs,
|
316
|
-
const cchar_t *ts, const cchar_t *bs, const cchar_t *tl,
|
317
|
-
const cchar_t *tr, const cchar_t *bl, const cchar_t *br)
|
318
|
-
{
|
319
|
-
PDC_LOG(("wborder_set() - called\n"));
|
320
|
-
|
321
|
-
return wborder(win, ls ? *ls : 0, rs ? *rs : 0, ts ? *ts : 0,
|
322
|
-
bs ? *bs : 0, tl ? *tl : 0, tr ? *tr : 0,
|
323
|
-
bl ? *bl : 0, br ? *br : 0);
|
324
|
-
}
|
325
|
-
|
326
|
-
int border_set(const cchar_t *ls, const cchar_t *rs, const cchar_t *ts,
|
327
|
-
const cchar_t *bs, const cchar_t *tl, const cchar_t *tr,
|
328
|
-
const cchar_t *bl, const cchar_t *br)
|
329
|
-
{
|
330
|
-
PDC_LOG(("border_set() - called\n"));
|
331
|
-
|
332
|
-
return wborder_set(stdscr, ls, rs, ts, bs, tl, tr, bl, br);
|
333
|
-
}
|
334
|
-
|
335
|
-
int box_set(WINDOW *win, const cchar_t *verch, const cchar_t *horch)
|
336
|
-
{
|
337
|
-
PDC_LOG(("box_set() - called\n"));
|
338
|
-
|
339
|
-
return wborder_set(win, verch, verch, horch, horch,
|
340
|
-
(const cchar_t *)NULL, (const cchar_t *)NULL,
|
341
|
-
(const cchar_t *)NULL, (const cchar_t *)NULL);
|
342
|
-
}
|
343
|
-
|
344
|
-
int whline_set(WINDOW *win, const cchar_t *wch, int n)
|
345
|
-
{
|
346
|
-
PDC_LOG(("whline_set() - called\n"));
|
347
|
-
|
348
|
-
return wch ? whline(win, *wch, n) : ERR;
|
349
|
-
}
|
350
|
-
|
351
|
-
int hline_set(const cchar_t *wch, int n)
|
352
|
-
{
|
353
|
-
PDC_LOG(("hline_set() - called\n"));
|
354
|
-
|
355
|
-
return whline_set(stdscr, wch, n);
|
356
|
-
}
|
357
|
-
|
358
|
-
int mvhline_set(int y, int x, const cchar_t *wch, int n)
|
359
|
-
{
|
360
|
-
PDC_LOG(("mvhline_set() - called\n"));
|
361
|
-
|
362
|
-
if (move(y, x) == ERR)
|
363
|
-
return ERR;
|
364
|
-
|
365
|
-
return whline_set(stdscr, wch, n);
|
366
|
-
}
|
367
|
-
|
368
|
-
int mvwhline_set(WINDOW *win, int y, int x, const cchar_t *wch, int n)
|
369
|
-
{
|
370
|
-
PDC_LOG(("mvwhline_set() - called\n"));
|
371
|
-
|
372
|
-
if (wmove(win, y, x) == ERR)
|
373
|
-
return ERR;
|
374
|
-
|
375
|
-
return whline_set(win, wch, n);
|
376
|
-
}
|
377
|
-
|
378
|
-
int wvline_set(WINDOW *win, const cchar_t *wch, int n)
|
379
|
-
{
|
380
|
-
PDC_LOG(("wvline_set() - called\n"));
|
381
|
-
|
382
|
-
return wch ? wvline(win, *wch, n) : ERR;
|
383
|
-
}
|
384
|
-
|
385
|
-
int vline_set(const cchar_t *wch, int n)
|
386
|
-
{
|
387
|
-
PDC_LOG(("vline_set() - called\n"));
|
388
|
-
|
389
|
-
return wvline_set(stdscr, wch, n);
|
390
|
-
}
|
391
|
-
|
392
|
-
int mvvline_set(int y, int x, const cchar_t *wch, int n)
|
393
|
-
{
|
394
|
-
PDC_LOG(("mvvline_set() - called\n"));
|
395
|
-
|
396
|
-
if (move(y, x) == ERR)
|
397
|
-
return ERR;
|
398
|
-
|
399
|
-
return wvline_set(stdscr, wch, n);
|
400
|
-
}
|
401
|
-
|
402
|
-
int mvwvline_set(WINDOW *win, int y, int x, const cchar_t *wch, int n)
|
403
|
-
{
|
404
|
-
PDC_LOG(("mvwvline_set() - called\n"));
|
405
|
-
|
406
|
-
if (wmove(win, y, x) == ERR)
|
407
|
-
return ERR;
|
408
|
-
|
409
|
-
return wvline_set(win, wch, n);
|
410
|
-
}
|
411
|
-
#endif
|
@@ -1,159 +0,0 @@
|
|
1
|
-
/* Public Domain Curses */
|
2
|
-
|
3
|
-
#include <curspriv.h>
|
4
|
-
|
5
|
-
/*man-start**************************************************************
|
6
|
-
|
7
|
-
clear
|
8
|
-
-----
|
9
|
-
|
10
|
-
### Synopsis
|
11
|
-
|
12
|
-
int clear(void);
|
13
|
-
int wclear(WINDOW *win);
|
14
|
-
int erase(void);
|
15
|
-
int werase(WINDOW *win);
|
16
|
-
int clrtobot(void);
|
17
|
-
int wclrtobot(WINDOW *win);
|
18
|
-
int clrtoeol(void);
|
19
|
-
int wclrtoeol(WINDOW *win);
|
20
|
-
|
21
|
-
### Description
|
22
|
-
|
23
|
-
erase() and werase() copy blanks (i.e. the background chtype) to
|
24
|
-
every cell of the window.
|
25
|
-
|
26
|
-
clear() and wclear() are similar to erase() and werase(), but
|
27
|
-
they also call clearok() to ensure that the the window is
|
28
|
-
cleared on the next wrefresh().
|
29
|
-
|
30
|
-
clrtobot() and wclrtobot() clear the window from the current
|
31
|
-
cursor position to the end of the window.
|
32
|
-
|
33
|
-
clrtoeol() and wclrtoeol() clear the window from the current
|
34
|
-
cursor position to the end of the current line.
|
35
|
-
|
36
|
-
### Return Value
|
37
|
-
|
38
|
-
All functions return OK on success and ERR on error.
|
39
|
-
|
40
|
-
### Portability
|
41
|
-
X/Open BSD SYS V
|
42
|
-
clear Y Y Y
|
43
|
-
wclear Y Y Y
|
44
|
-
erase Y Y Y
|
45
|
-
werase Y Y Y
|
46
|
-
clrtobot Y Y Y
|
47
|
-
wclrtobot Y Y Y
|
48
|
-
clrtoeol Y Y Y
|
49
|
-
wclrtoeol Y Y Y
|
50
|
-
|
51
|
-
**man-end****************************************************************/
|
52
|
-
|
53
|
-
int wclrtoeol(WINDOW *win)
|
54
|
-
{
|
55
|
-
int x, y, minx;
|
56
|
-
chtype blank, *ptr;
|
57
|
-
|
58
|
-
PDC_LOG(("wclrtoeol() - called: Row: %d Col: %d\n",
|
59
|
-
win->_cury, win->_curx));
|
60
|
-
|
61
|
-
if (!win)
|
62
|
-
return ERR;
|
63
|
-
|
64
|
-
y = win->_cury;
|
65
|
-
x = win->_curx;
|
66
|
-
|
67
|
-
/* wrs (4/10/93) account for window background */
|
68
|
-
|
69
|
-
blank = win->_bkgd;
|
70
|
-
|
71
|
-
for (minx = x, ptr = &win->_y[y][x]; minx < win->_maxx; minx++, ptr++)
|
72
|
-
*ptr = blank;
|
73
|
-
|
74
|
-
if (x < win->_firstch[y] || win->_firstch[y] == _NO_CHANGE)
|
75
|
-
win->_firstch[y] = x;
|
76
|
-
|
77
|
-
win->_lastch[y] = win->_maxx - 1;
|
78
|
-
|
79
|
-
PDC_sync(win);
|
80
|
-
return OK;
|
81
|
-
}
|
82
|
-
|
83
|
-
int clrtoeol(void)
|
84
|
-
{
|
85
|
-
PDC_LOG(("clrtoeol() - called\n"));
|
86
|
-
|
87
|
-
return wclrtoeol(stdscr);
|
88
|
-
}
|
89
|
-
|
90
|
-
int wclrtobot(WINDOW *win)
|
91
|
-
{
|
92
|
-
int savey, savex;
|
93
|
-
|
94
|
-
PDC_LOG(("wclrtobot() - called\n"));
|
95
|
-
|
96
|
-
if (!win)
|
97
|
-
return ERR;
|
98
|
-
|
99
|
-
savey = win->_cury;
|
100
|
-
savex = win->_curx;
|
101
|
-
|
102
|
-
/* should this involve scrolling region somehow ? */
|
103
|
-
|
104
|
-
if (win->_cury + 1 < win->_maxy)
|
105
|
-
{
|
106
|
-
win->_curx = 0;
|
107
|
-
win->_cury++;
|
108
|
-
for (; win->_maxy > win->_cury; win->_cury++)
|
109
|
-
wclrtoeol(win);
|
110
|
-
win->_cury = savey;
|
111
|
-
win->_curx = savex;
|
112
|
-
}
|
113
|
-
wclrtoeol(win);
|
114
|
-
|
115
|
-
PDC_sync(win);
|
116
|
-
return OK;
|
117
|
-
}
|
118
|
-
|
119
|
-
int clrtobot(void)
|
120
|
-
{
|
121
|
-
PDC_LOG(("clrtobot() - called\n"));
|
122
|
-
|
123
|
-
return wclrtobot(stdscr);
|
124
|
-
}
|
125
|
-
|
126
|
-
int werase(WINDOW *win)
|
127
|
-
{
|
128
|
-
PDC_LOG(("werase() - called\n"));
|
129
|
-
|
130
|
-
if (wmove(win, 0, 0) == ERR)
|
131
|
-
return ERR;
|
132
|
-
|
133
|
-
return wclrtobot(win);
|
134
|
-
}
|
135
|
-
|
136
|
-
int erase(void)
|
137
|
-
{
|
138
|
-
PDC_LOG(("erase() - called\n"));
|
139
|
-
|
140
|
-
return werase(stdscr);
|
141
|
-
}
|
142
|
-
|
143
|
-
int wclear(WINDOW *win)
|
144
|
-
{
|
145
|
-
PDC_LOG(("wclear() - called\n"));
|
146
|
-
|
147
|
-
if (!win)
|
148
|
-
return ERR;
|
149
|
-
|
150
|
-
win->_clear = TRUE;
|
151
|
-
return werase(win);
|
152
|
-
}
|
153
|
-
|
154
|
-
int clear(void)
|
155
|
-
{
|
156
|
-
PDC_LOG(("clear() - called\n"));
|
157
|
-
|
158
|
-
return wclear(stdscr);
|
159
|
-
}
|