• R/O
  • HTTP
  • SSH
  • HTTPS

lcs-jp: Commit

Liberal Crime Squad 日本語版


Commit MetaInfo

Revision8afbfa21b2269cc70ad40b80594d93b0f0810321 (tree)
Zeit2019-04-27 18:53:31
Autormaruhiro <maruhiro@brid...>
Commitermaruhiro

Log Message

プログラムを整理した

Ändern Zusammenfassung

Diff

--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@ dev
1111 workspaces
1212 *.o
1313 crimesquad.exe
14+bs.exe
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
1+all:
2+ cd src; make -f Makefile
3+
4+install:
5+ cp -p ./src/crimesquad /usr/local/bin
6+ rm -r -f /usr/local/share/lcs
7+ mkdir /usr/local/share/lcs
8+ mkdir /usr/local/share/lcs/art
9+ cp -p -r art/ /usr/local/share/lcs
10+
11+lcs_win32_jp.zip:
12+ rm -r -f lcs_win32_jp
13+ mkdir lcs_win32_jp
14+ mkdir lcs_win32_jp/art
15+ cp -p art/*.* lcs_win32_jp/art
16+ cp -p src/crimesquad.exe docs/CrimeSquadManual.txt ./pdcurses.dll ./COPYING lcs_win32_jp/
17+ zip -u -9 lcs_win32_jp.zip lcs_win32_jp/*
18+ zip -u -9 lcs_win32_jp.zip lcs_win32_jp/art/*
19+ rm -r -f lcs_win32_jp
20+
21+clean:
22+ cd src; make clean
23+ rm -r -f lcs_win32_jp
24+ rm -f *.zip
--- a/src/Makefile
+++ b/src/Makefile
@@ -81,15 +81,21 @@ OBJS = \
8181 game.o \
8282 lcsio.o
8383 CC = g++
84-#CFLAGS = -w -I$(shell pwd) -I./pdcurses/ -DNOMINMAX -DMARKUP_STL $(shell sdl2-config --cflags)
85-#LDFLAGS = -L./pdcurses/ -lpdcurses -lSDL2_mixer $(shell sdl2-config --libs)
86-CFLAGS = -w -I$(shell pwd) -DNOMINMAX -DMARKUP_STL -DDONT_INCLUDE_SDL
87-LDFLAGS = -lpdcurses
8884
89-$(EXE): $(OBJS)
85+# for Linux
86+CFLAGS = -w -I$(shell pwd) -DNOMINMAX -DMARKUP_STL -DMARKUP_MBCS -DMARKUP_STDCONV -Dwctomb=wctomb_sjis -DDONT_INCLUDE_SDL -DLinux -DHAVE_LIBNCURSES
87+LDFLAGS = -lncursesw -liconv
88+
89+# for Windows
90+#CFLAGS = -w -I$(shell pwd) -DNOMINMAX -DMARKUP_STL -DMARKUP_MBCS -DMARKUP_STDCONV -Dwctomb=wctomb_sjis -DDONT_INCLUDE_SDL
91+#LDFLAGS = -lpdcurses
92+
93+$(EXE): bs $(OBJS)
9094 $(CC) -o $(EXE) $(OBJS) $(LDFLAGS)
9195 .cpp.o:
92- $(CC) $(CFLAGS) -E -c $< | iconv -f UTF-8 -t cp932 | sed 's/[\x80-\xff]\\/&\\/g' | $(CC) $(CFLAGS) -c -xc++ -o $@ -
96+ $(CC) $(CFLAGS) -E -c $< | iconv -f UTF-8 -t cp932 | ./bs | $(CC) $(CFLAGS) -c -xc++ -o $@ -
97+bs: bs.c
98+ $(CC) -o bs bs.c
9399
94100 clean:
95- rm -f $(OBJS) $(EXE) $(EXE).exe
101+ rm -f $(OBJS) bs bs.exe $(EXE) $(EXE).exe
--- /dev/null
+++ b/src/bs.c
@@ -0,0 +1,16 @@
1+#include <stdio.h>
2+
3+int main(int argc, char *argv[])
4+{
5+ char buf[256], *p;
6+
7+ while(fgets(buf, sizeof(buf), stdin) > 0 && !feof(stdin)) {
8+ for(p = buf; *p != 0; p++) {
9+ if(p != buf && *p == '\\' && (*(p - 1) & 0x80))
10+ putc('\\', stdout);
11+ putc(*p, stdout);
12+ }
13+ }
14+
15+ return 0;
16+}
--- a/src/common.h
+++ b/src/common.h
@@ -73,7 +73,7 @@
7373 //#define CH_USE_CP437 // this works best with the "W" version of PDCurses on Windows (from pdc34dllw.zip instead of pdc34dllu.zip)... it's the standard way we do it
7474 //#define CH_USE_ASCII_HACK // this works with either the "W" or "U" version of PDCurses just fine either way, as it only uses standard ASCII characters (ugly though)
7575 //#define CH_USE_UNICODE // this only works on Windows with the UTF-8 version of PDCurses (the "U" version), and if you have the PDC_WIDE define above uncommented
76- #define CH_USE_MULTIBYTE
76+ #define CH_USE_MB
7777 #else
7878 #include <vector>
7979 #include <map>
@@ -128,7 +128,7 @@
128128 #endif
129129 #endif
130130
131-#if !defined(CH_USE_CP437) && !defined(CH_USE_MULTIBYTE)
131+#ifndef CH_USE_CP437
132132 // addch_unicode() is implemented in common\consolesupport.cpp
133133 // we need it for ALL non-CP437 code pages though, including UTF-8 and the ASCII hack
134134 int addch_unicode(int c);
--- a/src/common/consolesupport.cpp
+++ b/src/common/consolesupport.cpp
@@ -232,7 +232,7 @@ int lookup_unicode_hack(int c) {
232232 }
233233 #endif
234234
235-#if !defined(CH_USE_CP437) && !defined(CH_USE_MULTIBYTE)
235+#ifndef CH_USE_CP437
236236 // This function's for both UTF-8 and the ASCII hack (only disabled in pure CP437 mode)
237237 int addch_unicode(int c) {
238238 #ifdef CH_USE_UNICODE
@@ -294,22 +294,15 @@ void set_title(char *s)
294294 void init_console()
295295 {
296296 #ifdef WIN32
297- #ifdef CH_USE_MULTIBYTE
297+ // This has to be set to Code Page 437 in Windows regardless of Unicode, that's just how PDCurses works on Windows, even the UTF-8 version of PDCurses
298298 SetConsoleOutputCP(932);
299299 SetConsoleCP(932);
300- setlocale(LC_ALL,"ja_JP.932");
300+ setlocale(LC_ALL,"");
301301 _setmbcp(_MB_CP_LOCALE);
302- #else
303- // This has to be set to Code Page 437 in Windows regardless of Unicode, that's just how PDCurses works on Windows, even the UTF-8 version of PDCurses
304- SetConsoleOutputCP(437); // use Code Page 437 (US English code page for DOS) for output, regardless of anything else
305- SetConsoleCP(437); // use Code Page 437 (US English code page for DOS) for input, regardless of anything else
306- setlocale(LC_ALL,"English_United States.437");
307- _setmbcp(_MB_CP_LOCALE); // use same code page as multibyte code page
308- #endif
309302 #else // WIN32
303+ setlocale(LC_ALL,"");
310304 #ifdef CH_USE_UNICODE
311- //setlocale(LC_ALL,"en_US.UTF-8"); // POSIX-compliant OSes DO support UTF-8/Unicode for setlocale, unlike Windows
312- setlocale(LC_ALL,"ja_JP.UTF-8");
305+ setlocale(LC_ALL,"en_US.UTF-8");
313306 #endif
314307 #ifdef CH_USE_CP437
315308 setlocale(LC_ALL,"en_US.CP437");
@@ -317,9 +310,6 @@ void init_console()
317310 #ifdef CH_USE_ASCII_HACK
318311 setlocale(LC_ALL,"en_US.CP437");
319312 #endif
320- #ifdef CH_USE_MULTIBYTE
321- setlocale(LC_ALL,"ja_JP.932");
322- #endif
323313 #endif // WIN32
324314 #ifdef CH_USE_UNICODE
325315 setup_unicode();
@@ -383,3 +373,91 @@ void end_cleartype_fix() // execute this function after the user is done playing
383373 }
384374 }
385375 #endif
376+
377+#if defined(WIN32)
378+const char *mb_to_utf8(const char* text)
379+{
380+ return text;
381+}
382+int wctomb_sjis(char *s, wchar_t wc)
383+{
384+ wchar_t wstr[2];
385+
386+ wstr[0]=wc;
387+ wstr[1]=0;
388+ return WideCharToMultiByte(932,0,wstr,1,s,2+1,NULL,NULL);
389+}
390+#else
391+#include <iconv.h>
392+const char *mb_to_utf8(const char* text)
393+{
394+ static iconv_t cd=NULL;
395+ static char buf[1024];
396+ char *ip=(char*)text,*op=buf;
397+ size_t ilen=strlen(text),olen=sizeof(buf)-1;
398+
399+ if(cd==NULL)
400+ {
401+ const char *lang=getenv("LANG");
402+ if(strstr(lang,"SJIS")!=NULL||strstr(lang,"sjis")!=NULL)
403+ cd=iconv_open("SJIS","SJIS");
404+ else if(strstr(lang,"EUC")!=NULL||strstr(lang,"euc")!=NULL)
405+ cd=iconv_open("EUC","SJIS");
406+ else
407+ cd=iconv_open("UTF-8","SJIS");
408+ }
409+
410+ iconv(cd,&ip,&ilen,&op,&olen);
411+ *op=0;
412+ return buf;
413+}
414+#include <iconv.h>
415+int wctomb_sjis(char *s, wchar_t wc)
416+{
417+ static iconv_t cd=NULL;
418+ char utf8[8],*ip=utf8,*op=s;
419+ size_t ilen,olen=8;
420+
421+ if(cd==NULL)
422+ {
423+ cd=iconv_open("SJIS","UTF-8");
424+ }
425+
426+ if(wc<=0x7f)
427+ {
428+ *op++=(char)wc;
429+ *op=0;
430+ return 1;
431+ }
432+ else if(wc<=0x7ff)
433+ {
434+ utf8[0]=(0xc0|(wc>>6));
435+ utf8[1]=(0x80|(wc&0x3f));
436+ utf8[2]=0;
437+ ilen=strlen(utf8)+1;
438+ if(iconv(cd,&ip,&ilen,&op,&olen)<=0)
439+ {
440+ op=s;
441+ *op++='?';
442+ }
443+ *op=0;
444+ return strlen(s);
445+ }
446+ else
447+ {
448+ utf8[0]=(0xe0|(wc>>12));
449+ utf8[1]=(0x80|(wc>>6)&0x3f);
450+ utf8[2]=(0x80|(wc&0x3f));
451+ utf8[3]=0;
452+ ilen=strlen(utf8)+1;
453+ if(iconv(cd,&ip,&ilen,&op,&olen)<=0)
454+ {
455+ op=s;
456+ *op++='?';
457+ *op++='?';
458+ }
459+ *op=0;
460+ return strlen(s);
461+ }
462+}
463+#endif
--- a/src/cursesgraphics.h
+++ b/src/cursesgraphics.h
@@ -1650,7 +1650,7 @@ struct unicodechar unicode_hacks[] = {
16501650
16511651 #endif /* CH_USE_UNICODE */
16521652
1653-#ifdef CH_USE_MULTIBYTE
1653+#ifdef CH_USE_MB
16541654
16551655 // Range (0 .. 31), CP437 display characters:
16561656 #define CH_HACK_FIGURE_SPACE 0x00
--- a/src/includes.h
+++ b/src/includes.h
@@ -991,25 +991,17 @@ void addprevpagestr();
991991 /* prints a long blurb showing how to page forward and back */
992992 void addpagestr();
993993 /* Variants of addch and mvaddch that work on chars and use translateGraphicsChar(), fixing display of extended characters */
994-#if defined(CH_USE_MULTIBYTE)
995994 inline int addchar(char ch) { return addch(ch); }
996995 inline int mvaddchar(int y,int x,char ch) { return mvaddch(y,x,ch); }
997996 inline int addgrah(char ch) { return addch(translateGraphicsChar(ch)); }
998997 inline int mvaddgrah(int y,int x,char ch) { return mvaddch(y,x,translateGraphicsChar(ch)); }
999-#else
1000-inline int addchar(char ch) { return addch(translateGraphicsChar(ch)); }
1001-inline int mvaddchar(int y,int x,char ch) { return mvaddch(y,x,translateGraphicsChar(ch)); }
1002-inline int addgrah(char ch) { return addch(translateGraphicsChar(ch)); }
1003-inline int mvaddgrah(int y,int x,char ch) { return mvaddch(y,x,translateGraphicsChar(ch)); }
1004-#endif
1005998 inline int addchar(char ch,Log &log) { log.record(ch); return addchar(ch); }
1006999 inline int mvaddchar(int y,int x,char ch,Log &log) { log.record(ch); return mvaddchar(y,x,ch); }
10071000 /* Redefining addstr() and mvaddstr() so they use addchar() and mvaddchar(), fixing display of extended characters */
1008-#if defined(CH_USE_MULTIBYTE)
1009-#else
1001+const char *mb_to_utf8(const char *);
1002+inline int addstr_mb(const char* text) { addstr(mb_to_utf8(text)); }
10101003 #undef addstr
1011-inline int addstr(const char* text) { int ret=ERR; for(int i=0;i<len(text);i++) ret=addchar(text[i]); return ret; }
1012-#endif
1004+#define addstr addstr_mb
10131005 #undef mvaddstr
10141006 inline int mvaddstr(int y,int x,const char* text) { int ret=move(y,x); if(ret!=ERR) ret=addstr(text); return ret; }
10151007 /* Various wrappers to addstr() and mvaddstr() which handle permutations of:
@@ -1017,11 +1009,7 @@ inline int mvaddstr(int y,int x,const char* text) { int ret=move(y,x); if(ret!=E
10171009 - std::string or c-style char arrays */
10181010 inline int addstr(const char *text,Log &log) { log.record(text); return addstr(text); }
10191011 inline int mvaddstr(int y,int x,const char *text,Log &log) { log.record(text); return mvaddstr(y,x,text); }
1020-#if defined(CH_USE_MULTIBYTE)
10211012 inline int addstr(const std::string& text) { return addstr(&text[0]); }
1022-#else
1023-inline int addstr(const std::string& text) { int ret=ERR; for(int i=0;i<len(text);i++) ret=addchar(text[i]); return ret; }
1024-#endif
10251013 inline int addstr(const std::string& text, Log &log) { log.record(text); return addstr(text); }
10261014 inline int mvaddstr(int y,int x,const std::string& text) { int ret=move(y,x); if(ret!=ERR) ret=addstr(text); return ret; }
10271015 inline int mvaddstr(int y,int x,const std::string& text,Log &log) { log.record(text); return mvaddstr(y,x,text); }
--- a/src/news/news.cpp
+++ b/src/news/news.cpp
@@ -1777,30 +1777,10 @@ void displaynewspicture(int p,int y)
17771777
17781778 int chrsize(char *str)
17791779 {
1780- if(strlen("漢")==3) // UTF-8
1781- {
1782- if((*str & 0x80) == 0)
1783- return 1;
1784- else if((*str & 0xe0) == 0xc0)
1785- return 2;
1786- else if((*str & 0xf0) == 0xe0)
1787- return 3;
1788- else if((*str & 0xf8) == 0xf0)
1789- return 4;
1790- else if((*str & 0xfc) == 0xf8)
1791- return 5;
1792- else if((*str & 0xfe) == 0xfc)
1793- return 6;
1794- else
1795- return 1;
1796- }
1797- else // ShiftJIS or EUC
1798- {
1799- if(*str & 0x80)
1800- return 2;
1801- else
1802- return 1;
1803- }
1780+ if(*str & 0x80)
1781+ return 2;
1782+ else
1783+ return 1;
18041784 }
18051785
18061786 /* news - draws the specified block of text to the screen */
--- a/src/pdcurses/curses.h
+++ b/src/pdcurses/curses.h
@@ -1,3 +1,11 @@
1+#ifndef PDC_DLL_BUILD
2+# define PDC_DLL_BUILD
3+#endif
4+
5+/* Public Domain Curses */
6+
7+/* $Id: curses.h,v 1.295 2008/07/15 17:13:25 wmcbrine Exp $ */
8+
19 /*----------------------------------------------------------------------*
210 * PDCurses *
311 *----------------------------------------------------------------------*/
@@ -7,36 +15,32 @@
715
816 /*man-start**************************************************************
917
10-Define before inclusion (only those needed):
18+PDCurses definitions list: (Only define those needed)
1119
1220 XCURSES True if compiling for X11.
1321 PDC_RGB True if you want to use RGB color definitions
1422 (Red = 1, Green = 2, Blue = 4) instead of BGR.
1523 PDC_WIDE True if building wide-character support.
16- PDC_DLL_BUILD True if building a Windows DLL.
17- PDC_NCMOUSE Use the ncurses mouse API instead
18- of PDCurses' traditional mouse API.
24+ PDC_DLL_BUILD True if building a Win32 DLL.
25+ NCURSES_MOUSE_VERSION Use the ncurses mouse API instead
26+ of PDCurses' traditional mouse API.
1927
20-Defined by this header:
28+PDCurses portable platform definitions list:
2129
22- PDCURSES Enables access to PDCurses-only routines.
2330 PDC_BUILD Defines API build version.
24- PDC_VER_MAJOR Major version number
25- PDC_VER_MINOR Minor version number
26- PDC_VERDOT Version string
31+ PDCURSES Enables access to PDCurses-only routines.
32+ XOPEN Always true.
33+ SYSVcurses True if you are compiling for SYSV portability.
34+ BSDcurses True if you are compiling for BSD portability.
2735
2836 **man-end****************************************************************/
2937
38+#define PDC_BUILD 3401
3039 #define PDCURSES 1 /* PDCurses-only routines */
31-#define PDC_BUILD 3801
32-#define PDC_VER_MAJOR 3
33-#define PDC_VER_MINOR 8
34-#define PDC_VERDOT "3.8"
35-#define CHTYPE_LONG 1 /* chtype >= 32 bits */
36-
37-#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
38-# define PDC_99 1
39-#endif
40+#define XOPEN 1 /* X/Open Curses routines */
41+#define SYSVcurses 1 /* System V Curses routines */
42+#define BSDcurses 1 /* BSD Curses routines */
43+#define CHTYPE_LONG 1 /* size of chtype; long */
4044
4145 /*----------------------------------------------------------------------*/
4246
@@ -48,11 +52,7 @@ Defined by this header:
4852 # include <wchar.h>
4953 #endif
5054
51-#if defined(PDC_99) && !defined(__bool_true_false_are_defined)
52-# include <stdbool.h>
53-#endif
54-
55-#ifdef __cplusplus
55+#if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
5656 extern "C"
5757 {
5858 # define bool _bool
@@ -60,30 +60,42 @@ extern "C"
6060
6161 /*----------------------------------------------------------------------
6262 *
63- * Constants and Types
63+ * PDCurses Manifest Constants
6464 *
6565 */
6666
67-#undef FALSE
68-#define FALSE 0
69-
70-#undef TRUE
71-#define TRUE 1
72-
73-#undef ERR
74-#define ERR (-1)
67+#ifndef FALSE
68+# define FALSE 0
69+#endif
70+#ifndef TRUE
71+# define TRUE 1
72+#endif
73+#ifndef NULL
74+# define NULL (void *)0
75+#endif
76+#ifndef ERR
77+# define ERR (-1)
78+#endif
79+#ifndef OK
80+# define OK 0
81+#endif
7582
76-#undef OK
77-#define OK 0
83+/*----------------------------------------------------------------------
84+ *
85+ * PDCurses Type Declarations
86+ *
87+ */
7888
79-#ifndef __bool_true_false_are_defined
80-typedef unsigned char bool;
81-#endif
89+typedef unsigned char bool; /* PDCurses Boolean type */
8290
83-#if _LP64
91+#ifdef CHTYPE_LONG
92+# if _LP64
8493 typedef unsigned int chtype;
85-#else
94+# else
8695 typedef unsigned long chtype; /* 16-bit attr + 16-bit char */
96+# endif
97+#else
98+typedef unsigned short chtype; /* 8-bit attr + 8-bit char */
8799 #endif
88100
89101 #ifdef PDC_WIDE
@@ -94,44 +106,10 @@ typedef chtype attr_t;
94106
95107 /*----------------------------------------------------------------------
96108 *
97- * Version Info
109+ * PDCurses Mouse Interface -- SYSVR4, with extensions
98110 *
99111 */
100112
101-/* Use this structure with PDC_get_version() for run-time info about the
102- way the library was built, in case it doesn't match the header. */
103-
104-typedef struct
105-{
106- short flags; /* flags OR'd together (see below) */
107- short build; /* PDC_BUILD at compile time */
108- unsigned char major; /* PDC_VER_MAJOR */
109- unsigned char minor; /* PDC_VER_MINOR */
110- unsigned char csize; /* sizeof chtype */
111- unsigned char bsize; /* sizeof bool */
112-} PDC_VERSION;
113-
114-enum
115-{
116- PDC_VFLAG_DEBUG = 1, /* set if built with -DPDCDEBUG */
117- PDC_VFLAG_WIDE = 2, /* -DPDC_WIDE */
118- PDC_VFLAG_UTF8 = 4, /* -DPDC_FORCE_UTF8 */
119- PDC_VFLAG_DLL = 8, /* -DPDC_DLL_BUILD */
120- PDC_VFLAG_RGB = 16 /* -DPDC_RGB */
121-};
122-
123-/*----------------------------------------------------------------------
124- *
125- * Mouse Interface -- SYSVR4, with extensions
126- *
127- */
128-
129-#if _LP64
130-typedef unsigned int mmask_t;
131-#else
132-typedef unsigned long mmask_t;
133-#endif
134-
135113 typedef struct
136114 {
137115 int x; /* absolute column, 0 based, measured in characters */
@@ -168,26 +146,23 @@ typedef struct
168146 * 10000 <- mouse position report
169147 * 100000 <- mouse wheel up
170148 * 1000000 <- mouse wheel down
171- * 10000000 <- mouse wheel left
172- * 100000000 <- mouse wheel right
173149 */
174150
175151 #define PDC_MOUSE_MOVED 0x0008
176152 #define PDC_MOUSE_POSITION 0x0010
177153 #define PDC_MOUSE_WHEEL_UP 0x0020
178154 #define PDC_MOUSE_WHEEL_DOWN 0x0040
179-#define PDC_MOUSE_WHEEL_LEFT 0x0080
180-#define PDC_MOUSE_WHEEL_RIGHT 0x0100
181155
182156 #define A_BUTTON_CHANGED (Mouse_status.changes & 7)
157+#ifdef MOUSE_MOVED
158+#undef MOUSE_MOVED
159+#endif
183160 #define MOUSE_MOVED (Mouse_status.changes & PDC_MOUSE_MOVED)
184161 #define MOUSE_POS_REPORT (Mouse_status.changes & PDC_MOUSE_POSITION)
185162 #define BUTTON_CHANGED(x) (Mouse_status.changes & (1 << ((x) - 1)))
186163 #define BUTTON_STATUS(x) (Mouse_status.button[(x) - 1])
187164 #define MOUSE_WHEEL_UP (Mouse_status.changes & PDC_MOUSE_WHEEL_UP)
188165 #define MOUSE_WHEEL_DOWN (Mouse_status.changes & PDC_MOUSE_WHEEL_DOWN)
189-#define MOUSE_WHEEL_LEFT (Mouse_status.changes & PDC_MOUSE_WHEEL_LEFT)
190-#define MOUSE_WHEEL_RIGHT (Mouse_status.changes & PDC_MOUSE_WHEEL_RIGHT)
191166
192167 /* mouse bit-masks */
193168
@@ -238,18 +213,16 @@ typedef struct
238213
239214 /* ncurses mouse interface */
240215
216+typedef unsigned long mmask_t;
217+
241218 typedef struct
242219 {
243- short id; /* unused, always 0 */
244- int x, y, z; /* x, y same as MOUSE_STATUS; z unused */
245- mmask_t bstate; /* equivalent to changes + button[], but
246- in the same format as used for mousemask() */
220+ short id; /* unused, always 0 */
221+ int x, y, z; /* x, y same as MOUSE_STATUS; z unused */
222+ mmask_t bstate; /* equivalent to changes + button[], but
223+ in the same format as used for mousemask() */
247224 } MEVENT;
248225
249-#if defined(PDC_NCMOUSE) && !defined(NCURSES_MOUSE_VERSION)
250-# define NCURSES_MOUSE_VERSION 2
251-#endif
252-
253226 #ifdef NCURSES_MOUSE_VERSION
254227 # define BUTTON_SHIFT BUTTON_MODIFIER_SHIFT
255228 # define BUTTON_CONTROL BUTTON_MODIFIER_CONTROL
@@ -263,7 +236,7 @@ typedef struct
263236
264237 /*----------------------------------------------------------------------
265238 *
266- * Window and Screen Structures
239+ * PDCurses Structure Definitions
267240 *
268241 */
269242
@@ -308,7 +281,7 @@ typedef struct
308281 bool raw_out; /* raw output mode (7 v. 8 bits) */
309282 bool audible; /* FALSE if the bell is visual */
310283 bool mono; /* TRUE if current screen is mono */
311- short resized; /* TRUE if TERM has been resized */
284+ bool resized; /* TRUE if TERM has been resized */
312285 bool orig_attr; /* TRUE if we have the original colors */
313286 short orig_fore; /* original screen foreground color */
314287 short orig_back; /* original screen foreground color */
@@ -318,7 +291,8 @@ typedef struct
318291 int orig_cursor; /* original cursor size */
319292 int lines; /* new value for LINES */
320293 int cols; /* new value for COLS */
321- mmask_t _trap_mbe; /* trap these mouse button events */
294+ unsigned long _trap_mbe; /* trap these mouse button events */
295+ unsigned long _map_mbe_to_key; /* map mouse buttons to slk */
322296 int mouse_wait; /* time to wait (in ms) for a
323297 button release after a press, in
324298 order to count it as a click */
@@ -350,12 +324,11 @@ typedef struct
350324 int sb_cur_x;
351325 #endif
352326 short line_color; /* color of line attributes - default -1 */
353- attr_t termattrs; /* attribute capabilities */
354327 } SCREEN;
355328
356329 /*----------------------------------------------------------------------
357330 *
358- * External Variables
331+ * PDCurses External Variables
359332 *
360333 */
361334
@@ -383,20 +356,42 @@ PDCEX char ttytype[]; /* terminal name/description */
383356
384357 /*man-start**************************************************************
385358
386-Text Attributes
387-===============
359+PDCurses Text Attributes
360+========================
361+
362+Originally, PDCurses used a short (16 bits) for its chtype. To include
363+color, a number of things had to be sacrificed from the strict Unix and
364+System V support. The main problem was fitting all character attributes
365+and color into an unsigned char (all 8 bits!).
366+
367+Today, PDCurses by default uses a long (32 bits) for its chtype, as in
368+System V. The short chtype is still available, by undefining CHTYPE_LONG
369+and rebuilding the library.
388370
389-PDCurses uses a 32-bit integer for its chtype:
371+The following is the structure of a win->_attrs chtype:
390372
391- +--------------------------------------------------------------------+
392- |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|..| 2| 1| 0|
393- +--------------------------------------------------------------------+
394- color pair | modifiers | character eg 'a'
373+short form:
395374
396-There are 256 color pairs (8 bits), 8 bits for modifiers, and 16 bits
397-for character data. The modifiers are bold, underline, right-line,
398-left-line, italic, reverse and blink, plus the alternate character set
399-indicator.
375+-------------------------------------------------
376+|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
377+-------------------------------------------------
378+ color number | attrs | character eg 'a'
379+
380+The available non-color attributes are bold, reverse and blink. Others
381+have no effect. The high order char is an index into an array of
382+physical colors (defined in color.c) -- 32 foreground/background color
383+pairs (5 bits) plus 3 bits for other attributes.
384+
385+long form:
386+
387+----------------------------------------------------------------------------
388+|31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|..| 3| 2| 1| 0|
389+----------------------------------------------------------------------------
390+ color number | modifiers | character eg 'a'
391+
392+The available non-color attributes are bold, underline, invisible,
393+right-line, left-line, protect, reverse and blink. 256 color pairs (8
394+bits), 8 bits for other attributes, and 16 bits for character data.
400395
401396 **man-end****************************************************************/
402397
@@ -404,33 +399,49 @@ indicator.
404399
405400 #define A_NORMAL (chtype)0
406401
407-#define A_ALTCHARSET (chtype)0x00010000
408-#define A_RIGHT (chtype)0x00020000
409-#define A_LEFT (chtype)0x00040000
410-#define A_ITALIC (chtype)0x00080000
411-#define A_UNDERLINE (chtype)0x00100000
412-#define A_REVERSE (chtype)0x00200000
413-#define A_BLINK (chtype)0x00400000
414-#define A_BOLD (chtype)0x00800000
402+#ifdef CHTYPE_LONG
403+# define A_ALTCHARSET (chtype)0x00010000
404+# define A_RIGHTLINE (chtype)0x00020000
405+# define A_LEFTLINE (chtype)0x00040000
406+# define A_INVIS (chtype)0x00080000
407+# define A_UNDERLINE (chtype)0x00100000
408+# define A_REVERSE (chtype)0x00200000
409+# define A_BLINK (chtype)0x00400000
410+# define A_BOLD (chtype)0x00800000
411+
412+# define A_ATTRIBUTES (chtype)0xffff0000
413+# define A_CHARTEXT (chtype)0x0000ffff
414+# define A_COLOR (chtype)0xff000000
415+
416+# define A_ITALIC A_INVIS
417+# define A_PROTECT (A_UNDERLINE | A_LEFTLINE | A_RIGHTLINE)
418+
419+# define PDC_ATTR_SHIFT 19
420+# define PDC_COLOR_SHIFT 24
421+#else
422+# define A_BOLD (chtype)0x0100 /* X/Open */
423+# define A_REVERSE (chtype)0x0200 /* X/Open */
424+# define A_BLINK (chtype)0x0400 /* X/Open */
415425
416-#define A_ATTRIBUTES (chtype)0xffff0000
417-#define A_CHARTEXT (chtype)0x0000ffff
418-#define A_COLOR (chtype)0xff000000
426+# define A_ATTRIBUTES (chtype)0xff00 /* X/Open */
427+# define A_CHARTEXT (chtype)0x00ff /* X/Open */
428+# define A_COLOR (chtype)0xf800 /* System V */
419429
420-#define PDC_COLOR_SHIFT 24
430+# define A_ALTCHARSET A_NORMAL /* X/Open */
431+# define A_PROTECT A_NORMAL /* X/Open */
432+# define A_UNDERLINE A_NORMAL /* X/Open */
421433
422-#define A_LEFTLINE A_LEFT
423-#define A_RIGHTLINE A_RIGHT
424-#define A_STANDOUT (A_REVERSE | A_BOLD) /* X/Open */
434+# define A_LEFTLINE A_NORMAL
435+# define A_RIGHTLINE A_NORMAL
436+# define A_ITALIC A_NORMAL
437+# define A_INVIS A_NORMAL
425438
426-#define A_DIM A_NORMAL
427-#define A_INVIS A_NORMAL
428-#define A_PROTECT A_NORMAL
439+# define PDC_ATTR_SHIFT 8
440+# define PDC_COLOR_SHIFT 11
441+#endif
429442
430-#define A_HORIZONTAL A_NORMAL
431-#define A_LOW A_NORMAL
432-#define A_TOP A_NORMAL
433-#define A_VERTICAL A_NORMAL
443+#define A_STANDOUT (A_REVERSE | A_BOLD) /* X/Open */
444+#define A_DIM A_NORMAL
434445
435446 #define CHR_MSK A_CHARTEXT /* Obsolete */
436447 #define ATR_MSK A_ATTRIBUTES /* Obsolete */
@@ -439,78 +450,81 @@ indicator.
439450 /* For use with attr_t -- X/Open says, "these shall be distinct", so
440451 this is a non-conforming implementation. */
441452
442-#define WA_NORMAL A_NORMAL
443-
444453 #define WA_ALTCHARSET A_ALTCHARSET
445454 #define WA_BLINK A_BLINK
446455 #define WA_BOLD A_BOLD
447456 #define WA_DIM A_DIM
448457 #define WA_INVIS A_INVIS
449-#define WA_ITALIC A_ITALIC
450-#define WA_LEFT A_LEFT
458+#define WA_LEFT A_LEFTLINE
451459 #define WA_PROTECT A_PROTECT
452460 #define WA_REVERSE A_REVERSE
453-#define WA_RIGHT A_RIGHT
461+#define WA_RIGHT A_RIGHTLINE
454462 #define WA_STANDOUT A_STANDOUT
455463 #define WA_UNDERLINE A_UNDERLINE
456464
457-#define WA_HORIZONTAL A_HORIZONTAL
458-#define WA_LOW A_LOW
459-#define WA_TOP A_TOP
460-#define WA_VERTICAL A_VERTICAL
461-
462-#define WA_ATTRIBUTES A_ATTRIBUTES
465+#define WA_HORIZONTAL A_NORMAL
466+#define WA_LOW A_NORMAL
467+#define WA_TOP A_NORMAL
468+#define WA_VERTICAL A_NORMAL
463469
464470 /*** Alternate character set macros ***/
465471
466-#define PDC_ACS(w) ((chtype)w | A_ALTCHARSET)
472+/* 'w' = 32-bit chtype; acs_map[] index | A_ALTCHARSET
473+ 'n' = 16-bit chtype; it gets the fallback set because no bit is
474+ available for A_ALTCHARSET */
475+
476+#ifdef CHTYPE_LONG
477+# define ACS_PICK(w, n) ((chtype)w | A_ALTCHARSET)
478+#else
479+# define ACS_PICK(w, n) ((chtype)n)
480+#endif
467481
468482 /* VT100-compatible symbols -- box chars */
469483
470-#define ACS_ULCORNER PDC_ACS('l')
471-#define ACS_LLCORNER PDC_ACS('m')
472-#define ACS_URCORNER PDC_ACS('k')
473-#define ACS_LRCORNER PDC_ACS('j')
474-#define ACS_RTEE PDC_ACS('u')
475-#define ACS_LTEE PDC_ACS('t')
476-#define ACS_BTEE PDC_ACS('v')
477-#define ACS_TTEE PDC_ACS('w')
478-#define ACS_HLINE PDC_ACS('q')
479-#define ACS_VLINE PDC_ACS('x')
480-#define ACS_PLUS PDC_ACS('n')
484+#define ACS_ULCORNER ACS_PICK('l', '+')
485+#define ACS_LLCORNER ACS_PICK('m', '+')
486+#define ACS_URCORNER ACS_PICK('k', '+')
487+#define ACS_LRCORNER ACS_PICK('j', '+')
488+#define ACS_RTEE ACS_PICK('u', '+')
489+#define ACS_LTEE ACS_PICK('t', '+')
490+#define ACS_BTEE ACS_PICK('v', '+')
491+#define ACS_TTEE ACS_PICK('w', '+')
492+#define ACS_HLINE ACS_PICK('q', '-')
493+#define ACS_VLINE ACS_PICK('x', '|')
494+#define ACS_PLUS ACS_PICK('n', '+')
481495
482496 /* VT100-compatible symbols -- other */
483497
484-#define ACS_S1 PDC_ACS('o')
485-#define ACS_S9 PDC_ACS('s')
486-#define ACS_DIAMOND PDC_ACS('`')
487-#define ACS_CKBOARD PDC_ACS('a')
488-#define ACS_DEGREE PDC_ACS('f')
489-#define ACS_PLMINUS PDC_ACS('g')
490-#define ACS_BULLET PDC_ACS('~')
498+#define ACS_S1 ACS_PICK('o', '-')
499+#define ACS_S9 ACS_PICK('s', '_')
500+#define ACS_DIAMOND ACS_PICK('`', '+')
501+#define ACS_CKBOARD ACS_PICK('a', ':')
502+#define ACS_DEGREE ACS_PICK('f', '\'')
503+#define ACS_PLMINUS ACS_PICK('g', '#')
504+#define ACS_BULLET ACS_PICK('~', 'o')
491505
492506 /* Teletype 5410v1 symbols -- these are defined in SysV curses, but
493507 are not well-supported by most terminals. Stick to VT100 characters
494508 for optimum portability. */
495509
496-#define ACS_LARROW PDC_ACS(',')
497-#define ACS_RARROW PDC_ACS('+')
498-#define ACS_DARROW PDC_ACS('.')
499-#define ACS_UARROW PDC_ACS('-')
500-#define ACS_BOARD PDC_ACS('h')
501-#define ACS_LANTERN PDC_ACS('i')
502-#define ACS_BLOCK PDC_ACS('0')
510+#define ACS_LARROW ACS_PICK(',', '<')
511+#define ACS_RARROW ACS_PICK('+', '>')
512+#define ACS_DARROW ACS_PICK('.', 'v')
513+#define ACS_UARROW ACS_PICK('-', '^')
514+#define ACS_BOARD ACS_PICK('h', '#')
515+#define ACS_LANTERN ACS_PICK('i', '*')
516+#define ACS_BLOCK ACS_PICK('0', '#')
503517
504518 /* That goes double for these -- undocumented SysV symbols. Don't use
505519 them. */
506520
507-#define ACS_S3 PDC_ACS('p')
508-#define ACS_S7 PDC_ACS('r')
509-#define ACS_LEQUAL PDC_ACS('y')
510-#define ACS_GEQUAL PDC_ACS('z')
511-#define ACS_PI PDC_ACS('{')
512-#define ACS_NEQUAL PDC_ACS('|')
513-#define ACS_STERLING PDC_ACS('}')
521+#define ACS_S3 ACS_PICK('p', '-')
522+#define ACS_S7 ACS_PICK('r', '-')
523+#define ACS_LEQUAL ACS_PICK('y', '<')
524+#define ACS_GEQUAL ACS_PICK('z', '>')
525+#define ACS_PI ACS_PICK('{', 'n')
526+#define ACS_NEQUAL ACS_PICK('|', '+')
527+#define ACS_STERLING ACS_PICK('}', 'L')
514528
515529 /* Box char aliases */
516530
@@ -600,8 +614,8 @@ indicator.
600614
601615 /*----------------------------------------------------------------------
602616 *
603- * Function and Keypad Key Definitions
604- * Many are just for compatibility
617+ * Function and Keypad Key Definitions.
618+ * Many are just for compatibility.
605619 *
606620 */
607621
@@ -856,477 +870,472 @@ indicator.
856870
857871 /*----------------------------------------------------------------------
858872 *
859- * Functions
873+ * PDCurses Function Declarations
860874 *
861875 */
862876
863877 /* Standard */
864878
865-PDCEX int addch(const chtype);
866-PDCEX int addchnstr(const chtype *, int);
867-PDCEX int addchstr(const chtype *);
868-PDCEX int addnstr(const char *, int);
869-PDCEX int addstr(const char *);
870-PDCEX int attroff(chtype);
871-PDCEX int attron(chtype);
872-PDCEX int attrset(chtype);
873-PDCEX int attr_get(attr_t *, short *, void *);
874-PDCEX int attr_off(attr_t, void *);
875-PDCEX int attr_on(attr_t, void *);
876-PDCEX int attr_set(attr_t, short, void *);
877-PDCEX int baudrate(void);
878-PDCEX int beep(void);
879-PDCEX int bkgd(chtype);
880-PDCEX void bkgdset(chtype);
881-PDCEX int border(chtype, chtype, chtype, chtype,
882- chtype, chtype, chtype, chtype);
883-PDCEX int box(WINDOW *, chtype, chtype);
884-PDCEX bool can_change_color(void);
885-PDCEX int cbreak(void);
886-PDCEX int chgat(int, attr_t, short, const void *);
887-PDCEX int clearok(WINDOW *, bool);
888-PDCEX int clear(void);
889-PDCEX int clrtobot(void);
890-PDCEX int clrtoeol(void);
891-PDCEX int color_content(short, short *, short *, short *);
892-PDCEX int color_set(short, void *);
893-PDCEX int copywin(const WINDOW *, WINDOW *, int, int, int,
894- int, int, int, int);
895-PDCEX int curs_set(int);
896-PDCEX int def_prog_mode(void);
897-PDCEX int def_shell_mode(void);
898-PDCEX int delay_output(int);
899-PDCEX int delch(void);
900-PDCEX int deleteln(void);
901-PDCEX void delscreen(SCREEN *);
902-PDCEX int delwin(WINDOW *);
903-PDCEX WINDOW *derwin(WINDOW *, int, int, int, int);
904-PDCEX int doupdate(void);
905-PDCEX WINDOW *dupwin(WINDOW *);
906-PDCEX int echochar(const chtype);
907-PDCEX int echo(void);
908-PDCEX int endwin(void);
909-PDCEX char erasechar(void);
910-PDCEX int erase(void);
911-PDCEX void filter(void);
912-PDCEX int flash(void);
913-PDCEX int flushinp(void);
914-PDCEX chtype getbkgd(WINDOW *);
915-PDCEX int getnstr(char *, int);
916-PDCEX int getstr(char *);
917-PDCEX WINDOW *getwin(FILE *);
918-PDCEX int halfdelay(int);
919-PDCEX bool has_colors(void);
920-PDCEX bool has_ic(void);
921-PDCEX bool has_il(void);
922-PDCEX int hline(chtype, int);
923-PDCEX void idcok(WINDOW *, bool);
924-PDCEX int idlok(WINDOW *, bool);
925-PDCEX void immedok(WINDOW *, bool);
926-PDCEX int inchnstr(chtype *, int);
927-PDCEX int inchstr(chtype *);
928-PDCEX chtype inch(void);
929-PDCEX int init_color(short, short, short, short);
930-PDCEX int init_pair(short, short, short);
931-PDCEX WINDOW *initscr(void);
932-PDCEX int innstr(char *, int);
933-PDCEX int insch(chtype);
934-PDCEX int insdelln(int);
935-PDCEX int insertln(void);
936-PDCEX int insnstr(const char *, int);
937-PDCEX int insstr(const char *);
938-PDCEX int instr(char *);
939-PDCEX int intrflush(WINDOW *, bool);
940-PDCEX bool isendwin(void);
941-PDCEX bool is_linetouched(WINDOW *, int);
942-PDCEX bool is_wintouched(WINDOW *);
943-PDCEX char *keyname(int);
944-PDCEX int keypad(WINDOW *, bool);
945-PDCEX char killchar(void);
946-PDCEX int leaveok(WINDOW *, bool);
947-PDCEX char *longname(void);
948-PDCEX int meta(WINDOW *, bool);
949-PDCEX int move(int, int);
950-PDCEX int mvaddch(int, int, const chtype);
951-PDCEX int mvaddchnstr(int, int, const chtype *, int);
952-PDCEX int mvaddchstr(int, int, const chtype *);
953-PDCEX int mvaddnstr(int, int, const char *, int);
954-PDCEX int mvaddstr(int, int, const char *);
955-PDCEX int mvchgat(int, int, int, attr_t, short, const void *);
956-PDCEX int mvcur(int, int, int, int);
957-PDCEX int mvdelch(int, int);
958-PDCEX int mvderwin(WINDOW *, int, int);
959-PDCEX int mvgetch(int, int);
960-PDCEX int mvgetnstr(int, int, char *, int);
961-PDCEX int mvgetstr(int, int, char *);
962-PDCEX int mvhline(int, int, chtype, int);
963-PDCEX chtype mvinch(int, int);
964-PDCEX int mvinchnstr(int, int, chtype *, int);
965-PDCEX int mvinchstr(int, int, chtype *);
966-PDCEX int mvinnstr(int, int, char *, int);
967-PDCEX int mvinsch(int, int, chtype);
968-PDCEX int mvinsnstr(int, int, const char *, int);
969-PDCEX int mvinsstr(int, int, const char *);
970-PDCEX int mvinstr(int, int, char *);
971-PDCEX int mvprintw(int, int, const char *, ...);
972-PDCEX int mvscanw(int, int, const char *, ...);
973-PDCEX int mvvline(int, int, chtype, int);
974-PDCEX int mvwaddchnstr(WINDOW *, int, int, const chtype *, int);
975-PDCEX int mvwaddchstr(WINDOW *, int, int, const chtype *);
976-PDCEX int mvwaddch(WINDOW *, int, int, const chtype);
977-PDCEX int mvwaddnstr(WINDOW *, int, int, const char *, int);
978-PDCEX int mvwaddstr(WINDOW *, int, int, const char *);
979-PDCEX int mvwchgat(WINDOW *, int, int, int, attr_t, short, const void *);
980-PDCEX int mvwdelch(WINDOW *, int, int);
981-PDCEX int mvwgetch(WINDOW *, int, int);
982-PDCEX int mvwgetnstr(WINDOW *, int, int, char *, int);
983-PDCEX int mvwgetstr(WINDOW *, int, int, char *);
984-PDCEX int mvwhline(WINDOW *, int, int, chtype, int);
985-PDCEX int mvwinchnstr(WINDOW *, int, int, chtype *, int);
986-PDCEX int mvwinchstr(WINDOW *, int, int, chtype *);
987-PDCEX chtype mvwinch(WINDOW *, int, int);
988-PDCEX int mvwinnstr(WINDOW *, int, int, char *, int);
989-PDCEX int mvwinsch(WINDOW *, int, int, chtype);
990-PDCEX int mvwinsnstr(WINDOW *, int, int, const char *, int);
991-PDCEX int mvwinsstr(WINDOW *, int, int, const char *);
992-PDCEX int mvwinstr(WINDOW *, int, int, char *);
993-PDCEX int mvwin(WINDOW *, int, int);
994-PDCEX int mvwprintw(WINDOW *, int, int, const char *, ...);
995-PDCEX int mvwscanw(WINDOW *, int, int, const char *, ...);
996-PDCEX int mvwvline(WINDOW *, int, int, chtype, int);
997-PDCEX int napms(int);
998-PDCEX WINDOW *newpad(int, int);
999-PDCEX SCREEN *newterm(const char *, FILE *, FILE *);
1000-PDCEX WINDOW *newwin(int, int, int, int);
1001-PDCEX int nl(void);
1002-PDCEX int nocbreak(void);
1003-PDCEX int nodelay(WINDOW *, bool);
1004-PDCEX int noecho(void);
1005-PDCEX int nonl(void);
1006-PDCEX void noqiflush(void);
1007-PDCEX int noraw(void);
1008-PDCEX int notimeout(WINDOW *, bool);
1009-PDCEX int overlay(const WINDOW *, WINDOW *);
1010-PDCEX int overwrite(const WINDOW *, WINDOW *);
1011-PDCEX int pair_content(short, short *, short *);
1012-PDCEX int pechochar(WINDOW *, chtype);
1013-PDCEX int pnoutrefresh(WINDOW *, int, int, int, int, int, int);
1014-PDCEX int prefresh(WINDOW *, int, int, int, int, int, int);
1015-PDCEX int printw(const char *, ...);
1016-PDCEX int putwin(WINDOW *, FILE *);
1017-PDCEX void qiflush(void);
1018-PDCEX int raw(void);
1019-PDCEX int redrawwin(WINDOW *);
1020-PDCEX int refresh(void);
1021-PDCEX int reset_prog_mode(void);
1022-PDCEX int reset_shell_mode(void);
1023-PDCEX int resetty(void);
1024-PDCEX int ripoffline(int, int (*)(WINDOW *, int));
1025-PDCEX int savetty(void);
1026-PDCEX int scanw(const char *, ...);
1027-PDCEX int scr_dump(const char *);
1028-PDCEX int scr_init(const char *);
1029-PDCEX int scr_restore(const char *);
1030-PDCEX int scr_set(const char *);
1031-PDCEX int scrl(int);
1032-PDCEX int scroll(WINDOW *);
1033-PDCEX int scrollok(WINDOW *, bool);
1034-PDCEX SCREEN *set_term(SCREEN *);
1035-PDCEX int setscrreg(int, int);
1036-PDCEX int slk_attroff(const chtype);
1037-PDCEX int slk_attr_off(const attr_t, void *);
1038-PDCEX int slk_attron(const chtype);
1039-PDCEX int slk_attr_on(const attr_t, void *);
1040-PDCEX int slk_attrset(const chtype);
1041-PDCEX int slk_attr_set(const attr_t, short, void *);
1042-PDCEX int slk_clear(void);
1043-PDCEX int slk_color(short);
1044-PDCEX int slk_init(int);
1045-PDCEX char *slk_label(int);
1046-PDCEX int slk_noutrefresh(void);
1047-PDCEX int slk_refresh(void);
1048-PDCEX int slk_restore(void);
1049-PDCEX int slk_set(int, const char *, int);
1050-PDCEX int slk_touch(void);
1051-PDCEX int standend(void);
1052-PDCEX int standout(void);
1053-PDCEX int start_color(void);
1054-PDCEX WINDOW *subpad(WINDOW *, int, int, int, int);
1055-PDCEX WINDOW *subwin(WINDOW *, int, int, int, int);
1056-PDCEX int syncok(WINDOW *, bool);
1057-PDCEX chtype termattrs(void);
1058-PDCEX attr_t term_attrs(void);
1059-PDCEX char *termname(void);
1060-PDCEX void timeout(int);
1061-PDCEX int touchline(WINDOW *, int, int);
1062-PDCEX int touchwin(WINDOW *);
1063-PDCEX int typeahead(int);
1064-PDCEX int untouchwin(WINDOW *);
1065-PDCEX void use_env(bool);
1066-PDCEX int vidattr(chtype);
1067-PDCEX int vid_attr(attr_t, short, void *);
1068-PDCEX int vidputs(chtype, int (*)(int));
1069-PDCEX int vid_puts(attr_t, short, void *, int (*)(int));
1070-PDCEX int vline(chtype, int);
1071-PDCEX int vw_printw(WINDOW *, const char *, va_list);
1072-PDCEX int vwprintw(WINDOW *, const char *, va_list);
1073-PDCEX int vw_scanw(WINDOW *, const char *, va_list);
1074-PDCEX int vwscanw(WINDOW *, const char *, va_list);
1075-PDCEX int waddchnstr(WINDOW *, const chtype *, int);
1076-PDCEX int waddchstr(WINDOW *, const chtype *);
1077-PDCEX int waddch(WINDOW *, const chtype);
1078-PDCEX int waddnstr(WINDOW *, const char *, int);
1079-PDCEX int waddstr(WINDOW *, const char *);
1080-PDCEX int wattroff(WINDOW *, chtype);
1081-PDCEX int wattron(WINDOW *, chtype);
1082-PDCEX int wattrset(WINDOW *, chtype);
1083-PDCEX int wattr_get(WINDOW *, attr_t *, short *, void *);
1084-PDCEX int wattr_off(WINDOW *, attr_t, void *);
1085-PDCEX int wattr_on(WINDOW *, attr_t, void *);
1086-PDCEX int wattr_set(WINDOW *, attr_t, short, void *);
1087-PDCEX void wbkgdset(WINDOW *, chtype);
1088-PDCEX int wbkgd(WINDOW *, chtype);
1089-PDCEX int wborder(WINDOW *, chtype, chtype, chtype, chtype,
1090- chtype, chtype, chtype, chtype);
1091-PDCEX int wchgat(WINDOW *, int, attr_t, short, const void *);
1092-PDCEX int wclear(WINDOW *);
1093-PDCEX int wclrtobot(WINDOW *);
1094-PDCEX int wclrtoeol(WINDOW *);
1095-PDCEX int wcolor_set(WINDOW *, short, void *);
1096-PDCEX void wcursyncup(WINDOW *);
1097-PDCEX int wdelch(WINDOW *);
1098-PDCEX int wdeleteln(WINDOW *);
1099-PDCEX int wechochar(WINDOW *, const chtype);
1100-PDCEX int werase(WINDOW *);
1101-PDCEX int wgetch(WINDOW *);
1102-PDCEX int wgetnstr(WINDOW *, char *, int);
1103-PDCEX int wgetstr(WINDOW *, char *);
1104-PDCEX int whline(WINDOW *, chtype, int);
1105-PDCEX int winchnstr(WINDOW *, chtype *, int);
1106-PDCEX int winchstr(WINDOW *, chtype *);
1107-PDCEX chtype winch(WINDOW *);
1108-PDCEX int winnstr(WINDOW *, char *, int);
1109-PDCEX int winsch(WINDOW *, chtype);
1110-PDCEX int winsdelln(WINDOW *, int);
1111-PDCEX int winsertln(WINDOW *);
1112-PDCEX int winsnstr(WINDOW *, const char *, int);
1113-PDCEX int winsstr(WINDOW *, const char *);
1114-PDCEX int winstr(WINDOW *, char *);
1115-PDCEX int wmove(WINDOW *, int, int);
1116-PDCEX int wnoutrefresh(WINDOW *);
1117-PDCEX int wprintw(WINDOW *, const char *, ...);
1118-PDCEX int wredrawln(WINDOW *, int, int);
1119-PDCEX int wrefresh(WINDOW *);
1120-PDCEX int wscanw(WINDOW *, const char *, ...);
1121-PDCEX int wscrl(WINDOW *, int);
1122-PDCEX int wsetscrreg(WINDOW *, int, int);
1123-PDCEX int wstandend(WINDOW *);
1124-PDCEX int wstandout(WINDOW *);
1125-PDCEX void wsyncdown(WINDOW *);
1126-PDCEX void wsyncup(WINDOW *);
1127-PDCEX void wtimeout(WINDOW *, int);
1128-PDCEX int wtouchln(WINDOW *, int, int, int);
1129-PDCEX int wvline(WINDOW *, chtype, int);
879+int addch(const chtype);
880+int addchnstr(const chtype *, int);
881+int addchstr(const chtype *);
882+int addnstr(const char *, int);
883+int addstr(const char *);
884+int attroff(chtype);
885+int attron(chtype);
886+int attrset(chtype);
887+int attr_get(attr_t *, short *, void *);
888+int attr_off(attr_t, void *);
889+int attr_on(attr_t, void *);
890+int attr_set(attr_t, short, void *);
891+int baudrate(void);
892+int beep(void);
893+int bkgd(chtype);
894+void bkgdset(chtype);
895+int border(chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype);
896+int box(WINDOW *, chtype, chtype);
897+bool can_change_color(void);
898+int cbreak(void);
899+int chgat(int, attr_t, short, const void *);
900+int clearok(WINDOW *, bool);
901+int clear(void);
902+int clrtobot(void);
903+int clrtoeol(void);
904+int color_content(short, short *, short *, short *);
905+int color_set(short, void *);
906+int copywin(const WINDOW *, WINDOW *, int, int, int, int, int, int, int);
907+int curs_set(int);
908+int def_prog_mode(void);
909+int def_shell_mode(void);
910+int delay_output(int);
911+int delch(void);
912+int deleteln(void);
913+void delscreen(SCREEN *);
914+int delwin(WINDOW *);
915+WINDOW *derwin(WINDOW *, int, int, int, int);
916+int doupdate(void);
917+WINDOW *dupwin(WINDOW *);
918+int echochar(const chtype);
919+int echo(void);
920+int endwin(void);
921+char erasechar(void);
922+int erase(void);
923+void filter(void);
924+int flash(void);
925+int flushinp(void);
926+chtype getbkgd(WINDOW *);
927+int getnstr(char *, int);
928+int getstr(char *);
929+WINDOW *getwin(FILE *);
930+int halfdelay(int);
931+bool has_colors(void);
932+bool has_ic(void);
933+bool has_il(void);
934+int hline(chtype, int);
935+void idcok(WINDOW *, bool);
936+int idlok(WINDOW *, bool);
937+void immedok(WINDOW *, bool);
938+int inchnstr(chtype *, int);
939+int inchstr(chtype *);
940+chtype inch(void);
941+int init_color(short, short, short, short);
942+int init_pair(short, short, short);
943+WINDOW *initscr(void);
944+int innstr(char *, int);
945+int insch(chtype);
946+int insdelln(int);
947+int insertln(void);
948+int insnstr(const char *, int);
949+int insstr(const char *);
950+int instr(char *);
951+int intrflush(WINDOW *, bool);
952+bool isendwin(void);
953+bool is_linetouched(WINDOW *, int);
954+bool is_wintouched(WINDOW *);
955+char *keyname(int);
956+int keypad(WINDOW *, bool);
957+char killchar(void);
958+int leaveok(WINDOW *, bool);
959+char *longname(void);
960+int meta(WINDOW *, bool);
961+int move(int, int);
962+int mvaddch(int, int, const chtype);
963+int mvaddchnstr(int, int, const chtype *, int);
964+int mvaddchstr(int, int, const chtype *);
965+int mvaddnstr(int, int, const char *, int);
966+int mvaddstr(int, int, const char *);
967+int mvchgat(int, int, int, attr_t, short, const void *);
968+int mvcur(int, int, int, int);
969+int mvdelch(int, int);
970+int mvderwin(WINDOW *, int, int);
971+int mvgetch(int, int);
972+int mvgetnstr(int, int, char *, int);
973+int mvgetstr(int, int, char *);
974+int mvhline(int, int, chtype, int);
975+chtype mvinch(int, int);
976+int mvinchnstr(int, int, chtype *, int);
977+int mvinchstr(int, int, chtype *);
978+int mvinnstr(int, int, char *, int);
979+int mvinsch(int, int, chtype);
980+int mvinsnstr(int, int, const char *, int);
981+int mvinsstr(int, int, const char *);
982+int mvinstr(int, int, char *);
983+int mvprintw(int, int, const char *, ...);
984+int mvscanw(int, int, const char *, ...);
985+int mvvline(int, int, chtype, int);
986+int mvwaddchnstr(WINDOW *, int, int, const chtype *, int);
987+int mvwaddchstr(WINDOW *, int, int, const chtype *);
988+int mvwaddch(WINDOW *, int, int, const chtype);
989+int mvwaddnstr(WINDOW *, int, int, const char *, int);
990+int mvwaddstr(WINDOW *, int, int, const char *);
991+int mvwchgat(WINDOW *, int, int, int, attr_t, short, const void *);
992+int mvwdelch(WINDOW *, int, int);
993+int mvwgetch(WINDOW *, int, int);
994+int mvwgetnstr(WINDOW *, int, int, char *, int);
995+int mvwgetstr(WINDOW *, int, int, char *);
996+int mvwhline(WINDOW *, int, int, chtype, int);
997+int mvwinchnstr(WINDOW *, int, int, chtype *, int);
998+int mvwinchstr(WINDOW *, int, int, chtype *);
999+chtype mvwinch(WINDOW *, int, int);
1000+int mvwinnstr(WINDOW *, int, int, char *, int);
1001+int mvwinsch(WINDOW *, int, int, chtype);
1002+int mvwinsnstr(WINDOW *, int, int, const char *, int);
1003+int mvwinsstr(WINDOW *, int, int, const char *);
1004+int mvwinstr(WINDOW *, int, int, char *);
1005+int mvwin(WINDOW *, int, int);
1006+int mvwprintw(WINDOW *, int, int, const char *, ...);
1007+int mvwscanw(WINDOW *, int, int, const char *, ...);
1008+int mvwvline(WINDOW *, int, int, chtype, int);
1009+int napms(int);
1010+WINDOW *newpad(int, int);
1011+SCREEN *newterm(const char *, FILE *, FILE *);
1012+WINDOW *newwin(int, int, int, int);
1013+int nl(void);
1014+int nocbreak(void);
1015+int nodelay(WINDOW *, bool);
1016+int noecho(void);
1017+int nonl(void);
1018+void noqiflush(void);
1019+int noraw(void);
1020+int notimeout(WINDOW *, bool);
1021+int overlay(const WINDOW *, WINDOW *);
1022+int overwrite(const WINDOW *, WINDOW *);
1023+int pair_content(short, short *, short *);
1024+int pechochar(WINDOW *, chtype);
1025+int pnoutrefresh(WINDOW *, int, int, int, int, int, int);
1026+int prefresh(WINDOW *, int, int, int, int, int, int);
1027+int printw(const char *, ...);
1028+int putwin(WINDOW *, FILE *);
1029+void qiflush(void);
1030+int raw(void);
1031+int redrawwin(WINDOW *);
1032+int refresh(void);
1033+int reset_prog_mode(void);
1034+int reset_shell_mode(void);
1035+int resetty(void);
1036+int ripoffline(int, int (*)(WINDOW *, int));
1037+int savetty(void);
1038+int scanw(const char *, ...);
1039+int scr_dump(const char *);
1040+int scr_init(const char *);
1041+int scr_restore(const char *);
1042+int scr_set(const char *);
1043+int scrl(int);
1044+int scroll(WINDOW *);
1045+int scrollok(WINDOW *, bool);
1046+SCREEN *set_term(SCREEN *);
1047+int setscrreg(int, int);
1048+int slk_attroff(const chtype);
1049+int slk_attr_off(const attr_t, void *);
1050+int slk_attron(const chtype);
1051+int slk_attr_on(const attr_t, void *);
1052+int slk_attrset(const chtype);
1053+int slk_attr_set(const attr_t, short, void *);
1054+int slk_clear(void);
1055+int slk_color(short);
1056+int slk_init(int);
1057+char *slk_label(int);
1058+int slk_noutrefresh(void);
1059+int slk_refresh(void);
1060+int slk_restore(void);
1061+int slk_set(int, const char *, int);
1062+int slk_touch(void);
1063+int standend(void);
1064+int standout(void);
1065+int start_color(void);
1066+WINDOW *subpad(WINDOW *, int, int, int, int);
1067+WINDOW *subwin(WINDOW *, int, int, int, int);
1068+int syncok(WINDOW *, bool);
1069+chtype termattrs(void);
1070+attr_t term_attrs(void);
1071+char *termname(void);
1072+void timeout(int);
1073+int touchline(WINDOW *, int, int);
1074+int touchwin(WINDOW *);
1075+int typeahead(int);
1076+int untouchwin(WINDOW *);
1077+void use_env(bool);
1078+int vidattr(chtype);
1079+int vid_attr(attr_t, short, void *);
1080+int vidputs(chtype, int (*)(int));
1081+int vid_puts(attr_t, short, void *, int (*)(int));
1082+int vline(chtype, int);
1083+int vw_printw(WINDOW *, const char *, va_list);
1084+int vwprintw(WINDOW *, const char *, va_list);
1085+int vw_scanw(WINDOW *, const char *, va_list);
1086+int vwscanw(WINDOW *, const char *, va_list);
1087+int waddchnstr(WINDOW *, const chtype *, int);
1088+int waddchstr(WINDOW *, const chtype *);
1089+int waddch(WINDOW *, const chtype);
1090+int waddnstr(WINDOW *, const char *, int);
1091+int waddstr(WINDOW *, const char *);
1092+int wattroff(WINDOW *, chtype);
1093+int wattron(WINDOW *, chtype);
1094+int wattrset(WINDOW *, chtype);
1095+int wattr_get(WINDOW *, attr_t *, short *, void *);
1096+int wattr_off(WINDOW *, attr_t, void *);
1097+int wattr_on(WINDOW *, attr_t, void *);
1098+int wattr_set(WINDOW *, attr_t, short, void *);
1099+void wbkgdset(WINDOW *, chtype);
1100+int wbkgd(WINDOW *, chtype);
1101+int wborder(WINDOW *, chtype, chtype, chtype, chtype,
1102+ chtype, chtype, chtype, chtype);
1103+int wchgat(WINDOW *, int, attr_t, short, const void *);
1104+int wclear(WINDOW *);
1105+int wclrtobot(WINDOW *);
1106+int wclrtoeol(WINDOW *);
1107+int wcolor_set(WINDOW *, short, void *);
1108+void wcursyncup(WINDOW *);
1109+int wdelch(WINDOW *);
1110+int wdeleteln(WINDOW *);
1111+int wechochar(WINDOW *, const chtype);
1112+int werase(WINDOW *);
1113+int wgetch(WINDOW *);
1114+int wgetnstr(WINDOW *, char *, int);
1115+int wgetstr(WINDOW *, char *);
1116+int whline(WINDOW *, chtype, int);
1117+int winchnstr(WINDOW *, chtype *, int);
1118+int winchstr(WINDOW *, chtype *);
1119+chtype winch(WINDOW *);
1120+int winnstr(WINDOW *, char *, int);
1121+int winsch(WINDOW *, chtype);
1122+int winsdelln(WINDOW *, int);
1123+int winsertln(WINDOW *);
1124+int winsnstr(WINDOW *, const char *, int);
1125+int winsstr(WINDOW *, const char *);
1126+int winstr(WINDOW *, char *);
1127+int wmove(WINDOW *, int, int);
1128+int wnoutrefresh(WINDOW *);
1129+int wprintw(WINDOW *, const char *, ...);
1130+int wredrawln(WINDOW *, int, int);
1131+int wrefresh(WINDOW *);
1132+int wscanw(WINDOW *, const char *, ...);
1133+int wscrl(WINDOW *, int);
1134+int wsetscrreg(WINDOW *, int, int);
1135+int wstandend(WINDOW *);
1136+int wstandout(WINDOW *);
1137+void wsyncdown(WINDOW *);
1138+void wsyncup(WINDOW *);
1139+void wtimeout(WINDOW *, int);
1140+int wtouchln(WINDOW *, int, int, int);
1141+int wvline(WINDOW *, chtype, int);
11301142
11311143 /* Wide-character functions */
11321144
11331145 #ifdef PDC_WIDE
1134-PDCEX int addnwstr(const wchar_t *, int);
1135-PDCEX int addwstr(const wchar_t *);
1136-PDCEX int add_wch(const cchar_t *);
1137-PDCEX int add_wchnstr(const cchar_t *, int);
1138-PDCEX int add_wchstr(const cchar_t *);
1139-PDCEX int bkgrnd(const cchar_t *);
1140-PDCEX void bkgrndset(const cchar_t *);
1141-PDCEX int border_set(const cchar_t *, const cchar_t *, const cchar_t *,
1142- const cchar_t *, const cchar_t *, const cchar_t *,
1143- const cchar_t *, const cchar_t *);
1144-PDCEX int box_set(WINDOW *, const cchar_t *, const cchar_t *);
1145-PDCEX int echo_wchar(const cchar_t *);
1146-PDCEX int erasewchar(wchar_t *);
1147-PDCEX int getbkgrnd(cchar_t *);
1148-PDCEX int getcchar(const cchar_t *, wchar_t *, attr_t *, short *, void *);
1149-PDCEX int getn_wstr(wint_t *, int);
1150-PDCEX int get_wch(wint_t *);
1151-PDCEX int get_wstr(wint_t *);
1152-PDCEX int hline_set(const cchar_t *, int);
1153-PDCEX int innwstr(wchar_t *, int);
1154-PDCEX int ins_nwstr(const wchar_t *, int);
1155-PDCEX int ins_wch(const cchar_t *);
1156-PDCEX int ins_wstr(const wchar_t *);
1157-PDCEX int inwstr(wchar_t *);
1158-PDCEX int in_wch(cchar_t *);
1159-PDCEX int in_wchnstr(cchar_t *, int);
1160-PDCEX int in_wchstr(cchar_t *);
1161-PDCEX char *key_name(wchar_t);
1162-PDCEX int killwchar(wchar_t *);
1163-PDCEX int mvaddnwstr(int, int, const wchar_t *, int);
1164-PDCEX int mvaddwstr(int, int, const wchar_t *);
1165-PDCEX int mvadd_wch(int, int, const cchar_t *);
1166-PDCEX int mvadd_wchnstr(int, int, const cchar_t *, int);
1167-PDCEX int mvadd_wchstr(int, int, const cchar_t *);
1168-PDCEX int mvgetn_wstr(int, int, wint_t *, int);
1169-PDCEX int mvget_wch(int, int, wint_t *);
1170-PDCEX int mvget_wstr(int, int, wint_t *);
1171-PDCEX int mvhline_set(int, int, const cchar_t *, int);
1172-PDCEX int mvinnwstr(int, int, wchar_t *, int);
1173-PDCEX int mvins_nwstr(int, int, const wchar_t *, int);
1174-PDCEX int mvins_wch(int, int, const cchar_t *);
1175-PDCEX int mvins_wstr(int, int, const wchar_t *);
1176-PDCEX int mvinwstr(int, int, wchar_t *);
1177-PDCEX int mvin_wch(int, int, cchar_t *);
1178-PDCEX int mvin_wchnstr(int, int, cchar_t *, int);
1179-PDCEX int mvin_wchstr(int, int, cchar_t *);
1180-PDCEX int mvvline_set(int, int, const cchar_t *, int);
1181-PDCEX int mvwaddnwstr(WINDOW *, int, int, const wchar_t *, int);
1182-PDCEX int mvwaddwstr(WINDOW *, int, int, const wchar_t *);
1183-PDCEX int mvwadd_wch(WINDOW *, int, int, const cchar_t *);
1184-PDCEX int mvwadd_wchnstr(WINDOW *, int, int, const cchar_t *, int);
1185-PDCEX int mvwadd_wchstr(WINDOW *, int, int, const cchar_t *);
1186-PDCEX int mvwgetn_wstr(WINDOW *, int, int, wint_t *, int);
1187-PDCEX int mvwget_wch(WINDOW *, int, int, wint_t *);
1188-PDCEX int mvwget_wstr(WINDOW *, int, int, wint_t *);
1189-PDCEX int mvwhline_set(WINDOW *, int, int, const cchar_t *, int);
1190-PDCEX int mvwinnwstr(WINDOW *, int, int, wchar_t *, int);
1191-PDCEX int mvwins_nwstr(WINDOW *, int, int, const wchar_t *, int);
1192-PDCEX int mvwins_wch(WINDOW *, int, int, const cchar_t *);
1193-PDCEX int mvwins_wstr(WINDOW *, int, int, const wchar_t *);
1194-PDCEX int mvwin_wch(WINDOW *, int, int, cchar_t *);
1195-PDCEX int mvwin_wchnstr(WINDOW *, int, int, cchar_t *, int);
1196-PDCEX int mvwin_wchstr(WINDOW *, int, int, cchar_t *);
1197-PDCEX int mvwinwstr(WINDOW *, int, int, wchar_t *);
1198-PDCEX int mvwvline_set(WINDOW *, int, int, const cchar_t *, int);
1199-PDCEX int pecho_wchar(WINDOW *, const cchar_t*);
1200-PDCEX int setcchar(cchar_t*, const wchar_t*, const attr_t,
1201- short, const void*);
1202-PDCEX int slk_wset(int, const wchar_t *, int);
1203-PDCEX int unget_wch(const wchar_t);
1204-PDCEX int vline_set(const cchar_t *, int);
1205-PDCEX int waddnwstr(WINDOW *, const wchar_t *, int);
1206-PDCEX int waddwstr(WINDOW *, const wchar_t *);
1207-PDCEX int wadd_wch(WINDOW *, const cchar_t *);
1208-PDCEX int wadd_wchnstr(WINDOW *, const cchar_t *, int);
1209-PDCEX int wadd_wchstr(WINDOW *, const cchar_t *);
1210-PDCEX int wbkgrnd(WINDOW *, const cchar_t *);
1211-PDCEX void wbkgrndset(WINDOW *, const cchar_t *);
1212-PDCEX int wborder_set(WINDOW *, const cchar_t *, const cchar_t *,
1213- const cchar_t *, const cchar_t *, const cchar_t *,
1214- const cchar_t *, const cchar_t *, const cchar_t *);
1215-PDCEX int wecho_wchar(WINDOW *, const cchar_t *);
1216-PDCEX int wgetbkgrnd(WINDOW *, cchar_t *);
1217-PDCEX int wgetn_wstr(WINDOW *, wint_t *, int);
1218-PDCEX int wget_wch(WINDOW *, wint_t *);
1219-PDCEX int wget_wstr(WINDOW *, wint_t *);
1220-PDCEX int whline_set(WINDOW *, const cchar_t *, int);
1221-PDCEX int winnwstr(WINDOW *, wchar_t *, int);
1222-PDCEX int wins_nwstr(WINDOW *, const wchar_t *, int);
1223-PDCEX int wins_wch(WINDOW *, const cchar_t *);
1224-PDCEX int wins_wstr(WINDOW *, const wchar_t *);
1225-PDCEX int winwstr(WINDOW *, wchar_t *);
1226-PDCEX int win_wch(WINDOW *, cchar_t *);
1227-PDCEX int win_wchnstr(WINDOW *, cchar_t *, int);
1228-PDCEX int win_wchstr(WINDOW *, cchar_t *);
1229-PDCEX wchar_t *wunctrl(cchar_t *);
1230-PDCEX int wvline_set(WINDOW *, const cchar_t *, int);
1146+int addnwstr(const wchar_t *, int);
1147+int addwstr(const wchar_t *);
1148+int add_wch(const cchar_t *);
1149+int add_wchnstr(const cchar_t *, int);
1150+int add_wchstr(const cchar_t *);
1151+int border_set(const cchar_t *, const cchar_t *, const cchar_t *,
1152+ const cchar_t *, const cchar_t *, const cchar_t *,
1153+ const cchar_t *, const cchar_t *);
1154+int box_set(WINDOW *, const cchar_t *, const cchar_t *);
1155+int echo_wchar(const cchar_t *);
1156+int erasewchar(wchar_t *);
1157+int getbkgrnd(cchar_t *);
1158+int getcchar(const cchar_t *, wchar_t *, attr_t *, short *, void *);
1159+int getn_wstr(wint_t *, int);
1160+int get_wch(wint_t *);
1161+int get_wstr(wint_t *);
1162+int hline_set(const cchar_t *, int);
1163+int innwstr(wchar_t *, int);
1164+int ins_nwstr(const wchar_t *, int);
1165+int ins_wch(const cchar_t *);
1166+int ins_wstr(const wchar_t *);
1167+int inwstr(wchar_t *);
1168+int in_wch(cchar_t *);
1169+int in_wchnstr(cchar_t *, int);
1170+int in_wchstr(cchar_t *);
1171+char *key_name(wchar_t);
1172+int killwchar(wchar_t *);
1173+int mvaddnwstr(int, int, const wchar_t *, int);
1174+int mvaddwstr(int, int, const wchar_t *);
1175+int mvadd_wch(int, int, const cchar_t *);
1176+int mvadd_wchnstr(int, int, const cchar_t *, int);
1177+int mvadd_wchstr(int, int, const cchar_t *);
1178+int mvgetn_wstr(int, int, wint_t *, int);
1179+int mvget_wch(int, int, wint_t *);
1180+int mvget_wstr(int, int, wint_t *);
1181+int mvhline_set(int, int, const cchar_t *, int);
1182+int mvinnwstr(int, int, wchar_t *, int);
1183+int mvins_nwstr(int, int, const wchar_t *, int);
1184+int mvins_wch(int, int, const cchar_t *);
1185+int mvins_wstr(int, int, const wchar_t *);
1186+int mvinwstr(int, int, wchar_t *);
1187+int mvin_wch(int, int, cchar_t *);
1188+int mvin_wchnstr(int, int, cchar_t *, int);
1189+int mvin_wchstr(int, int, cchar_t *);
1190+int mvvline_set(int, int, const cchar_t *, int);
1191+int mvwaddnwstr(WINDOW *, int, int, const wchar_t *, int);
1192+int mvwaddwstr(WINDOW *, int, int, const wchar_t *);
1193+int mvwadd_wch(WINDOW *, int, int, const cchar_t *);
1194+int mvwadd_wchnstr(WINDOW *, int, int, const cchar_t *, int);
1195+int mvwadd_wchstr(WINDOW *, int, int, const cchar_t *);
1196+int mvwgetn_wstr(WINDOW *, int, int, wint_t *, int);
1197+int mvwget_wch(WINDOW *, int, int, wint_t *);
1198+int mvwget_wstr(WINDOW *, int, int, wint_t *);
1199+int mvwhline_set(WINDOW *, int, int, const cchar_t *, int);
1200+int mvwinnwstr(WINDOW *, int, int, wchar_t *, int);
1201+int mvwins_nwstr(WINDOW *, int, int, const wchar_t *, int);
1202+int mvwins_wch(WINDOW *, int, int, const cchar_t *);
1203+int mvwins_wstr(WINDOW *, int, int, const wchar_t *);
1204+int mvwin_wch(WINDOW *, int, int, cchar_t *);
1205+int mvwin_wchnstr(WINDOW *, int, int, cchar_t *, int);
1206+int mvwin_wchstr(WINDOW *, int, int, cchar_t *);
1207+int mvwinwstr(WINDOW *, int, int, wchar_t *);
1208+int mvwvline_set(WINDOW *, int, int, const cchar_t *, int);
1209+int pecho_wchar(WINDOW *, const cchar_t*);
1210+int setcchar(cchar_t*, const wchar_t*, const attr_t, short, const void*);
1211+int slk_wset(int, const wchar_t *, int);
1212+int unget_wch(const wchar_t);
1213+int vline_set(const cchar_t *, int);
1214+int waddnwstr(WINDOW *, const wchar_t *, int);
1215+int waddwstr(WINDOW *, const wchar_t *);
1216+int wadd_wch(WINDOW *, const cchar_t *);
1217+int wadd_wchnstr(WINDOW *, const cchar_t *, int);
1218+int wadd_wchstr(WINDOW *, const cchar_t *);
1219+int wbkgrnd(WINDOW *, const cchar_t *);
1220+void wbkgrndset(WINDOW *, const cchar_t *);
1221+int wborder_set(WINDOW *, const cchar_t *, const cchar_t *,
1222+ const cchar_t *, const cchar_t *, const cchar_t *,
1223+ const cchar_t *, const cchar_t *, const cchar_t *);
1224+int wecho_wchar(WINDOW *, const cchar_t *);
1225+int wgetbkgrnd(WINDOW *, cchar_t *);
1226+int wgetn_wstr(WINDOW *, wint_t *, int);
1227+int wget_wch(WINDOW *, wint_t *);
1228+int wget_wstr(WINDOW *, wint_t *);
1229+int whline_set(WINDOW *, const cchar_t *, int);
1230+int winnwstr(WINDOW *, wchar_t *, int);
1231+int wins_nwstr(WINDOW *, const wchar_t *, int);
1232+int wins_wch(WINDOW *, const cchar_t *);
1233+int wins_wstr(WINDOW *, const wchar_t *);
1234+int winwstr(WINDOW *, wchar_t *);
1235+int win_wch(WINDOW *, cchar_t *);
1236+int win_wchnstr(WINDOW *, cchar_t *, int);
1237+int win_wchstr(WINDOW *, cchar_t *);
1238+wchar_t *wunctrl(cchar_t *);
1239+int wvline_set(WINDOW *, const cchar_t *, int);
12311240 #endif
12321241
12331242 /* Quasi-standard */
12341243
1235-PDCEX chtype getattrs(WINDOW *);
1236-PDCEX int getbegx(WINDOW *);
1237-PDCEX int getbegy(WINDOW *);
1238-PDCEX int getmaxx(WINDOW *);
1239-PDCEX int getmaxy(WINDOW *);
1240-PDCEX int getparx(WINDOW *);
1241-PDCEX int getpary(WINDOW *);
1242-PDCEX int getcurx(WINDOW *);
1243-PDCEX int getcury(WINDOW *);
1244-PDCEX void traceoff(void);
1245-PDCEX void traceon(void);
1246-PDCEX char *unctrl(chtype);
1247-
1248-PDCEX int crmode(void);
1249-PDCEX int nocrmode(void);
1250-PDCEX int draino(int);
1251-PDCEX int resetterm(void);
1252-PDCEX int fixterm(void);
1253-PDCEX int saveterm(void);
1254-PDCEX void setsyx(int, int);
1255-
1256-PDCEX int mouse_set(mmask_t);
1257-PDCEX int mouse_on(mmask_t);
1258-PDCEX int mouse_off(mmask_t);
1259-PDCEX int request_mouse_pos(void);
1260-PDCEX void wmouse_position(WINDOW *, int *, int *);
1261-PDCEX mmask_t getmouse(void);
1244+chtype getattrs(WINDOW *);
1245+int getbegx(WINDOW *);
1246+int getbegy(WINDOW *);
1247+int getmaxx(WINDOW *);
1248+int getmaxy(WINDOW *);
1249+int getparx(WINDOW *);
1250+int getpary(WINDOW *);
1251+int getcurx(WINDOW *);
1252+int getcury(WINDOW *);
1253+void traceoff(void);
1254+void traceon(void);
1255+char *unctrl(chtype);
1256+
1257+int crmode(void);
1258+int nocrmode(void);
1259+int draino(int);
1260+int resetterm(void);
1261+int fixterm(void);
1262+int saveterm(void);
1263+int setsyx(int, int);
1264+
1265+int mouse_set(unsigned long);
1266+int mouse_on(unsigned long);
1267+int mouse_off(unsigned long);
1268+int request_mouse_pos(void);
1269+int map_button(unsigned long);
1270+void wmouse_position(WINDOW *, int *, int *);
1271+unsigned long getmouse(void);
1272+unsigned long getbmap(void);
12621273
12631274 /* ncurses */
12641275
1265-PDCEX int assume_default_colors(int, int);
1266-PDCEX const char *curses_version(void);
1267-PDCEX bool has_key(int);
1268-PDCEX int use_default_colors(void);
1269-PDCEX int wresize(WINDOW *, int, int);
1276+int assume_default_colors(int, int);
1277+const char *curses_version(void);
1278+bool has_key(int);
1279+int use_default_colors(void);
1280+int wresize(WINDOW *, int, int);
12701281
1271-PDCEX int mouseinterval(int);
1272-PDCEX mmask_t mousemask(mmask_t, mmask_t *);
1273-PDCEX bool mouse_trafo(int *, int *, bool);
1274-PDCEX int nc_getmouse(MEVENT *);
1275-PDCEX int ungetmouse(MEVENT *);
1276-PDCEX bool wenclose(const WINDOW *, int, int);
1277-PDCEX bool wmouse_trafo(const WINDOW *, int *, int *, bool);
1282+int mouseinterval(int);
1283+mmask_t mousemask(mmask_t, mmask_t *);
1284+bool mouse_trafo(int *, int *, bool);
1285+int nc_getmouse(MEVENT *);
1286+int ungetmouse(MEVENT *);
1287+bool wenclose(const WINDOW *, int, int);
1288+bool wmouse_trafo(const WINDOW *, int *, int *, bool);
12781289
12791290 /* PDCurses */
12801291
1281-PDCEX int addrawch(chtype);
1282-PDCEX int insrawch(chtype);
1283-PDCEX bool is_termresized(void);
1284-PDCEX int mvaddrawch(int, int, chtype);
1285-PDCEX int mvdeleteln(int, int);
1286-PDCEX int mvinsertln(int, int);
1287-PDCEX int mvinsrawch(int, int, chtype);
1288-PDCEX int mvwaddrawch(WINDOW *, int, int, chtype);
1289-PDCEX int mvwdeleteln(WINDOW *, int, int);
1290-PDCEX int mvwinsertln(WINDOW *, int, int);
1291-PDCEX int mvwinsrawch(WINDOW *, int, int, chtype);
1292-PDCEX int raw_output(bool);
1293-PDCEX int resize_term(int, int);
1294-PDCEX WINDOW *resize_window(WINDOW *, int, int);
1295-PDCEX int waddrawch(WINDOW *, chtype);
1296-PDCEX int winsrawch(WINDOW *, chtype);
1297-PDCEX char wordchar(void);
1292+int addrawch(chtype);
1293+int insrawch(chtype);
1294+bool is_termresized(void);
1295+int mvaddrawch(int, int, chtype);
1296+int mvdeleteln(int, int);
1297+int mvinsertln(int, int);
1298+int mvinsrawch(int, int, chtype);
1299+int mvwaddrawch(WINDOW *, int, int, chtype);
1300+int mvwdeleteln(WINDOW *, int, int);
1301+int mvwinsertln(WINDOW *, int, int);
1302+int mvwinsrawch(WINDOW *, int, int, chtype);
1303+int raw_output(bool);
1304+int resize_term(int, int);
1305+WINDOW *resize_window(WINDOW *, int, int);
1306+int waddrawch(WINDOW *, chtype);
1307+int winsrawch(WINDOW *, chtype);
1308+char wordchar(void);
12981309
12991310 #ifdef PDC_WIDE
1300-PDCEX wchar_t *slk_wlabel(int);
1311+wchar_t *slk_wlabel(int);
13011312 #endif
13021313
1303-PDCEX void PDC_debug(const char *, ...);
1304-PDCEX void PDC_get_version(PDC_VERSION *);
1305-PDCEX int PDC_ungetch(int);
1306-PDCEX int PDC_set_blink(bool);
1307-PDCEX int PDC_set_bold(bool);
1308-PDCEX int PDC_set_line_color(short);
1309-PDCEX void PDC_set_title(const char *);
1314+void PDC_debug(const char *, ...);
1315+int PDC_ungetch(int);
1316+int PDC_set_blink(bool);
1317+int PDC_set_line_color(short);
1318+void PDC_set_title(const char *);
13101319
1311-PDCEX int PDC_clearclipboard(void);
1312-PDCEX int PDC_freeclipboard(char *);
1313-PDCEX int PDC_getclipboard(char **, long *);
1314-PDCEX int PDC_setclipboard(const char *, long);
1320+int PDC_clearclipboard(void);
1321+int PDC_freeclipboard(char *);
1322+int PDC_getclipboard(char **, long *);
1323+int PDC_setclipboard(const char *, long);
13151324
1316-PDCEX unsigned long PDC_get_input_fd(void);
1317-PDCEX unsigned long PDC_get_key_modifiers(void);
1318-PDCEX int PDC_return_key_modifiers(bool);
1319-PDCEX int PDC_save_key_modifiers(bool);
1325+unsigned long PDC_get_input_fd(void);
1326+unsigned long PDC_get_key_modifiers(void);
1327+int PDC_return_key_modifiers(bool);
1328+int PDC_save_key_modifiers(bool);
13201329
13211330 #ifdef XCURSES
1322-PDCEX WINDOW *Xinitscr(int, char **);
1323-PDCEX void XCursesExit(void);
1324-PDCEX int sb_init(void);
1325-PDCEX int sb_set_horz(int, int, int);
1326-PDCEX int sb_set_vert(int, int, int);
1327-PDCEX int sb_get_horz(int *, int *, int *);
1328-PDCEX int sb_get_vert(int *, int *, int *);
1329-PDCEX int sb_refresh(void);
1331+WINDOW *Xinitscr(int, char **);
1332+void XCursesExit(void);
1333+int sb_init(void);
1334+int sb_set_horz(int, int, int);
1335+int sb_set_vert(int, int, int);
1336+int sb_get_horz(int *, int *, int *);
1337+int sb_get_vert(int *, int *, int *);
1338+int sb_refresh(void);
13301339 #endif
13311340
13321341 /*** Functions defined as macros ***/
@@ -1367,7 +1376,7 @@ PDCEX int sb_refresh(void);
13671376 #define PDC_KEY_MODIFIER_ALT 4
13681377 #define PDC_KEY_MODIFIER_NUMLOCK 8
13691378
1370-#ifdef __cplusplus
1379+#if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS)
13711380 # undef bool
13721381 }
13731382 #endif
Show on old repository browser