curses 1.3.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +19 -0
- data/.github/workflows/ubuntu.yml +26 -0
- data/.github/workflows/windows.yml +25 -0
- data/History.md +27 -0
- data/README.md +14 -46
- data/Rakefile +0 -86
- data/curses.gemspec +3 -4
- data/ext/curses/curses.c +194 -38
- data/ext/curses/extconf.rb +81 -22
- data/lib/curses.rb +5 -12
- data/sample/addch.rb +16 -0
- data/sample/attr_demo.rb +32 -0
- data/sample/colors.rb +26 -0
- data/sample/mouse_move.rb +75 -0
- data/vendor/PDCurses/.gitignore +47 -0
- data/vendor/PDCurses/.travis.yml +49 -0
- data/vendor/PDCurses/CMakeLists.txt +68 -0
- data/vendor/PDCurses/HISTORY.md +2036 -0
- data/vendor/PDCurses/IMPLEMNT.md +327 -0
- data/vendor/PDCurses/Makefile +27 -0
- data/vendor/PDCurses/README.md +77 -0
- data/vendor/PDCurses/acs_defs.h +265 -0
- data/vendor/PDCurses/appveyor.yml +218 -0
- data/vendor/PDCurses/cmake/README.md +71 -0
- data/vendor/PDCurses/cmake/build_dependencies.cmake +178 -0
- data/vendor/PDCurses/cmake/build_options.cmake +25 -0
- data/vendor/PDCurses/cmake/dll_version.cmake +26 -0
- data/vendor/PDCurses/cmake/gen_config_header.cmake +43 -0
- data/vendor/PDCurses/cmake/get_version.cmake +17 -0
- data/vendor/PDCurses/cmake/make_uninstall.cmake +19 -0
- data/vendor/PDCurses/cmake/project_common.cmake +121 -0
- data/vendor/PDCurses/cmake/resource.in.cmake +52 -0
- data/vendor/PDCurses/cmake/sdl2_ttf/CMakeLists.txt +83 -0
- data/vendor/PDCurses/cmake/target_arch.cmake +36 -0
- data/vendor/PDCurses/cmake/version.in.cmake +73 -0
- data/vendor/PDCurses/cmake/watcom_open_dos16_toolchain.cmake +96 -0
- data/vendor/PDCurses/cmake/watcom_open_dos32_toolchain.cmake +106 -0
- data/vendor/PDCurses/cmake/watcom_open_os2v2_toolchain.cmake +105 -0
- data/vendor/PDCurses/curses.h +1846 -0
- data/vendor/PDCurses/curspriv.h +134 -0
- data/vendor/PDCurses/demos/README.md +25 -0
- data/vendor/PDCurses/demos/firework.c +144 -0
- data/vendor/PDCurses/demos/newtest.c +581 -0
- data/vendor/PDCurses/demos/ozdemo.c +447 -0
- data/vendor/PDCurses/demos/ptest.c +283 -0
- data/vendor/PDCurses/demos/rain.c +157 -0
- data/vendor/PDCurses/demos/testcurs.c +1607 -0
- data/vendor/PDCurses/demos/tui.c +1048 -0
- data/vendor/PDCurses/demos/tui.h +65 -0
- data/vendor/PDCurses/demos/tuidemo.c +233 -0
- data/vendor/PDCurses/demos/version.c +61 -0
- data/vendor/PDCurses/demos/worm.c +432 -0
- data/vendor/PDCurses/demos/xmas.c +955 -0
- data/vendor/PDCurses/dos/CMakeLists.txt +47 -0
- data/vendor/PDCurses/dos/Makefile +105 -0
- data/vendor/PDCurses/dos/Makefile.bcc +83 -0
- data/vendor/PDCurses/dos/Makefile.dmc +257 -0
- data/vendor/PDCurses/dos/Makefile.msc +113 -0
- data/vendor/PDCurses/dos/Makefile.wcc +107 -0
- data/vendor/PDCurses/dos/README.md +51 -0
- data/vendor/PDCurses/dos/bccdos.lrf +9 -0
- data/vendor/PDCurses/dos/mscdos.lrf +50 -0
- data/vendor/PDCurses/dos/pdcclip.c +132 -0
- data/vendor/PDCurses/dos/pdcdisp.c +135 -0
- data/vendor/PDCurses/dos/pdcdos.h +194 -0
- data/vendor/PDCurses/dos/pdcgetsc.c +98 -0
- data/vendor/PDCurses/dos/pdckbd.c +513 -0
- data/vendor/PDCurses/dos/pdcscrn.c +785 -0
- data/vendor/PDCurses/dos/pdcsetsc.c +101 -0
- data/vendor/PDCurses/dos/pdcutil.c +212 -0
- data/vendor/PDCurses/libobjs.mif +26 -0
- data/vendor/PDCurses/makedist.mif +20 -0
- data/vendor/PDCurses/man/Makefile +37 -0
- data/vendor/PDCurses/man/README.md +21 -0
- data/vendor/PDCurses/man/intro.md +361 -0
- data/vendor/PDCurses/man/manext.c +119 -0
- data/vendor/PDCurses/man/sdl.md +152 -0
- data/vendor/PDCurses/man/sdl2.md +58 -0
- data/vendor/PDCurses/man/x11.md +407 -0
- data/vendor/PDCurses/ncurses/CMakeLists.txt +66 -0
- data/vendor/PDCurses/ncurses/README.md +26 -0
- data/vendor/PDCurses/ncurses/makefile +29 -0
- data/vendor/PDCurses/os2/CMakeLists.txt +41 -0
- data/vendor/PDCurses/os2/Makefile +132 -0
- data/vendor/PDCurses/os2/Makefile.bcc +90 -0
- data/vendor/PDCurses/os2/Makefile.wcc +43 -0
- data/vendor/PDCurses/os2/README.md +43 -0
- data/vendor/PDCurses/os2/iccos2.lrf +50 -0
- data/vendor/PDCurses/os2/iccos2.mak +256 -0
- data/vendor/PDCurses/os2/pdcclip.c +188 -0
- data/vendor/PDCurses/os2/pdcdisp.c +93 -0
- data/vendor/PDCurses/os2/pdcgetsc.c +89 -0
- data/vendor/PDCurses/os2/pdckbd.c +521 -0
- data/vendor/PDCurses/os2/pdcos2.h +55 -0
- data/vendor/PDCurses/os2/pdcscrn.c +449 -0
- data/vendor/PDCurses/os2/pdcsetsc.c +112 -0
- data/vendor/PDCurses/os2/pdcutil.c +52 -0
- data/vendor/PDCurses/panel.h +56 -0
- data/vendor/PDCurses/pdcurses/README.md +25 -0
- data/vendor/PDCurses/pdcurses/addch.c +693 -0
- data/vendor/PDCurses/pdcurses/addchstr.c +245 -0
- data/vendor/PDCurses/pdcurses/addstr.c +240 -0
- data/vendor/PDCurses/pdcurses/attr.c +359 -0
- data/vendor/PDCurses/pdcurses/beep.c +68 -0
- data/vendor/PDCurses/pdcurses/bkgd.c +223 -0
- data/vendor/PDCurses/pdcurses/border.c +411 -0
- data/vendor/PDCurses/pdcurses/clear.c +159 -0
- data/vendor/PDCurses/pdcurses/color.c +298 -0
- data/vendor/PDCurses/pdcurses/debug.c +109 -0
- data/vendor/PDCurses/pdcurses/delch.c +96 -0
- data/vendor/PDCurses/pdcurses/deleteln.c +211 -0
- data/vendor/PDCurses/pdcurses/deprec.c +27 -0
- data/vendor/PDCurses/pdcurses/getch.c +417 -0
- data/vendor/PDCurses/pdcurses/getstr.c +474 -0
- data/vendor/PDCurses/pdcurses/getyx.c +139 -0
- data/vendor/PDCurses/pdcurses/inch.c +127 -0
- data/vendor/PDCurses/pdcurses/inchstr.c +214 -0
- data/vendor/PDCurses/pdcurses/initscr.c +367 -0
- data/vendor/PDCurses/pdcurses/inopts.c +324 -0
- data/vendor/PDCurses/pdcurses/insch.c +271 -0
- data/vendor/PDCurses/pdcurses/insstr.c +264 -0
- data/vendor/PDCurses/pdcurses/instr.c +246 -0
- data/vendor/PDCurses/pdcurses/kernel.c +259 -0
- data/vendor/PDCurses/pdcurses/keyname.c +157 -0
- data/vendor/PDCurses/pdcurses/mouse.c +438 -0
- data/vendor/PDCurses/pdcurses/move.c +57 -0
- data/vendor/PDCurses/pdcurses/outopts.c +159 -0
- data/vendor/PDCurses/pdcurses/overlay.c +214 -0
- data/vendor/PDCurses/pdcurses/pad.c +260 -0
- data/vendor/PDCurses/pdcurses/panel.c +633 -0
- data/vendor/PDCurses/pdcurses/printw.c +126 -0
- data/vendor/PDCurses/pdcurses/refresh.c +279 -0
- data/vendor/PDCurses/pdcurses/scanw.c +578 -0
- data/vendor/PDCurses/pdcurses/scr_dump.c +213 -0
- data/vendor/PDCurses/pdcurses/scroll.c +101 -0
- data/vendor/PDCurses/pdcurses/slk.c +591 -0
- data/vendor/PDCurses/pdcurses/termattr.c +182 -0
- data/vendor/PDCurses/pdcurses/terminfo.c +217 -0
- data/vendor/PDCurses/pdcurses/touch.c +163 -0
- data/vendor/PDCurses/pdcurses/util.c +312 -0
- data/vendor/PDCurses/pdcurses/window.c +569 -0
- data/vendor/PDCurses/sdl1/Makefile +129 -0
- data/vendor/PDCurses/sdl1/Makefile.mng +110 -0
- data/vendor/PDCurses/sdl1/README.md +31 -0
- data/vendor/PDCurses/sdl1/deffont.h +385 -0
- data/vendor/PDCurses/sdl1/deficon.h +23 -0
- data/vendor/PDCurses/sdl1/pdcclip.c +131 -0
- data/vendor/PDCurses/sdl1/pdcdisp.c +373 -0
- data/vendor/PDCurses/sdl1/pdcgetsc.c +30 -0
- data/vendor/PDCurses/sdl1/pdckbd.c +405 -0
- data/vendor/PDCurses/sdl1/pdcscrn.c +414 -0
- data/vendor/PDCurses/sdl1/pdcsdl.h +31 -0
- data/vendor/PDCurses/sdl1/pdcsetsc.c +64 -0
- data/vendor/PDCurses/sdl1/pdcutil.c +40 -0
- data/vendor/PDCurses/sdl1/sdltest.c +79 -0
- data/vendor/PDCurses/sdl2/CMakeLists.txt +76 -0
- data/vendor/PDCurses/sdl2/Makefile +135 -0
- data/vendor/PDCurses/sdl2/Makefile.vc +164 -0
- data/vendor/PDCurses/sdl2/README.md +34 -0
- data/vendor/PDCurses/sdl2/deffont.h +385 -0
- data/vendor/PDCurses/sdl2/deficon.h +23 -0
- data/vendor/PDCurses/sdl2/pdcclip.c +93 -0
- data/vendor/PDCurses/sdl2/pdcdisp.c +534 -0
- data/vendor/PDCurses/sdl2/pdcgetsc.c +30 -0
- data/vendor/PDCurses/sdl2/pdckbd.c +480 -0
- data/vendor/PDCurses/sdl2/pdcscrn.c +443 -0
- data/vendor/PDCurses/sdl2/pdcsdl.h +33 -0
- data/vendor/PDCurses/sdl2/pdcsetsc.c +67 -0
- data/vendor/PDCurses/sdl2/pdcutil.c +39 -0
- data/vendor/PDCurses/sdl2/sdltest.c +81 -0
- data/vendor/PDCurses/term.h +48 -0
- data/vendor/PDCurses/version.mif +7 -0
- data/vendor/PDCurses/vt/CMakeLists.txt +28 -0
- data/vendor/PDCurses/vt/Makefile +135 -0
- data/vendor/PDCurses/vt/Makefile.bcc +111 -0
- data/vendor/PDCurses/vt/Makefile.dmc +258 -0
- data/vendor/PDCurses/vt/Makefile.vc +144 -0
- data/vendor/PDCurses/vt/Makefile.wcc +107 -0
- data/vendor/PDCurses/vt/README.md +64 -0
- data/vendor/PDCurses/vt/pdcclip.c +20 -0
- data/vendor/PDCurses/vt/pdcdisp.c +284 -0
- data/vendor/PDCurses/vt/pdcgetsc.c +27 -0
- data/vendor/PDCurses/vt/pdckbd.c +394 -0
- data/vendor/PDCurses/vt/pdcscrn.c +434 -0
- data/vendor/PDCurses/vt/pdcsetsc.c +45 -0
- data/vendor/PDCurses/vt/pdcutil.c +43 -0
- data/vendor/PDCurses/vt/pdcvt.h +16 -0
- data/vendor/PDCurses/watcom.mif +68 -0
- data/vendor/PDCurses/wincon/CMakeLists.txt +27 -0
- data/vendor/PDCurses/wincon/Makefile.bcc +88 -0
- data/vendor/PDCurses/wincon/Makefile.dmc +256 -0
- data/vendor/PDCurses/wincon/Makefile.lcc +273 -0
- data/vendor/PDCurses/wincon/Makefile.mng +176 -0
- data/vendor/PDCurses/wincon/Makefile.vc +144 -0
- data/vendor/PDCurses/wincon/Makefile.wcc +51 -0
- data/vendor/PDCurses/wincon/README.md +85 -0
- data/vendor/PDCurses/wincon/pdcclip.c +174 -0
- data/vendor/PDCurses/wincon/pdcdisp.c +143 -0
- data/vendor/PDCurses/wincon/pdcgetsc.c +55 -0
- data/vendor/PDCurses/wincon/pdckbd.c +786 -0
- data/vendor/PDCurses/wincon/pdcscrn.c +717 -0
- data/vendor/PDCurses/wincon/pdcsetsc.c +91 -0
- data/vendor/PDCurses/wincon/pdcurses.ico +0 -0
- data/vendor/PDCurses/wincon/pdcurses.rc +28 -0
- data/vendor/PDCurses/wincon/pdcutil.c +41 -0
- data/vendor/PDCurses/wincon/pdcwin.h +31 -0
- data/vendor/PDCurses/wingui/CMakeLists.txt +27 -0
- data/vendor/PDCurses/wingui/Makefile.bcc +85 -0
- data/vendor/PDCurses/wingui/Makefile.dmc +259 -0
- data/vendor/PDCurses/wingui/Makefile.lcc +273 -0
- data/vendor/PDCurses/wingui/Makefile.mng +171 -0
- data/vendor/PDCurses/wingui/Makefile.vc +144 -0
- data/vendor/PDCurses/wingui/Makefile.wcc +51 -0
- data/vendor/PDCurses/wingui/README.md +93 -0
- data/vendor/PDCurses/wingui/pdcclip.c +174 -0
- data/vendor/PDCurses/wingui/pdcdisp.c +718 -0
- data/vendor/PDCurses/wingui/pdcgetsc.c +30 -0
- data/vendor/PDCurses/wingui/pdckbd.c +143 -0
- data/vendor/PDCurses/wingui/pdcscrn.c +2797 -0
- data/vendor/PDCurses/wingui/pdcsetsc.c +89 -0
- data/vendor/PDCurses/wingui/pdcurses.ico +0 -0
- data/vendor/PDCurses/wingui/pdcurses.rc +28 -0
- data/vendor/PDCurses/wingui/pdcutil.c +61 -0
- data/vendor/PDCurses/wingui/pdcwin.h +122 -0
- data/vendor/PDCurses/x11/Makefile.in +754 -0
- data/vendor/PDCurses/x11/PDCurses.spec +82 -0
- data/vendor/PDCurses/x11/README.md +62 -0
- data/vendor/PDCurses/x11/ScrollBox.c +319 -0
- data/vendor/PDCurses/x11/ScrollBox.h +51 -0
- data/vendor/PDCurses/x11/ScrollBoxP.h +70 -0
- data/vendor/PDCurses/x11/aclocal.m4 +994 -0
- data/vendor/PDCurses/x11/big_icon.xbm +46 -0
- data/vendor/PDCurses/x11/compose.h +201 -0
- data/vendor/PDCurses/x11/config.guess +1500 -0
- data/vendor/PDCurses/x11/config.h.in +100 -0
- data/vendor/PDCurses/x11/config.sub +1616 -0
- data/vendor/PDCurses/x11/configure +6700 -0
- data/vendor/PDCurses/x11/configure.ac +295 -0
- data/vendor/PDCurses/x11/debian/changelog +6 -0
- data/vendor/PDCurses/x11/debian/compat +1 -0
- data/vendor/PDCurses/x11/debian/control +11 -0
- data/vendor/PDCurses/x11/debian/copyright +27 -0
- data/vendor/PDCurses/x11/debian/rules +98 -0
- data/vendor/PDCurses/x11/install-sh +253 -0
- data/vendor/PDCurses/x11/little_icon.xbm +14 -0
- data/vendor/PDCurses/x11/ncurses_cfg.h +45 -0
- data/vendor/PDCurses/x11/pdcclip.c +173 -0
- data/vendor/PDCurses/x11/pdcdisp.c +85 -0
- data/vendor/PDCurses/x11/pdcgetsc.c +28 -0
- data/vendor/PDCurses/x11/pdckbd.c +104 -0
- data/vendor/PDCurses/x11/pdcscrn.c +258 -0
- data/vendor/PDCurses/x11/pdcsetsc.c +95 -0
- data/vendor/PDCurses/x11/pdcutil.c +52 -0
- data/vendor/PDCurses/x11/pdcx11.c +316 -0
- data/vendor/PDCurses/x11/pdcx11.h +191 -0
- data/vendor/PDCurses/x11/sb.c +155 -0
- data/vendor/PDCurses/x11/x11.c +3686 -0
- data/vendor/PDCurses/x11/xcurses-config.in +81 -0
- metadata +259 -25
- data/.travis.yml +0 -16
- data/appveyor.yml +0 -16
@@ -0,0 +1,45 @@
|
|
1
|
+
/* This file is only used with the ncurses test programs.
|
2
|
+
*
|
3
|
+
* Have ncurses-5.6 unpacked in your $(HOME) (you don't need to build
|
4
|
+
* it), or edit ncurses_testdir appropriately in the Makefile. Configure
|
5
|
+
* and build PDCurses for X11. (Sorry, other ports won't work yet.)
|
6
|
+
* Change to this directory, and:
|
7
|
+
*
|
8
|
+
* "make ncurses_tests" to start.
|
9
|
+
* "make ncurses_clean" when you're done.
|
10
|
+
*
|
11
|
+
* Builds: bs gdc hanoi knight tclock ncurses
|
12
|
+
*/
|
13
|
+
|
14
|
+
#define NCURSES_MOUSE_VERSION 2
|
15
|
+
|
16
|
+
#include "../config.h"
|
17
|
+
#include <curses.h>
|
18
|
+
|
19
|
+
#define ExitProgram exit
|
20
|
+
|
21
|
+
#define HAVE_CURSES_VERSION 1
|
22
|
+
#define HAVE_GETBEGX 1
|
23
|
+
#define HAVE_GETCURX 1
|
24
|
+
#define HAVE_GETMAXX 1
|
25
|
+
#define HAVE_GETNSTR 1
|
26
|
+
#define HAVE_GETTIMEOFDAY 1
|
27
|
+
#define HAVE_GETWIN 1
|
28
|
+
#define HAVE_LIBPANEL 1
|
29
|
+
#define HAVE_LOCALE_H 1
|
30
|
+
#define HAVE_NAPMS 1
|
31
|
+
#define HAVE_PANEL_H 1
|
32
|
+
#define HAVE_PUTWIN 1
|
33
|
+
#define HAVE_SLK_COLOR 1
|
34
|
+
#define HAVE_SLK_INIT 1
|
35
|
+
#define HAVE_WRESIZE 1
|
36
|
+
|
37
|
+
#ifdef PDC_WIDE
|
38
|
+
# define USE_WIDEC_SUPPORT 1
|
39
|
+
#endif
|
40
|
+
|
41
|
+
/* Fool ncurses.c so it gives us all the tests, and doesn't redefine
|
42
|
+
ACS_ chars
|
43
|
+
*/
|
44
|
+
|
45
|
+
#define NCURSES_VERSION PDCURSES
|
@@ -0,0 +1,173 @@
|
|
1
|
+
/* Public Domain Curses */
|
2
|
+
|
3
|
+
#include "pdcx11.h"
|
4
|
+
|
5
|
+
#include <stdlib.h>
|
6
|
+
|
7
|
+
/*man-start**************************************************************
|
8
|
+
|
9
|
+
clipboard
|
10
|
+
---------
|
11
|
+
|
12
|
+
### Synopsis
|
13
|
+
|
14
|
+
int PDC_getclipboard(char **contents, long *length);
|
15
|
+
int PDC_setclipboard(const char *contents, long length);
|
16
|
+
int PDC_freeclipboard(char *contents);
|
17
|
+
int PDC_clearclipboard(void);
|
18
|
+
|
19
|
+
### Description
|
20
|
+
|
21
|
+
PDC_getclipboard() gets the textual contents of the system's
|
22
|
+
clipboard. This function returns the contents of the clipboard
|
23
|
+
in the contents argument. It is the responsibilitiy of the
|
24
|
+
caller to free the memory returned, via PDC_freeclipboard().
|
25
|
+
The length of the clipboard contents is returned in the length
|
26
|
+
argument.
|
27
|
+
|
28
|
+
PDC_setclipboard copies the supplied text into the system's
|
29
|
+
clipboard, emptying the clipboard prior to the copy.
|
30
|
+
|
31
|
+
PDC_clearclipboard() clears the internal clipboard.
|
32
|
+
|
33
|
+
### Return Values
|
34
|
+
|
35
|
+
indicator of success/failure of call.
|
36
|
+
PDC_CLIP_SUCCESS the call was successful
|
37
|
+
PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for
|
38
|
+
the clipboard contents
|
39
|
+
PDC_CLIP_EMPTY the clipboard contains no text
|
40
|
+
PDC_CLIP_ACCESS_ERROR no clipboard support
|
41
|
+
|
42
|
+
### Portability
|
43
|
+
X/Open BSD SYS V
|
44
|
+
PDC_getclipboard - - -
|
45
|
+
PDC_setclipboard - - -
|
46
|
+
PDC_freeclipboard - - -
|
47
|
+
PDC_clearclipboard - - -
|
48
|
+
|
49
|
+
**man-end****************************************************************/
|
50
|
+
|
51
|
+
int PDC_getclipboard(char **contents, long *length)
|
52
|
+
{
|
53
|
+
#ifdef PDC_WIDE
|
54
|
+
wchar_t *wcontents;
|
55
|
+
#endif
|
56
|
+
int result = 0;
|
57
|
+
int len;
|
58
|
+
|
59
|
+
PDC_LOG(("PDC_getclipboard() - called\n"));
|
60
|
+
|
61
|
+
XCursesInstructAndWait(CURSES_GET_SELECTION);
|
62
|
+
|
63
|
+
if (XC_read_socket(xc_display_sock, &result, sizeof(int)) < 0)
|
64
|
+
XCursesExitCursesProcess(5, "exiting from PDC_getclipboard");
|
65
|
+
|
66
|
+
if (result == PDC_CLIP_SUCCESS)
|
67
|
+
{
|
68
|
+
if (XC_read_socket(xc_display_sock, &len, sizeof(int)) < 0)
|
69
|
+
XCursesExitCursesProcess(5, "exiting from PDC_getclipboard");
|
70
|
+
#ifdef PDC_WIDE
|
71
|
+
wcontents = malloc((len + 1) * sizeof(wchar_t));
|
72
|
+
*contents = malloc(len * 3 + 1);
|
73
|
+
|
74
|
+
if (!wcontents || !*contents)
|
75
|
+
#else
|
76
|
+
*contents = malloc(len + 1);
|
77
|
+
|
78
|
+
if (!*contents)
|
79
|
+
#endif
|
80
|
+
XCursesExitCursesProcess(6, "exiting from PDC_getclipboard - "
|
81
|
+
"synchronization error");
|
82
|
+
|
83
|
+
if (len)
|
84
|
+
{
|
85
|
+
if (XC_read_socket(xc_display_sock,
|
86
|
+
#ifdef PDC_WIDE
|
87
|
+
wcontents, len * sizeof(wchar_t)) < 0)
|
88
|
+
#else
|
89
|
+
*contents, len) < 0)
|
90
|
+
#endif
|
91
|
+
XCursesExitCursesProcess(5, "exiting from PDC_getclipboard");
|
92
|
+
}
|
93
|
+
|
94
|
+
#ifdef PDC_WIDE
|
95
|
+
wcontents[len] = 0;
|
96
|
+
len = PDC_wcstombs(*contents, wcontents, len * 3);
|
97
|
+
free(wcontents);
|
98
|
+
#endif
|
99
|
+
(*contents)[len] = '\0';
|
100
|
+
*length = len;
|
101
|
+
}
|
102
|
+
|
103
|
+
return result;
|
104
|
+
}
|
105
|
+
|
106
|
+
int PDC_setclipboard(const char *contents, long length)
|
107
|
+
{
|
108
|
+
#ifdef PDC_WIDE
|
109
|
+
wchar_t *wcontents;
|
110
|
+
#endif
|
111
|
+
int rc;
|
112
|
+
|
113
|
+
PDC_LOG(("PDC_setclipboard() - called\n"));
|
114
|
+
|
115
|
+
#ifdef PDC_WIDE
|
116
|
+
wcontents = malloc((length + 1) * sizeof(wchar_t));
|
117
|
+
if (!wcontents)
|
118
|
+
return PDC_CLIP_MEMORY_ERROR;
|
119
|
+
|
120
|
+
length = PDC_mbstowcs(wcontents, contents, length);
|
121
|
+
#endif
|
122
|
+
XCursesInstruct(CURSES_SET_SELECTION);
|
123
|
+
|
124
|
+
/* Write, then wait for X to do its stuff; expect return code. */
|
125
|
+
|
126
|
+
if (XC_write_socket(xc_display_sock, &length, sizeof(long)) >= 0)
|
127
|
+
{
|
128
|
+
if (XC_write_socket(xc_display_sock,
|
129
|
+
#ifdef PDC_WIDE
|
130
|
+
wcontents, length * sizeof(wchar_t)) >= 0)
|
131
|
+
{
|
132
|
+
free(wcontents);
|
133
|
+
#else
|
134
|
+
contents, length) >= 0)
|
135
|
+
{
|
136
|
+
#endif
|
137
|
+
if (XC_read_socket(xc_display_sock, &rc, sizeof(int)) >= 0)
|
138
|
+
return rc;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
142
|
+
XCursesExitCursesProcess(5, "exiting from PDC_setclipboard");
|
143
|
+
|
144
|
+
return PDC_CLIP_ACCESS_ERROR; /* not reached */
|
145
|
+
}
|
146
|
+
|
147
|
+
int PDC_freeclipboard(char *contents)
|
148
|
+
{
|
149
|
+
PDC_LOG(("PDC_freeclipboard() - called\n"));
|
150
|
+
|
151
|
+
free(contents);
|
152
|
+
return PDC_CLIP_SUCCESS;
|
153
|
+
}
|
154
|
+
|
155
|
+
int PDC_clearclipboard(void)
|
156
|
+
{
|
157
|
+
int rc;
|
158
|
+
long len = 0;
|
159
|
+
|
160
|
+
PDC_LOG(("PDC_clearclipboard() - called\n"));
|
161
|
+
|
162
|
+
XCursesInstruct(CURSES_CLEAR_SELECTION);
|
163
|
+
|
164
|
+
/* Write, then wait for X to do its stuff; expect return code. */
|
165
|
+
|
166
|
+
if (XC_write_socket(xc_display_sock, &len, sizeof(long)) >= 0)
|
167
|
+
if (XC_read_socket(xc_display_sock, &rc, sizeof(int)) >= 0)
|
168
|
+
return rc;
|
169
|
+
|
170
|
+
XCursesExitCursesProcess(5, "exiting from PDC_clearclipboard");
|
171
|
+
|
172
|
+
return PDC_CLIP_ACCESS_ERROR; /* not reached */
|
173
|
+
}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
/* Public Domain Curses */
|
2
|
+
|
3
|
+
#include "pdcx11.h"
|
4
|
+
|
5
|
+
#include <string.h>
|
6
|
+
|
7
|
+
#ifdef CHTYPE_LONG
|
8
|
+
|
9
|
+
#ifdef PDC_WIDE
|
10
|
+
#define USE_UNICODE_ACS_CHARS 1
|
11
|
+
#else
|
12
|
+
#define USE_ISO8859_CHARSET
|
13
|
+
#endif
|
14
|
+
|
15
|
+
#include "acs_defs.h"
|
16
|
+
|
17
|
+
#endif
|
18
|
+
|
19
|
+
int PDC_display_cursor(int oldrow, int oldcol, int newrow, int newcol,
|
20
|
+
int visibility)
|
21
|
+
{
|
22
|
+
char buf[30];
|
23
|
+
int idx, pos;
|
24
|
+
|
25
|
+
PDC_LOG(("%s:PDC_display_cursor() - called: NEW row %d col %d, vis %d\n",
|
26
|
+
XCLOGMSG, newrow, newcol, visibility));
|
27
|
+
|
28
|
+
if (visibility == -1)
|
29
|
+
{
|
30
|
+
/* Only send the CURSES_DISPLAY_CURSOR message, no data */
|
31
|
+
|
32
|
+
idx = CURSES_DISPLAY_CURSOR;
|
33
|
+
memcpy(buf, &idx, sizeof(int));
|
34
|
+
idx = sizeof(int);
|
35
|
+
}
|
36
|
+
else
|
37
|
+
{
|
38
|
+
idx = CURSES_CURSOR;
|
39
|
+
memcpy(buf, &idx, sizeof(int));
|
40
|
+
|
41
|
+
idx = sizeof(int);
|
42
|
+
pos = oldrow + (oldcol << 8);
|
43
|
+
memcpy(buf + idx, &pos, sizeof(int));
|
44
|
+
|
45
|
+
idx += sizeof(int);
|
46
|
+
pos = newrow + (newcol << 8);
|
47
|
+
memcpy(buf + idx, &pos, sizeof(int));
|
48
|
+
|
49
|
+
idx += sizeof(int);
|
50
|
+
}
|
51
|
+
|
52
|
+
if (XC_write_socket(xc_display_sock, buf, idx) < 0)
|
53
|
+
XCursesExitCursesProcess(1, "exiting from PDC_display_cursor");
|
54
|
+
|
55
|
+
return OK;
|
56
|
+
}
|
57
|
+
|
58
|
+
/* position hardware cursor at (y, x) */
|
59
|
+
|
60
|
+
void PDC_gotoyx(int row, int col)
|
61
|
+
{
|
62
|
+
PDC_LOG(("PDC_gotoyx() - called: row %d col %d\n", row, col));
|
63
|
+
|
64
|
+
PDC_display_cursor(SP->cursrow, SP->curscol, row, col, SP->visibility);
|
65
|
+
}
|
66
|
+
|
67
|
+
/* update the given physical line to look like the corresponding line in
|
68
|
+
curscr */
|
69
|
+
|
70
|
+
void PDC_transform_line(int lineno, int x, int len, const chtype *srcp)
|
71
|
+
{
|
72
|
+
PDC_LOG(("PDC_transform_line() - called: line %d\n", lineno));
|
73
|
+
|
74
|
+
XC_get_line_lock(lineno);
|
75
|
+
|
76
|
+
memcpy(Xcurscr + XCURSCR_Y_OFF(lineno) + (x * sizeof(chtype)), srcp,
|
77
|
+
len * sizeof(chtype));
|
78
|
+
|
79
|
+
*(Xcurscr + XCURSCR_START_OFF + lineno) = x;
|
80
|
+
*(Xcurscr + XCURSCR_LENGTH_OFF + lineno) = len;
|
81
|
+
|
82
|
+
XC_release_line_lock(lineno);
|
83
|
+
|
84
|
+
XCursesInstructAndWait(CURSES_REFRESH);
|
85
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
/* Public Domain Curses */
|
2
|
+
|
3
|
+
#include "pdcx11.h"
|
4
|
+
|
5
|
+
/* return width of screen/viewport */
|
6
|
+
|
7
|
+
int PDC_get_columns(void)
|
8
|
+
{
|
9
|
+
PDC_LOG(("PDC_get_columns() - called\n"));
|
10
|
+
|
11
|
+
return XCursesCOLS;
|
12
|
+
}
|
13
|
+
|
14
|
+
/* get the cursor size/shape */
|
15
|
+
|
16
|
+
int PDC_get_cursor_mode(void)
|
17
|
+
{
|
18
|
+
return 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
/* return number of screen rows */
|
22
|
+
|
23
|
+
int PDC_get_rows(void)
|
24
|
+
{
|
25
|
+
PDC_LOG(("PDC_get_rows() - called\n"));
|
26
|
+
|
27
|
+
return XCursesLINES;
|
28
|
+
}
|
@@ -0,0 +1,104 @@
|
|
1
|
+
/* Public Domain Curses */
|
2
|
+
|
3
|
+
#include "pdcx11.h"
|
4
|
+
|
5
|
+
/*man-start**************************************************************
|
6
|
+
|
7
|
+
pdckbd
|
8
|
+
------
|
9
|
+
|
10
|
+
### Synopsis
|
11
|
+
|
12
|
+
unsigned long PDC_get_input_fd(void);
|
13
|
+
|
14
|
+
### Description
|
15
|
+
|
16
|
+
PDC_get_input_fd() returns the file descriptor that PDCurses
|
17
|
+
reads its input from. It can be used for select().
|
18
|
+
|
19
|
+
### Portability
|
20
|
+
X/Open BSD SYS V
|
21
|
+
PDC_get_input_fd - - -
|
22
|
+
|
23
|
+
**man-end****************************************************************/
|
24
|
+
|
25
|
+
/* check if a key or mouse event is waiting */
|
26
|
+
|
27
|
+
bool PDC_check_key(void)
|
28
|
+
{
|
29
|
+
struct timeval socket_timeout = {0};
|
30
|
+
int s;
|
31
|
+
|
32
|
+
/* Is something ready to be read on the socket ? Must be a key. */
|
33
|
+
|
34
|
+
FD_ZERO(&xc_readfds);
|
35
|
+
FD_SET(xc_key_sock, &xc_readfds);
|
36
|
+
|
37
|
+
if ((s = select(FD_SETSIZE, (FD_SET_CAST)&xc_readfds, NULL,
|
38
|
+
NULL, &socket_timeout)) < 0)
|
39
|
+
XCursesExitCursesProcess(3, "child - exiting from "
|
40
|
+
"PDC_check_key select failed");
|
41
|
+
|
42
|
+
PDC_LOG(("%s:PDC_check_key() - returning %s\n", XCLOGMSG,
|
43
|
+
s ? "TRUE" : "FALSE"));
|
44
|
+
|
45
|
+
return !!s;
|
46
|
+
}
|
47
|
+
|
48
|
+
/* return the next available key or mouse event */
|
49
|
+
|
50
|
+
int PDC_get_key(void)
|
51
|
+
{
|
52
|
+
unsigned long newkey = 0;
|
53
|
+
int key = 0;
|
54
|
+
|
55
|
+
if (XC_read_socket(xc_key_sock, &newkey, sizeof(unsigned long)) < 0)
|
56
|
+
XCursesExitCursesProcess(2, "exiting from PDC_get_key");
|
57
|
+
|
58
|
+
pdc_key_modifiers = (newkey >> 24) & 0xFF;
|
59
|
+
key = (int)(newkey & 0x00FFFFFF);
|
60
|
+
|
61
|
+
if (key == KEY_MOUSE && SP->key_code)
|
62
|
+
{
|
63
|
+
if (XC_read_socket(xc_key_sock, &pdc_mouse_status,
|
64
|
+
sizeof(MOUSE_STATUS)) < 0)
|
65
|
+
XCursesExitCursesProcess(2, "exiting from PDC_get_key");
|
66
|
+
}
|
67
|
+
|
68
|
+
PDC_LOG(("%s:PDC_get_key() - key %d returned\n", XCLOGMSG, key));
|
69
|
+
|
70
|
+
return key;
|
71
|
+
}
|
72
|
+
|
73
|
+
unsigned long PDC_get_input_fd(void)
|
74
|
+
{
|
75
|
+
PDC_LOG(("PDC_get_input_fd() - called\n"));
|
76
|
+
|
77
|
+
return xc_key_sock;
|
78
|
+
}
|
79
|
+
|
80
|
+
void PDC_set_keyboard_binary(bool on)
|
81
|
+
{
|
82
|
+
PDC_LOG(("PDC_set_keyboard_binary() - called\n"));
|
83
|
+
}
|
84
|
+
|
85
|
+
/* discard any pending keyboard or mouse input -- this is the core
|
86
|
+
routine for flushinp() */
|
87
|
+
|
88
|
+
void PDC_flushinp(void)
|
89
|
+
{
|
90
|
+
PDC_LOG(("PDC_flushinp() - called\n"));
|
91
|
+
|
92
|
+
while (PDC_check_key())
|
93
|
+
PDC_get_key();
|
94
|
+
}
|
95
|
+
|
96
|
+
int PDC_mouse_set(void)
|
97
|
+
{
|
98
|
+
return OK;
|
99
|
+
}
|
100
|
+
|
101
|
+
int PDC_modifiers_set(void)
|
102
|
+
{
|
103
|
+
return OK;
|
104
|
+
}
|
@@ -0,0 +1,258 @@
|
|
1
|
+
/* Public Domain Curses */
|
2
|
+
|
3
|
+
#include "pdcx11.h"
|
4
|
+
|
5
|
+
/* special purpose function keys */
|
6
|
+
|
7
|
+
static int PDC_shutdown_key[PDC_MAX_FUNCTION_KEYS] = { 0, 0, 0, 0, 0 };
|
8
|
+
|
9
|
+
/* COLOR_PAIR to attribute encoding table. */
|
10
|
+
|
11
|
+
short *xc_atrtab = (short *)NULL;
|
12
|
+
|
13
|
+
/* close the physical screen */
|
14
|
+
|
15
|
+
void PDC_scr_close(void)
|
16
|
+
{
|
17
|
+
PDC_LOG(("PDC_scr_close() - called\n"));
|
18
|
+
}
|
19
|
+
|
20
|
+
void PDC_scr_free(void)
|
21
|
+
{
|
22
|
+
XCursesExit();
|
23
|
+
|
24
|
+
xc_atrtab = (short *)NULL;
|
25
|
+
}
|
26
|
+
|
27
|
+
/* open the physical screen -- allocate SP, miscellaneous intialization */
|
28
|
+
|
29
|
+
int PDC_scr_open(int argc, char **argv)
|
30
|
+
{
|
31
|
+
extern bool sb_started;
|
32
|
+
|
33
|
+
PDC_LOG(("PDC_scr_open() - called\n"));
|
34
|
+
|
35
|
+
if ((XCursesInitscr(argc, argv) == ERR) || !SP)
|
36
|
+
return ERR;
|
37
|
+
|
38
|
+
SP->cursrow = SP->curscol = 0;
|
39
|
+
SP->orig_attr = FALSE;
|
40
|
+
SP->sb_on = sb_started;
|
41
|
+
SP->sb_total_y = 0;
|
42
|
+
SP->sb_viewport_y = 0;
|
43
|
+
SP->sb_cur_y = 0;
|
44
|
+
SP->sb_total_x = 0;
|
45
|
+
SP->sb_viewport_x = 0;
|
46
|
+
SP->sb_cur_x = 0;
|
47
|
+
|
48
|
+
return OK;
|
49
|
+
}
|
50
|
+
|
51
|
+
/* the core of resize_term() */
|
52
|
+
|
53
|
+
int PDC_resize_screen(int nlines, int ncols)
|
54
|
+
{
|
55
|
+
PDC_LOG(("PDC_resize_screen() - called. Lines: %d Cols: %d\n",
|
56
|
+
nlines, ncols));
|
57
|
+
|
58
|
+
if( !stdscr) /* window hasn't been created yet; we're */
|
59
|
+
{ /* specifying its size before doing so */
|
60
|
+
XCursesLINES = nlines;
|
61
|
+
XCursesCOLS = ncols;
|
62
|
+
return OK;
|
63
|
+
}
|
64
|
+
|
65
|
+
if (nlines || ncols || !SP->resized)
|
66
|
+
return ERR;
|
67
|
+
|
68
|
+
shmdt((char *)Xcurscr);
|
69
|
+
XCursesInstructAndWait(CURSES_RESIZE);
|
70
|
+
|
71
|
+
if ((shmid_Xcurscr = shmget(shmkey_Xcurscr,
|
72
|
+
SP->XcurscrSize + XCURSESSHMMIN, 0700)) < 0)
|
73
|
+
{
|
74
|
+
perror("Cannot allocate shared memory for curscr");
|
75
|
+
kill(xc_otherpid, SIGKILL);
|
76
|
+
return ERR;
|
77
|
+
}
|
78
|
+
|
79
|
+
XCursesLINES = SP->lines;
|
80
|
+
XCursesCOLS = SP->cols;
|
81
|
+
|
82
|
+
PDC_LOG(("%s:shmid_Xcurscr %d shmkey_Xcurscr %d SP->lines %d "
|
83
|
+
"SP->cols %d\n", XCLOGMSG, shmid_Xcurscr,
|
84
|
+
shmkey_Xcurscr, SP->lines, SP->cols));
|
85
|
+
|
86
|
+
Xcurscr = (unsigned char*)shmat(shmid_Xcurscr, 0, 0);
|
87
|
+
xc_atrtab = (short *)(Xcurscr + XCURSCR_ATRTAB_OFF);
|
88
|
+
|
89
|
+
SP->resized = FALSE;
|
90
|
+
|
91
|
+
return OK;
|
92
|
+
}
|
93
|
+
|
94
|
+
void PDC_reset_prog_mode(void)
|
95
|
+
{
|
96
|
+
PDC_LOG(("PDC_reset_prog_mode() - called.\n"));
|
97
|
+
}
|
98
|
+
|
99
|
+
void PDC_reset_shell_mode(void)
|
100
|
+
{
|
101
|
+
PDC_LOG(("PDC_reset_shell_mode() - called.\n"));
|
102
|
+
}
|
103
|
+
|
104
|
+
void PDC_restore_screen_mode(int i)
|
105
|
+
{
|
106
|
+
}
|
107
|
+
|
108
|
+
void PDC_save_screen_mode(int i)
|
109
|
+
{
|
110
|
+
}
|
111
|
+
|
112
|
+
void PDC_init_pair(short pair, short fg, short bg)
|
113
|
+
{
|
114
|
+
xc_atrtab[pair * 2] = fg;
|
115
|
+
xc_atrtab[pair * 2 + 1] = bg;
|
116
|
+
}
|
117
|
+
|
118
|
+
int PDC_pair_content(short pair, short *fg, short *bg)
|
119
|
+
{
|
120
|
+
*fg = xc_atrtab[pair * 2];
|
121
|
+
*bg = xc_atrtab[pair * 2 + 1];
|
122
|
+
|
123
|
+
return OK;
|
124
|
+
}
|
125
|
+
|
126
|
+
bool PDC_can_change_color(void)
|
127
|
+
{
|
128
|
+
return TRUE;
|
129
|
+
}
|
130
|
+
|
131
|
+
int PDC_color_content(short color, short *red, short *green, short *blue)
|
132
|
+
{
|
133
|
+
XColor *tmp = (XColor *)(Xcurscr + XCURSCR_XCOLOR_OFF);
|
134
|
+
|
135
|
+
tmp->pixel = color;
|
136
|
+
|
137
|
+
XCursesInstructAndWait(CURSES_GET_COLOR);
|
138
|
+
|
139
|
+
*red = ((double)(tmp->red) * 1000 / 65535) + 0.5;
|
140
|
+
*green = ((double)(tmp->green) * 1000 / 65535) + 0.5;
|
141
|
+
*blue = ((double)(tmp->blue) * 1000 / 65535) + 0.5;
|
142
|
+
|
143
|
+
return OK;
|
144
|
+
}
|
145
|
+
|
146
|
+
int PDC_init_color(short color, short red, short green, short blue)
|
147
|
+
{
|
148
|
+
XColor *tmp = (XColor *)(Xcurscr + XCURSCR_XCOLOR_OFF);
|
149
|
+
|
150
|
+
tmp->pixel = color;
|
151
|
+
|
152
|
+
tmp->red = ((double)red * 65535 / 1000) + 0.5;
|
153
|
+
tmp->green = ((double)green * 65535 / 1000) + 0.5;
|
154
|
+
tmp->blue = ((double)blue * 65535 / 1000) + 0.5;
|
155
|
+
|
156
|
+
XCursesInstructAndWait(CURSES_SET_COLOR);
|
157
|
+
|
158
|
+
return OK;
|
159
|
+
}
|
160
|
+
|
161
|
+
/*man-start**************************************************************
|
162
|
+
|
163
|
+
Function keys
|
164
|
+
-------------
|
165
|
+
|
166
|
+
### Synopsis
|
167
|
+
|
168
|
+
int PDC_set_function_key( const unsigned function, const int new_key);
|
169
|
+
|
170
|
+
### Description
|
171
|
+
|
172
|
+
Allows one to set a 'shut down' key, and reassign hotkeys used for
|
173
|
+
pasting from the clipboard and enlarging and decreasing the font size,
|
174
|
+
and for using the font selection dialog (on platforms where these
|
175
|
+
things are possible and implemented). For example, calling
|
176
|
+
|
177
|
+
PDC_set_function_key( FUNCTION_KEY_SHUT_DOWN, ALT_Q);
|
178
|
+
|
179
|
+
would reset PDCurses such that, if the user clicks on the 'close' box,
|
180
|
+
Alt-Q would be added to the key queue. This would give the app the
|
181
|
+
opportunity to shut things down gracefully, perhaps asking "are you
|
182
|
+
sure", and/or "save changes or discard or cancel", rather than just
|
183
|
+
having the window close (the default behavior).
|
184
|
+
|
185
|
+
Similarly, one can set FUNCTION_KEY_ABORT to a key which, when pressed,
|
186
|
+
will cause the program to abort gracelessly (no key returned to the
|
187
|
+
application). One would normally use this to enable/disable Ctrl-C or
|
188
|
+
Ctrl-Break.
|
189
|
+
|
190
|
+
### Return Value
|
191
|
+
|
192
|
+
Returns key code previously set for that function, or -1 if the
|
193
|
+
function does not actually exist.
|
194
|
+
|
195
|
+
### Portability
|
196
|
+
|
197
|
+
PDCurses-only function.
|
198
|
+
|
199
|
+
**man-end****************************************************************/
|
200
|
+
|
201
|
+
int PDC_set_function_key( const unsigned function, const int new_key)
|
202
|
+
{
|
203
|
+
int old_key = -1;
|
204
|
+
|
205
|
+
if (function < PDC_MAX_FUNCTION_KEYS)
|
206
|
+
{
|
207
|
+
old_key = PDC_shutdown_key[function];
|
208
|
+
PDC_shutdown_key[function] = new_key;
|
209
|
+
}
|
210
|
+
if (function == FUNCTION_KEY_SHUT_DOWN)
|
211
|
+
{
|
212
|
+
SP->exit_key = new_key;
|
213
|
+
}
|
214
|
+
return(old_key);
|
215
|
+
}
|
216
|
+
|
217
|
+
|
218
|
+
/*man-start**************************************************************
|
219
|
+
|
220
|
+
Resize limits
|
221
|
+
-------------
|
222
|
+
|
223
|
+
### Synopsis
|
224
|
+
|
225
|
+
void PDC_set_resize_limits( const int new_min_lines,
|
226
|
+
const int new_max_lines,
|
227
|
+
const int new_min_cols,
|
228
|
+
const int new_max_cols);
|
229
|
+
|
230
|
+
### Description
|
231
|
+
|
232
|
+
For platforms supporting resizable windows (SDLx, WinGUI, X11). Some
|
233
|
+
programs may be unprepared for a resize event; for these, calling
|
234
|
+
this function with the max and min limits equal ensures that no
|
235
|
+
user resizing can be done. Other programs may require at least a
|
236
|
+
certain number, and/or no more than a certain number, of columns
|
237
|
+
and/or lines.
|
238
|
+
|
239
|
+
### Portability
|
240
|
+
|
241
|
+
PDCurses-only function.
|
242
|
+
|
243
|
+
**man-end****************************************************************/
|
244
|
+
|
245
|
+
/* Note that at least at present, only WinGUI pays any attention to
|
246
|
+
resize limits. */
|
247
|
+
|
248
|
+
int PDC_min_lines = 25, PDC_min_cols = 80;
|
249
|
+
int PDC_max_lines = 25, PDC_max_cols = 80;
|
250
|
+
|
251
|
+
void PDC_set_resize_limits( const int new_min_lines, const int new_max_lines,
|
252
|
+
const int new_min_cols, const int new_max_cols)
|
253
|
+
{
|
254
|
+
PDC_min_lines = max( new_min_lines, 2);
|
255
|
+
PDC_max_lines = max( new_max_lines, PDC_min_lines);
|
256
|
+
PDC_min_cols = max( new_min_cols, 2);
|
257
|
+
PDC_max_cols = max( new_max_cols, PDC_min_cols);
|
258
|
+
}
|