From 83c38bc26e2f4ef552a976077643a896c0df2e64 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Thu, 27 Nov 2008 13:17:51 +0000 Subject: [PATCH 01/46] Bogus comment. Reported by Kerry Tatlow. --- dos/mscdos.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dos/mscdos.mak b/dos/mscdos.mak index 7aa6c5f7..3d778f4c 100644 --- a/dos/mscdos.mak +++ b/dos/mscdos.mak @@ -1,6 +1,6 @@ # NMAKE Makefile for PDCurses library - Microsoft C for DOS # -# Usage: nmake -f [path\]dosmsc.mak [DEBUG=] [target] +# Usage: nmake -f [path\]mscdos.mak [DEBUG=] [target] # # where target can be any of: # [all|demos|pdcurses.lib|testcurs.exe...] From 3560528d0568341aff0b1fca71d5bd6c042b2b02 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Thu, 4 Feb 2010 05:09:27 +0000 Subject: [PATCH 02/46] Added WA_NORMAL and WA_ATTRIBUTES. --- curses.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/curses.h b/curses.h index 6f3ce19d..de9c3702 100644 --- a/curses.h +++ b/curses.h @@ -1,6 +1,6 @@ /* Public Domain Curses */ -/* $Id: curses.h,v 1.295 2008/07/15 17:13:25 wmcbrine Exp $ */ +/* $Id: curses.h,v 1.296 2010/02/04 05:09:27 wmcbrine Exp $ */ /*----------------------------------------------------------------------* * PDCurses * @@ -443,6 +443,8 @@ bits), 8 bits for other attributes, and 16 bits for character data. /* For use with attr_t -- X/Open says, "these shall be distinct", so this is a non-conforming implementation. */ +#define WA_NORMAL A_NORMAL + #define WA_ALTCHARSET A_ALTCHARSET #define WA_BLINK A_BLINK #define WA_BOLD A_BOLD @@ -460,6 +462,8 @@ bits), 8 bits for other attributes, and 16 bits for character data. #define WA_TOP A_NORMAL #define WA_VERTICAL A_NORMAL +#define WA_ATTRIBUTES A_ATTRIBUTES + /*** Alternate character set macros ***/ /* 'w' = 32-bit chtype; acs_map[] index | A_ALTCHARSET From d266914ecb53d3ca272d665b088bd4ef37b69812 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 8 Aug 2010 08:54:31 +0000 Subject: [PATCH 03/46] PDC_DLL_BUILD, not PDCURSES_DLL_BUILD. Reported by Anonymous on SF.net. --- win32/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32/README b/win32/README index bfe2ad95..88dd0d75 100644 --- a/win32/README +++ b/win32/README @@ -60,8 +60,8 @@ Building nmake -f vcwin32.mak WIDE=Y DLL=Y When you build the library as a Windows DLL, you must always define - PDCURSES_DLL_BUILD when linking against it. (Or, if you only want to - use the DLL, you could add this definition to your curses.h.) + PDC_DLL_BUILD when linking against it. (Or, if you only want to use + the DLL, you could add this definition to your curses.h.) Distribution Status From 7a223c1d499ebc66aebe173d15250e9c30a78607 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Wed, 20 Apr 2011 22:13:34 +0000 Subject: [PATCH 04/46] Add support for left/right mouse scroll wheels in X11, by Mark Hessling. (Not tested by me.) --- curses.h | 8 +++++++- demos/testcurs.c | 6 +++++- x11/x11.c | 23 ++++++++++++++++++----- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/curses.h b/curses.h index de9c3702..295084e2 100644 --- a/curses.h +++ b/curses.h @@ -1,6 +1,6 @@ /* Public Domain Curses */ -/* $Id: curses.h,v 1.296 2010/02/04 05:09:27 wmcbrine Exp $ */ +/* $Id: curses.h,v 1.297 2011/04/20 22:13:33 wmcbrine Exp $ */ /*----------------------------------------------------------------------* * PDCurses * @@ -142,12 +142,16 @@ typedef struct * 10000 <- mouse position report * 100000 <- mouse wheel up * 1000000 <- mouse wheel down + * 10000000 <- mouse wheel left + * 100000000 <- mouse wheel right */ #define PDC_MOUSE_MOVED 0x0008 #define PDC_MOUSE_POSITION 0x0010 #define PDC_MOUSE_WHEEL_UP 0x0020 #define PDC_MOUSE_WHEEL_DOWN 0x0040 +#define PDC_MOUSE_WHEEL_LEFT 0x0080 +#define PDC_MOUSE_WHEEL_RIGHT 0x0100 #define A_BUTTON_CHANGED (Mouse_status.changes & 7) #define MOUSE_MOVED (Mouse_status.changes & PDC_MOUSE_MOVED) @@ -156,6 +160,8 @@ typedef struct #define BUTTON_STATUS(x) (Mouse_status.button[(x) - 1]) #define MOUSE_WHEEL_UP (Mouse_status.changes & PDC_MOUSE_WHEEL_UP) #define MOUSE_WHEEL_DOWN (Mouse_status.changes & PDC_MOUSE_WHEEL_DOWN) +#define MOUSE_WHEEL_LEFT (Mouse_status.changes & PDC_MOUSE_WHEEL_LEFT) +#define MOUSE_WHEEL_RIGHT (Mouse_status.changes & PDC_MOUSE_WHEEL_RIGHT) /* mouse bit-masks */ diff --git a/demos/testcurs.c b/demos/testcurs.c index 5b330f55..e8555b54 100644 --- a/demos/testcurs.c +++ b/demos/testcurs.c @@ -5,7 +5,7 @@ * wrs(5/28/93) -- modified to be consistent (perform identically) * with either PDCurses or under Unix System V, R4 * - * $Id: testcurs.c,v 1.85 2008/07/14 12:35:23 wmcbrine Exp $ + * $Id: testcurs.c,v 1.86 2011/04/20 22:13:34 wmcbrine Exp $ */ #ifndef _XOPEN_SOURCE_EXTENDED @@ -449,6 +449,10 @@ void inputTest(WINDOW *win) waddstr(win, "wheel up: "); else if (MOUSE_WHEEL_DOWN) waddstr(win, "wheel dn: "); + else if (MOUSE_WHEEL_LEFT) + waddstr(win, "wheel lt: "); + else if (MOUSE_WHEEL_RIGHT) + waddstr(win, "wheel rt: "); else if ((BUTTON_STATUS(button) & BUTTON_ACTION_MASK) == BUTTON_PRESSED) waddstr(win, "pressed: "); diff --git a/x11/x11.c b/x11/x11.c index 97d44985..1f579285 100644 --- a/x11/x11.c +++ b/x11/x11.c @@ -2,7 +2,7 @@ #include "pdcx11.h" -RCSID("$Id: x11.c,v 1.94 2008/07/14 04:33:26 wmcbrine Exp $") +RCSID("$Id: x11.c,v 1.95 2011/04/20 22:13:34 wmcbrine Exp $") #ifdef HAVE_DECKEYSYM_H # include @@ -1964,16 +1964,29 @@ static void XCursesButton(Widget w, XEvent *event, String *params, { case ButtonPress: /* Handle button 4 and 5, which are normally mapped to the wheel - mouse scroll up and down */ + mouse scroll up and down, and button 6 and 7, which are + normally mapped to the wheel mouse scroll left and right */ - if (button_no == 4 || button_no == 5) + if (button_no >= 4 && button_no <= 7) { /* Send the KEY_MOUSE to curses program */ memset(&Mouse_status, 0, sizeof(Mouse_status)); - Mouse_status.changes = (button_no == 5) ? - PDC_MOUSE_WHEEL_DOWN : PDC_MOUSE_WHEEL_UP; + switch(button_no) + { + case 4: + Mouse_status.changes = PDC_MOUSE_WHEEL_UP; + break; + case 5: + Mouse_status.changes = PDC_MOUSE_WHEEL_DOWN; + break; + case 6: + Mouse_status.changes = PDC_MOUSE_WHEEL_LEFT; + break; + case 7: + Mouse_status.changes = PDC_MOUSE_WHEEL_RIGHT; + } MOUSE_X_POS = MOUSE_Y_POS = -1; _send_key_to_curses(KEY_MOUSE, &Mouse_status, TRUE); From ec33788e315a2a59d9b80fb9925b9069e190810d Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sat, 23 Apr 2011 06:50:03 +0000 Subject: [PATCH 05/46] Left/right scroll wheel support for SDL and Win32. Still not tested. --- sdl1/pdckbd.c | 20 ++++++++++++++++---- win32/pdckbd.c | 15 ++++++++++++++- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/sdl1/pdckbd.c b/sdl1/pdckbd.c index 56bf1e47..57a88e1c 100644 --- a/sdl1/pdckbd.c +++ b/sdl1/pdckbd.c @@ -2,7 +2,7 @@ #include "pdcsdl.h" -RCSID("$Id: pdckbd.c,v 1.20 2008/07/14 04:24:52 wmcbrine Exp $") +RCSID("$Id: pdckbd.c,v 1.21 2011/04/23 06:50:02 wmcbrine Exp $") /*man-start************************************************************** @@ -282,12 +282,24 @@ static int _process_mouse_event(void) /* handle scroll wheel */ - if ((btn == 4 || btn == 5) && action == BUTTON_RELEASED) + if ((btn >= 4 && btn <= 7) && action == BUTTON_RELEASED) { pdc_mouse_status.x = pdc_mouse_status.y = -1; - pdc_mouse_status.changes = (btn == 5) ? - PDC_MOUSE_WHEEL_DOWN : PDC_MOUSE_WHEEL_UP; + switch (btn) + { + case 4: + pdc_mouse_status.changes = PDC_MOUSE_WHEEL_UP; + break; + case 5: + pdc_mouse_status.changes = PDC_MOUSE_WHEEL_DOWN; + break; + case 6: + pdc_mouse_status.changes = PDC_MOUSE_WHEEL_LEFT; + break; + case 7: + pdc_mouse_status.changes = PDC_MOUSE_WHEEL_RIGHT; + } return KEY_MOUSE; } diff --git a/win32/pdckbd.c b/win32/pdckbd.c index 1c5b05b0..7717260d 100644 --- a/win32/pdckbd.c +++ b/win32/pdckbd.c @@ -2,7 +2,7 @@ #include "pdcwin.h" -RCSID("$Id: pdckbd.c,v 1.115 2008/07/20 20:12:04 wmcbrine Exp $") +RCSID("$Id: pdckbd.c,v 1.116 2011/04/23 06:50:03 wmcbrine Exp $") /*man-start************************************************************** @@ -486,6 +486,19 @@ static int _process_mouse_event(void) return KEY_MOUSE; } + if (MEV.dwEventFlags == 8) + { + pdc_mouse_status.changes = (MEV.dwButtonState & 0xFF000000) ? + PDC_MOUSE_WHEEL_RIGHT : PDC_MOUSE_WHEEL_LEFT; + + pdc_mouse_status.x = -1; + pdc_mouse_status.y = -1; + + memset(&old_mouse_status, 0, sizeof(old_mouse_status)); + + return KEY_MOUSE; + } + action = (MEV.dwEventFlags == 2) ? BUTTON_DOUBLE_CLICKED : ((MEV.dwEventFlags == 1) ? BUTTON_MOVED : BUTTON_PRESSED); From d7ebd4b050593ecd6bd654299dc68a2fba7b96ab Mon Sep 17 00:00:00 2001 From: William McBrine Date: Wed, 27 Apr 2011 20:18:47 +0000 Subject: [PATCH 06/46] Updated with correct description of current indentation style. --- IMPLEMNT | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/IMPLEMNT b/IMPLEMNT index 0445f8bb..a83f026f 100644 --- a/IMPLEMNT +++ b/IMPLEMNT @@ -1,8 +1,9 @@ PDCurses Implementor's Guide ============================ -Version 1.3 - 200?/??/?? - notes about official ports -Version 1.2 - 2007/07/11 - added PDC_init_pair(), PDC_pair_content(), +Version 1.3 - 20??/??/?? - notes about official ports, new indentation + style +Version 1.2 - 2007/07/11 - added PDC_init_pair(), PDC_pair_content(), version history; removed pdc_atrtab Version 1.1 - 2007/06/06 - minor cosmetic change Version 1.0 - 2007/04/01 - initial revision @@ -65,9 +66,8 @@ an application's choices. Current PDCurses style also uses a single leading underscore with the name of any static function; and modified BSD/Allman-style indentation, -approximately equivalent to "indent -kr -i8 -bl -bli0", with adjustments -to keep every line under 80 columns. This isn't essential, but a -consistent style helps readability. +approximately equivalent to "indent -kr -nut -bl -bli0", with +adjustments to keep every line under 80 columns. pdcdisp.c: From 63bd1d19102dcea5b7b5459897592a8831121f28 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Tue, 8 May 2012 07:00:59 +0000 Subject: [PATCH 07/46] I see no value in the NUMKEYPAD define, and it was already removed from the other platforms when their keyboard code was restructured. --- win32/pdckbd.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/win32/pdckbd.c b/win32/pdckbd.c index 7717260d..888cac9b 100644 --- a/win32/pdckbd.c +++ b/win32/pdckbd.c @@ -2,7 +2,7 @@ #include "pdcwin.h" -RCSID("$Id: pdckbd.c,v 1.116 2011/04/23 06:50:03 wmcbrine Exp $") +RCSID("$Id: pdckbd.c,v 1.117 2012/05/08 07:00:59 wmcbrine Exp $") /*man-start************************************************************** @@ -417,12 +417,9 @@ static int _process_key_event(void) { /* This code should catch all keys returning a printable character. Characters above 0x7F should be returned as - positive codes. But if'ndef NUMKEYPAD we have to return - extended keycodes for keypad codes. */ + positive codes. */ -#ifndef NUMKEYPAD if (kptab[vk].extended == 0) -#endif { SP->key_code = FALSE; return key; From e50f65fa92ba69e7204b99a80105f8b515fd45bb Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 11 May 2012 16:48:28 +0000 Subject: [PATCH 08/46] New subwindows/subpads/resized windows should copy _delayms. Patch by "xaizek". --- pdcurses/window.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pdcurses/window.c b/pdcurses/window.c index dbfd5849..231c5a32 100644 --- a/pdcurses/window.c +++ b/pdcurses/window.c @@ -2,7 +2,7 @@ #include -RCSID("$Id: window.c,v 1.62 2008/07/13 16:08:18 wmcbrine Exp $") +RCSID("$Id: window.c,v 1.63 2012/05/11 16:48:28 wmcbrine Exp $") /*man-start************************************************************** @@ -323,6 +323,7 @@ WINDOW *subwin(WINDOW *orig, int nlines, int ncols, int begy, int begx) win->_leaveit = orig->_leaveit; win->_scroll = orig->_scroll; win->_nodelay = orig->_nodelay; + win->_delayms = orig->_delayms; win->_use_keypad = orig->_use_keypad; win->_immed = orig->_immed; win->_sync = orig->_sync; @@ -410,6 +411,7 @@ WINDOW *dupwin(WINDOW *win) new->_leaveit = win->_leaveit; new->_scroll = win->_scroll; new->_nodelay = win->_nodelay; + new->_delayms = win->_delayms; new->_use_keypad = win->_use_keypad; new->_tmarg = win->_tmarg; new->_bmarg = win->_bmarg; @@ -486,6 +488,7 @@ WINDOW *resize_window(WINDOW *win, int nlines, int ncols) new->_leaveit = win->_leaveit; new->_scroll = win->_scroll; new->_nodelay = win->_nodelay; + new->_delayms = win->_delayms; new->_use_keypad = win->_use_keypad; new->_tmarg = (win->_tmarg > new->_maxy - 1) ? 0 : win->_tmarg; new->_bmarg = (win->_bmarg == win->_maxy - 1) ? From 828a5aeb8bd6d111f1becab04bac0e3b89be3420 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sat, 19 May 2012 05:19:44 +0000 Subject: [PATCH 09/46] Although its value is common to DOS, OS/2 and Win32, PDC_ATTR_SHIFT is really an implementation detail, that doesn't need to be exposed. --- curses.h | 4 +--- dos/pdcdos.h | 8 +++++++- os2/pdcos2.h | 8 +++++++- win32/pdcwin.h | 8 +++++++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/curses.h b/curses.h index 295084e2..c0d4a59a 100644 --- a/curses.h +++ b/curses.h @@ -1,6 +1,6 @@ /* Public Domain Curses */ -/* $Id: curses.h,v 1.297 2011/04/20 22:13:33 wmcbrine Exp $ */ +/* $Id: curses.h,v 1.298 2012/05/19 05:19:43 wmcbrine Exp $ */ /*----------------------------------------------------------------------* * PDCurses * @@ -415,7 +415,6 @@ bits), 8 bits for other attributes, and 16 bits for character data. # define A_ITALIC A_INVIS # define A_PROTECT (A_UNDERLINE | A_LEFTLINE | A_RIGHTLINE) -# define PDC_ATTR_SHIFT 19 # define PDC_COLOR_SHIFT 24 #else # define A_BOLD (chtype)0x0100 /* X/Open */ @@ -435,7 +434,6 @@ bits), 8 bits for other attributes, and 16 bits for character data. # define A_ITALIC A_NORMAL # define A_INVIS A_NORMAL -# define PDC_ATTR_SHIFT 8 # define PDC_COLOR_SHIFT 11 #endif diff --git a/dos/pdcdos.h b/dos/pdcdos.h index 436699de..d5d27b23 100644 --- a/dos/pdcdos.h +++ b/dos/pdcdos.h @@ -1,10 +1,16 @@ /* Public Domain Curses */ -/* $Id: pdcdos.h,v 1.30 2008/07/13 16:08:17 wmcbrine Exp $ */ +/* $Id: pdcdos.h,v 1.31 2012/05/19 05:19:44 wmcbrine Exp $ */ #include #include +#ifdef CHTYPE_LONG +# define PDC_ATTR_SHIFT 19 +#else +# define PDC_ATTR_SHIFT 8 +#endif + #if defined(_MSC_VER) || defined(_QC) # define MSC 1 #endif diff --git a/os2/pdcos2.h b/os2/pdcos2.h index 1c11d480..6b2dd18f 100644 --- a/os2/pdcos2.h +++ b/os2/pdcos2.h @@ -1,6 +1,6 @@ /* Public Domain Curses */ -/* $Id: pdcos2.h,v 1.9 2008/08/14 06:38:35 wmcbrine Exp $ */ +/* $Id: pdcos2.h,v 1.10 2012/05/19 05:19:44 wmcbrine Exp $ */ #ifdef _MSC_VER # define USE_OS2_H 1 /* Use the os2.h for the compiler */ @@ -24,6 +24,12 @@ #include +#ifdef CHTYPE_LONG +# define PDC_ATTR_SHIFT 19 +#else +# define PDC_ATTR_SHIFT 8 +#endif + #ifdef __WATCOMC__ # define PDCTHUNK(x) ((ptr_16)(x)) # ifdef __386__ diff --git a/win32/pdcwin.h b/win32/pdcwin.h index bb3396f0..90024039 100644 --- a/win32/pdcwin.h +++ b/win32/pdcwin.h @@ -1,6 +1,6 @@ /* Public Domain Curses */ -/* $Id: pdcwin.h,v 1.6 2008/07/13 06:36:32 wmcbrine Exp $ */ +/* $Id: pdcwin.h,v 1.7 2012/05/19 05:19:44 wmcbrine Exp $ */ #ifdef PDC_WIDE # define UNICODE @@ -10,6 +10,12 @@ #undef MOUSE_MOVED #include +#ifdef CHTYPE_LONG +# define PDC_ATTR_SHIFT 19 +#else +# define PDC_ATTR_SHIFT 8 +#endif + extern unsigned char *pdc_atrtab; extern HANDLE pdc_con_out, pdc_con_in; extern DWORD pdc_quick_edit; From f70e21f91b1de7ffe424f20fe28bbb34df4625aa Mon Sep 17 00:00:00 2001 From: William McBrine Date: Mon, 26 Nov 2012 08:22:50 +0000 Subject: [PATCH 10/46] Reverse the effects of http://lists.x.org/archives/xorg-devel/2011-March/019981.html , which cause PDCurses to hang (although it's not yet clear why). Until I have something better... --- x11/x11.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/x11/x11.c b/x11/x11.c index 1f579285..65dba7a1 100644 --- a/x11/x11.c +++ b/x11/x11.c @@ -2,7 +2,7 @@ #include "pdcx11.h" -RCSID("$Id: x11.c,v 1.95 2011/04/20 22:13:34 wmcbrine Exp $") +RCSID("$Id: x11.c,v 1.96 2012/11/26 08:22:50 wmcbrine Exp $") #ifdef HAVE_DECKEYSYM_H # include @@ -3236,7 +3236,15 @@ int XCursesSetupX(int argc, char *argv[]) #endif /* Wait for events */ + { + XEvent event; + + for (;;) /* forever */ + { + XtAppNextEvent(app_context, &event); + XtDispatchEvent(&event); + } + } - XtAppMainLoop(app_context); return OK; /* won't get here */ } From 82de8aa25e4b3a73528d24994d2fd5b8eb54e56f Mon Sep 17 00:00:00 2001 From: William McBrine Date: Thu, 27 Feb 2014 18:42:16 +0000 Subject: [PATCH 11/46] copywin() needs to disallow corner values equal to _maxx or _maxy, not just less than. Reported by "Aleksandr". --- pdcurses/overlay.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdcurses/overlay.c b/pdcurses/overlay.c index f9bba50f..f7df3372 100644 --- a/pdcurses/overlay.c +++ b/pdcurses/overlay.c @@ -2,7 +2,7 @@ #include -RCSID("$Id: overlay.c,v 1.36 2008/07/14 12:35:23 wmcbrine Exp $") +RCSID("$Id: overlay.c,v 1.37 2014/02/27 18:42:16 wmcbrine Exp $") /*man-start************************************************************** @@ -236,8 +236,8 @@ int copywin(const WINDOW *src_w, WINDOW *dst_w, int src_tr, int src_tc, PDC_LOG(("copywin() - called\n")); - if (!src_w || !dst_w || dst_w == curscr || dst_br > dst_w->_maxy - || dst_bc > dst_w->_maxx || dst_tr < 0 || dst_tc < 0) + if (!src_w || !dst_w || dst_w == curscr || dst_br >= dst_w->_maxy + || dst_bc >= dst_w->_maxx || dst_tr < 0 || dst_tc < 0) return ERR; src_rows = src_w->_maxy - src_tr; From 0bf3fc3ec2e8226dcbc086fdbfcb8da4f813041e Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 28 Feb 2014 17:35:45 +0000 Subject: [PATCH 12/46] Potentially invalid saved cursor position in resize_window() -- another off-by-one _maxx/_maxy error. Patch after "Luke-Jr". --- pdcurses/window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdcurses/window.c b/pdcurses/window.c index 231c5a32..0cdae202 100644 --- a/pdcurses/window.c +++ b/pdcurses/window.c @@ -2,7 +2,7 @@ #include -RCSID("$Id: window.c,v 1.63 2012/05/11 16:48:28 wmcbrine Exp $") +RCSID("$Id: window.c,v 1.64 2014/02/28 17:35:45 wmcbrine Exp $") /*man-start************************************************************** @@ -464,8 +464,8 @@ WINDOW *resize_window(WINDOW *win, int nlines, int ncols) return (WINDOW *)NULL; } - save_curx = min(win->_curx, new->_maxx); - save_cury = min(win->_cury, new->_maxy); + save_curx = min(win->_curx, (new->_maxx - 1)); + save_cury = min(win->_cury, (new->_maxy - 1)); if (!(win->_flags & (_SUBPAD|_SUBWIN))) { From 94e922f2cb1891209930a6e65da2149335c2ac99 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 28 Feb 2014 19:29:17 +0000 Subject: [PATCH 13/46] Common code -- overlay() and overwrite(). --- pdcurses/overlay.c | 67 ++++++++-------------------------------------- 1 file changed, 11 insertions(+), 56 deletions(-) diff --git a/pdcurses/overlay.c b/pdcurses/overlay.c index f7df3372..01f26d23 100644 --- a/pdcurses/overlay.c +++ b/pdcurses/overlay.c @@ -2,7 +2,7 @@ #include -RCSID("$Id: overlay.c,v 1.37 2014/02/27 18:42:16 wmcbrine Exp $") +RCSID("$Id: overlay.c,v 1.38 2014/02/28 19:29:17 wmcbrine Exp $") /*man-start************************************************************** @@ -113,14 +113,12 @@ static int _copy_win(const WINDOW *src_w, WINDOW *dst_w, int src_tr, return OK; } -int overlay(const WINDOW *src_w, WINDOW *dst_w) +int _copy_overlap(const WINDOW *src_w, WINDOW *dst_w, bool overlay) { int first_line, first_col, last_line, last_col; int src_start_x, src_start_y, dst_start_x, dst_start_y; int xdiff, ydiff; - PDC_LOG(("overlay() - called\n")); - if (!src_w || !dst_w) return ERR; @@ -167,64 +165,21 @@ int overlay(const WINDOW *src_w, WINDOW *dst_w) return _copy_win(src_w, dst_w, src_start_y, src_start_x, src_start_y + ydiff, src_start_x + xdiff, - dst_start_y, dst_start_x, TRUE); + dst_start_y, dst_start_x, overlay); +} + +int overlay(const WINDOW *src_w, WINDOW *dst_w) +{ + PDC_LOG(("overlay() - called\n")); + + return _copy_overlap(src_w, dst_w, TRUE); } int overwrite(const WINDOW *src_w, WINDOW *dst_w) { - int first_line, first_col, last_line, last_col; - int src_start_x, src_start_y, dst_start_x, dst_start_y; - int xdiff, ydiff; - PDC_LOG(("overwrite() - called\n")); - if (!src_w || !dst_w) - return ERR; - - first_col = max(dst_w->_begx, src_w->_begx); - first_line = max(dst_w->_begy, src_w->_begy); - - last_col = min(src_w->_begx + src_w->_maxx, dst_w->_begx + dst_w->_maxx); - last_line = min(src_w->_begy + src_w->_maxy, dst_w->_begy + dst_w->_maxy); - - /* determine the overlapping region of the two windows in real - coordinates */ - - /* if no overlapping region, do nothing */ - - if ((last_col < first_col) || (last_line < first_line)) - return OK; - - /* size of overlapping region */ - - xdiff = last_col - first_col; - ydiff = last_line - first_line; - - if (src_w->_begx <= dst_w->_begx) - { - src_start_x = dst_w->_begx - src_w->_begx; - dst_start_x = 0; - } - else - { - dst_start_x = src_w->_begx - dst_w->_begx; - src_start_x = 0; - } - - if (src_w->_begy <= dst_w->_begy) - { - src_start_y = dst_w->_begy - src_w->_begy; - dst_start_y = 0; - } - else - { - dst_start_y = src_w->_begy - dst_w->_begy; - src_start_y = 0; - } - - return _copy_win(src_w, dst_w, src_start_y, src_start_x, - src_start_y + ydiff, src_start_x + xdiff, - dst_start_y, dst_start_x, FALSE); + return _copy_overlap(src_w, dst_w, FALSE); } int copywin(const WINDOW *src_w, WINDOW *dst_w, int src_tr, int src_tc, From e46011688c5d8cbafaa926ec16d8e335f61438b4 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Tue, 4 Mar 2014 18:55:46 +0000 Subject: [PATCH 14/46] SDL.h is now preferred over SDL/SDL.h. --- sdl1/Makefile | 2 +- sdl1/pdcsdl.h | 4 ++-- sdl1/sdltest.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sdl1/Makefile b/sdl1/Makefile index a8393f0b..61a9f7e4 100644 --- a/sdl1/Makefile +++ b/sdl1/Makefile @@ -92,7 +92,7 @@ xmas: $(demodir)/xmas.c $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS) sdltest: $(osdir)/sdltest.c - $(BUILD) $(DEMOFLAGS) -o $@ $< $(LDFLAGS) + $(BUILD) $(DEMOFLAGS) $(SFLAGS) -o $@ $< $(LDFLAGS) tui.o: $(demodir)/tui.c $(demodir)/tui.h $(BUILD) -c $(DEMOFLAGS) $(demodir)/tui.c diff --git a/sdl1/pdcsdl.h b/sdl1/pdcsdl.h index 79df21a5..6d98ca1c 100644 --- a/sdl1/pdcsdl.h +++ b/sdl1/pdcsdl.h @@ -1,10 +1,10 @@ /* Public Domain Curses */ -/* $Id: pdcsdl.h,v 1.17 2008/07/14 04:24:52 wmcbrine Exp $ */ +/* $Id: pdcsdl.h,v 1.18 2014/03/04 18:55:46 wmcbrine Exp $ */ #include -#include +#include PDCEX SDL_Surface *pdc_screen, *pdc_font, *pdc_icon, *pdc_back; PDCEX int pdc_sheight, pdc_swidth, pdc_yoffset, pdc_xoffset; diff --git a/sdl1/sdltest.c b/sdl1/sdltest.c index d39533b3..e8e318b4 100644 --- a/sdl1/sdltest.c +++ b/sdl1/sdltest.c @@ -2,10 +2,10 @@ The top portion of the window is devoted to SDL, with a four-line (assuming the default 8x16 font) stdscr at the bottom. - $Id: sdltest.c,v 1.2 2008/07/14 04:24:52 wmcbrine Exp $ + $Id: sdltest.c,v 1.3 2014/03/04 18:55:46 wmcbrine Exp $ */ -#include +#include #include #include #include From d6484d4837a007ee686054da092b456655fb59d9 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Wed, 17 Jun 2015 23:56:44 -0400 Subject: [PATCH 15/46] Use gmail address instead of sf.net. --- README | 2 +- configure | 24 ++++++++++++------------ configure.ac | 2 +- sdl1/README | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README b/README index dc476a9f..74a4e19a 100644 --- a/README +++ b/README @@ -45,4 +45,4 @@ described within it. Maintainer ---------- -William McBrine +William McBrine diff --git a/configure b/configure index 2d094bc4..9d14bd8c 100755 --- a/configure +++ b/configure @@ -2,7 +2,7 @@ # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for PDCurses 3.4. # -# Report bugs to . +# Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. @@ -576,7 +576,7 @@ PACKAGE_NAME='PDCurses' PACKAGE_TARNAME='PDCurses' PACKAGE_VERSION='3.4' PACKAGE_STRING='PDCurses 3.4' -PACKAGE_BUGREPORT='wmcbrine@users.sf.net' +PACKAGE_BUGREPORT='wmcbrine@gmail.com' ac_unique_file="curspriv.h" # Factoring default headers for most tests. @@ -1313,7 +1313,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . _ACEOF ac_status=$? fi @@ -3879,9 +3879,9 @@ echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2 { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to wmcbrine@users.sf.net ## -## ------------------------------------ ## +## --------------------------------- ## +## Report this to wmcbrine@gmail.com ## +## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; @@ -4039,9 +4039,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >& { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to wmcbrine@users.sf.net ## -## ------------------------------------ ## +## --------------------------------- ## +## Report this to wmcbrine@gmail.com ## +## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; @@ -4983,9 +4983,9 @@ echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >& { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX -## ------------------------------------ ## -## Report this to wmcbrine@users.sf.net ## -## ------------------------------------ ## +## --------------------------------- ## +## Report this to wmcbrine@gmail.com ## +## --------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; diff --git a/configure.ac b/configure.ac index cf87496d..7a285b4b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl $Id: configure.ac,v 1.35 2008/07/21 12:19:21 wmcbrine Exp $ dnl Process this file with autoconf to produce a configure script. -AC_INIT([PDCurses], [3.4], [wmcbrine@users.sf.net], [PDCurses]) +AC_INIT([PDCurses], [3.4], [wmcbrine@gmail.com], [PDCurses]) AC_CONFIG_SRCDIR([curspriv.h]) AC_SUBST(prefix) diff --git a/sdl1/README b/sdl1/README index 35234d39..c8a2a9b4 100644 --- a/sdl1/README +++ b/sdl1/README @@ -30,4 +30,4 @@ The files in this directory are released to the Public Domain. Acknowledgements ---------------- -SDL port was provided by William McBrine +SDL port was provided by William McBrine From 51fec8ee32581a55b6d49aa843eee4735541c003 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sat, 20 Jun 2015 09:06:43 -0400 Subject: [PATCH 16/46] Id tags aren't useful with git. --- curses.h | 2 -- curspriv.h | 4 ---- demos/firework.c | 2 -- demos/newdemo.c | 2 -- demos/ptest.c | 2 -- demos/rain.c | 2 -- demos/testcurs.c | 2 -- demos/tui.c | 2 -- demos/tui.h | 2 -- demos/tuidemo.c | 2 -- demos/worm.c | 2 -- demos/xmas.c | 2 -- dos/pdcclip.c | 2 -- dos/pdcdisp.c | 2 -- dos/pdcdos.h | 2 -- dos/pdcgetsc.c | 2 -- dos/pdckbd.c | 2 -- dos/pdcscrn.c | 2 -- dos/pdcsetsc.c | 2 -- dos/pdcutil.c | 2 -- os2/pdcclip.c | 2 -- os2/pdcdisp.c | 2 -- os2/pdcgetsc.c | 2 -- os2/pdckbd.c | 2 -- os2/pdcos2.h | 2 -- os2/pdcscrn.c | 2 -- os2/pdcsetsc.c | 2 -- os2/pdcutil.c | 2 -- panel.h | 2 -- pdcurses/addch.c | 2 -- pdcurses/addchstr.c | 2 -- pdcurses/addstr.c | 2 -- pdcurses/attr.c | 2 -- pdcurses/beep.c | 2 -- pdcurses/bkgd.c | 2 -- pdcurses/border.c | 2 -- pdcurses/clear.c | 2 -- pdcurses/color.c | 2 -- pdcurses/debug.c | 2 -- pdcurses/delch.c | 2 -- pdcurses/deleteln.c | 2 -- pdcurses/deprec.c | 2 -- pdcurses/getch.c | 2 -- pdcurses/getstr.c | 2 -- pdcurses/getyx.c | 2 -- pdcurses/inch.c | 2 -- pdcurses/inchstr.c | 2 -- pdcurses/initscr.c | 2 -- pdcurses/inopts.c | 2 -- pdcurses/insch.c | 2 -- pdcurses/insstr.c | 2 -- pdcurses/instr.c | 2 -- pdcurses/kernel.c | 2 -- pdcurses/keyname.c | 2 -- pdcurses/mouse.c | 2 -- pdcurses/move.c | 2 -- pdcurses/outopts.c | 2 -- pdcurses/overlay.c | 2 -- pdcurses/pad.c | 2 -- pdcurses/panel.c | 2 -- pdcurses/printw.c | 2 -- pdcurses/refresh.c | 2 -- pdcurses/scanw.c | 2 -- pdcurses/scr_dump.c | 2 -- pdcurses/scroll.c | 2 -- pdcurses/slk.c | 2 -- pdcurses/termattr.c | 2 -- pdcurses/terminfo.c | 2 -- pdcurses/touch.c | 2 -- pdcurses/util.c | 2 -- pdcurses/window.c | 2 -- sdl1/pdcclip.c | 2 -- sdl1/pdcdisp.c | 2 -- sdl1/pdcgetsc.c | 2 -- sdl1/pdckbd.c | 2 -- sdl1/pdcscrn.c | 2 -- sdl1/pdcsdl.h | 2 -- sdl1/pdcsetsc.c | 2 -- sdl1/pdcutil.c | 2 -- sdl1/sdltest.c | 2 -- term.h | 2 -- win32/pdcclip.c | 2 -- win32/pdcdisp.c | 2 -- win32/pdcgetsc.c | 2 -- win32/pdckbd.c | 2 -- win32/pdcscrn.c | 2 -- win32/pdcsetsc.c | 2 -- win32/pdcutil.c | 2 -- win32/pdcwin.h | 2 -- x11/ScrollBox.c | 2 -- x11/ScrollBox.h | 2 -- x11/ScrollBoxP.h | 2 -- x11/compose.h | 2 -- x11/ncurses_cfg.h | 4 +--- x11/pdcclip.c | 2 -- x11/pdcdisp.c | 2 -- x11/pdcgetsc.c | 2 -- x11/pdckbd.c | 2 -- x11/pdcscrn.c | 2 -- x11/pdcsetsc.c | 2 -- x11/pdcutil.c | 2 -- x11/pdcx11.c | 2 -- x11/pdcx11.h | 2 -- x11/sb.c | 2 -- x11/x11.c | 2 -- 105 files changed, 1 insertion(+), 213 deletions(-) diff --git a/curses.h b/curses.h index c0d4a59a..29738c7a 100644 --- a/curses.h +++ b/curses.h @@ -1,7 +1,5 @@ /* Public Domain Curses */ -/* $Id: curses.h,v 1.298 2012/05/19 05:19:43 wmcbrine Exp $ */ - /*----------------------------------------------------------------------* * PDCurses * *----------------------------------------------------------------------*/ diff --git a/curspriv.h b/curspriv.h index 8b34f010..dcfd6479 100644 --- a/curspriv.h +++ b/curspriv.h @@ -1,7 +1,5 @@ /* Public Domain Curses */ -/* $Id: curspriv.h,v 1.158 2008/07/13 16:08:16 wmcbrine Exp $ */ - /* Private definitions and declarations for use within PDCurses. These should generally not be referenced by applications. */ @@ -113,10 +111,8 @@ size_t PDC_wcstombs(char *, const wchar_t *, size_t); #ifdef PDCDEBUG # define PDC_LOG(x) if (pdc_trace_on) PDC_debug x -# define RCSID(x) static const char *rcsid = x; #else # define PDC_LOG(x) -# define RCSID(x) #endif /* Internal macros for attributes */ diff --git a/demos/firework.c b/demos/firework.c index 8d7921f3..373c90c0 100644 --- a/demos/firework.c +++ b/demos/firework.c @@ -1,5 +1,3 @@ -/* $Id: firework.c,v 1.25 2008/07/13 16:08:17 wmcbrine Exp $ */ - #include #include #include diff --git a/demos/newdemo.c b/demos/newdemo.c index 3eae98d4..60bcbee9 100644 --- a/demos/newdemo.c +++ b/demos/newdemo.c @@ -3,8 +3,6 @@ * illustrates the use of colors for text output. * * Hacks by jbuhler@cs.washington.edu on 12/29/96 - * - * $Id: newdemo.c,v 1.39 2008/07/13 16:08:17 wmcbrine Exp $ */ #include diff --git a/demos/ptest.c b/demos/ptest.c index 1134f6ff..222a08de 100644 --- a/demos/ptest.c +++ b/demos/ptest.c @@ -1,5 +1,3 @@ -/* $Id: ptest.c,v 1.24 2008/07/13 16:08:17 wmcbrine Exp $ */ - #include #include #include diff --git a/demos/rain.c b/demos/rain.c index 51d05a90..630c59f9 100644 --- a/demos/rain.c +++ b/demos/rain.c @@ -26,8 +26,6 @@ * authorization. * ****************************************************************************/ -/* $Id: rain.c,v 1.11 2008/07/13 16:08:17 wmcbrine Exp $ */ - #include #include #include diff --git a/demos/testcurs.c b/demos/testcurs.c index e8555b54..7457df35 100644 --- a/demos/testcurs.c +++ b/demos/testcurs.c @@ -4,8 +4,6 @@ * * wrs(5/28/93) -- modified to be consistent (perform identically) * with either PDCurses or under Unix System V, R4 - * - * $Id: testcurs.c,v 1.86 2011/04/20 22:13:34 wmcbrine Exp $ */ #ifndef _XOPEN_SOURCE_EXTENDED diff --git a/demos/tui.c b/demos/tui.c index e57a1b09..4563c748 100644 --- a/demos/tui.c +++ b/demos/tui.c @@ -2,8 +2,6 @@ /* * 'textual user interface' * - * $Id: tui.c,v 1.34 2008/07/14 12:35:23 wmcbrine Exp $ - * * Author : P.J. Kunst * Date : 25-02-93 */ diff --git a/demos/tui.h b/demos/tui.h index b99ca6b2..98bfd5f2 100644 --- a/demos/tui.h +++ b/demos/tui.h @@ -1,8 +1,6 @@ /* * 'textual user interface' * - * $Id: tui.h,v 1.11 2008/07/14 12:35:23 wmcbrine Exp $ - * * Author : P.J. Kunst * Date : 25-02-93 */ diff --git a/demos/tuidemo.c b/demos/tuidemo.c index a22d2a41..cb2ffcc7 100644 --- a/demos/tuidemo.c +++ b/demos/tuidemo.c @@ -1,6 +1,4 @@ /* - * $Id: tuidemo.c,v 1.22 2008/07/14 12:35:23 wmcbrine Exp $ - * * Author : P.J. Kunst * Date : 25-02-93 * diff --git a/demos/worm.c b/demos/worm.c index 5a823f90..988fcf5e 100644 --- a/demos/worm.c +++ b/demos/worm.c @@ -50,8 +50,6 @@ Options: -l set worm length -n set number of worms -t make worms leave droppings - - $Id: worm.c,v 1.16 2008/07/13 16:08:17 wmcbrine Exp $ */ #include diff --git a/demos/xmas.c b/demos/xmas.c index 706858a5..62b4842a 100644 --- a/demos/xmas.c +++ b/demos/xmas.c @@ -44,8 +44,6 @@ /* */ /******************************************************************************/ -/* $Id: xmas.c,v 1.29 2008/07/13 16:08:17 wmcbrine Exp $ */ - #include #include diff --git a/dos/pdcclip.c b/dos/pdcclip.c index 74607aa0..797da32a 100644 --- a/dos/pdcclip.c +++ b/dos/pdcclip.c @@ -2,8 +2,6 @@ #include "pdcdos.h" -RCSID("$Id: pdcclip.c,v 1.33 2008/07/13 16:08:17 wmcbrine Exp $") - #include /*man-start************************************************************** diff --git a/dos/pdcdisp.c b/dos/pdcdisp.c index aae9bfb5..18b9a5de 100644 --- a/dos/pdcdisp.c +++ b/dos/pdcdisp.c @@ -2,8 +2,6 @@ #include "pdcdos.h" -RCSID("$Id: pdcdisp.c,v 1.65 2008/07/13 16:08:17 wmcbrine Exp $") - /* ACS definitions originally by jshumate@wrdis01.robins.af.mil -- these match code page 437 and compatible pages (CP850, CP852, etc.) */ diff --git a/dos/pdcdos.h b/dos/pdcdos.h index d5d27b23..da3b1512 100644 --- a/dos/pdcdos.h +++ b/dos/pdcdos.h @@ -1,7 +1,5 @@ /* Public Domain Curses */ -/* $Id: pdcdos.h,v 1.31 2012/05/19 05:19:44 wmcbrine Exp $ */ - #include #include diff --git a/dos/pdcgetsc.c b/dos/pdcgetsc.c index 290db5a3..58ae8f58 100644 --- a/dos/pdcgetsc.c +++ b/dos/pdcgetsc.c @@ -2,8 +2,6 @@ #include "pdcdos.h" -RCSID("$Id: pdcgetsc.c,v 1.42 2008/07/13 16:08:17 wmcbrine Exp $") - #include /* return width of screen/viewport */ diff --git a/dos/pdckbd.c b/dos/pdckbd.c index 652cb0cb..88c9e521 100644 --- a/dos/pdckbd.c +++ b/dos/pdckbd.c @@ -11,8 +11,6 @@ #include "pdcdos.h" -RCSID("$Id: pdckbd.c,v 1.87 2008/07/13 16:08:17 wmcbrine Exp $") - /*man-start************************************************************** Name: pdckbd diff --git a/dos/pdcscrn.c b/dos/pdcscrn.c index ddfb0956..f877f2d9 100644 --- a/dos/pdcscrn.c +++ b/dos/pdcscrn.c @@ -2,8 +2,6 @@ #include "pdcdos.h" -RCSID("$Id: pdcscrn.c,v 1.89 2008/07/13 16:08:17 wmcbrine Exp $") - #include #ifdef CHTYPE_LONG diff --git a/dos/pdcsetsc.c b/dos/pdcsetsc.c index 2180ef48..d8fe7d16 100644 --- a/dos/pdcsetsc.c +++ b/dos/pdcsetsc.c @@ -2,8 +2,6 @@ #include "pdcdos.h" -RCSID("$Id: pdcsetsc.c,v 1.39 2008/07/13 16:08:17 wmcbrine Exp $") - /*man-start************************************************************** Name: pdcsetsc diff --git a/dos/pdcutil.c b/dos/pdcutil.c index b209352a..d99bff12 100644 --- a/dos/pdcutil.c +++ b/dos/pdcutil.c @@ -2,8 +2,6 @@ #include "pdcdos.h" -RCSID("$Id: pdcutil.c,v 1.24 2008/07/13 16:08:17 wmcbrine Exp $") - void PDC_beep(void) { PDCREGS regs; diff --git a/os2/pdcclip.c b/os2/pdcclip.c index ddc61d90..e8334929 100644 --- a/os2/pdcclip.c +++ b/os2/pdcclip.c @@ -2,8 +2,6 @@ #include "pdcos2.h" -RCSID("$Id: pdcclip.c,v 1.33 2008/07/14 04:24:51 wmcbrine Exp $") - /*man-start************************************************************** Name: clipboard diff --git a/os2/pdcdisp.c b/os2/pdcdisp.c index 3c1b86e7..95c08d85 100644 --- a/os2/pdcdisp.c +++ b/os2/pdcdisp.c @@ -2,8 +2,6 @@ #include "pdcos2.h" -RCSID("$Id: pdcdisp.c,v 1.49 2008/07/14 04:24:51 wmcbrine Exp $") - /* ACS definitions originally by jshumate@wrdis01.robins.af.mil -- these match code page 437 and compatible pages (CP850, CP852, etc.) */ diff --git a/os2/pdcgetsc.c b/os2/pdcgetsc.c index d712dadf..288a3dfd 100644 --- a/os2/pdcgetsc.c +++ b/os2/pdcgetsc.c @@ -2,8 +2,6 @@ #include "pdcos2.h" -RCSID("$Id: pdcgetsc.c,v 1.39 2008/07/14 04:24:51 wmcbrine Exp $") - /* return width of screen/viewport */ int PDC_get_columns(void) diff --git a/os2/pdckbd.c b/os2/pdckbd.c index 42c24ccd..765d21b2 100644 --- a/os2/pdckbd.c +++ b/os2/pdckbd.c @@ -8,8 +8,6 @@ defined(__TURBOC__) #include "pdcos2.h" -RCSID("$Id: pdckbd.c,v 1.89 2008/07/14 04:24:51 wmcbrine Exp $") - /*man-start************************************************************** Name: pdckbd diff --git a/os2/pdcos2.h b/os2/pdcos2.h index 6b2dd18f..37040678 100644 --- a/os2/pdcos2.h +++ b/os2/pdcos2.h @@ -1,7 +1,5 @@ /* Public Domain Curses */ -/* $Id: pdcos2.h,v 1.10 2012/05/19 05:19:44 wmcbrine Exp $ */ - #ifdef _MSC_VER # define USE_OS2_H 1 /* Use the os2.h for the compiler */ # define APIRET USHORT diff --git a/os2/pdcscrn.c b/os2/pdcscrn.c index e2d68faa..1f8ae2ec 100644 --- a/os2/pdcscrn.c +++ b/os2/pdcscrn.c @@ -2,8 +2,6 @@ #include "pdcos2.h" -RCSID("$Id: pdcscrn.c,v 1.76 2008/07/14 04:24:51 wmcbrine Exp $") - #ifdef CHTYPE_LONG # define PDC_OFFSET 32 #else diff --git a/os2/pdcsetsc.c b/os2/pdcsetsc.c index 2a770bd2..0f9229d3 100644 --- a/os2/pdcsetsc.c +++ b/os2/pdcsetsc.c @@ -2,8 +2,6 @@ #include "pdcos2.h" -RCSID("$Id: pdcsetsc.c,v 1.44 2008/07/14 04:24:51 wmcbrine Exp $") - /*man-start************************************************************** Name: pdcsetsc diff --git a/os2/pdcutil.c b/os2/pdcutil.c index 290be359..d4d57f56 100644 --- a/os2/pdcutil.c +++ b/os2/pdcutil.c @@ -2,8 +2,6 @@ #include "pdcos2.h" -RCSID("$Id: pdcutil.c,v 1.14 2008/07/14 04:24:51 wmcbrine Exp $") - #if defined(OS2) && !defined(__EMX__) APIRET APIENTRY DosSleep(ULONG ulTime); #endif diff --git a/panel.h b/panel.h index 1d7cacef..26627b93 100644 --- a/panel.h +++ b/panel.h @@ -1,7 +1,5 @@ /* Public Domain Curses */ -/* $Id: panel.h,v 1.19 2008/07/13 16:08:16 wmcbrine Exp $ */ - /*----------------------------------------------------------------------* * Panels for PDCurses * *----------------------------------------------------------------------*/ diff --git a/pdcurses/addch.c b/pdcurses/addch.c index 586d1a71..d30173f2 100644 --- a/pdcurses/addch.c +++ b/pdcurses/addch.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: addch.c,v 1.54 2008/07/13 16:08:17 wmcbrine Exp $") - /*man-start************************************************************** Name: addch diff --git a/pdcurses/addchstr.c b/pdcurses/addchstr.c index 0eea85a7..831be6fd 100644 --- a/pdcurses/addchstr.c +++ b/pdcurses/addchstr.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: addchstr.c,v 1.43 2008/07/13 16:08:17 wmcbrine Exp $") - /*man-start************************************************************** Name: addchstr diff --git a/pdcurses/addstr.c b/pdcurses/addstr.c index ca19fd02..7fb8c8d7 100644 --- a/pdcurses/addstr.c +++ b/pdcurses/addstr.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: addstr.c,v 1.44 2008/07/13 16:08:17 wmcbrine Exp $") - /*man-start************************************************************** Name: addstr diff --git a/pdcurses/attr.c b/pdcurses/attr.c index 532384b3..4da011b4 100644 --- a/pdcurses/attr.c +++ b/pdcurses/attr.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: attr.c,v 1.41 2008/07/13 16:08:17 wmcbrine Exp $") - /*man-start************************************************************** Name: attr diff --git a/pdcurses/beep.c b/pdcurses/beep.c index 9e92f457..f5e32210 100644 --- a/pdcurses/beep.c +++ b/pdcurses/beep.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: beep.c,v 1.34 2008/07/13 16:08:17 wmcbrine Exp $") - /*man-start************************************************************** Name: beep diff --git a/pdcurses/bkgd.c b/pdcurses/bkgd.c index 083239e1..635245c9 100644 --- a/pdcurses/bkgd.c +++ b/pdcurses/bkgd.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: bkgd.c,v 1.39 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: bkgd diff --git a/pdcurses/border.c b/pdcurses/border.c index ec86aafd..9117614b 100644 --- a/pdcurses/border.c +++ b/pdcurses/border.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: border.c,v 1.53 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: border diff --git a/pdcurses/clear.c b/pdcurses/clear.c index eda33855..274d8034 100644 --- a/pdcurses/clear.c +++ b/pdcurses/clear.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: clear.c,v 1.35 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: clear diff --git a/pdcurses/color.c b/pdcurses/color.c index 038f7604..fca75950 100644 --- a/pdcurses/color.c +++ b/pdcurses/color.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: color.c,v 1.83 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: color diff --git a/pdcurses/debug.c b/pdcurses/debug.c index 95dc7d44..77496d3b 100644 --- a/pdcurses/debug.c +++ b/pdcurses/debug.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: debug.c,v 1.7 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: debug diff --git a/pdcurses/delch.c b/pdcurses/delch.c index 9c2416ee..f99a65bb 100644 --- a/pdcurses/delch.c +++ b/pdcurses/delch.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: delch.c,v 1.33 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: delch diff --git a/pdcurses/deleteln.c b/pdcurses/deleteln.c index c856e90a..2c72b74a 100644 --- a/pdcurses/deleteln.c +++ b/pdcurses/deleteln.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: deleteln.c,v 1.35 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: deleteln diff --git a/pdcurses/deprec.c b/pdcurses/deprec.c index 83e61311..561c1511 100644 --- a/pdcurses/deprec.c +++ b/pdcurses/deprec.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: deprec.c,v 1.6 2008/07/13 16:08:18 wmcbrine Exp $") - /* Deprecated functions. These should not be used, and will eventually be removed. They're here solely for the benefit of applications that linked to them in older versions of PDCurses. */ diff --git a/pdcurses/getch.c b/pdcurses/getch.c index 87677bae..39a5babc 100644 --- a/pdcurses/getch.c +++ b/pdcurses/getch.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: getch.c,v 1.72 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: getch diff --git a/pdcurses/getstr.c b/pdcurses/getstr.c index c6386d31..b0269bb0 100644 --- a/pdcurses/getstr.c +++ b/pdcurses/getstr.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: getstr.c,v 1.51 2008/07/14 04:24:51 wmcbrine Exp $") - /*man-start************************************************************** Name: getstr diff --git a/pdcurses/getyx.c b/pdcurses/getyx.c index fd0564d9..f24d08fe 100644 --- a/pdcurses/getyx.c +++ b/pdcurses/getyx.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: getyx.c,v 1.29 2008/07/15 17:13:26 wmcbrine Exp $") - /*man-start************************************************************** Name: getyx diff --git a/pdcurses/inch.c b/pdcurses/inch.c index 7347e740..557b9173 100644 --- a/pdcurses/inch.c +++ b/pdcurses/inch.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: inch.c,v 1.33 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: inch diff --git a/pdcurses/inchstr.c b/pdcurses/inchstr.c index 50b8cf5b..1d92255a 100644 --- a/pdcurses/inchstr.c +++ b/pdcurses/inchstr.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: inchstr.c,v 1.34 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: inchstr diff --git a/pdcurses/initscr.c b/pdcurses/initscr.c index d80fa0cf..b46d2d39 100644 --- a/pdcurses/initscr.c +++ b/pdcurses/initscr.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: initscr.c,v 1.114 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: initscr diff --git a/pdcurses/inopts.c b/pdcurses/inopts.c index 6d33fc2a..3157edce 100644 --- a/pdcurses/inopts.c +++ b/pdcurses/inopts.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: inopts.c,v 1.43 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: inopts diff --git a/pdcurses/insch.c b/pdcurses/insch.c index 50527f2f..5126305c 100644 --- a/pdcurses/insch.c +++ b/pdcurses/insch.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: insch.c,v 1.44 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: insch diff --git a/pdcurses/insstr.c b/pdcurses/insstr.c index 38fa3891..eea86f19 100644 --- a/pdcurses/insstr.c +++ b/pdcurses/insstr.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: insstr.c,v 1.46 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: insstr diff --git a/pdcurses/instr.c b/pdcurses/instr.c index bbf369cc..0247b8fe 100644 --- a/pdcurses/instr.c +++ b/pdcurses/instr.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: instr.c,v 1.44 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: instr diff --git a/pdcurses/kernel.c b/pdcurses/kernel.c index 7e41ccfd..af3fc92b 100644 --- a/pdcurses/kernel.c +++ b/pdcurses/kernel.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: kernel.c,v 1.78 2008/07/15 17:13:26 wmcbrine Exp $") - /*man-start************************************************************** Name: kernel diff --git a/pdcurses/keyname.c b/pdcurses/keyname.c index 6d02cef8..d6513b5b 100644 --- a/pdcurses/keyname.c +++ b/pdcurses/keyname.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: keyname.c,v 1.8 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: keyname diff --git a/pdcurses/mouse.c b/pdcurses/mouse.c index 1f476dd4..b1a7ae95 100644 --- a/pdcurses/mouse.c +++ b/pdcurses/mouse.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: mouse.c,v 1.45 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: mouse diff --git a/pdcurses/move.c b/pdcurses/move.c index 30e59084..172b5a61 100644 --- a/pdcurses/move.c +++ b/pdcurses/move.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: move.c,v 1.28 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: move diff --git a/pdcurses/outopts.c b/pdcurses/outopts.c index 0a8fd2d5..76e54cb8 100644 --- a/pdcurses/outopts.c +++ b/pdcurses/outopts.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: outopts.c,v 1.39 2008/07/14 12:22:13 wmcbrine Exp $") - /*man-start************************************************************** Name: outopts diff --git a/pdcurses/overlay.c b/pdcurses/overlay.c index 01f26d23..42475332 100644 --- a/pdcurses/overlay.c +++ b/pdcurses/overlay.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: overlay.c,v 1.38 2014/02/28 19:29:17 wmcbrine Exp $") - /*man-start************************************************************** Name: overlay diff --git a/pdcurses/pad.c b/pdcurses/pad.c index ccc5db20..ed318f82 100644 --- a/pdcurses/pad.c +++ b/pdcurses/pad.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: pad.c,v 1.50 2008/07/14 12:22:13 wmcbrine Exp $") - /*man-start************************************************************** Name: pad diff --git a/pdcurses/panel.c b/pdcurses/panel.c index 77028c6f..08307902 100644 --- a/pdcurses/panel.c +++ b/pdcurses/panel.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: panel.c,v 1.8 2008/07/14 12:35:23 wmcbrine Exp $") - /*man-start************************************************************** Name: panel diff --git a/pdcurses/printw.c b/pdcurses/printw.c index 9be0c5fc..b8081e50 100644 --- a/pdcurses/printw.c +++ b/pdcurses/printw.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: printw.c,v 1.40 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: printw diff --git a/pdcurses/refresh.c b/pdcurses/refresh.c index 0b8e1ca5..90161b30 100644 --- a/pdcurses/refresh.c +++ b/pdcurses/refresh.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: refresh.c,v 1.56 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: refresh diff --git a/pdcurses/scanw.c b/pdcurses/scanw.c index af2bcb9e..d0a799b7 100644 --- a/pdcurses/scanw.c +++ b/pdcurses/scanw.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: scanw.c,v 1.42 2008/07/14 12:22:13 wmcbrine Exp $") - /*man-start************************************************************** Name: scanw diff --git a/pdcurses/scr_dump.c b/pdcurses/scr_dump.c index e02046e5..4b7cd380 100644 --- a/pdcurses/scr_dump.c +++ b/pdcurses/scr_dump.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: scr_dump.c,v 1.30 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: scr_dump diff --git a/pdcurses/scroll.c b/pdcurses/scroll.c index c53e2954..52aaa43a 100644 --- a/pdcurses/scroll.c +++ b/pdcurses/scroll.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: scroll.c,v 1.36 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: scroll diff --git a/pdcurses/slk.c b/pdcurses/slk.c index f97f406e..6defd0da 100644 --- a/pdcurses/slk.c +++ b/pdcurses/slk.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: slk.c,v 1.61 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: slk diff --git a/pdcurses/termattr.c b/pdcurses/termattr.c index 06e9ee85..4c31ffb9 100644 --- a/pdcurses/termattr.c +++ b/pdcurses/termattr.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: termattr.c,v 1.54 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: termattr diff --git a/pdcurses/terminfo.c b/pdcurses/terminfo.c index c099ada7..50538407 100644 --- a/pdcurses/terminfo.c +++ b/pdcurses/terminfo.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: terminfo.c,v 1.37 2008/07/21 12:29:20 wmcbrine Exp $") - /*man-start************************************************************** Name: terminfo diff --git a/pdcurses/touch.c b/pdcurses/touch.c index 9355aa1f..a36ec5d1 100644 --- a/pdcurses/touch.c +++ b/pdcurses/touch.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: touch.c,v 1.29 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: touch diff --git a/pdcurses/util.c b/pdcurses/util.c index f0673fca..225d630c 100644 --- a/pdcurses/util.c +++ b/pdcurses/util.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: util.c,v 1.71 2008/07/13 16:08:18 wmcbrine Exp $") - /*man-start************************************************************** Name: util diff --git a/pdcurses/window.c b/pdcurses/window.c index 0cdae202..ad83e4d1 100644 --- a/pdcurses/window.c +++ b/pdcurses/window.c @@ -2,8 +2,6 @@ #include -RCSID("$Id: window.c,v 1.64 2014/02/28 17:35:45 wmcbrine Exp $") - /*man-start************************************************************** Name: window diff --git a/sdl1/pdcclip.c b/sdl1/pdcclip.c index 203c975d..33b53683 100644 --- a/sdl1/pdcclip.c +++ b/sdl1/pdcclip.c @@ -2,8 +2,6 @@ #include "pdcsdl.h" -RCSID("$Id: pdcclip.c,v 1.6 2008/07/14 04:24:52 wmcbrine Exp $") - #include /*man-start************************************************************** diff --git a/sdl1/pdcdisp.c b/sdl1/pdcdisp.c index 3712e662..b15eb30f 100644 --- a/sdl1/pdcdisp.c +++ b/sdl1/pdcdisp.c @@ -2,8 +2,6 @@ #include "pdcsdl.h" -RCSID("$Id: pdcdisp.c,v 1.35 2008/07/14 04:24:52 wmcbrine Exp $") - #include #include diff --git a/sdl1/pdcgetsc.c b/sdl1/pdcgetsc.c index 43192350..79d25a4c 100644 --- a/sdl1/pdcgetsc.c +++ b/sdl1/pdcgetsc.c @@ -2,8 +2,6 @@ #include "pdcsdl.h" -RCSID("$Id: pdcgetsc.c,v 1.8 2008/07/14 04:24:52 wmcbrine Exp $") - /* get the cursor size/shape */ int PDC_get_cursor_mode(void) diff --git a/sdl1/pdckbd.c b/sdl1/pdckbd.c index 57a88e1c..26085b14 100644 --- a/sdl1/pdckbd.c +++ b/sdl1/pdckbd.c @@ -2,8 +2,6 @@ #include "pdcsdl.h" -RCSID("$Id: pdckbd.c,v 1.21 2011/04/23 06:50:02 wmcbrine Exp $") - /*man-start************************************************************** Name: pdckbd diff --git a/sdl1/pdcscrn.c b/sdl1/pdcscrn.c index e422b25c..4a76c8de 100644 --- a/sdl1/pdcscrn.c +++ b/sdl1/pdcscrn.c @@ -2,8 +2,6 @@ #include "pdcsdl.h" -RCSID("$Id: pdcscrn.c,v 1.34 2008/07/14 04:24:52 wmcbrine Exp $") - #include #include "deffont.h" #include "deficon.h" diff --git a/sdl1/pdcsdl.h b/sdl1/pdcsdl.h index 6d98ca1c..70d87052 100644 --- a/sdl1/pdcsdl.h +++ b/sdl1/pdcsdl.h @@ -1,7 +1,5 @@ /* Public Domain Curses */ -/* $Id: pdcsdl.h,v 1.18 2014/03/04 18:55:46 wmcbrine Exp $ */ - #include #include diff --git a/sdl1/pdcsetsc.c b/sdl1/pdcsetsc.c index 0df97ab7..544eaac4 100644 --- a/sdl1/pdcsetsc.c +++ b/sdl1/pdcsetsc.c @@ -2,8 +2,6 @@ #include "pdcsdl.h" -RCSID("$Id: pdcsetsc.c,v 1.7 2008/07/14 04:24:52 wmcbrine Exp $") - /*man-start************************************************************** Name: pdcsetsc diff --git a/sdl1/pdcutil.c b/sdl1/pdcutil.c index b2d84045..291e1cd4 100644 --- a/sdl1/pdcutil.c +++ b/sdl1/pdcutil.c @@ -2,8 +2,6 @@ #include "pdcsdl.h" -RCSID("$Id: pdcutil.c,v 1.6 2008/07/14 04:24:52 wmcbrine Exp $") - void PDC_beep(void) { PDC_LOG(("PDC_beep() - called\n")); diff --git a/sdl1/sdltest.c b/sdl1/sdltest.c index e8e318b4..6b1e7b99 100644 --- a/sdl1/sdltest.c +++ b/sdl1/sdltest.c @@ -1,8 +1,6 @@ /* Here's a simple example of combining SDL and PDCurses functionality. The top portion of the window is devoted to SDL, with a four-line (assuming the default 8x16 font) stdscr at the bottom. - - $Id: sdltest.c,v 1.3 2014/03/04 18:55:46 wmcbrine Exp $ */ #include diff --git a/term.h b/term.h index ce6bc4fa..48dbe80e 100644 --- a/term.h +++ b/term.h @@ -1,7 +1,5 @@ /* Public Domain Curses */ -/* $Id: term.h,v 1.16 2008/07/13 16:08:16 wmcbrine Exp $ */ - /* PDCurses doesn't operate with terminfo, but we need these functions for compatibility, to allow some things (notably, interface libraries for other languages) to be compiled. Anyone who tries to actually _use_ diff --git a/win32/pdcclip.c b/win32/pdcclip.c index 35b6bba5..35bfdb81 100644 --- a/win32/pdcclip.c +++ b/win32/pdcclip.c @@ -2,8 +2,6 @@ #include "pdcwin.h" -RCSID("$Id: pdcclip.c,v 1.30 2008/07/14 04:24:52 wmcbrine Exp $") - /*man-start************************************************************** Name: clipboard diff --git a/win32/pdcdisp.c b/win32/pdcdisp.c index c2ad8142..7ded1990 100644 --- a/win32/pdcdisp.c +++ b/win32/pdcdisp.c @@ -2,8 +2,6 @@ #include "pdcwin.h" -RCSID("$Id: pdcdisp.c,v 1.47 2008/07/14 04:24:52 wmcbrine Exp $") - #include #include diff --git a/win32/pdcgetsc.c b/win32/pdcgetsc.c index 15f0dc5f..3e9d8682 100644 --- a/win32/pdcgetsc.c +++ b/win32/pdcgetsc.c @@ -2,8 +2,6 @@ #include "pdcwin.h" -RCSID("$Id: pdcgetsc.c,v 1.36 2008/07/14 04:24:52 wmcbrine Exp $") - /* get the cursor size/shape */ int PDC_get_cursor_mode(void) diff --git a/win32/pdckbd.c b/win32/pdckbd.c index 888cac9b..a73ed7a9 100644 --- a/win32/pdckbd.c +++ b/win32/pdckbd.c @@ -2,8 +2,6 @@ #include "pdcwin.h" -RCSID("$Id: pdckbd.c,v 1.117 2012/05/08 07:00:59 wmcbrine Exp $") - /*man-start************************************************************** Name: pdckbd diff --git a/win32/pdcscrn.c b/win32/pdcscrn.c index b48ddaaf..11f98bba 100644 --- a/win32/pdcscrn.c +++ b/win32/pdcscrn.c @@ -2,8 +2,6 @@ #include "pdcwin.h" -RCSID("$Id: pdcscrn.c,v 1.92 2008/07/20 20:12:04 wmcbrine Exp $") - #ifdef CHTYPE_LONG # define PDC_OFFSET 32 #else diff --git a/win32/pdcsetsc.c b/win32/pdcsetsc.c index cfb12315..bbc9781c 100644 --- a/win32/pdcsetsc.c +++ b/win32/pdcsetsc.c @@ -2,8 +2,6 @@ #include "pdcwin.h" -RCSID("$Id: pdcsetsc.c,v 1.40 2008/07/14 04:24:52 wmcbrine Exp $") - /*man-start************************************************************** Name: pdcsetsc diff --git a/win32/pdcutil.c b/win32/pdcutil.c index f7be019e..111ed2ff 100644 --- a/win32/pdcutil.c +++ b/win32/pdcutil.c @@ -2,8 +2,6 @@ #include "pdcwin.h" -RCSID("$Id: pdcutil.c,v 1.14 2008/07/14 04:24:52 wmcbrine Exp $") - void PDC_beep(void) { PDC_LOG(("PDC_beep() - called\n")); diff --git a/win32/pdcwin.h b/win32/pdcwin.h index 90024039..e3bc41c8 100644 --- a/win32/pdcwin.h +++ b/win32/pdcwin.h @@ -1,7 +1,5 @@ /* Public Domain Curses */ -/* $Id: pdcwin.h,v 1.7 2012/05/19 05:19:44 wmcbrine Exp $ */ - #ifdef PDC_WIDE # define UNICODE #endif diff --git a/x11/ScrollBox.c b/x11/ScrollBox.c index 48ea38fd..83255478 100644 --- a/x11/ScrollBox.c +++ b/x11/ScrollBox.c @@ -11,8 +11,6 @@ copies from any such party to do so. This license includes without limitation a license to do the foregoing actions under any patents of the party supplying this software to the X Consortium. - - $Id: ScrollBox.c,v 1.15 2008/07/14 04:24:52 wmcbrine Exp $ */ /* ScrollBox.c - scrollBox composite widget */ diff --git a/x11/ScrollBox.h b/x11/ScrollBox.h index 58258627..4e395a38 100644 --- a/x11/ScrollBox.h +++ b/x11/ScrollBox.h @@ -11,8 +11,6 @@ copies from any such party to do so. This license includes without limitation a license to do the foregoing actions under any patents of the party supplying this software to the X Consortium. - - $Id: ScrollBox.h,v 1.4 2008/07/14 04:24:52 wmcbrine Exp $ */ #ifndef _XORAscrollBox_h diff --git a/x11/ScrollBoxP.h b/x11/ScrollBoxP.h index 069666da..a34d4ee9 100644 --- a/x11/ScrollBoxP.h +++ b/x11/ScrollBoxP.h @@ -11,8 +11,6 @@ copies from any such party to do so. This license includes without limitation a license to do the foregoing actions under any patents of the party supplying this software to the X Consortium. - - $Id: ScrollBoxP.h,v 1.5 2008/07/14 04:24:52 wmcbrine Exp $ */ /* diff --git a/x11/compose.h b/x11/compose.h index 12b85fa1..7712847a 100644 --- a/x11/compose.h +++ b/x11/compose.h @@ -1,7 +1,5 @@ /* Public Domain Curses */ -/* $Id: compose.h,v 1.3 2008/07/14 04:24:52 wmcbrine Exp $ */ - /* Tables and variables for the built-in compose key system. This file is not included when PDCurses is built with XIM support. */ diff --git a/x11/ncurses_cfg.h b/x11/ncurses_cfg.h index 42571180..8b28ff71 100644 --- a/x11/ncurses_cfg.h +++ b/x11/ncurses_cfg.h @@ -1,6 +1,4 @@ -/* $Id: ncurses_cfg.h,v 1.8 2006/12/28 01:02:03 wmcbrine Exp $ - * - * This file is only used with the ncurses test programs. +/* This file is only used with the ncurses test programs. * * Have ncurses-5.6 unpacked in your $(HOME) (you don't need to build * it), or edit ncurses_testdir appropriately in the Makefile. Configure diff --git a/x11/pdcclip.c b/x11/pdcclip.c index 1a3ce92a..2386aed3 100644 --- a/x11/pdcclip.c +++ b/x11/pdcclip.c @@ -2,8 +2,6 @@ #include "pdcx11.h" -RCSID("$Id: pdcclip.c,v 1.35 2008/07/14 04:24:52 wmcbrine Exp $") - #include /*man-start************************************************************** diff --git a/x11/pdcdisp.c b/x11/pdcdisp.c index 3700edb5..05024d40 100644 --- a/x11/pdcdisp.c +++ b/x11/pdcdisp.c @@ -2,8 +2,6 @@ #include "pdcx11.h" -RCSID("$Id: pdcdisp.c,v 1.46 2008/07/14 04:24:52 wmcbrine Exp $") - #include #ifdef CHTYPE_LONG diff --git a/x11/pdcgetsc.c b/x11/pdcgetsc.c index 8f7c0ad9..462d4687 100644 --- a/x11/pdcgetsc.c +++ b/x11/pdcgetsc.c @@ -2,8 +2,6 @@ #include "pdcx11.h" -RCSID("$Id: pdcgetsc.c,v 1.26 2008/07/14 04:24:52 wmcbrine Exp $") - /* return width of screen/viewport */ int PDC_get_columns(void) diff --git a/x11/pdckbd.c b/x11/pdckbd.c index 30c37a87..c0d1adb5 100644 --- a/x11/pdckbd.c +++ b/x11/pdckbd.c @@ -2,8 +2,6 @@ #include "pdcx11.h" -RCSID("$Id: pdckbd.c,v 1.62 2008/07/14 04:24:52 wmcbrine Exp $") - /*man-start************************************************************** Name: pdckbd diff --git a/x11/pdcscrn.c b/x11/pdcscrn.c index 07b1a042..4db608f5 100644 --- a/x11/pdcscrn.c +++ b/x11/pdcscrn.c @@ -2,8 +2,6 @@ #include "pdcx11.h" -RCSID("$Id: pdcscrn.c,v 1.55 2008/07/14 04:24:52 wmcbrine Exp $") - /* COLOR_PAIR to attribute encoding table. */ short *xc_atrtab = (short *)NULL; diff --git a/x11/pdcsetsc.c b/x11/pdcsetsc.c index 395060e8..8278f273 100644 --- a/x11/pdcsetsc.c +++ b/x11/pdcsetsc.c @@ -2,8 +2,6 @@ #include "pdcx11.h" -RCSID("$Id: pdcsetsc.c,v 1.33 2008/07/14 04:24:52 wmcbrine Exp $") - #include /*man-start************************************************************** diff --git a/x11/pdcutil.c b/x11/pdcutil.c index 5b5109f8..a49fac81 100644 --- a/x11/pdcutil.c +++ b/x11/pdcutil.c @@ -2,8 +2,6 @@ #include "pdcx11.h" -RCSID("$Id: pdcutil.c,v 1.10 2008/07/14 04:24:52 wmcbrine Exp $") - #if defined(HAVE_POLL) && !defined(HAVE_USLEEP) # include #endif diff --git a/x11/pdcx11.c b/x11/pdcx11.c index 1e8d0d16..dd33ea5e 100644 --- a/x11/pdcx11.c +++ b/x11/pdcx11.c @@ -2,8 +2,6 @@ #include "pdcx11.h" -RCSID("$Id: pdcx11.c,v 1.96 2008/07/14 04:24:52 wmcbrine Exp $") - #include #include diff --git a/x11/pdcx11.h b/x11/pdcx11.h index 0b66c880..d0b5af7d 100644 --- a/x11/pdcx11.h +++ b/x11/pdcx11.h @@ -1,7 +1,5 @@ /* Public Domain Curses */ -/* $Id: pdcx11.h,v 1.64 2008/07/14 04:24:52 wmcbrine Exp $ */ - #include #ifdef HAVE_UNISTD_H diff --git a/x11/sb.c b/x11/sb.c index a34f502b..7513d9a0 100644 --- a/x11/sb.c +++ b/x11/sb.c @@ -2,8 +2,6 @@ #include "pdcx11.h" -RCSID("$Id: sb.c,v 1.27 2008/07/14 04:24:52 wmcbrine Exp $") - /*man-start************************************************************** Name: sb diff --git a/x11/x11.c b/x11/x11.c index 65dba7a1..dfbfd3b2 100644 --- a/x11/x11.c +++ b/x11/x11.c @@ -2,8 +2,6 @@ #include "pdcx11.h" -RCSID("$Id: x11.c,v 1.96 2012/11/26 08:22:50 wmcbrine Exp $") - #ifdef HAVE_DECKEYSYM_H # include #endif From 060c80a90b655555121b6c76e38b05691e89267d Mon Sep 17 00:00:00 2001 From: William McBrine Date: Wed, 22 Jul 2015 17:32:36 -0400 Subject: [PATCH 17/46] pdcurses.sourceforge.net -> pdcurses.org --- PDCurses.spec | 4 ++-- README | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PDCurses.spec b/PDCurses.spec index 814e313f..529daa67 100644 --- a/PDCurses.spec +++ b/PDCurses.spec @@ -11,14 +11,14 @@ Release: 1 Copyright: Public Domain Group: Development/Libraries Source: %{name}-%{version}.tar.gz -URL: http://pdcurses.sourceforge.net +URL: http://pdcurses.org BuildRoot: %{_tmppath}/%{name}-%{version}-root Prefix: %base %description PDCurses for X11 is an implementation of the curses library that lets you build text-mode curses programs as native X11 applications. For more -information, visit http://pdcurses.sourceforge.net/ +information, visit http://pdcurses.org/ %prep %setup -q diff --git a/README b/README index 74a4e19a..53e9dd2b 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ Welcome to PDCurses! Public Domain Curses, aka PDCurses, is an implementation of X/Open curses for multiple platforms. The latest version can be found at: - http://pdcurses.sourceforge.net/ + http://pdcurses.org/ For changes, see the HISTORY file. From 5325c5da245597f778c53c8ed8fc2098e6d4a23d Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 10 Nov 2015 19:19:00 +0100 Subject: [PATCH 18/46] libpayload/PDcurses: avoid NULL deref Found by Coverity Scan Signed-off-by: Patrick Georgi Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/7973 --- pdcurses/clear.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pdcurses/clear.c b/pdcurses/clear.c index 274d8034..3641ee47 100644 --- a/pdcurses/clear.c +++ b/pdcurses/clear.c @@ -84,14 +84,14 @@ int clrtoeol(void) int wclrtobot(WINDOW *win) { - int savey = win->_cury; - int savex = win->_curx; - PDC_LOG(("wclrtobot() - called\n")); if (!win) return ERR; + int savey = win->_cury; + int savex = win->_curx; + /* should this involve scrolling region somehow ? */ if (win->_cury + 1 < win->_maxy) From cfe5cc747e1cd5824d7525550fec6e8a47da7a0b Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 10 Nov 2015 19:17:55 +0100 Subject: [PATCH 19/46] Fix variable shadowing PDCurses has a function called overlay() and also uses overlay as a variable name in some functions. This patch fixes the ambiguity that caused warnings like curses/PDCurses-3.4/pdcurses/overlay.c: In function '_copy_win': curses/PDCurses-3.4/pdcurses/overlay.c:51:39: warning: declaration of 'overlay' shadows a global declaration [-Wshadow] In file included from curses/PDCurses-3.4/curspriv.h:16:0, from curses/PDCurses-3.4/pdcurses/overlay.c:3: curses/PDCurses-3.4/curses.h:1014:9: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/2906 --- pdcurses/overlay.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pdcurses/overlay.c b/pdcurses/overlay.c index 42475332..b3f808ad 100644 --- a/pdcurses/overlay.c +++ b/pdcurses/overlay.c @@ -46,7 +46,7 @@ static int _copy_win(const WINDOW *src_w, WINDOW *dst_w, int src_tr, int src_tc, int src_br, int src_bc, int dst_tr, - int dst_tc, bool overlay) + int dst_tc, bool _overlay) { int col, line, y1, fc, *minchng, *maxchng; chtype *w1ptr, *w2ptr; @@ -77,7 +77,7 @@ static int _copy_win(const WINDOW *src_w, WINDOW *dst_w, int src_tr, for (col = 0; col < xdiff; col++) { if ((*w1ptr) != (*w2ptr) && - !((*w1ptr & A_CHARTEXT) == ' ' && overlay)) + !((*w1ptr & A_CHARTEXT) == ' ' && _overlay)) { *w2ptr = *w1ptr; @@ -181,7 +181,7 @@ int overwrite(const WINDOW *src_w, WINDOW *dst_w) } int copywin(const WINDOW *src_w, WINDOW *dst_w, int src_tr, int src_tc, - int dst_tr, int dst_tc, int dst_br, int dst_bc, int overlay) + int dst_tr, int dst_tc, int dst_br, int dst_bc, int _overlay) { int src_end_x, src_end_y; int src_rows, src_cols, dst_rows, dst_cols; @@ -205,5 +205,5 @@ int copywin(const WINDOW *src_w, WINDOW *dst_w, int src_tr, int src_tc, src_end_x = src_tc + min_cols; return _copy_win(src_w, dst_w, src_tr, src_tc, src_end_y, src_end_x, - dst_tr, dst_tc, overlay); + dst_tr, dst_tc, _overlay); } From 4a874a76cf4f6fb6ba5ca1b5bd912be1bbb18329 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 10 Nov 2015 19:19:25 +0100 Subject: [PATCH 20/46] Remove empty lines at end of file Used command line to remove empty lines at end of file: find . -type f -exec sed -i -e :a -e '/^\n*$/{$d;N;};/\n$/ba' {} \; Signed-off-by: Elyes HAOUAS Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/10446 --- doc/intro.txt | 1 - x11/sb.c | 1 - 2 files changed, 2 deletions(-) diff --git a/doc/intro.txt b/doc/intro.txt index a13cb7af..b54dcf01 100644 --- a/doc/intro.txt +++ b/doc/intro.txt @@ -831,4 +831,3 @@ Functions specific to the X11 port of PDCurses: sb_refresh sb -------------------------------------------------------------------------- - diff --git a/x11/sb.c b/x11/sb.c index 7513d9a0..f2f22a42 100644 --- a/x11/sb.c +++ b/x11/sb.c @@ -148,4 +148,3 @@ int sb_refresh(void) return OK; } - From 4ec7f0f3262d10c93c9f045381fe810e602c9eea Mon Sep 17 00:00:00 2001 From: William McBrine Date: Thu, 12 Nov 2015 13:28:38 -0500 Subject: [PATCH 21/46] Avoid "discards const" warnings in termname() -- return a static buffer, as documented. --- pdcurses/termattr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pdcurses/termattr.c b/pdcurses/termattr.c index 4c31ffb9..ac72b346 100644 --- a/pdcurses/termattr.c +++ b/pdcurses/termattr.c @@ -135,9 +135,11 @@ attr_t term_attrs(void) char *termname(void) { + static char _termname[14] = "pdcurses"; + PDC_LOG(("termname() - called\n")); - return "pdcurses"; + return _termname; } char wordchar(void) From 217980202995bdd0d68cbe6954dd77fd76acf5b0 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Thu, 12 Nov 2015 14:05:53 -0500 Subject: [PATCH 22/46] Same fix for keyname() -- return pointer to static buffer. --- pdcurses/keyname.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pdcurses/keyname.c b/pdcurses/keyname.c index d6513b5b..03ab3e35 100644 --- a/pdcurses/keyname.c +++ b/pdcurses/keyname.c @@ -30,11 +30,15 @@ **man-end****************************************************************/ +#include + char *keyname(int key) { + static char _keyname[14]; + /* Key names must be in exactly the same order as in curses.h */ - static char *key_name[] = + static char *key_names[] = { "KEY_BREAK", "KEY_DOWN", "KEY_UP", "KEY_LEFT", "KEY_RIGHT", "KEY_HOME", "KEY_BACKSPACE", "KEY_F0", "KEY_F(1)", "KEY_F(2)", @@ -100,10 +104,10 @@ char *keyname(int key) PDC_LOG(("keyname() - called: key %d\n", key)); - if ((key >= 0) && (key < 0x80)) - return unctrl((chtype)key); + strcpy(_keyname, ((key >= 0) && (key < 0x80)) ? unctrl((chtype)key) : + has_key(key) ? key_names[key - KEY_MIN] : "UNKNOWN KEY"); - return has_key(key) ? key_name[key - KEY_MIN] : "UNKNOWN KEY"; + return _keyname; } bool has_key(int key) From 0bd221972ead5338c99ac2655ed0810a7422de27 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sat, 5 Dec 2015 12:31:15 -0500 Subject: [PATCH 23/46] Stricter C. Problem reported by Damien Gaignon. --- pdcurses/clear.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pdcurses/clear.c b/pdcurses/clear.c index 3641ee47..3c384968 100644 --- a/pdcurses/clear.c +++ b/pdcurses/clear.c @@ -84,13 +84,15 @@ int clrtoeol(void) int wclrtobot(WINDOW *win) { + int savey, savex; + PDC_LOG(("wclrtobot() - called\n")); if (!win) return ERR; - int savey = win->_cury; - int savex = win->_curx; + savey = win->_cury; + savex = win->_curx; /* should this involve scrolling region somehow ? */ From a117358ee1a10bcf4a8958ddb0de673c7ef3860f Mon Sep 17 00:00:00 2001 From: anatoly techtonik Date: Tue, 29 Dec 2015 07:06:23 +0300 Subject: [PATCH 24/46] Update and rename README to README.md Markdown + link build instructions --- README => README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) rename README => README.md (84%) diff --git a/README b/README.md similarity index 84% rename from README rename to README.md index 53e9dd2b..5a18be87 100644 --- a/README +++ b/README.md @@ -6,7 +6,7 @@ curses for multiple platforms. The latest version can be found at: http://pdcurses.org/ -For changes, see the HISTORY file. +For changes, see the [HISTORY](HISTORY) file. Legal Stuff @@ -30,8 +30,15 @@ Ports PDCurses has been ported to DOS, OS/2, Win32, X11 and SDL. A directory containing the port-specific source files exists for each of these -platforms. Build instructions are in the README file for each platform. +platforms. +Build instructions are in the README file for each platform: + +- [DOS](dos/README) +- [OS/2](os2/README) +- [SDL](sdl1/README) +- [Win32](win32/README) +- [X11](x11/README) Distribution Status ------------------- From 21ae8db4992e7976899be9e41e308210d70ea36b Mon Sep 17 00:00:00 2001 From: William McBrine Date: Fri, 1 Jan 2016 09:56:28 -0500 Subject: [PATCH 25/46] Stupid change needed for Open Watcom 1.8+ (no longer compatible with earlier OW). --- watcom.mif | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/watcom.mif b/watcom.mif index 023ea37e..d0bab8d9 100644 --- a/watcom.mif +++ b/watcom.mif @@ -24,7 +24,7 @@ LINK = wlink !ifdef __LOADDLL__ ! loaddll wcc wccd ! loaddll wcc386 wccd386 -! loaddll wlink wlink +! loaddll wlink wlinkd ! loaddll wlib wlibd !endif From 3cc611a288db0fc6fe4c07b86bb45cfa87538aa0 Mon Sep 17 00:00:00 2001 From: Jason Hood Date: Sat, 2 Jan 2016 12:03:35 +1000 Subject: [PATCH 26/46] Win32: Create a new console screen buffer by default. Run PDCurses in its own buffer, leaving the original buffer unchanged. The old behavior can be used by defining `set PDC_RESTORE_SCREEN=0`. It also catches unhandled exceptions and Ctrl+Break to restore the original buffer before terminating. --- win32/pdcscrn.c | 164 +++++++++++++++++++----------------------------- 1 file changed, 65 insertions(+), 99 deletions(-) diff --git a/win32/pdcscrn.c b/win32/pdcscrn.c index 11f98bba..2334b381 100644 --- a/win32/pdcscrn.c +++ b/win32/pdcscrn.c @@ -12,6 +12,7 @@ unsigned char *pdc_atrtab = (unsigned char *)NULL; +HANDLE std_con_out = INVALID_HANDLE_VALUE; HANDLE pdc_con_out = INVALID_HANDLE_VALUE; HANDLE pdc_con_in = INVALID_HANDLE_VALUE; @@ -25,7 +26,7 @@ static short curstoreal[16], realtocurs[16] = COLOR_MAGENTA + 8, COLOR_YELLOW + 8, COLOR_WHITE + 8 }; -enum { PDC_RESTORE_NONE, PDC_RESTORE_BUFFER, PDC_RESTORE_WINDOW }; +enum { PDC_RESTORE_NONE, PDC_RESTORE_BUFFER }; /* Struct for storing console registry keys, and for use with the undocumented WM_SETCONSOLEINFO message. Originally by James Brown, @@ -66,7 +67,8 @@ static struct static CONSOLE_SCREEN_BUFFER_INFO orig_scr; -static CHAR_INFO *ci_save = NULL; +static LPTOP_LEVEL_EXCEPTION_FILTER xcpt_filter; + static DWORD old_console_mode = 0; static bool is_nt; @@ -215,47 +217,51 @@ static void _init_console_info(void) RegCloseKey(reghnd); } +/* restore the original console buffer in the event of a crash */ + +static LONG WINAPI _restore_console(LPEXCEPTION_POINTERS ep) +{ + PDC_scr_close(); + + return EXCEPTION_CONTINUE_SEARCH; +} + +/* restore the original console buffer on Ctrl+Break (or Ctrl+C, + if it gets re-enabled) */ + +static BOOL WINAPI _ctrl_break(DWORD dwCtrlType) +{ + if (dwCtrlType == CTRL_BREAK_EVENT || dwCtrlType == CTRL_C_EVENT) + PDC_scr_close(); + + return FALSE; +} + /* close the physical screen -- may restore the screen to its state before PDC_scr_open(); miscellaneous cleanup */ void PDC_scr_close(void) { - COORD origin; - SMALL_RECT rect; - PDC_LOG(("PDC_scr_close() - called\n")); - PDC_reset_shell_mode(); - - if (SP->_restore != PDC_RESTORE_NONE) - { - if (SP->_restore == PDC_RESTORE_WINDOW) - { - rect.Top = orig_scr.srWindow.Top; - rect.Left = orig_scr.srWindow.Left; - rect.Bottom = orig_scr.srWindow.Bottom; - rect.Right = orig_scr.srWindow.Right; - } - else /* PDC_RESTORE_BUFFER */ - { - rect.Top = rect.Left = 0; - rect.Bottom = orig_scr.dwSize.Y - 1; - rect.Right = orig_scr.dwSize.X - 1; - } - - origin.X = origin.Y = 0; - - if (!WriteConsoleOutput(pdc_con_out, ci_save, orig_scr.dwSize, - origin, &rect)) - return; - } - if (SP->visibility != 1) curs_set(1); + PDC_reset_shell_mode(); + /* Position cursor to the bottom left of the screen. */ - PDC_gotoyx(PDC_get_buffer_rows() - 2, 0); + if (SP->_restore == PDC_RESTORE_NONE) + { + SMALL_RECT win; + + win.Left = orig_scr.srWindow.Left; + win.Right = orig_scr.srWindow.Right; + win.Top = 0; + win.Bottom = orig_scr.srWindow.Bottom - orig_scr.srWindow.Top; + SetConsoleWindowInfo(pdc_con_out, TRUE, &win); + PDC_gotoyx(win.Bottom, 0); + } } void PDC_scr_free(void) @@ -266,6 +272,15 @@ void PDC_scr_free(void) free(pdc_atrtab); pdc_atrtab = (unsigned char *)NULL; + + if (pdc_con_out != std_con_out) + { + CloseHandle(pdc_con_out); + pdc_con_out = std_con_out; + } + + SetUnhandledExceptionFilter(xcpt_filter); + SetConsoleCtrlHandler(_ctrl_break, FALSE); } /* open the physical screen -- allocate SP, miscellaneous intialization, @@ -273,8 +288,6 @@ void PDC_scr_free(void) int PDC_scr_open(int argc, char **argv) { - COORD bufsize, origin; - SMALL_RECT rect; const char *str; CONSOLE_SCREEN_BUFFER_INFO csbi; int i; @@ -290,6 +303,7 @@ int PDC_scr_open(int argc, char **argv) for (i = 0; i < 16; i++) curstoreal[realtocurs[i]] = i; + std_con_out = pdc_con_out = GetStdHandle(STD_OUTPUT_HANDLE); pdc_con_in = GetStdHandle(STD_INPUT_HANDLE); @@ -340,80 +354,28 @@ int PDC_scr_open(int argc, char **argv) SP->_restore = PDC_RESTORE_NONE; - if (getenv("PDC_RESTORE_SCREEN")) + if ((str = getenv("PDC_RESTORE_SCREEN")) == NULL || *str != '0') { - /* Attempt to save the complete console buffer */ + /* Create a new console buffer */ - ci_save = malloc(orig_scr.dwSize.X * orig_scr.dwSize.Y * - sizeof(CHAR_INFO)); + pdc_con_out = + CreateConsoleScreenBuffer(GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, CONSOLE_TEXTMODE_BUFFER, NULL); - if (!ci_save) + if (pdc_con_out == INVALID_HANDLE_VALUE) { - PDC_LOG(("PDC_scr_open() - malloc failure (1)\n")); + PDC_LOG(("PDC_scr_open() - screen buffer failure\n")); - return ERR; - } - - bufsize.X = orig_scr.dwSize.X; - bufsize.Y = orig_scr.dwSize.Y; - - origin.X = origin.Y = 0; - - rect.Top = rect.Left = 0; - rect.Bottom = orig_scr.dwSize.Y - 1; - rect.Right = orig_scr.dwSize.X - 1; - - if (!ReadConsoleOutput(pdc_con_out, ci_save, bufsize, origin, &rect)) - { - /* We can't save the complete buffer, so try and save just - the displayed window */ - - free(ci_save); - ci_save = NULL; - - bufsize.X = orig_scr.srWindow.Right - orig_scr.srWindow.Left + 1; - bufsize.Y = orig_scr.srWindow.Bottom - orig_scr.srWindow.Top + 1; - - ci_save = malloc(bufsize.X * bufsize.Y * sizeof(CHAR_INFO)); - - if (!ci_save) - { - PDC_LOG(("PDC_scr_open() - malloc failure (2)\n")); - - return ERR; - } - - origin.X = origin.Y = 0; - - rect.Top = orig_scr.srWindow.Top; - rect.Left = orig_scr.srWindow.Left; - rect.Bottom = orig_scr.srWindow.Bottom; - rect.Right = orig_scr.srWindow.Right; - - if (!ReadConsoleOutput(pdc_con_out, ci_save, bufsize, - origin, &rect)) - { -#ifdef PDCDEBUG - CHAR LastError[256]; - - FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, - GetLastError(), MAKELANGID(LANG_NEUTRAL, - SUBLANG_DEFAULT), LastError, 256, NULL); - - PDC_LOG(("PDC_scr_open() - %s\n", LastError)); -#endif - free(ci_save); - ci_save = NULL; - - return ERR; - } - - SP->_restore = PDC_RESTORE_WINDOW; + pdc_con_out = std_con_out; } else SP->_restore = PDC_RESTORE_BUFFER; } + xcpt_filter = SetUnhandledExceptionFilter(_restore_console); + SetConsoleCtrlHandler(_ctrl_break, TRUE); + SP->_preserve = (getenv("PDC_PRESERVE_SCREEN") != NULL); PDC_reset_prog_mode(); @@ -498,7 +460,9 @@ void PDC_reset_prog_mode(void) { PDC_LOG(("PDC_reset_prog_mode() - called.\n")); - if (is_nt) + if (pdc_con_out != std_con_out) + SetConsoleActiveScreenBuffer(pdc_con_out); + else if (is_nt) { COORD bufsize; SMALL_RECT rect; @@ -523,7 +487,9 @@ void PDC_reset_shell_mode(void) { PDC_LOG(("PDC_reset_shell_mode() - called.\n")); - if (is_nt) + if (pdc_con_out != std_con_out) + SetConsoleActiveScreenBuffer(std_con_out); + else if (is_nt) { SetConsoleScreenBufferSize(pdc_con_out, orig_scr.dwSize); SetConsoleWindowInfo(pdc_con_out, TRUE, &orig_scr.srWindow); From 8670794cfb5d31966f058de2fb767ed68aacdfe6 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sat, 2 Jan 2016 00:00:37 -0500 Subject: [PATCH 27/46] Make init_color() work on more recent versions of Windows (console). Patch by "Didrole". --- win32/pdcscrn.c | 51 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) diff --git a/win32/pdcscrn.c b/win32/pdcscrn.c index 11f98bba..def751d3 100644 --- a/win32/pdcscrn.c +++ b/win32/pdcscrn.c @@ -602,17 +602,60 @@ int PDC_color_content(short color, short *red, short *green, short *blue) return OK; } +typedef BOOL (WINAPI *SetConsoleScreenBufferInfoExFn)(HANDLE hConsoleOutput, + PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx); +typedef BOOL (WINAPI *GetConsoleScreenBufferInfoExFn)(HANDLE hConsoleOutput, + PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx); + int PDC_init_color(short color, short red, short green, short blue) { - if (!console_info.Hwnd) - _init_console_info(); + static SetConsoleScreenBufferInfoExFn pSetConsoleScreenBufferInfoEx = NULL; + static GetConsoleScreenBufferInfoExFn pGetConsoleScreenBufferInfoEx = NULL; + static BOOL bOnce = TRUE; - console_info.ColorTable[curstoreal[color]] = + if (bOnce) + { + HMODULE hKernel = GetModuleHandleA("kernel32.dll"); + pGetConsoleScreenBufferInfoEx = + (GetConsoleScreenBufferInfoExFn)GetProcAddress(hKernel, + "GetConsoleScreenBufferInfoEx"); + pSetConsoleScreenBufferInfoEx = + (SetConsoleScreenBufferInfoExFn)GetProcAddress(hKernel, + "SetConsoleScreenBufferInfoEx"); + bOnce = FALSE; + } + + if (pGetConsoleScreenBufferInfoEx && pSetConsoleScreenBufferInfoEx) + { + CONSOLE_SCREEN_BUFFER_INFOEX screenBufferInfo; + screenBufferInfo.cbSize = sizeof(screenBufferInfo); + + if (!pGetConsoleScreenBufferInfoEx(pdc_con_out, &screenBufferInfo)) + return ERR; + + screenBufferInfo.srWindow.Right++; + screenBufferInfo.srWindow.Bottom++; + + screenBufferInfo.ColorTable[curstoreal[color]] = RGB(DIVROUND(red * 255, 1000), DIVROUND(green * 255, 1000), DIVROUND(blue * 255, 1000)); - _set_console_info(); + if (!pSetConsoleScreenBufferInfoEx(pdc_con_out, &screenBufferInfo)) + return ERR; + } + else + { + if (!console_info.Hwnd) + _init_console_info(); + + console_info.ColorTable[curstoreal[color]] = + RGB(DIVROUND(red * 255, 1000), + DIVROUND(green * 255, 1000), + DIVROUND(blue * 255, 1000)); + + _set_console_info(); + } return OK; } From 62ede2b601af8599da50830db1b26d6fd970cade Mon Sep 17 00:00:00 2001 From: William McBrine Date: Mon, 4 Jan 2016 00:46:54 -0500 Subject: [PATCH 28/46] Allow building Win32 console port with new color change code on Borland 5.5, potentially others with older wincon.h. --- curspriv.h | 4 ++++ win32/pdcscrn.c | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/curspriv.h b/curspriv.h index dcfd6479..462857b1 100644 --- a/curspriv.h +++ b/curspriv.h @@ -32,6 +32,10 @@ # define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings */ #endif +#if defined(_WIN32) && !defined(__TURBOC__) && !defined(HAVE_INFOEX) +# define HAVE_INFOEX +#endif + /*----------------------------------------------------------------------*/ typedef struct /* structure for ripped off lines */ diff --git a/win32/pdcscrn.c b/win32/pdcscrn.c index bea01e1b..5ba5f94c 100644 --- a/win32/pdcscrn.c +++ b/win32/pdcscrn.c @@ -65,6 +65,22 @@ static struct WCHAR ConsoleTitle[0x100]; } console_info; +#ifndef HAVE_INFOEX +/* Console screen buffer information (extended version) */ +typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX { + ULONG cbSize; + COORD dwSize; + COORD dwCursorPosition; + WORD wAttributes; + SMALL_RECT srWindow; + COORD dwMaximumWindowSize; + WORD wPopupAttributes; + BOOL bFullscreenSupported; + COLORREF ColorTable[16]; +} CONSOLE_SCREEN_BUFFER_INFOEX; +typedef CONSOLE_SCREEN_BUFFER_INFOEX *PCONSOLE_SCREEN_BUFFER_INFOEX; +#endif + static CONSOLE_SCREEN_BUFFER_INFO orig_scr; static LPTOP_LEVEL_EXCEPTION_FILTER xcpt_filter; From 1c1ef69f9c307140860453b9973013c1997a6a68 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Mon, 4 Jan 2016 07:45:01 -0500 Subject: [PATCH 29/46] Use new Win32 console API for PDC_color_content() as well as PDC_init_color(); fetch the extended info only once; redundant code. --- win32/pdcscrn.c | 144 +++++++++++++++++++++++++++++------------------- 1 file changed, 86 insertions(+), 58 deletions(-) diff --git a/win32/pdcscrn.c b/win32/pdcscrn.c index 5ba5f94c..690ce347 100644 --- a/win32/pdcscrn.c +++ b/win32/pdcscrn.c @@ -81,7 +81,16 @@ typedef struct _CONSOLE_SCREEN_BUFFER_INFOEX { typedef CONSOLE_SCREEN_BUFFER_INFOEX *PCONSOLE_SCREEN_BUFFER_INFOEX; #endif +typedef BOOL (WINAPI *SetConsoleScreenBufferInfoExFn)(HANDLE hConsoleOutput, + PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx); +typedef BOOL (WINAPI *GetConsoleScreenBufferInfoExFn)(HANDLE hConsoleOutput, + PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx); + +static SetConsoleScreenBufferInfoExFn pSetConsoleScreenBufferInfoEx = NULL; +static GetConsoleScreenBufferInfoExFn pGetConsoleScreenBufferInfoEx = NULL; + static CONSOLE_SCREEN_BUFFER_INFO orig_scr; +static CONSOLE_SCREEN_BUFFER_INFOEX console_infoex; static LPTOP_LEVEL_EXCEPTION_FILTER xcpt_filter; @@ -174,6 +183,25 @@ static void _set_console_info(void) CloseHandle(hProcess); } +static int _set_console_infoex(void) +{ + if (!pSetConsoleScreenBufferInfoEx(pdc_con_out, &console_infoex)) + return ERR; + + return OK; +} + +static int _set_colors(void) +{ + if (pSetConsoleScreenBufferInfoEx) + return _set_console_infoex(); + else + { + _set_console_info(); + return OK; + } +} + /* One-time initialization for console_info -- color table and font info from the registry; other values from functions. */ @@ -233,6 +261,36 @@ static void _init_console_info(void) RegCloseKey(reghnd); } +static int _init_console_infoex(void) +{ + console_infoex.cbSize = sizeof(console_infoex); + + if (!pGetConsoleScreenBufferInfoEx(pdc_con_out, &console_infoex)) + return ERR; + + console_infoex.srWindow.Right++; + console_infoex.srWindow.Bottom++; + + return OK; +} + +static COLORREF *_get_colors(void) +{ + if (pGetConsoleScreenBufferInfoEx) + { + int status = OK; + if (!console_infoex.cbSize) + status = _init_console_infoex(); + return (status == ERR) ? NULL : &(console_infoex.ColorTable); + } + else + { + if (!console_info.Hwnd) + _init_console_info(); + return &(console_info.ColorTable); + } +} + /* restore the original console buffer in the event of a crash */ static LONG WINAPI _restore_console(LPEXCEPTION_POINTERS ep) @@ -306,6 +364,7 @@ int PDC_scr_open(int argc, char **argv) { const char *str; CONSOLE_SCREEN_BUFFER_INFO csbi; + HMODULE h_kernel; int i; PDC_LOG(("PDC_scr_open() - called\n")); @@ -398,6 +457,14 @@ int PDC_scr_open(int argc, char **argv) SP->mono = FALSE; + h_kernel = GetModuleHandleA("kernel32.dll"); + pGetConsoleScreenBufferInfoEx = + (GetConsoleScreenBufferInfoExFn)GetProcAddress(h_kernel, + "GetConsoleScreenBufferInfoEx"); + pSetConsoleScreenBufferInfoEx = + (SetConsoleScreenBufferInfoExFn)GetProcAddress(h_kernel, + "SetConsoleScreenBufferInfoEx"); + return OK; } @@ -570,74 +637,35 @@ bool PDC_can_change_color(void) int PDC_color_content(short color, short *red, short *green, short *blue) { - DWORD col; + COLORREF *color_table = _get_colors(); - if (!console_info.Hwnd) - _init_console_info(); + if (color_table) + { + DWORD col = color_table[curstoreal[color]]; - col = console_info.ColorTable[curstoreal[color]]; + *red = DIVROUND(GetRValue(col) * 1000, 255); + *green = DIVROUND(GetGValue(col) * 1000, 255); + *blue = DIVROUND(GetBValue(col) * 1000, 255); - *red = DIVROUND(GetRValue(col) * 1000, 255); - *green = DIVROUND(GetGValue(col) * 1000, 255); - *blue = DIVROUND(GetBValue(col) * 1000, 255); + return OK; + } - return OK; + return ERR; } -typedef BOOL (WINAPI *SetConsoleScreenBufferInfoExFn)(HANDLE hConsoleOutput, - PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx); -typedef BOOL (WINAPI *GetConsoleScreenBufferInfoExFn)(HANDLE hConsoleOutput, - PCONSOLE_SCREEN_BUFFER_INFOEX lpConsoleScreenBufferInfoEx); - int PDC_init_color(short color, short red, short green, short blue) { - static SetConsoleScreenBufferInfoExFn pSetConsoleScreenBufferInfoEx = NULL; - static GetConsoleScreenBufferInfoExFn pGetConsoleScreenBufferInfoEx = NULL; - static BOOL bOnce = TRUE; + COLORREF *color_table = _get_colors(); - if (bOnce) + if (color_table) { - HMODULE hKernel = GetModuleHandleA("kernel32.dll"); - pGetConsoleScreenBufferInfoEx = - (GetConsoleScreenBufferInfoExFn)GetProcAddress(hKernel, - "GetConsoleScreenBufferInfoEx"); - pSetConsoleScreenBufferInfoEx = - (SetConsoleScreenBufferInfoExFn)GetProcAddress(hKernel, - "SetConsoleScreenBufferInfoEx"); - bOnce = FALSE; + color_table[curstoreal[color]] = + RGB(DIVROUND(red * 255, 1000), + DIVROUND(green * 255, 1000), + DIVROUND(blue * 255, 1000)); + + return _set_colors(); } - if (pGetConsoleScreenBufferInfoEx && pSetConsoleScreenBufferInfoEx) - { - CONSOLE_SCREEN_BUFFER_INFOEX screenBufferInfo; - screenBufferInfo.cbSize = sizeof(screenBufferInfo); - - if (!pGetConsoleScreenBufferInfoEx(pdc_con_out, &screenBufferInfo)) - return ERR; - - screenBufferInfo.srWindow.Right++; - screenBufferInfo.srWindow.Bottom++; - - screenBufferInfo.ColorTable[curstoreal[color]] = - RGB(DIVROUND(red * 255, 1000), - DIVROUND(green * 255, 1000), - DIVROUND(blue * 255, 1000)); - - if (!pSetConsoleScreenBufferInfoEx(pdc_con_out, &screenBufferInfo)) - return ERR; - } - else - { - if (!console_info.Hwnd) - _init_console_info(); - - console_info.ColorTable[curstoreal[color]] = - RGB(DIVROUND(red * 255, 1000), - DIVROUND(green * 255, 1000), - DIVROUND(blue * 255, 1000)); - - _set_console_info(); - } - - return OK; + return ERR; } From 8154cb3c3434aeb42df9f6ce1c98c1c8a80d31a6 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Mon, 4 Jan 2016 13:11:53 -0500 Subject: [PATCH 30/46] Same problem with LCC. --- curspriv.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/curspriv.h b/curspriv.h index 462857b1..bd9106bb 100644 --- a/curspriv.h +++ b/curspriv.h @@ -32,7 +32,8 @@ # define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings */ #endif -#if defined(_WIN32) && !defined(__TURBOC__) && !defined(HAVE_INFOEX) +#if defined(_WIN32) && !defined(__TURBOC__) && !defined(__LCC__) && \ + !defined(HAVE_INFOEX) # define HAVE_INFOEX #endif From 1fd2e20bc48c9c94b603a2c264b3bef434cb9db6 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Mon, 4 Jan 2016 13:40:35 -0500 Subject: [PATCH 31/46] And for Digital Mars. --- curspriv.h | 2 +- win32/pdcscrn.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/curspriv.h b/curspriv.h index bd9106bb..99f30efe 100644 --- a/curspriv.h +++ b/curspriv.h @@ -33,7 +33,7 @@ #endif #if defined(_WIN32) && !defined(__TURBOC__) && !defined(__LCC__) && \ - !defined(HAVE_INFOEX) + !defined(__DMC__) && !defined(HAVE_INFOEX) # define HAVE_INFOEX #endif diff --git a/win32/pdcscrn.c b/win32/pdcscrn.c index 690ce347..bc7dfb4d 100644 --- a/win32/pdcscrn.c +++ b/win32/pdcscrn.c @@ -281,13 +281,14 @@ static COLORREF *_get_colors(void) int status = OK; if (!console_infoex.cbSize) status = _init_console_infoex(); - return (status == ERR) ? NULL : &(console_infoex.ColorTable); + return (status == ERR) ? NULL : + (COLORREF *)(&(console_infoex.ColorTable)); } else { if (!console_info.Hwnd) _init_console_info(); - return &(console_info.ColorTable); + return (COLORREF *)(&(console_info.ColorTable)); } } From d5a5ab581d1f0c79247c8420b3733413a19556ee Mon Sep 17 00:00:00 2001 From: William McBrine Date: Mon, 4 Jan 2016 21:02:08 -0500 Subject: [PATCH 32/46] Reverse issue for Cygwin. --- curspriv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/curspriv.h b/curspriv.h index 99f30efe..8ec63b2a 100644 --- a/curspriv.h +++ b/curspriv.h @@ -32,8 +32,8 @@ # define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings */ #endif -#if defined(_WIN32) && !defined(__TURBOC__) && !defined(__LCC__) && \ - !defined(__DMC__) && !defined(HAVE_INFOEX) +#if (defined(__CYGWIN32__) || defined(_WIN32)) && !defined(__TURBOC__) && \ + !defined(__LCC__) && !defined(__DMC__) && !defined(HAVE_INFOEX) # define HAVE_INFOEX #endif From 99fb27a750d470e5bc731a17eee06af70f3b3f75 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Mon, 4 Jan 2016 21:14:17 -0500 Subject: [PATCH 33/46] Back to the old problem, with MinGW (TDM version -- not sure if this applies to all versions). --- curspriv.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/curspriv.h b/curspriv.h index 8ec63b2a..1ce8cdb6 100644 --- a/curspriv.h +++ b/curspriv.h @@ -33,7 +33,8 @@ #endif #if (defined(__CYGWIN32__) || defined(_WIN32)) && !defined(__TURBOC__) && \ - !defined(__LCC__) && !defined(__DMC__) && !defined(HAVE_INFOEX) + !defined(__LCC__) && !defined(__DMC__) && !defined(__MINGW32__) && \ + !defined(HAVE_INFOEX) # define HAVE_INFOEX #endif From d94161d6821ae4a2100ca602dedc1c33d64d0bdc Mon Sep 17 00:00:00 2001 From: William McBrine Date: Tue, 5 Jan 2016 01:11:40 -0500 Subject: [PATCH 34/46] HAVE_INFOEX test really belongs under win32; make compiler list inclusive rather than exclusive. --- curspriv.h | 6 ------ win32/pdcwin.h | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/curspriv.h b/curspriv.h index 1ce8cdb6..dcfd6479 100644 --- a/curspriv.h +++ b/curspriv.h @@ -32,12 +32,6 @@ # define _CRT_SECURE_NO_DEPRECATE 1 /* kill nonsense warnings */ #endif -#if (defined(__CYGWIN32__) || defined(_WIN32)) && !defined(__TURBOC__) && \ - !defined(__LCC__) && !defined(__DMC__) && !defined(__MINGW32__) && \ - !defined(HAVE_INFOEX) -# define HAVE_INFOEX -#endif - /*----------------------------------------------------------------------*/ typedef struct /* structure for ripped off lines */ diff --git a/win32/pdcwin.h b/win32/pdcwin.h index e3bc41c8..fae475c1 100644 --- a/win32/pdcwin.h +++ b/win32/pdcwin.h @@ -14,6 +14,11 @@ # define PDC_ATTR_SHIFT 8 #endif +#if (defined(__CYGWIN32__) || defined(__WATCOMC__) || defined(_MSC_VER)) && \ + !defined(HAVE_INFOEX) +# define HAVE_INFOEX +#endif + extern unsigned char *pdc_atrtab; extern HANDLE pdc_con_out, pdc_con_in; extern DWORD pdc_quick_edit; From 6d9b9df7ced3c3e47513b63d022ab66470f2e3ab Mon Sep 17 00:00:00 2001 From: William McBrine Date: Tue, 5 Jan 2016 14:15:51 -0500 Subject: [PATCH 35/46] Now supports only Open Watcom 1.8+; perparing for markdown. --- win32/README | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/win32/README b/win32/README index 88dd0d75..cfce5f33 100644 --- a/win32/README +++ b/win32/README @@ -8,28 +8,28 @@ console mode (Win9x/Me/NT/2k/XP/Vista). Building -------- -. Choose the appropriate makefile for your compiler: +- Choose the appropriate makefile for your compiler: - bccwin32.mak - Borland C++ 4.0.2+ - dmcwin32.mak - Digital Mars - gccwin32.mak - Cygnus GNU Compiler - lccwin32.mak - LCC-Win32 - mingwin32.mak - MinGW - vcwin32.mak - Microsoft Visual C++ 2.0+ - wccwin32.mak - Watcom 10.6+ + bccwin32.mak - Borland C++ 4.0.2+ + dmcwin32.mak - Digital Mars + gccwin32.mak - Cygnus GNU Compiler + lccwin32.mak - LCC-Win32 + mingwin32.mak - MinGW + vcwin32.mak - Microsoft Visual C++ 2.0+ + wccwin32.mak - Open Watcom 1.8+ -. Optionally, you can build in a different directory than the platform +- Optionally, you can build in a different directory than the platform directory by setting PDCURSES_SRCDIR to point to the directory where you unpacked PDCurses, and changing to your target directory: - set PDCURSES_SRCDIR=c:\pdcurses + set PDCURSES_SRCDIR=c:\pdcurses This won't work with the LCC or Digital Mars makefiles, nor will the options described below. -. Build it: +- Build it: - make -f makefilename + make -f makefilename (For Watcom, use "wmake" instead of "make"; for MSVC, "nmake".) You'll get the libraries (pdcurses.lib or .a, depending on your compiler; and @@ -41,7 +41,7 @@ Building You can also give the optional parameter "WIDE=Y", to build the library with wide-character (Unicode) support: - make -f mingwin32.mak WIDE=Y + make -f mingwin32.mak WIDE=Y When built this way, the library is not compatible with Windows 9x, unless you also link with the Microsoft Layer for Unicode (not @@ -52,12 +52,12 @@ Building unless WIDE=Y is also set. Use it to get around the poor support for UTF-8 in the Win32 console: - make -f mingwin32.mak WIDE=Y UTF8=Y + make -f mingwin32.mak WIDE=Y UTF8=Y You can also use the optional parameter "DLL=Y" with Visual C++, MinGW or Cygwin, to build the library as a DLL: - nmake -f vcwin32.mak WIDE=Y DLL=Y + nmake -f vcwin32.mak WIDE=Y DLL=Y When you build the library as a Windows DLL, you must always define PDC_DLL_BUILD when linking against it. (Or, if you only want to use From 41f3f3e1fd3b5f511b46372e5b98c5b053a99912 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Tue, 5 Jan 2016 14:33:53 -0500 Subject: [PATCH 36/46] All READMEs "converted" to markdown (only trivial changes). --- README.md | 10 +++++----- demos/{README => README.md} | 0 doc/{README => README.md} | 2 +- dos/{README => README.md} | 23 ++++++++++++----------- os2/{README => README.md} | 20 ++++++++++---------- pdcurses/{README => README.md} | 0 sdl1/{README => README.md} | 2 +- win32/{README => README.md} | 0 x11/{README => README.md} | 6 +++--- 9 files changed, 32 insertions(+), 31 deletions(-) rename demos/{README => README.md} (100%) rename doc/{README => README.md} (88%) rename dos/{README => README.md} (67%) rename os2/{README => README.md} (69%) rename pdcurses/{README => README.md} (100%) rename sdl1/{README => README.md} (93%) rename win32/{README => README.md} (100%) rename x11/{README => README.md} (91%) diff --git a/README.md b/README.md index 5a18be87..06c935c1 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,11 @@ platforms. Build instructions are in the README file for each platform: -- [DOS](dos/README) -- [OS/2](os2/README) -- [SDL](sdl1/README) -- [Win32](win32/README) -- [X11](x11/README) +- [DOS](dos/README.md) +- [OS/2](os2/README.md) +- [SDL](sdl1/README.md) +- [Win32](win32/README.md) +- [X11](x11/README.md) Distribution Status ------------------- diff --git a/demos/README b/demos/README.md similarity index 100% rename from demos/README rename to demos/README.md diff --git a/doc/README b/doc/README.md similarity index 88% rename from doc/README rename to doc/README.md index 6f93a397..f769099a 100644 --- a/doc/README +++ b/doc/README.md @@ -10,7 +10,7 @@ with the "man page" sections from the source code files, into Building -------- -. Type "make". ("make clean" to remove the built files.) A Unix-like +- Type "make". ("make clean" to remove the built files.) A Unix-like environment is required for the Makefile. This is called automatically when doing a top-level make of the X11 port. diff --git a/dos/README b/dos/README.md similarity index 67% rename from dos/README rename to dos/README.md index 569034bb..f5358f5c 100644 --- a/dos/README +++ b/dos/README.md @@ -7,26 +7,26 @@ This directory contains PDCurses source code files specific to DOS. Building -------- -. Choose the appropriate makefile for your compiler: +- Choose the appropriate makefile for your compiler: - bccdos.mak - Borland C++ 3.0+ - gccdos.mak - DJGPP V2 - mscdos.mak - Microsoft C - wccdos16.mak - Watcom 10.6+ (16-bit) - wccdos4g.mak - Watcom 10.6+ (32-bit) + bccdos.mak - Borland C++ 3.0+ + gccdos.mak - DJGPP V2 + mscdos.mak - Microsoft C + wccdos16.mak - Open Watcom 1.8+ (16-bit) + wccdos4g.mak - Open Watcom 1.8+ (32-bit) -. For 16-bit compilers, you can change the memory MODEL in the makefile. +- For 16-bit compilers, you can change the memory MODEL in the makefile. (Large model is the default, and recommended.) -. Optionally, you can build in a different directory than the platform +- Optionally, you can build in a different directory than the platform directory by setting PDCURSES_SRCDIR to point to the directory where you unpacked PDCurses, and changing to your target directory: - set PDCURSES_SRCDIR=c:\pdcurses + set PDCURSES_SRCDIR=c:\pdcurses -. Build it: +- Build it: - make -f makefile + make -f makefile (For Watcom, use "wmake" instead of "make"; for MSVC, "nmake".) You'll get the libraries (pdcurses.lib or .a, depending on your compiler; and @@ -46,4 +46,5 @@ Acknowledgements ---------------- Watcom C port was provided by Pieter Kunst + DJGPP 1.x port was provided by David Nugent diff --git a/os2/README b/os2/README.md similarity index 69% rename from os2/README rename to os2/README.md index 7fde884e..45043c77 100644 --- a/os2/README +++ b/os2/README.md @@ -7,22 +7,22 @@ This directory contains PDCurses source code files specific to OS/2. Building -------- -. Choose the appropriate makefile for your compiler: +- Choose the appropriate makefile for your compiler: - bccos2.mak - Borland C++ 2.0 - gccos2.mak - EMX 0.9b+ - iccos2.mak - C Set/2 - wccos2.mak - Watcom 10.6+ (32-bit) + bccos2.mak - Borland C++ 2.0 + gccos2.mak - EMX 0.9b+ + iccos2.mak - C Set/2 + wccos2.mak - Open Watcom 1.8+ -. Optionally, you can build in a different directory than the platform +- Optionally, you can build in a different directory than the platform directory by setting PDCURSES_SRCDIR to point to the directory where you unpacked PDCurses, and changing to your target directory: - set PDCURSES_SRCDIR=c:\pdcurses + set PDCURSES_SRCDIR=c:\pdcurses -. Build it: +- Build it: - make -f makefilename + make -f makefilename (For Watcom, use "wmake" instead of "make"; for MSVC or C Set/2, "nmake".) You'll get the libraries (pdcurses.lib or .a, depending on @@ -34,7 +34,7 @@ Building You can also use the optional parameter "DLL=Y" with EMX, to build the library as a DLL: - make -f gccos2.mak DLL=Y + make -f gccos2.mak DLL=Y Distribution Status diff --git a/pdcurses/README b/pdcurses/README.md similarity index 100% rename from pdcurses/README rename to pdcurses/README.md diff --git a/sdl1/README b/sdl1/README.md similarity index 93% rename from sdl1/README rename to sdl1/README.md index c8a2a9b4..2ac02a07 100644 --- a/sdl1/README +++ b/sdl1/README.md @@ -7,7 +7,7 @@ This is a port of PDCurses for SDL. Building -------- -. On *nix (including Linux and Mac OS X), run "make" in the sdl1 +- On *nix (including Linux and Mac OS X), run "make" in the sdl1 directory. There is no configure script (yet?) for this port. This assumes a working sdl-config, and GNU make. It builds the library libpdcurses.a (dynamic lib not implemented). diff --git a/win32/README b/win32/README.md similarity index 100% rename from win32/README rename to win32/README.md diff --git a/x11/README b/x11/README.md similarity index 91% rename from x11/README rename to x11/README.md index 37b45d06..967ac552 100644 --- a/x11/README +++ b/x11/README.md @@ -9,7 +9,7 @@ resulting in native X11 programs. Building -------- -. Run "./configure" in the top-level directory. +- Run "./configure" in the top-level directory. To build the wide-character version of the library, specify "--enable-widec" as a parameter. To use X Input Methods, add @@ -29,9 +29,9 @@ Building switch -O2. You can turn this off, and turn on debugging (-g), by adding "--with-debug" to the configure command. -. Run "make". This should build libXCurses and all the demo programs. +- Run "make". This should build libXCurses and all the demo programs. -. Optionally, run "make install". curses.h and panel.h will be renamed +- Optionally, run "make install". curses.h and panel.h will be renamed when installed (to xcurses.h and xpanel.h), to avoid conflicts with any existing curses installations. Unrenamed copies of curses.h and panel.h are installed in (by default) /usr/local/include/xcurses. From 4e98966dd93e68866795c4636c5a565a71fc4147 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Tue, 5 Jan 2016 16:11:16 -0500 Subject: [PATCH 37/46] More markdown madness. --- HISTORY => HISTORY.md | 132 ++++++++++++++++++++-------------------- IMPLEMNT => IMPLEMNT.md | 94 ++++++++++++++-------------- Makefile.in | 32 +++++----- PDCurses.spec | 2 +- README.md | 2 +- makedist.mif | 4 +- win32/gccwin32.mak | 2 +- 7 files changed, 135 insertions(+), 133 deletions(-) rename HISTORY => HISTORY.md (95%) rename IMPLEMNT => IMPLEMNT.md (85%) diff --git a/HISTORY b/HISTORY.md similarity index 95% rename from HISTORY rename to HISTORY.md index 7cf5b71a..a2c3f6d5 100644 --- a/HISTORY +++ b/HISTORY.md @@ -794,9 +794,9 @@ PDCurses 2.7 - 2005/12/30 INTRODUCTION: - Hello all. As of a few weeks ago, I'm the new maintainer for PDCurses. - Here's a brief summary of changes in this release. (More details are - available in the CVS log and trackers on SourceForge.) +Hello all. As of a few weeks ago, I'm the new maintainer for PDCurses. +Here's a brief summary of changes in this release. (More details are +available in the CVS log and trackers on SourceForge.) NEW FEATURES: @@ -902,27 +902,27 @@ BUGS FIXED: ACKNOWLEDGEMENTS: - Walter Briscoe - Jean-Pierre Demailly - Ruslan Fedyarov - Warren Gay - Florian Grosse-Coosmann - Vladimir Kokovic - Matt Maloy - K.H. Man - Michael Ryazanov - Ron Thibodeau - Alexandr Zamaraev + - Walter Briscoe + - Jean-Pierre Demailly + - Ruslan Fedyarov + - Warren Gay + - Florian Grosse-Coosmann + - Vladimir Kokovic + - Matt Maloy + - K.H. Man + - Michael Ryazanov + - Ron Thibodeau + - Alexandr Zamaraev - and of course, MARK HESSLING, for his over 13 years of service as the - maintainer of PDCurses. Plus, thanks to all who've reported bugs or - requested features. Apologies to anyone I've forgotten. +and of course, MARK HESSLING, for his over 13 years of service as the +maintainer of PDCurses. Plus, thanks to all who've reported bugs or +requested features. Apologies to anyone I've forgotten. - I've tested this version on Turbo C++ 3.0 and Borland C++ 3.1 for DOS; - DJGPP 2.X; Open Watcom 1.3 for DOS (16 and 32-bit), Windows and OS/2; - EMX 0.9d and the "newgcc" version of EMX; Borland C++ 5.5 for Windows; - recent versions of MinGW, Cygwin, LCC-Win32 and Microsoft Visual C++; - and gcc under several flavors of Linux, Mac OS X, *BSD and Solaris. +I've tested this version on Turbo C++ 3.0 and Borland C++ 3.1 for DOS; +DJGPP 2.X; Open Watcom 1.3 for DOS (16 and 32-bit), Windows and OS/2; +EMX 0.9d and the "newgcc" version of EMX; Borland C++ 5.5 for Windows; +recent versions of MinGW, Cygwin, LCC-Win32 and Microsoft Visual C++; +and gcc under several flavors of Linux, Mac OS X, *BSD and Solaris. -- William McBrine @@ -1128,15 +1128,15 @@ NEW COMPILER SUPPORT: ACKNOWLEDGEMENTS: (for this release) - Georg Fuchs for various changes. - Juan David Palomar for pointing out getnstr() was not implemented. - William McBrine for fix to allow black/black as valid color pair. - Peter Preus for pointing out the missing bccos2.mak file. - Laura Michaels for a couple of bug fixes and changes required to - support Mingw32 compiler. - Frank Heckenbach for PDC_get_input_fd() and some portability fixes and - the fixes for panel library. - Matthias Burian for the lcc-win32 compiler support. +- Georg Fuchs for various changes. +- Juan David Palomar for pointing out getnstr() was not implemented. +- William McBrine for fix to allow black/black as valid color pair. +- Peter Preus for pointing out the missing bccos2.mak file. +- Laura Michaels for a couple of bug fixes and changes required to + support Mingw32 compiler. +- Frank Heckenbach for PDC_get_input_fd() and some portability fixes and + the fixes for panel library. +- Matthias Burian for the lcc-win32 compiler support. ------------------------------------------------------------------------ @@ -1145,7 +1145,7 @@ PDCurses 2.3 - 1998/07/09 INTRODUCTION: - This release of PDCurses includes the following changes: +This release of PDCurses includes the following changes: - added more System V R4 functions @@ -1163,9 +1163,9 @@ INTRODUCTION: - long chtype extended to non-Unix ports - The name of the statically built library is pdcurses.lib (or - pdcurses.a). The name of the DLL import library (where applicable) is - curses.lib. +The name of the statically built library is pdcurses.lib (or +pdcurses.a). The name of the DLL import library (where applicable) is +curses.lib. BUGS FIXED: @@ -1187,30 +1187,30 @@ NEW COMPILER SUPPORT: EXTRA OPTIONS: - PDCurses recognizes two environment variables which determines the - initialization and finalization behavior. These environment variables - do not apply to the X11 port. +PDCurses recognizes two environment variables which determines the +initialization and finalization behavior. These environment variables +do not apply to the X11 port. - PDC_PRESERVE_SCREEN - If this environment variable is set, PDCurses will not clear the screen - to the default white on black on startup. This allows you to overlay - a window over the top of the existing screen background. +PDC_PRESERVE_SCREEN - +If this environment variable is set, PDCurses will not clear the screen +to the default white on black on startup. This allows you to overlay +a window over the top of the existing screen background. - PDC_RESTORE_SCREEN - If this environment variable is set, PDCurses will take a copy of the - contents of the screen at the time that PDCurses is started; initscr(), - and when endwin() is called, the screen will be restored. +PDC_RESTORE_SCREEN - +If this environment variable is set, PDCurses will take a copy of the +contents of the screen at the time that PDCurses is started; initscr(), +and when endwin() is called, the screen will be restored. ACKNOWLEDGEMENTS: (for this release) - Chris Szurgot for original Win32 port. - Gurusamy Sarathy for some updates to the Win32 port. - Kim Huron for the slk..() functions. - Florian Grosse Coosmann for some bug fixes. - Esa Peuha for reducing compiler warnings. - Augustin Martin Domingo for patches to X11 port to enable accented - characters. +- Chris Szurgot for original Win32 port. +- Gurusamy Sarathy for some updates to the Win32 port. +- Kim Huron for the slk..() functions. +- Florian Grosse Coosmann for some bug fixes. +- Esa Peuha for reducing compiler warnings. +- Augustin Martin Domingo for patches to X11 port to enable accented + characters. ------------------------------------------------------------------------ @@ -1242,7 +1242,7 @@ BUGS FIXED: - mvwin() checked the wrong coordinates - removed DESQview shadow memory buffer checking bug in curses.h in - #define for wstandout() + \#define for wstandout() - lots of others I can't remember @@ -1444,10 +1444,10 @@ DIRECTIONS: where environment_options are: - OS (host operating system) - COMP (compiler) - OPT (optimized version or debug version) - optional. default Y - TOS (target operating system) - optional. default OS + OS (host operating system) + COMP (compiler) + OPT (optimized version or debug version) - optional. default Y + TOS (target operating system) - optional. default OS see the makefile for valid combinations @@ -1525,14 +1525,14 @@ BUGS and UNFINISHED BUSINESS: ACKNOWLEDGEMENTS: - John 'Frotz' Fa'atuai, the previous maintainer for providing an - excellent base for further development. - John Burnell , for the OS/2 port. - John Steele, Jason (finally NOT a John) Shumate.... - for various fixes and suggestions. - Eberhardt Mattes (author of emx) for allowing code based on his - C library to be included with PDCurses. - Several others for their support, moral and actual. +- John 'Frotz' Fa'atuai, the previous maintainer for providing an + excellent base for further development. +- John Burnell , for the OS/2 port. +- John Steele, Jason (finally NOT a John) Shumate.... + for various fixes and suggestions. +- Eberhardt Mattes (author of emx) for allowing code based on his + C library to be included with PDCurses. +- Several others for their support, moral and actual. -- Mark Hessling diff --git a/IMPLEMNT b/IMPLEMNT.md similarity index 85% rename from IMPLEMNT rename to IMPLEMNT.md index a83f026f..dabcabda 100644 --- a/IMPLEMNT +++ b/IMPLEMNT.md @@ -1,12 +1,12 @@ PDCurses Implementor's Guide ============================ -Version 1.3 - 20??/??/?? - notes about official ports, new indentation - style -Version 1.2 - 2007/07/11 - added PDC_init_pair(), PDC_pair_content(), - version history; removed pdc_atrtab -Version 1.1 - 2007/06/06 - minor cosmetic change -Version 1.0 - 2007/04/01 - initial revision +- Version 1.3 - 20??/??/?? - notes about official ports, new indentation + style; markdown +- Version 1.2 - 2007/07/11 - added PDC_init_pair(), PDC_pair_content(), + version history; removed pdc_atrtab +- Version 1.1 - 2007/06/06 - minor cosmetic change +- Version 1.0 - 2007/04/01 - initial revision This document is for those wishing to port PDCurses to a new platform, or just wanting to better understand how it works. Nothing here should @@ -30,8 +30,8 @@ PDCurses distribution, please follow these guidelines: under GPL, BSD, etc. will not be accepted. -DATA STRUCTURES ---------------- +Data Structures +=============== A port of PDCurses must provide acs_map[], a 128-element array of chtypes, with values laid out based on the Alternate Character Set of @@ -50,8 +50,8 @@ table can be either hardwired, or filled by PDC_scr_open(). Existing ports define it in pdcdisp.c, but this is not required. -FUNCTIONS ---------- +Functions +========= A port of PDCurses must implement the following functions, with extern scope. These functions are traditionally divided into several modules, @@ -73,14 +73,14 @@ adjustments to keep every line under 80 columns. pdcdisp.c: ---------- -void PDC_gotoyx(int y, int x); +### void PDC_gotoyx(int y, int x); Move the physical cursor (as opposed to the logical cursor affected by wmove()) to the given location. This is called mainly from doupdate(). In general, this function need not compare the old location with the new one, and should just move the cursor unconditionally. -void PDC_transform_line(int lineno, int x, int len, const chtype *srcp); +### void PDC_transform_line(int lineno, int x, int len, const chtype *srcp); The core output routine. It takes len chtype entities from srcp (a pointer into curscr) and renders them to the physical screen at line @@ -92,13 +92,13 @@ chtype. pdcgetsc.c: ----------- -int PDC_get_columns(void); +### int PDC_get_columns(void); Returns the size of the screen in columns. It's used in resize_term() to set the new value of COLS. (Some existing implementations also call it internally from PDC_scr_open(), but this is not required.) -int PDC_get_cursor_mode(void); +### int PDC_get_cursor_mode(void); Returns the size/shape of the cursor. The format of the result is unspecified, except that it must be returned as an int. This function is @@ -106,7 +106,7 @@ called from initscr(), and the result is stored in SP->orig_cursor, which is used by PDC_curs_set() to determine the size/shape of the cursor in normal visibility mode (curs_set(1)). -int PDC_get_rows(void); +### int PDC_get_rows(void); Returns the size of the screen in rows. It's used in resize_term() to set the new value of LINES. (Some existing implementations also call it @@ -116,18 +116,18 @@ internally from PDC_scr_open(), but this is not required.) pdckbd.c: --------- -bool PDC_check_key(void); +### bool PDC_check_key(void); Keyboard/mouse event check, called from wgetch(). Returns TRUE if there's an event ready to process. This function must be non-blocking. -void PDC_flushinp(void); +### void PDC_flushinp(void); This is the core of flushinp(). It discards any pending key or mouse events, removing them from any internal queue and from the OS queue, if applicable. -int PDC_get_key(void); +### int PDC_get_key(void); Get the next available key, or mouse event (indicated by a return of KEY_MOUSE), and remove it from the OS' input queue, if applicable. This @@ -146,13 +146,13 @@ happen on key up. But if this is not possible, it may return the modifier keys on key down (if and only if SP->return_key_modifiers is TRUE). -int PDC_modifiers_set(void); +### int PDC_modifiers_set(void); Called from PDC_return_key_modifiers(). If your platform needs to do anything in response to a change in SP->return_key_modifiers, do it here. Returns OK or ERR, which is passed on by the caller. -int PDC_mouse_set(void); +### int PDC_mouse_set(void); Called by mouse_set(), mouse_on(), and mouse_off() -- all the functions that modify SP->_trap_mbe. If your platform needs to do anything in @@ -160,7 +160,7 @@ response to a change in SP->_trap_mbe (for example, turning the mouse cursor on or off), do it here. Returns OK or ERR, which is passed on by the caller. -void PDC_set_keyboard_binary(bool on); +### void PDC_set_keyboard_binary(bool on); Set keyboard input to "binary" mode. If you need to do something to keep the OS from processing ^C, etc. on your platform, do it here. TRUE turns @@ -171,22 +171,22 @@ noraw(). pdcscrn.c: ---------- -bool PDC_can_change_color(void); +### bool PDC_can_change_color(void); Returns TRUE if init_color() and color_content() give meaningful results, FALSE otherwise. Called from can_change_color(). -int PDC_color_content(short color, short *red, short *green, short *blue); +### int PDC_color_content(short color, short *red, short *green, short *blue); The core of color_content(). This does all the work of that function, except checking for values out of range and null pointers. -int PDC_init_color(short color, short red, short green, short blue); +### int PDC_init_color(short color, short red, short green, short blue); The core of init_color(). This does all the work of that function, except checking for values out of range. -void PDC_init_pair(short pair, short fg, short bg); +### void PDC_init_pair(short pair, short fg, short bg); The core of init_pair(). This does all the work of that function, except checking for values out of range. The values passed to this function @@ -194,24 +194,24 @@ should be returned by a call to PDC_pair_content() with the same pair number. PDC_transform_line() should use the specified colors when rendering a chtype with the given pair number. -int PDC_pair_content(short pair, short *fg, short *bg); +### int PDC_pair_content(short pair, short *fg, short *bg); The core of pair_content(). This does all the work of that function, except checking for values out of range and null pointers. -void PDC_reset_prog_mode(void); +### void PDC_reset_prog_mode(void); The non-portable functionality of reset_prog_mode() is handled here -- whatever's not done in _restore_mode(). In current ports: In OS/2, this sets the keyboard to binary mode; in Win32, it enables or disables the mouse pointer to match the saved mode; in others it does nothing. -void PDC_reset_shell_mode(void); +### void PDC_reset_shell_mode(void); The same thing, for reset_shell_mode(). In OS/2 and Win32, it restores the default console mode; in others it does nothing. -int PDC_resize_screen(int nlines, int ncols); +### int PDC_resize_screen(int nlines, int ncols); This does the main work of resize_term(). It may respond to non-zero parameters, by setting the screen to the specified size; to zero @@ -220,17 +220,17 @@ runtime, in an unspecified way (e.g., by dragging the edges of the window); or both. It may also do nothing, if there's no appropriate action for the platform. -void PDC_restore_screen_mode(int i); +### void PDC_restore_screen_mode(int i); Called from _restore_mode() in kernel.c, this function does the actual mode changing, if applicable. Currently used only in DOS and OS/2. -void PDC_save_screen_mode(int i); +### void PDC_save_screen_mode(int i); Called from _save_mode() in kernel.c, this function saves the actual screen mode, if applicable. Currently used only in DOS and OS/2. -void PDC_scr_close(void); +### void PDC_scr_close(void); The platform-specific part of endwin(). It may restore the image of the original screen saved by PDC_scr_open(), if the PDC_RESTORE_SCREEN @@ -238,12 +238,12 @@ environment variable is set; either way, if using an existing terminal, this function should restore it to the mode it had at startup, and move the cursor to the lower left corner. (The X11 port does nothing.) -void PDC_scr_free(void); +### void PDC_scr_free(void); Frees the memory for SP allocated by PDC_scr_open(). Called by delscreen(). -int PDC_scr_open(int argc, char **argv); +### int PDC_scr_open(int argc, char **argv); The platform-specific part of initscr(). It's actually called from Xinitscr(); the arguments, if present, correspond to those used with @@ -263,7 +263,7 @@ restoration by PDC_scr_close(). pdcsetsc.c: ----------- -int PDC_curs_set(int visibility); +### int PDC_curs_set(int visibility); Called from curs_set(). Changes the appearance of the cursor -- 0 turns it off, 1 is normal (the terminal's default, if applicable, as @@ -274,14 +274,14 @@ appearance of these modes is not specified. pdcutil.c: ---------- -void PDC_beep(void); +### void PDC_beep(void); Emits a short audible beep. If this is not possible on your platform, you must set SP->audible to FALSE during initialization (i.e., from PDC_scr_open() -- not here); otherwise, set it to TRUE. This function is called from beep(). -void PDC_napms(int ms); +### void PDC_napms(int ms); This is the core delay routine, called by napms(). It pauses for about (the X/Open spec says "at least") ms milliseconds, then returns. High @@ -290,13 +290,15 @@ you can achieve them). More important is that this function gives back the process' time slice to the OS, so that PDCurses idles at low CPU usage. -const char *PDC_sysname(void); +### const char *PDC_sysname(void); Returns a short string describing the platform, such as "DOS" or "X11". This is used by longname(). It must be no more than 100 characters; it should be much, much shorter (existing platforms use no more than 5). --------------------------------------------------------------------------- + +More functions +============== The following functions are implemented in the platform directories, but are accessed directly by apps. Refer to the user documentation for their @@ -306,20 +308,20 @@ descriptions: pdcclip.c: ---------- -int PDC_clearclipboard(void); -int PDC_freeclipboard(char *contents); -int PDC_getclipboard(char **contents, long *length); -int PDC_setclipboard(const char *contents, long length); +### int PDC_clearclipboard(void); +### int PDC_freeclipboard(char *contents); +### int PDC_getclipboard(char **contents, long *length); +### int PDC_setclipboard(const char *contents, long length); pdckbd.c: --------- -unsigned long PDC_get_input_fd(void); +### unsigned long PDC_get_input_fd(void); pdcsetsc.c: ----------- -int PDC_set_blink(bool blinkon); -void PDC_set_title(const char *title); +### int PDC_set_blink(bool blinkon); +### void PDC_set_title(const char *title); diff --git a/Makefile.in b/Makefile.in index dc40abfb..c409b590 100644 --- a/Makefile.in +++ b/Makefile.in @@ -66,38 +66,38 @@ manual: cd doc; $(MAKE) $(MFLAGS) $@ $(ZIPFILE): - zip -9y $(ZIPFILE) README HISTORY IMPLEMNT *.spec *.mif *.def \ + zip -9y $(ZIPFILE) README.md HISTORY.md IMPLEMNT.md *.spec *.mif *.def \ Makefile.in config.h.in configure configure.ac config.guess \ config.sub x11/xcurses-config.in install-sh aclocal.m4 curses.h \ - curspriv.h panel.h term.h pdcurses/README \ - pdcurses/*.c demos/README demos/*.c demos/*.h dos/README dos/*.c \ - dos/*.h dos/*.mak dos/*.lrf os2/README os2/*.c os2/*.h os2/*.mak \ - os2/*.lrf sdl1/README sdl1/*.c sdl1/*.h sdl1/Make* \ - win32/README win32/*.c win32/*.h win32/*.mak \ - win32/*.ico win32/*.rc x11/README x11/*.c x11/*.h x11/Makefile.* \ + curspriv.h panel.h term.h pdcurses/README.md \ + pdcurses/*.c demos/README.md demos/*.c demos/*.h dos/README.md dos/*.c \ + dos/*.h dos/*.mak dos/*.lrf os2/README.md os2/*.c os2/*.h os2/*.mak \ + os2/*.lrf sdl1/README.md sdl1/*.c sdl1/*.h sdl1/Make* \ + win32/README.md win32/*.c win32/*.h win32/*.mak \ + win32/*.ico win32/*.rc x11/README.md x11/*.c x11/*.h x11/Makefile.* \ x11/*.xbm doc/*.txt doc/manext.c doc/Makefile zip: $(ZIPFILE) ../$(TARBALL): - (cd ..; tar cvf - $(PDC_DIR)/README $(PDC_DIR)/HISTORY \ - $(PDC_DIR)/IMPLEMNT $(PDC_DIR)/*.spec $(PDC_DIR)/*.mif \ + (cd ..; tar cvf - $(PDC_DIR)/README.md $(PDC_DIR)/HISTORY.md \ + $(PDC_DIR)/IMPLEMNT.md $(PDC_DIR)/*.spec $(PDC_DIR)/*.mif \ $(PDC_DIR)/*.def $(PDC_DIR)/Makefile.in $(PDC_DIR)/aclocal.m4 \ $(PDC_DIR)/config.h.in $(PDC_DIR)/configure \ $(PDC_DIR)/config.guess $(PDC_DIR)/x11/xcurses-config.in \ $(PDC_DIR)/config.sub $(PDC_DIR)/configure.ac \ $(PDC_DIR)/install-sh $(PDC_DIR)/curses.h $(PDC_DIR)/curspriv.h \ $(PDC_DIR)/panel.h $(PDC_DIR)/term.h \ - $(PDC_DIR)/pdcurses/README $(PDC_DIR)/pdcurses/*.c \ - $(PDC_DIR)/demos/README $(PDC_DIR)/demos/*.c $(PDC_DIR)/demos/*.h \ - $(PDC_DIR)/doc/*.txt $(PDC_DIR)/dos/README $(PDC_DIR)/dos/*.c \ + $(PDC_DIR)/pdcurses/README.md $(PDC_DIR)/pdcurses/*.c \ + $(PDC_DIR)/demos/README.md $(PDC_DIR)/demos/*.c $(PDC_DIR)/demos/*.h \ + $(PDC_DIR)/doc/*.txt $(PDC_DIR)/dos/README.md $(PDC_DIR)/dos/*.c \ $(PDC_DIR)/dos/*.h $(PDC_DIR)/dos/*.mak $(PDC_DIR)/dos/*.lrf \ - $(PDC_DIR)/os2/README $(PDC_DIR)/os2/*.c $(PDC_DIR)/os2/*.h \ + $(PDC_DIR)/os2/README.md $(PDC_DIR)/os2/*.c $(PDC_DIR)/os2/*.h \ $(PDC_DIR)/os2/*.mak $(PDC_DIR)/os2/*.lrf \ - $(PDC_DIR)/sdl1/README $(PDC_DIR)/sdl1/*.c $(PDC_DIR)/sdl1/*.h \ - $(PDC_DIR)/sdl1/Make* $(PDC_DIR)/win32/README $(PDC_DIR)/win32/*.c \ + $(PDC_DIR)/sdl1/README.md $(PDC_DIR)/sdl1/*.c $(PDC_DIR)/sdl1/*.h \ + $(PDC_DIR)/sdl1/Make* $(PDC_DIR)/win32/README.md $(PDC_DIR)/win32/*.c \ $(PDC_DIR)/win32/*.h $(PDC_DIR)/win32/*.mak \ - $(PDC_DIR)/win32/*.ico $(PDC_DIR)/win32/*.rc $(PDC_DIR)/x11/README \ + $(PDC_DIR)/win32/*.ico $(PDC_DIR)/win32/*.rc $(PDC_DIR)/x11/README.md \ $(PDC_DIR)/x11/*.c $(PDC_DIR)/x11/*.xbm $(PDC_DIR)/x11/*.h \ $(PDC_DIR)/x11/Makefile.* $(PDC_DIR)/doc/manext.c \ $(PDC_DIR)/doc/Makefile | gzip -9 > $(TARBALL)) diff --git a/PDCurses.spec b/PDCurses.spec index 529daa67..b485d423 100644 --- a/PDCurses.spec +++ b/PDCurses.spec @@ -40,7 +40,7 @@ rm -rf $RPM_BUILD_DIR/%{name}-%{version} %files %defattr(-,root,root) -%doc README HISTORY +%doc README.md HISTORY.md %{base}/bin/xcurses-config %{base}/lib/libXCurses.a %{base}/lib/libXpanel.a diff --git a/README.md b/README.md index 06c935c1..fb743bd1 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ curses for multiple platforms. The latest version can be found at: http://pdcurses.org/ -For changes, see the [HISTORY](HISTORY) file. +For changes, see the [HISTORY](HISTORY.md) file. Legal Stuff diff --git a/makedist.mif b/makedist.mif index e7495a50..318148b0 100644 --- a/makedist.mif +++ b/makedist.mif @@ -8,8 +8,8 @@ dist: $(PDCLIBS) echo $(PLATFORM2). >> file_id.diz echo Source available in PDCURS$(VER).ZIP >> file_id.diz echo Public Domain. >> file_id.diz - echo $(PDCURSES_SRCDIR)\README > flist - echo $(PDCURSES_SRCDIR)\HISTORY >> flist + echo $(PDCURSES_SRCDIR)\README.md > flist + echo $(PDCURSES_SRCDIR)\HISTORY.md >> flist echo $(PDCURSES_SRCDIR)\curses.h >> flist echo $(PDCURSES_SRCDIR)\panel.h >> flist echo $(PDCURSES_SRCDIR)\term.h >> flist diff --git a/win32/gccwin32.mak b/win32/gccwin32.mak index 7504bb34..4f65cb67 100644 --- a/win32/gccwin32.mak +++ b/win32/gccwin32.mak @@ -122,7 +122,7 @@ dist: $(PDCLIBS) echo Source available in PDCURS$(VER).ZIP >> file_id.diz echo Public Domain. >> file_id.diz zip -9jX pdc$(VER)_cyg_w32 \ - $(PDCURSES_SRCDIR)/README $(PDCURSES_SRCDIR)/HISTORY \ + $(PDCURSES_SRCDIR)/README.md $(PDCURSES_SRCDIR)/HISTORY.md \ $(PDCURSES_SRCDIR)/curses.h $(PDCURSES_SRCDIR)/panel.h \ $(LIBCURSES) $(LIBPANEL) file_id.diz rm file_id.diz From cb7d82fc4bd79631ac1539a2f7e72dc08171b6f3 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Thu, 7 Jan 2016 10:44:04 -0500 Subject: [PATCH 38/46] Man page sections reformatted slightly, markdown-style. --- dos/pdcclip.c | 61 ++++++----- dos/pdckbd.c | 20 ++-- dos/pdcsetsc.c | 40 +++---- os2/pdcclip.c | 61 ++++++----- os2/pdckbd.c | 20 ++-- os2/pdcsetsc.c | 40 +++---- pdcurses/addch.c | 173 ++++++++++++++++--------------- pdcurses/addchstr.c | 101 +++++++++--------- pdcurses/addstr.c | 99 +++++++++--------- pdcurses/attr.c | 155 ++++++++++++++-------------- pdcurses/beep.c | 35 ++++--- pdcurses/bkgd.c | 87 ++++++++-------- pdcurses/border.c | 159 ++++++++++++++-------------- pdcurses/clear.c | 67 ++++++------ pdcurses/color.c | 141 +++++++++++++------------ pdcurses/debug.c | 36 ++++--- pdcurses/delch.c | 43 ++++---- pdcurses/deleteln.c | 73 +++++++------ pdcurses/getch.c | 125 +++++++++++----------- pdcurses/getstr.c | 103 ++++++++++--------- pdcurses/getyx.c | 108 +++++++++---------- pdcurses/inch.c | 60 ++++++----- pdcurses/inchstr.c | 89 ++++++++-------- pdcurses/initscr.c | 137 ++++++++++++------------ pdcurses/inopts.c | 185 +++++++++++++++++---------------- pdcurses/insch.c | 85 ++++++++------- pdcurses/insstr.c | 103 ++++++++++--------- pdcurses/instr.c | 97 ++++++++--------- pdcurses/kernel.c | 131 +++++++++++------------ pdcurses/keyname.c | 36 ++++--- pdcurses/mouse.c | 246 ++++++++++++++++++++++---------------------- pdcurses/move.c | 33 +++--- pdcurses/outopts.c | 97 ++++++++--------- pdcurses/overlay.c | 63 ++++++------ pdcurses/pad.c | 99 +++++++++--------- pdcurses/panel.c | 187 +++++++++++++++++---------------- pdcurses/printw.c | 51 ++++----- pdcurses/refresh.c | 83 ++++++++------- pdcurses/scanw.c | 49 +++++---- pdcurses/scr_dump.c | 81 ++++++++------- pdcurses/scroll.c | 45 ++++---- pdcurses/slk.c | 127 ++++++++++++----------- pdcurses/termattr.c | 100 +++++++++--------- pdcurses/terminfo.c | 68 ++++++------ pdcurses/touch.c | 77 +++++++------- pdcurses/util.c | 109 ++++++++++---------- pdcurses/window.c | 206 +++++++++++++++++++------------------ sdl1/pdcclip.c | 61 ++++++----- sdl1/pdckbd.c | 20 ++-- sdl1/pdcsetsc.c | 40 +++---- win32/pdcclip.c | 61 ++++++----- win32/pdckbd.c | 20 ++-- win32/pdcsetsc.c | 40 +++---- x11/pdcclip.c | 61 ++++++----- x11/pdckbd.c | 20 ++-- x11/pdcsetsc.c | 40 +++---- x11/sb.c | 43 ++++---- 57 files changed, 2533 insertions(+), 2264 deletions(-) diff --git a/dos/pdcclip.c b/dos/pdcclip.c index 797da32a..0824edad 100644 --- a/dos/pdcclip.c +++ b/dos/pdcclip.c @@ -6,40 +6,45 @@ /*man-start************************************************************** - Name: clipboard +clipboard +--------- - Synopsis: - int PDC_getclipboard(char **contents, long *length); - int PDC_setclipboard(const char *contents, long length); - int PDC_freeclipboard(char *contents); - int PDC_clearclipboard(void); +### Synopsis - Description: - PDC_getclipboard() gets the textual contents of the system's - clipboard. This function returns the contents of the clipboard - in the contents argument. It is the responsibilitiy of the - caller to free the memory returned, via PDC_freeclipboard(). - The length of the clipboard contents is returned in the length - argument. + int PDC_getclipboard(char **contents, long *length); + int PDC_setclipboard(const char *contents, long length); + int PDC_freeclipboard(char *contents); + int PDC_clearclipboard(void); - PDC_setclipboard copies the supplied text into the system's - clipboard, emptying the clipboard prior to the copy. +### Description - PDC_clearclipboard() clears the internal clipboard. + PDC_getclipboard() gets the textual contents of the system's + clipboard. This function returns the contents of the clipboard + in the contents argument. It is the responsibilitiy of the + caller to free the memory returned, via PDC_freeclipboard(). + The length of the clipboard contents is returned in the length + argument. - Return Values: - indicator of success/failure of call. - PDC_CLIP_SUCCESS the call was successful - PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for - the clipboard contents - PDC_CLIP_EMPTY the clipboard contains no text - PDC_CLIP_ACCESS_ERROR no clipboard support + PDC_setclipboard copies the supplied text into the system's + clipboard, emptying the clipboard prior to the copy. - Portability X/Open BSD SYS V - PDC_getclipboard - - - - PDC_setclipboard - - - - PDC_freeclipboard - - - - PDC_clearclipboard - - - + PDC_clearclipboard() clears the internal clipboard. + +### Return Values + + indicator of success/failure of call. + PDC_CLIP_SUCCESS the call was successful + PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for + the clipboard contents + PDC_CLIP_EMPTY the clipboard contains no text + PDC_CLIP_ACCESS_ERROR no clipboard support + +### Portability + X/Open BSD SYS V + PDC_getclipboard - - - + PDC_setclipboard - - - + PDC_freeclipboard - - - + PDC_clearclipboard - - - **man-end****************************************************************/ diff --git a/dos/pdckbd.c b/dos/pdckbd.c index 88c9e521..5405ca09 100644 --- a/dos/pdckbd.c +++ b/dos/pdckbd.c @@ -13,17 +13,21 @@ /*man-start************************************************************** - Name: pdckbd +pdckbd +------ - Synopsis: - unsigned long PDC_get_input_fd(void); +### Synopsis - Description: - PDC_get_input_fd() returns the file descriptor that PDCurses - reads its input from. It can be used for select(). + unsigned long PDC_get_input_fd(void); - Portability X/Open BSD SYS V - PDC_get_input_fd - - - +### Description + + PDC_get_input_fd() returns the file descriptor that PDCurses + reads its input from. It can be used for select(). + +### Portability + X/Open BSD SYS V + PDC_get_input_fd - - - **man-end****************************************************************/ diff --git a/dos/pdcsetsc.c b/dos/pdcsetsc.c index d8fe7d16..13114fdd 100644 --- a/dos/pdcsetsc.c +++ b/dos/pdcsetsc.c @@ -4,28 +4,32 @@ /*man-start************************************************************** - Name: pdcsetsc +pdcsetsc +-------- - Synopsis: - int PDC_set_blink(bool blinkon); - void PDC_set_title(const char *title); +### Synopsis - Description: - PDC_set_blink() toggles whether the A_BLINK attribute sets an - actual blink mode (TRUE), or sets the background color to high - intensity (FALSE). The default is platform-dependent (FALSE in - most cases). It returns OK if it could set the state to match - the given parameter, ERR otherwise. Current platforms also - adjust the value of COLORS according to this function -- 16 for - FALSE, and 8 for TRUE. + int PDC_set_blink(bool blinkon); + void PDC_set_title(const char *title); - PDC_set_title() sets the title of the window in which the curses - program is running. This function may not do anything on some - platforms. (Currently it only works in Win32 and X11.) +### Description - Portability X/Open BSD SYS V - PDC_set_blink - - - - PDC_set_title - - - + PDC_set_blink() toggles whether the A_BLINK attribute sets an + actual blink mode (TRUE), or sets the background color to high + intensity (FALSE). The default is platform-dependent (FALSE in + most cases). It returns OK if it could set the state to match + the given parameter, ERR otherwise. Current platforms also + adjust the value of COLORS according to this function -- 16 for + FALSE, and 8 for TRUE. + + PDC_set_title() sets the title of the window in which the curses + program is running. This function may not do anything on some + platforms. (Currently it only works in Win32 and X11.) + +### Portability + X/Open BSD SYS V + PDC_set_blink - - - + PDC_set_title - - - **man-end****************************************************************/ diff --git a/os2/pdcclip.c b/os2/pdcclip.c index e8334929..a8a80f36 100644 --- a/os2/pdcclip.c +++ b/os2/pdcclip.c @@ -4,40 +4,45 @@ /*man-start************************************************************** - Name: clipboard +clipboard +--------- - Synopsis: - int PDC_getclipboard(char **contents, long *length); - int PDC_setclipboard(const char *contents, long length); - int PDC_freeclipboard(char *contents); - int PDC_clearclipboard(void); +### Synopsis - Description: - PDC_getclipboard() gets the textual contents of the system's - clipboard. This function returns the contents of the clipboard - in the contents argument. It is the responsibilitiy of the - caller to free the memory returned, via PDC_freeclipboard(). - The length of the clipboard contents is returned in the length - argument. + int PDC_getclipboard(char **contents, long *length); + int PDC_setclipboard(const char *contents, long length); + int PDC_freeclipboard(char *contents); + int PDC_clearclipboard(void); - PDC_setclipboard copies the supplied text into the system's - clipboard, emptying the clipboard prior to the copy. +### Description - PDC_clearclipboard() clears the internal clipboard. + PDC_getclipboard() gets the textual contents of the system's + clipboard. This function returns the contents of the clipboard + in the contents argument. It is the responsibilitiy of the + caller to free the memory returned, via PDC_freeclipboard(). + The length of the clipboard contents is returned in the length + argument. - Return Values: - indicator of success/failure of call. - PDC_CLIP_SUCCESS the call was successful - PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for - the clipboard contents - PDC_CLIP_EMPTY the clipboard contains no text - PDC_CLIP_ACCESS_ERROR no clipboard support + PDC_setclipboard copies the supplied text into the system's + clipboard, emptying the clipboard prior to the copy. - Portability X/Open BSD SYS V - PDC_getclipboard - - - - PDC_setclipboard - - - - PDC_freeclipboard - - - - PDC_clearclipboard - - - + PDC_clearclipboard() clears the internal clipboard. + +### Return Values + + indicator of success/failure of call. + PDC_CLIP_SUCCESS the call was successful + PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for + the clipboard contents + PDC_CLIP_EMPTY the clipboard contains no text + PDC_CLIP_ACCESS_ERROR no clipboard support + +### Portability + X/Open BSD SYS V + PDC_getclipboard - - - + PDC_setclipboard - - - + PDC_freeclipboard - - - + PDC_clearclipboard - - - **man-end****************************************************************/ diff --git a/os2/pdckbd.c b/os2/pdckbd.c index 765d21b2..4b70b2d2 100644 --- a/os2/pdckbd.c +++ b/os2/pdckbd.c @@ -10,17 +10,21 @@ defined(__TURBOC__) /*man-start************************************************************** - Name: pdckbd +pdckbd +------ - Synopsis: - unsigned long PDC_get_input_fd(void); +### Synopsis - Description: - PDC_get_input_fd() returns the file descriptor that PDCurses - reads its input from. It can be used for select(). + unsigned long PDC_get_input_fd(void); - Portability X/Open BSD SYS V - PDC_get_input_fd - - - +### Description + + PDC_get_input_fd() returns the file descriptor that PDCurses + reads its input from. It can be used for select(). + +### Portability + X/Open BSD SYS V + PDC_get_input_fd - - - **man-end****************************************************************/ diff --git a/os2/pdcsetsc.c b/os2/pdcsetsc.c index 0f9229d3..406aa4fe 100644 --- a/os2/pdcsetsc.c +++ b/os2/pdcsetsc.c @@ -4,28 +4,32 @@ /*man-start************************************************************** - Name: pdcsetsc +pdcsetsc +-------- - Synopsis: - int PDC_set_blink(bool blinkon); - void PDC_set_title(const char *title); +### Synopsis - Description: - PDC_set_blink() toggles whether the A_BLINK attribute sets an - actual blink mode (TRUE), or sets the background color to high - intensity (FALSE). The default is platform-dependent (FALSE in - most cases). It returns OK if it could set the state to match - the given parameter, ERR otherwise. Current platforms also - adjust the value of COLORS according to this function -- 16 for - FALSE, and 8 for TRUE. + int PDC_set_blink(bool blinkon); + void PDC_set_title(const char *title); - PDC_set_title() sets the title of the window in which the curses - program is running. This function may not do anything on some - platforms. (Currently it only works in Win32 and X11.) +### Description - Portability X/Open BSD SYS V - PDC_set_blink - - - - PDC_set_title - - - + PDC_set_blink() toggles whether the A_BLINK attribute sets an + actual blink mode (TRUE), or sets the background color to high + intensity (FALSE). The default is platform-dependent (FALSE in + most cases). It returns OK if it could set the state to match + the given parameter, ERR otherwise. Current platforms also + adjust the value of COLORS according to this function -- 16 for + FALSE, and 8 for TRUE. + + PDC_set_title() sets the title of the window in which the curses + program is running. This function may not do anything on some + platforms. (Currently it only works in Win32 and X11.) + +### Portability + X/Open BSD SYS V + PDC_set_blink - - - + PDC_set_title - - - **man-end****************************************************************/ diff --git a/pdcurses/addch.c b/pdcurses/addch.c index d30173f2..ff5802d7 100644 --- a/pdcurses/addch.c +++ b/pdcurses/addch.c @@ -4,107 +4,112 @@ /*man-start************************************************************** - Name: addch +addch +----- - Synopsis: - int addch(const chtype ch); - int waddch(WINDOW *win, const chtype ch); - int mvaddch(int y, int x, const chtype ch); - int mvwaddch(WINDOW *win, int y, int x, const chtype ch); - int echochar(const chtype ch); - int wechochar(WINDOW *win, const chtype ch); +### Synopsis - int addrawch(chtype ch); - int waddrawch(WINDOW *win, chtype ch); - int mvaddrawch(int y, int x, chtype ch); - int mvwaddrawch(WINDOW *win, int y, int x, chtype ch); + int addch(const chtype ch); + int waddch(WINDOW *win, const chtype ch); + int mvaddch(int y, int x, const chtype ch); + int mvwaddch(WINDOW *win, int y, int x, const chtype ch); + int echochar(const chtype ch); + int wechochar(WINDOW *win, const chtype ch); - int add_wch(const cchar_t *wch); - int wadd_wch(WINDOW *win, const cchar_t *wch); - int mvadd_wch(int y, int x, const cchar_t *wch); - int mvwadd_wch(WINDOW *win, int y, int x, const cchar_t *wch); - int echo_wchar(const cchar_t *wch); - int wecho_wchar(WINDOW *win, const cchar_t *wch); + int addrawch(chtype ch); + int waddrawch(WINDOW *win, chtype ch); + int mvaddrawch(int y, int x, chtype ch); + int mvwaddrawch(WINDOW *win, int y, int x, chtype ch); - Description: - addch() adds the chtype ch to the default window (stdscr) at the - current cursor position, and advances the cursor. Note that - chtypes can convey both text (a single character) and - attributes, including a color pair. add_wch() is the wide- - character version of this function, taking a pointer to a - cchar_t instead of a chtype. + int add_wch(const cchar_t *wch); + int wadd_wch(WINDOW *win, const cchar_t *wch); + int mvadd_wch(int y, int x, const cchar_t *wch); + int mvwadd_wch(WINDOW *win, int y, int x, const cchar_t *wch); + int echo_wchar(const cchar_t *wch); + int wecho_wchar(WINDOW *win, const cchar_t *wch); - waddch() is like addch(), but also lets you specify the window. - (This is in fact the core output routine.) wadd_wch() is the - wide version. +### Description - mvaddch() moves the cursor to the specified (y, x) position, and - adds ch to stdscr. mvadd_wch() is the wide version. + addch() adds the chtype ch to the default window (stdscr) at the + current cursor position, and advances the cursor. Note that + chtypes can convey both text (a single character) and + attributes, including a color pair. add_wch() is the wide- + character version of this function, taking a pointer to a + cchar_t instead of a chtype. - mvwaddch() moves the cursor to the specified position and adds - ch to the specified window. mvwadd_wch() is the wide version. + waddch() is like addch(), but also lets you specify the window. + (This is in fact the core output routine.) wadd_wch() is the + wide version. - echochar() adds ch to stdscr at the current cursor position and - calls refresh(). echo_wchar() is the wide version. + mvaddch() moves the cursor to the specified (y, x) position, and + adds ch to stdscr. mvadd_wch() is the wide version. - wechochar() adds ch to the specified window and calls - wrefresh(). wecho_wchar() is the wide version. + mvwaddch() moves the cursor to the specified position and adds + ch to the specified window. mvwadd_wch() is the wide version. - addrawch(), waddrawch(), mvaddrawch() and mvwaddrawch() are - PDCurses-specific wrappers for addch() etc. that disable the - translation of control characters. + echochar() adds ch to stdscr at the current cursor position and + calls refresh(). echo_wchar() is the wide version. - The following applies to all these functions: + wechochar() adds ch to the specified window and calls + wrefresh(). wecho_wchar() is the wide version. - If the cursor moves on to the right margin, an automatic newline - is performed. If scrollok is enabled, and a character is added - to the bottom right corner of the window, the scrolling region - will be scrolled up one line. If scrolling is not allowed, ERR - will be returned. + addrawch(), waddrawch(), mvaddrawch() and mvwaddrawch() are + PDCurses-specific wrappers for addch() etc. that disable the + translation of control characters. - If ch is a tab, newline, or backspace, the cursor will be moved - appropriately within the window. If ch is a newline, the - clrtoeol routine is called before the cursor is moved to the - beginning of the next line. If newline mapping is off, the - cursor will be moved to the next line, but the x coordinate will - be unchanged. If ch is a tab the cursor is moved to the next - tab position within the window. If ch is another control - character, it will be drawn in the ^X notation. Calling the - inch() routine after adding a control character returns the - representation of the control character, not the control - character. + The following applies to all these functions: - Video attributes can be combined with a character by ORing them - into the parameter. Text, including attributes, can be copied - from one place to another by using inch() and addch(). + If the cursor moves on to the right margin, an automatic newline + is performed. If scrollok is enabled, and a character is added + to the bottom right corner of the window, the scrolling region + will be scrolled up one line. If scrolling is not allowed, ERR + will be returned. - Note that in PDCurses, for now, a cchar_t and a chtype are the - same. The text field is 16 bits wide, and is treated as Unicode - (UCS-2) when PDCurses is built with wide-character support - (define PDC_WIDE). So, in functions that take a chtype, like - addch(), both the wide and narrow versions will handle Unicode. - But for portability, you should use the wide functions. + If ch is a tab, newline, or backspace, the cursor will be moved + appropriately within the window. If ch is a newline, the + clrtoeol routine is called before the cursor is moved to the + beginning of the next line. If newline mapping is off, the + cursor will be moved to the next line, but the x coordinate will + be unchanged. If ch is a tab the cursor is moved to the next + tab position within the window. If ch is another control + character, it will be drawn in the ^X notation. Calling the + inch() routine after adding a control character returns the + representation of the control character, not the control + character. - Return Value: - All functions return OK on success and ERR on error. + Video attributes can be combined with a character by ORing them + into the parameter. Text, including attributes, can be copied + from one place to another by using inch() and addch(). - Portability X/Open BSD SYS V - addch Y Y Y - waddch Y Y Y - mvaddch Y Y Y - mvwaddch Y Y Y - echochar Y - 3.0 - wechochar Y - 3.0 - addrawch - - - - waddrawch - - - - mvaddrawch - - - - mvwaddrawch - - - - add_wch Y - wadd_wch Y - mvadd_wch Y - mvwadd_wch Y - echo_wchar Y - wecho_wchar Y + Note that in PDCurses, for now, a cchar_t and a chtype are the + same. The text field is 16 bits wide, and is treated as Unicode + (UCS-2) when PDCurses is built with wide-character support + (define PDC_WIDE). So, in functions that take a chtype, like + addch(), both the wide and narrow versions will handle Unicode. + But for portability, you should use the wide functions. + +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + addch Y Y Y + waddch Y Y Y + mvaddch Y Y Y + mvwaddch Y Y Y + echochar Y - 3.0 + wechochar Y - 3.0 + addrawch - - - + waddrawch - - - + mvaddrawch - - - + mvwaddrawch - - - + add_wch Y + wadd_wch Y + mvadd_wch Y + mvwadd_wch Y + echo_wchar Y + wecho_wchar Y **man-end****************************************************************/ diff --git a/pdcurses/addchstr.c b/pdcurses/addchstr.c index 831be6fd..c1a0f112 100644 --- a/pdcurses/addchstr.c +++ b/pdcurses/addchstr.c @@ -4,60 +4,65 @@ /*man-start************************************************************** - Name: addchstr +addchstr +-------- - Synopsis: - int addchstr(const chtype *ch); - int addchnstr(const chtype *ch, int n); - int waddchstr(WINDOW *win, const chtype *ch); - int waddchnstr(WINDOW *win, const chtype *ch, int n); - int mvaddchstr(int y, int x, const chtype *ch); - int mvaddchnstr(int y, int x, const chtype *ch, int n); - int mvwaddchstr(WINDOW *, int y, int x, const chtype *ch); - int mvwaddchnstr(WINDOW *, int y, int x, const chtype *ch, int n); +### Synopsis - int add_wchstr(const cchar_t *wch); - int add_wchnstr(const cchar_t *wch, int n); - int wadd_wchstr(WINDOW *win, const cchar_t *wch); - int wadd_wchnstr(WINDOW *win, const cchar_t *wch, int n); - int mvadd_wchstr(int y, int x, const cchar_t *wch); - int mvadd_wchnstr(int y, int x, const cchar_t *wch, int n); - int mvwadd_wchstr(WINDOW *win, int y, int x, const cchar_t *wch); - int mvwadd_wchnstr(WINDOW *win, int y, int x, const cchar_t *wch, - int n); + int addchstr(const chtype *ch); + int addchnstr(const chtype *ch, int n); + int waddchstr(WINDOW *win, const chtype *ch); + int waddchnstr(WINDOW *win, const chtype *ch, int n); + int mvaddchstr(int y, int x, const chtype *ch); + int mvaddchnstr(int y, int x, const chtype *ch, int n); + int mvwaddchstr(WINDOW *, int y, int x, const chtype *ch); + int mvwaddchnstr(WINDOW *, int y, int x, const chtype *ch, int n); - Description: - These routines write a chtype or cchar_t string directly into - the window structure, starting at the current or specified - position. The four routines with n as the last argument copy at - most n elements, but no more than will fit on the line. If n = - -1 then the whole string is copied, up to the maximum number - that will fit on the line. + int add_wchstr(const cchar_t *wch); + int add_wchnstr(const cchar_t *wch, int n); + int wadd_wchstr(WINDOW *win, const cchar_t *wch); + int wadd_wchnstr(WINDOW *win, const cchar_t *wch, int n); + int mvadd_wchstr(int y, int x, const cchar_t *wch); + int mvadd_wchnstr(int y, int x, const cchar_t *wch, int n); + int mvwadd_wchstr(WINDOW *win, int y, int x, const cchar_t *wch); + int mvwadd_wchnstr(WINDOW *win, int y, int x, const cchar_t *wch, + int n); - The cursor position is not advanced. These routines do not check - for newline or other special characters, nor does any line - wrapping occur. +### Description - Return Value: - All functions return OK or ERR. + These routines write a chtype or cchar_t string directly into + the window structure, starting at the current or specified + position. The four routines with n as the last argument copy at + most n elements, but no more than will fit on the line. If n = + -1 then the whole string is copied, up to the maximum number + that will fit on the line. - Portability X/Open BSD SYS V - addchstr Y - 4.0 - waddchstr Y - 4.0 - mvaddchstr Y - 4.0 - mvwaddchstr Y - 4.0 - addchnstr Y - 4.0 - waddchnstr Y - 4.0 - mvaddchnstr Y - 4.0 - mvwaddchnstr Y - 4.0 - add_wchstr Y - wadd_wchstr Y - mvadd_wchstr Y - mvwadd_wchstr Y - add_wchnstr Y - wadd_wchnstr Y - mvadd_wchnstr Y - mvwadd_wchnstr Y + The cursor position is not advanced. These routines do not check + for newline or other special characters, nor does any line + wrapping occur. + +### Return Value + + All functions return OK or ERR. + +### Portability + X/Open BSD SYS V + addchstr Y - 4.0 + waddchstr Y - 4.0 + mvaddchstr Y - 4.0 + mvwaddchstr Y - 4.0 + addchnstr Y - 4.0 + waddchnstr Y - 4.0 + mvaddchnstr Y - 4.0 + mvwaddchnstr Y - 4.0 + add_wchstr Y + wadd_wchstr Y + mvadd_wchstr Y + mvwadd_wchstr Y + add_wchnstr Y + wadd_wchnstr Y + mvadd_wchnstr Y + mvwadd_wchnstr Y **man-end****************************************************************/ diff --git a/pdcurses/addstr.c b/pdcurses/addstr.c index 7fb8c8d7..a2a9465c 100644 --- a/pdcurses/addstr.c +++ b/pdcurses/addstr.c @@ -4,58 +4,63 @@ /*man-start************************************************************** - Name: addstr +addstr +------ - Synopsis: - int addstr(const char *str); - int addnstr(const char *str, int n); - int waddstr(WINDOW *win, const char *str); - int waddnstr(WINDOW *win, const char *str, int n); - int mvaddstr(int y, int x, const char *str); - int mvaddnstr(int y, int x, const char *str, int n); - int mvwaddstr(WINDOW *win, int y, int x, const char *str); - int mvwaddnstr(WINDOW *win, int y, int x, const char *str, int n); +### Synopsis - int addwstr(const wchar_t *wstr); - int addnwstr(const wchar_t *wstr, int n); - int waddwstr(WINDOW *win, const wchar_t *wstr); - int waddnwstr(WINDOW *win, const wchar_t *wstr, int n); - int mvaddwstr(int y, int x, const wchar_t *wstr); - int mvaddnwstr(int y, int x, const wchar_t *wstr, int n); - int mvwaddwstr(WINDOW *win, int y, int x, const wchar_t *wstr); - int mvwaddnwstr(WINDOW *win, int y, int x, const wchar_t *wstr, int n); + int addstr(const char *str); + int addnstr(const char *str, int n); + int waddstr(WINDOW *win, const char *str); + int waddnstr(WINDOW *win, const char *str, int n); + int mvaddstr(int y, int x, const char *str); + int mvaddnstr(int y, int x, const char *str, int n); + int mvwaddstr(WINDOW *win, int y, int x, const char *str); + int mvwaddnstr(WINDOW *win, int y, int x, const char *str, int n); - Description: - These routines write all the characters of the null-terminated - string str or wide-character string wstr to the given window. - The functionality is similar to calling waddch() once for each - character in the string; except that, when PDCurses is built - with wide-character support enabled, the narrow-character - functions treat the string as a multibyte string in the current - locale, and convert it. The routines with n as the last - argument write at most n characters; if n is negative, then the - entire string will be added. + int addwstr(const wchar_t *wstr); + int addnwstr(const wchar_t *wstr, int n); + int waddwstr(WINDOW *win, const wchar_t *wstr); + int waddnwstr(WINDOW *win, const wchar_t *wstr, int n); + int mvaddwstr(int y, int x, const wchar_t *wstr); + int mvaddnwstr(int y, int x, const wchar_t *wstr, int n); + int mvwaddwstr(WINDOW *win, int y, int x, const wchar_t *wstr); + int mvwaddnwstr(WINDOW *win, int y, int x, const wchar_t *wstr, int n); - Return Value: - All functions return OK or ERR. +### Description - Portability X/Open BSD SYS V - addstr Y Y Y - waddstr Y Y Y - mvaddstr Y Y Y - mvwaddstr Y Y Y - addnstr Y - 4.0 - waddnstr Y - 4.0 - mvaddnstr Y - 4.0 - mvwaddnstr Y - 4.0 - addwstr Y - waddwstr Y - mvaddwstr Y - mvwaddwstr Y - addnwstr Y - waddnwstr Y - mvaddnwstr Y - mvwaddnwstr Y + These routines write all the characters of the null-terminated + string str or wide-character string wstr to the given window. + The functionality is similar to calling waddch() once for each + character in the string; except that, when PDCurses is built + with wide-character support enabled, the narrow-character + functions treat the string as a multibyte string in the current + locale, and convert it. The routines with n as the last + argument write at most n characters; if n is negative, then the + entire string will be added. + +### Return Value + + All functions return OK or ERR. + +### Portability + X/Open BSD SYS V + addstr Y Y Y + waddstr Y Y Y + mvaddstr Y Y Y + mvwaddstr Y Y Y + addnstr Y - 4.0 + waddnstr Y - 4.0 + mvaddnstr Y - 4.0 + mvwaddnstr Y - 4.0 + addwstr Y + waddwstr Y + mvaddwstr Y + mvwaddwstr Y + addnwstr Y + waddnwstr Y + mvaddnwstr Y + mvwaddnwstr Y **man-end****************************************************************/ diff --git a/pdcurses/attr.c b/pdcurses/attr.c index 4da011b4..b92d6446 100644 --- a/pdcurses/attr.c +++ b/pdcurses/attr.c @@ -4,94 +4,99 @@ /*man-start************************************************************** - Name: attr +attr +---- - Synopsis: - int attroff(chtype attrs); - int wattroff(WINDOW *win, chtype attrs); - int attron(chtype attrs); - int wattron(WINDOW *win, chtype attrs); - int attrset(chtype attrs); - int wattrset(WINDOW *win, chtype attrs); - int standend(void); - int wstandend(WINDOW *win); - int standout(void); - int wstandout(WINDOW *win); +### Synopsis - int color_set(short color_pair, void *opts); - int wcolor_set(WINDOW *win, short color_pair, void *opts); + int attroff(chtype attrs); + int wattroff(WINDOW *win, chtype attrs); + int attron(chtype attrs); + int wattron(WINDOW *win, chtype attrs); + int attrset(chtype attrs); + int wattrset(WINDOW *win, chtype attrs); + int standend(void); + int wstandend(WINDOW *win); + int standout(void); + int wstandout(WINDOW *win); - int attr_get(attr_t *attrs, short *color_pair, void *opts); - int attr_off(attr_t attrs, void *opts); - int attr_on(attr_t attrs, void *opts); - int attr_set(attr_t attrs, short color_pair, void *opts); - int wattr_get(WINDOW *win, attr_t *attrs, short *color_pair, - void *opts); - int wattr_off(WINDOW *win, attr_t attrs, void *opts); - int wattr_on(WINDOW *win, attr_t attrs, void *opts); - int wattr_set(WINDOW *win, attr_t attrs, short color_pair, - void *opts); + int color_set(short color_pair, void *opts); + int wcolor_set(WINDOW *win, short color_pair, void *opts); - int chgat(int n, attr_t attr, short color, const void *opts); - int mvchgat(int y, int x, int n, attr_t attr, short color, - const void *opts); - int mvwchgat(WINDOW *win, int y, int x, int n, attr_t attr, - short color, const void *opts); - int wchgat(WINDOW *win, int n, attr_t attr, short color, + int attr_get(attr_t *attrs, short *color_pair, void *opts); + int attr_off(attr_t attrs, void *opts); + int attr_on(attr_t attrs, void *opts); + int attr_set(attr_t attrs, short color_pair, void *opts); + int wattr_get(WINDOW *win, attr_t *attrs, short *color_pair, + void *opts); + int wattr_off(WINDOW *win, attr_t attrs, void *opts); + int wattr_on(WINDOW *win, attr_t attrs, void *opts); + int wattr_set(WINDOW *win, attr_t attrs, short color_pair, + void *opts); + + int chgat(int n, attr_t attr, short color, const void *opts); + int mvchgat(int y, int x, int n, attr_t attr, short color, const void *opts); + int mvwchgat(WINDOW *win, int y, int x, int n, attr_t attr, + short color, const void *opts); + int wchgat(WINDOW *win, int n, attr_t attr, short color, + const void *opts); - chtype getattrs(WINDOW *win); + chtype getattrs(WINDOW *win); - Description: - These functions manipulate the current attributes and/or colors - of the named window. These attributes can be any combination - of A_STANDOUT, A_REVERSE, A_BOLD, A_DIM, A_BLINK, A_UNDERLINE. +### Description - These constants are defined in and can be combined - with the bitwise-OR operator (|). + These functions manipulate the current attributes and/or colors + of the named window. These attributes can be any combination + of A_STANDOUT, A_REVERSE, A_BOLD, A_DIM, A_BLINK, A_UNDERLINE. - The current attributes of a window are applied to all chtypes - that are written into the window with waddch(). Attributes are - a property of the chtype, and move with the character through - any scrolling or insert/delete operations. + These constants are defined in and can be combined + with the bitwise-OR operator (|). - attrset() sets the current attributes of the given window to - attrs. attroff() turns off the named attributes without - affecting any other attributes; attron() turns them on. - color_set() sets the window color to the value of color_pair. + The current attributes of a window are applied to all chtypes + that are written into the window with waddch(). Attributes are + a property of the chtype, and move with the character through + any scrolling or insert/delete operations. - standout() is the same as attron(A_STANDOUT). standend() is the - same as attrset(A_NORMAL); that is, it turns off all attributes. + attrset() sets the current attributes of the given window to + attrs. attroff() turns off the named attributes without + affecting any other attributes; attron() turns them on. + color_set() sets the window color to the value of color_pair. - Return Value: - All functions return OK on success and ERR on error. + standout() is the same as attron(A_STANDOUT). standend() is the + same as attrset(A_NORMAL); that is, it turns off all attributes. - Portability X/Open BSD SYS V - attroff Y Y Y - wattroff Y Y Y - attron Y Y Y - wattron Y Y Y - attrset Y Y Y - wattrset Y Y Y - standend Y Y Y - wstandend Y Y Y - standout Y Y Y - wstandout Y Y Y - color_set Y - wcolor_set Y - attr_get Y - wattr_get Y - attr_on Y - wattr_on Y - attr_off Y - wattr_off Y - attr_set Y - wattr_set Y - chgat Y - wchgat Y - mvchgat Y - mvwchgat Y - getattrs - +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + attroff Y Y Y + wattroff Y Y Y + attron Y Y Y + wattron Y Y Y + attrset Y Y Y + wattrset Y Y Y + standend Y Y Y + wstandend Y Y Y + standout Y Y Y + wstandout Y Y Y + color_set Y + wcolor_set Y + attr_get Y + wattr_get Y + attr_on Y + wattr_on Y + attr_off Y + wattr_off Y + attr_set Y + wattr_set Y + chgat Y + wchgat Y + mvchgat Y + mvwchgat Y + getattrs - **man-end****************************************************************/ diff --git a/pdcurses/beep.c b/pdcurses/beep.c index f5e32210..857706cc 100644 --- a/pdcurses/beep.c +++ b/pdcurses/beep.c @@ -4,26 +4,31 @@ /*man-start************************************************************** - Name: beep +beep +---- - Synopsis: - int beep(void); - int flash(void); +### Synopsis - Description: - beep() sounds the audible bell on the terminal, if possible; - if not, it calls flash(). + int beep(void); + int flash(void); - flash() "flashes" the screen, by inverting the foreground and - background of every cell, pausing, and then restoring the - original attributes. +### Description - Return Value: - These functions return OK. + beep() sounds the audible bell on the terminal, if possible; + if not, it calls flash(). - Portability X/Open BSD SYS V - beep Y Y Y - flash Y Y Y + flash() "flashes" the screen, by inverting the foreground and + background of every cell, pausing, and then restoring the + original attributes. + +### Return Value + + These functions return OK. + +### Portability + X/Open BSD SYS V + beep Y Y Y + flash Y Y Y **man-end****************************************************************/ diff --git a/pdcurses/bkgd.c b/pdcurses/bkgd.c index 635245c9..e0864471 100644 --- a/pdcurses/bkgd.c +++ b/pdcurses/bkgd.c @@ -4,54 +4,59 @@ /*man-start************************************************************** - Name: bkgd +bkgd +---- - Synopsis: - int bkgd(chtype ch); - void bkgdset(chtype ch); - chtype getbkgd(WINDOW *win); - int wbkgd(WINDOW *win, chtype ch); - void wbkgdset(WINDOW *win, chtype ch); +### Synopsis - int bkgrnd(const cchar_t *wch); - void bkgrndset(const cchar_t *wch); - int getbkgrnd(cchar_t *wch); - int wbkgrnd(WINDOW *win, const cchar_t *wch); - void wbkgrndset(WINDOW *win, const cchar_t *wch); - int wgetbkgrnd(WINDOW *win, cchar_t *wch); + int bkgd(chtype ch); + void bkgdset(chtype ch); + chtype getbkgd(WINDOW *win); + int wbkgd(WINDOW *win, chtype ch); + void wbkgdset(WINDOW *win, chtype ch); - Description: - bkgdset() and wbkgdset() manipulate the background of a window. - The background is a chtype consisting of any combination of - attributes and a character; it is combined with each chtype - added or inserted to the window by waddch() or winsch(). Only - the attribute part is used to set the background of non-blank - characters, while both character and attributes are used for - blank positions. + int bkgrnd(const cchar_t *wch); + void bkgrndset(const cchar_t *wch); + int getbkgrnd(cchar_t *wch); + int wbkgrnd(WINDOW *win, const cchar_t *wch); + void wbkgrndset(WINDOW *win, const cchar_t *wch); + int wgetbkgrnd(WINDOW *win, cchar_t *wch); - bkgd() and wbkgd() not only change the background, but apply it - immediately to every cell in the window. +### Description - The attributes that are defined with the attrset()/attron() set - of functions take precedence over the background attributes if - there is a conflict (e.g., different color pairs). + bkgdset() and wbkgdset() manipulate the background of a window. + The background is a chtype consisting of any combination of + attributes and a character; it is combined with each chtype + added or inserted to the window by waddch() or winsch(). Only + the attribute part is used to set the background of non-blank + characters, while both character and attributes are used for + blank positions. - Return Value: - bkgd() and wbkgd() return OK, unless the window is NULL, in - which case they return ERR. + bkgd() and wbkgd() not only change the background, but apply it + immediately to every cell in the window. - Portability X/Open BSD SYS V - bkgd Y - 4.0 - bkgdset Y - 4.0 - getbkgd Y - wbkgd Y - 4.0 - wbkgdset Y - 4.0 - bkgrnd Y - bkgrndset Y - getbkgrnd Y - wbkgrnd Y - wbkgrndset Y - wgetbkgrnd Y + The attributes that are defined with the attrset()/attron() set + of functions take precedence over the background attributes if + there is a conflict (e.g., different color pairs). + +### Return Value + + bkgd() and wbkgd() return OK, unless the window is NULL, in + which case they return ERR. + +### Portability + X/Open BSD SYS V + bkgd Y - 4.0 + bkgdset Y - 4.0 + getbkgd Y + wbkgd Y - 4.0 + wbkgdset Y - 4.0 + bkgrnd Y + bkgrndset Y + getbkgrnd Y + wbkgrnd Y + wbkgrndset Y + wgetbkgrnd Y **man-end****************************************************************/ diff --git a/pdcurses/border.c b/pdcurses/border.c index 9117614b..66ed41be 100644 --- a/pdcurses/border.c +++ b/pdcurses/border.c @@ -4,91 +4,96 @@ /*man-start************************************************************** - Name: border +border +------ - Synopsis: - int border(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, - chtype tr, chtype bl, chtype br); - int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts, - chtype bs, chtype tl, chtype tr, chtype bl, chtype br); - int box(WINDOW *win, chtype verch, chtype horch); - int hline(chtype ch, int n); - int vline(chtype ch, int n); - int whline(WINDOW *win, chtype ch, int n); - int wvline(WINDOW *win, chtype ch, int n); - int mvhline(int y, int x, chtype ch, int n); - int mvvline(int y, int x, chtype ch, int n); - int mvwhline(WINDOW *win, int y, int x, chtype ch, int n); - int mvwvline(WINDOW *win, int y, int x, chtype ch, int n); +### Synopsis - int border_set(const cchar_t *ls, const cchar_t *rs, - const cchar_t *ts, const cchar_t *bs, - const cchar_t *tl, const cchar_t *tr, - const cchar_t *bl, const cchar_t *br); - int wborder_set(WINDOW *win, const cchar_t *ls, const cchar_t *rs, - const cchar_t *ts, const cchar_t *bs, - const cchar_t *tl, const cchar_t *tr, - const cchar_t *bl, const cchar_t *br); - int box_set(WINDOW *win, const cchar_t *verch, const cchar_t *horch); - int hline_set(const cchar_t *wch, int n); - int vline_set(const cchar_t *wch, int n); - int whline_set(WINDOW *win, const cchar_t *wch, int n); - int wvline_set(WINDOW *win, const cchar_t *wch, int n); - int mvhline_set(int y, int x, const cchar_t *wch, int n); - int mvvline_set(int y, int x, const cchar_t *wch, int n); - int mvwhline_set(WINDOW *win, int y, int x, const cchar_t *wch, int n); - int mvwvline_set(WINDOW *win, int y, int x, const cchar_t *wch, int n); + int border(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, + chtype tr, chtype bl, chtype br); + int wborder(WINDOW *win, chtype ls, chtype rs, chtype ts, + chtype bs, chtype tl, chtype tr, chtype bl, chtype br); + int box(WINDOW *win, chtype verch, chtype horch); + int hline(chtype ch, int n); + int vline(chtype ch, int n); + int whline(WINDOW *win, chtype ch, int n); + int wvline(WINDOW *win, chtype ch, int n); + int mvhline(int y, int x, chtype ch, int n); + int mvvline(int y, int x, chtype ch, int n); + int mvwhline(WINDOW *win, int y, int x, chtype ch, int n); + int mvwvline(WINDOW *win, int y, int x, chtype ch, int n); - Description: - border(), wborder(), and box() draw a border around the edge of - the window. If any argument is zero, an appropriate default is - used: + int border_set(const cchar_t *ls, const cchar_t *rs, + const cchar_t *ts, const cchar_t *bs, + const cchar_t *tl, const cchar_t *tr, + const cchar_t *bl, const cchar_t *br); + int wborder_set(WINDOW *win, const cchar_t *ls, const cchar_t *rs, + const cchar_t *ts, const cchar_t *bs, + const cchar_t *tl, const cchar_t *tr, + const cchar_t *bl, const cchar_t *br); + int box_set(WINDOW *win, const cchar_t *verch, const cchar_t *horch); + int hline_set(const cchar_t *wch, int n); + int vline_set(const cchar_t *wch, int n); + int whline_set(WINDOW *win, const cchar_t *wch, int n); + int wvline_set(WINDOW *win, const cchar_t *wch, int n); + int mvhline_set(int y, int x, const cchar_t *wch, int n); + int mvvline_set(int y, int x, const cchar_t *wch, int n); + int mvwhline_set(WINDOW *win, int y, int x, const cchar_t *wch, int n); + int mvwvline_set(WINDOW *win, int y, int x, const cchar_t *wch, int n); - ls left side of border ACS_VLINE - rs right side of border ACS_VLINE - ts top side of border ACS_HLINE - bs bottom side of border ACS_HLINE - tl top left corner of border ACS_ULCORNER - tr top right corner of border ACS_URCORNER - bl bottom left corner of border ACS_LLCORNER - br bottom right corner of border ACS_LRCORNER +### Description - hline() and whline() draw a horizontal line, using ch, starting - from the current cursor position. The cursor position does not - change. The line is at most n characters long, or as many as - will fit in the window. + border(), wborder(), and box() draw a border around the edge of + the window. If any argument is zero, an appropriate default is + used: - vline() and wvline() draw a vertical line, using ch, starting - from the current cursor position. The cursor position does not - change. The line is at most n characters long, or as many as - will fit in the window. + ls left side of border ACS_VLINE + rs right side of border ACS_VLINE + ts top side of border ACS_HLINE + bs bottom side of border ACS_HLINE + tl top left corner of border ACS_ULCORNER + tr top right corner of border ACS_URCORNER + bl bottom left corner of border ACS_LLCORNER + br bottom right corner of border ACS_LRCORNER - Return Value: - These functions return OK on success and ERR on error. + hline() and whline() draw a horizontal line, using ch, starting + from the current cursor position. The cursor position does not + change. The line is at most n characters long, or as many as + will fit in the window. - Portability X/Open BSD SYS V - border Y - 4.0 - wborder Y - 4.0 - box Y Y Y - hline Y - 4.0 - vline Y - 4.0 - whline Y - 4.0 - wvline Y - 4.0 - mvhline Y - mvvline Y - mvwhline Y - mvwvline Y - border_set Y - wborder_set Y - box_set Y - hline_set Y - vline_set Y - whline_set Y - wvline_set Y - mvhline_set Y - mvvline_set Y - mvwhline_set Y - mvwvline_set Y + vline() and wvline() draw a vertical line, using ch, starting + from the current cursor position. The cursor position does not + change. The line is at most n characters long, or as many as + will fit in the window. + +### Return Value + + These functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + border Y - 4.0 + wborder Y - 4.0 + box Y Y Y + hline Y - 4.0 + vline Y - 4.0 + whline Y - 4.0 + wvline Y - 4.0 + mvhline Y + mvvline Y + mvwhline Y + mvwvline Y + border_set Y + wborder_set Y + box_set Y + hline_set Y + vline_set Y + whline_set Y + wvline_set Y + mvhline_set Y + mvvline_set Y + mvwhline_set Y + mvwvline_set Y **man-end****************************************************************/ diff --git a/pdcurses/clear.c b/pdcurses/clear.c index 3c384968..7e14b265 100644 --- a/pdcurses/clear.c +++ b/pdcurses/clear.c @@ -4,44 +4,49 @@ /*man-start************************************************************** - Name: clear +clear +----- - Synopsis: - int clear(void); - int wclear(WINDOW *win); - int erase(void); - int werase(WINDOW *win); - int clrtobot(void); - int wclrtobot(WINDOW *win); - int clrtoeol(void); - int wclrtoeol(WINDOW *win); +### Synopsis - Description: - erase() and werase() copy blanks (i.e. the background chtype) to - every cell of the window. + int clear(void); + int wclear(WINDOW *win); + int erase(void); + int werase(WINDOW *win); + int clrtobot(void); + int wclrtobot(WINDOW *win); + int clrtoeol(void); + int wclrtoeol(WINDOW *win); - clear() and wclear() are similar to erase() and werase(), but - they also call clearok() to ensure that the the window is - cleared on the next wrefresh(). +### Description - clrtobot() and wclrtobot() clear the window from the current - cursor position to the end of the window. + erase() and werase() copy blanks (i.e. the background chtype) to + every cell of the window. - clrtoeol() and wclrtoeol() clear the window from the current - cursor position to the end of the current line. + clear() and wclear() are similar to erase() and werase(), but + they also call clearok() to ensure that the the window is + cleared on the next wrefresh(). - Return Value: - All functions return OK on success and ERR on error. + clrtobot() and wclrtobot() clear the window from the current + cursor position to the end of the window. - Portability X/Open BSD SYS V - clear Y Y Y - wclear Y Y Y - erase Y Y Y - werase Y Y Y - clrtobot Y Y Y - wclrtobot Y Y Y - clrtoeol Y Y Y - wclrtoeol Y Y Y + clrtoeol() and wclrtoeol() clear the window from the current + cursor position to the end of the current line. + +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + clear Y Y Y + wclear Y Y Y + erase Y Y Y + werase Y Y Y + clrtobot Y Y Y + wclrtobot Y Y Y + clrtoeol Y Y Y + wclrtoeol Y Y Y **man-end****************************************************************/ diff --git a/pdcurses/color.c b/pdcurses/color.c index fca75950..9c35538c 100644 --- a/pdcurses/color.c +++ b/pdcurses/color.c @@ -4,88 +4,93 @@ /*man-start************************************************************** - Name: color +color +----- - Synopsis: - int start_color(void); - int init_pair(short pair, short fg, short bg); - int init_color(short color, short red, short green, short blue); - bool has_colors(void); - bool can_change_color(void); - int color_content(short color, short *red, short *green, short *blue); - int pair_content(short pair, short *fg, short *bg); +### Synopsis - int assume_default_colors(int f, int b); - int use_default_colors(void); + int start_color(void); + int init_pair(short pair, short fg, short bg); + int init_color(short color, short red, short green, short blue); + bool has_colors(void); + bool can_change_color(void); + int color_content(short color, short *red, short *green, short *blue); + int pair_content(short pair, short *fg, short *bg); - int PDC_set_line_color(short color); + int assume_default_colors(int f, int b); + int use_default_colors(void); - Description: - To use these routines, start_color() must be called, usually - immediately after initscr(). Colors are always used in pairs, - referred to as color-pairs. A color-pair consists of a - foreground color and a background color. A color-pair is - initialized via init_pair(). After initialization, COLOR_PAIR(n) - can be used like any other video attribute. + int PDC_set_line_color(short color); - start_color() initializes eight basic colors (black, red, green, - yellow, blue, magenta, cyan, and white), and two global - variables; COLORS and COLOR_PAIRS (respectively defining the - maximum number of colors and color-pairs the terminal is capable - of displaying). +### Description - init_pair() changes the definition of a color-pair. It takes - three arguments: the number of the color-pair to be redefined, - and the new values of the foreground and background colors. The - pair number must be between 0 and COLOR_PAIRS - 1, inclusive. - The foreground and background must be between 0 and COLORS - 1, - inclusive. If the color pair was previously initialized, the - screen is refreshed, and all occurrences of that color-pair are - changed to the new definition. + To use these routines, start_color() must be called, usually + immediately after initscr(). Colors are always used in pairs, + referred to as color-pairs. A color-pair consists of a + foreground color and a background color. A color-pair is + initialized via init_pair(). After initialization, COLOR_PAIR(n) + can be used like any other video attribute. - has_colors() indicates if the terminal supports, and can - maniplulate color. It returns TRUE or FALSE. + start_color() initializes eight basic colors (black, red, green, + yellow, blue, magenta, cyan, and white), and two global + variables; COLORS and COLOR_PAIRS (respectively defining the + maximum number of colors and color-pairs the terminal is capable + of displaying). - can_change_color() indicates if the terminal has the capability - to change the definition of its colors. + init_pair() changes the definition of a color-pair. It takes + three arguments: the number of the color-pair to be redefined, + and the new values of the foreground and background colors. The + pair number must be between 0 and COLOR_PAIRS - 1, inclusive. + The foreground and background must be between 0 and COLORS - 1, + inclusive. If the color pair was previously initialized, the + screen is refreshed, and all occurrences of that color-pair are + changed to the new definition. - pair_content() is used to determine what the colors of a given - color-pair consist of. + has_colors() indicates if the terminal supports, and can + maniplulate color. It returns TRUE or FALSE. - assume_default_colors() and use_default_colors() emulate the - ncurses extensions of the same names. assume_default_colors(f, - b) is essentially the same as init_pair(0, f, b) (which isn't - allowed); it redefines the default colors. use_default_colors() - allows the use of -1 as a foreground or background color with - init_pair(), and calls assume_default_colors(-1, -1); -1 - represents the foreground or background color that the terminal - had at startup. If the environment variable PDC_ORIGINAL_COLORS - is set at the time start_color() is called, that's equivalent to - calling use_default_colors(). + can_change_color() indicates if the terminal has the capability + to change the definition of its colors. - PDC_set_line_color() is used to set the color, globally, for - the color of the lines drawn for the attributes: A_UNDERLINE, - A_OVERLINE, A_LEFTLINE and A_RIGHTLINE. A value of -1 (the - default) indicates that the current foreground color should be - used. + pair_content() is used to determine what the colors of a given + color-pair consist of. - NOTE: COLOR_PAIR() and PAIR_NUMBER() are implemented as macros. + assume_default_colors() and use_default_colors() emulate the + ncurses extensions of the same names. assume_default_colors(f, + b) is essentially the same as init_pair(0, f, b) (which isn't + allowed); it redefines the default colors. use_default_colors() + allows the use of -1 as a foreground or background color with + init_pair(), and calls assume_default_colors(-1, -1); -1 + represents the foreground or background color that the terminal + had at startup. If the environment variable PDC_ORIGINAL_COLORS + is set at the time start_color() is called, that's equivalent to + calling use_default_colors(). - Return Value: - All functions return OK on success and ERR on error, except for - has_colors() and can_change_colors(), which return TRUE or FALSE. + PDC_set_line_color() is used to set the color, globally, for + the color of the lines drawn for the attributes: A_UNDERLINE, + A_OVERLINE, A_LEFTLINE and A_RIGHTLINE. A value of -1 (the + default) indicates that the current foreground color should be + used. - Portability X/Open BSD SYS V - start_color Y - 3.2 - init_pair Y - 3.2 - init_color Y - 3.2 - has_colors Y - 3.2 - can_change_color Y - 3.2 - color_content Y - 3.2 - pair_content Y - 3.2 - assume_default_colors - - - - use_default_colors - - - - PDC_set_line_color - - - + NOTE: COLOR_PAIR() and PAIR_NUMBER() are implemented as macros. + +### Return Value + + All functions return OK on success and ERR on error, except for + has_colors() and can_change_colors(), which return TRUE or FALSE. + +### Portability + X/Open BSD SYS V + start_color Y - 3.2 + init_pair Y - 3.2 + init_color Y - 3.2 + has_colors Y - 3.2 + can_change_color Y - 3.2 + color_content Y - 3.2 + pair_content Y - 3.2 + assume_default_colors - - - + use_default_colors - - - + PDC_set_line_color - - - **man-end****************************************************************/ diff --git a/pdcurses/debug.c b/pdcurses/debug.c index 77496d3b..f2605c7c 100644 --- a/pdcurses/debug.c +++ b/pdcurses/debug.c @@ -4,26 +4,30 @@ /*man-start************************************************************** - Name: debug +debug +----- - Synopsis: - void traceon(void); - void traceoff(void); - void PDC_debug(const char *, ...); +### Synopsis - Description: - traceon() and traceoff() toggle the recording of debugging - information to the file "trace". Although not standard, similar - functions are in some other curses implementations. + void traceon(void); + void traceoff(void); + void PDC_debug(const char *, ...); - PDC_debug() is the function that writes to the file, based on - whether traceon() has been called. It's used from the PDC_LOG() - macro. +### Description - Portability X/Open BSD SYS V - traceon - - - - traceoff - - - - PDC_debug - - - + traceon() and traceoff() toggle the recording of debugging + information to the file "trace". Although not standard, similar + functions are in some other curses implementations. + + PDC_debug() is the function that writes to the file, based on + whether traceon() has been called. It's used from the PDC_LOG() + macro. + +### Portability + X/Open BSD SYS V + traceon - - - + traceoff - - - + PDC_debug - - - **man-end****************************************************************/ diff --git a/pdcurses/delch.c b/pdcurses/delch.c index f99a65bb..2dfc4371 100644 --- a/pdcurses/delch.c +++ b/pdcurses/delch.c @@ -4,29 +4,34 @@ /*man-start************************************************************** - Name: delch +delch +----- - Synopsis: - int delch(void); - int wdelch(WINDOW *win); - int mvdelch(int y, int x); - int mvwdelch(WINDOW *win, int y, int x); +### Synopsis - Description: - The character under the cursor in the window is deleted. All - characters to the right on the same line are moved to the left - one position and the last character on the line is filled with - a blank. The cursor position does not change (after moving to - y, x if coordinates are specified). + int delch(void); + int wdelch(WINDOW *win); + int mvdelch(int y, int x); + int mvwdelch(WINDOW *win, int y, int x); - Return Value: - All functions return OK on success and ERR on error. +### Description - Portability X/Open BSD SYS V - delch Y Y Y - wdelch Y Y Y - mvdelch Y Y Y - mvwdelch Y Y Y + The character under the cursor in the window is deleted. All + characters to the right on the same line are moved to the left + one position and the last character on the line is filled with + a blank. The cursor position does not change (after moving to + y, x if coordinates are specified). + +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + delch Y Y Y + wdelch Y Y Y + mvdelch Y Y Y + mvwdelch Y Y Y **man-end****************************************************************/ diff --git a/pdcurses/deleteln.c b/pdcurses/deleteln.c index 2c72b74a..f94b4925 100644 --- a/pdcurses/deleteln.c +++ b/pdcurses/deleteln.c @@ -4,47 +4,52 @@ /*man-start************************************************************** - Name: deleteln +deleteln +-------- - Synopsis: - int deleteln(void); - int wdeleteln(WINDOW *win); - int insdelln(int n); - int winsdelln(WINDOW *win, int n); - int insertln(void); - int winsertln(WINDOW *win); +### Synopsis - int mvdeleteln(int y, int x); - int mvwdeleteln(WINDOW *win, int y, int x); - int mvinsertln(int y, int x); - int mvwinsertln(WINDOW *win, int y, int x); + int deleteln(void); + int wdeleteln(WINDOW *win); + int insdelln(int n); + int winsdelln(WINDOW *win, int n); + int insertln(void); + int winsertln(WINDOW *win); - Description: - With the deleteln() and wdeleteln() functions, the line under - the cursor in the window is deleted. All lines below the - current line are moved up one line. The bottom line of the - window is cleared. The cursor position does not change. + int mvdeleteln(int y, int x); + int mvwdeleteln(WINDOW *win, int y, int x); + int mvinsertln(int y, int x); + int mvwinsertln(WINDOW *win, int y, int x); - With the insertln() and winsertn() functions, a blank line is - inserted above the current line and the bottom line is lost. +### Description - mvdeleteln(), mvwdeleteln(), mvinsertln() and mvwinsertln() - allow moving the cursor and inserting/deleting in one call. + With the deleteln() and wdeleteln() functions, the line under + the cursor in the window is deleted. All lines below the + current line are moved up one line. The bottom line of the + window is cleared. The cursor position does not change. - Return Value: - All functions return OK on success and ERR on error. + With the insertln() and winsertn() functions, a blank line is + inserted above the current line and the bottom line is lost. - Portability X/Open BSD SYS V - deleteln Y Y Y - wdeleteln Y Y Y - mvdeleteln - - - - mvwdeleteln - - - - insdelln Y - 4.0 - winsdelln Y - 4.0 - insertln Y Y Y - winsertln Y Y Y - mvinsertln - - - - mvwinsertln - - - + mvdeleteln(), mvwdeleteln(), mvinsertln() and mvwinsertln() + allow moving the cursor and inserting/deleting in one call. + +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + deleteln Y Y Y + wdeleteln Y Y Y + mvdeleteln - - - + mvwdeleteln - - - + insdelln Y - 4.0 + winsdelln Y - 4.0 + insertln Y Y Y + winsertln Y Y Y + mvinsertln - - - + mvwinsertln - - - **man-end****************************************************************/ diff --git a/pdcurses/getch.c b/pdcurses/getch.c index 39a5babc..2339e51b 100644 --- a/pdcurses/getch.c +++ b/pdcurses/getch.c @@ -4,78 +4,83 @@ /*man-start************************************************************** - Name: getch +getch +----- - Synopsis: - int getch(void); - int wgetch(WINDOW *win); - int mvgetch(int y, int x); - int mvwgetch(WINDOW *win, int y, int x); - int ungetch(int ch); - int flushinp(void); +### Synopsis - int get_wch(wint_t *wch); - int wget_wch(WINDOW *win, wint_t *wch); - int mvget_wch(int y, int x, wint_t *wch); - int mvwget_wch(WINDOW *win, int y, int x, wint_t *wch); - int unget_wch(const wchar_t wch); + int getch(void); + int wgetch(WINDOW *win); + int mvgetch(int y, int x); + int mvwgetch(WINDOW *win, int y, int x); + int ungetch(int ch); + int flushinp(void); - unsigned long PDC_get_key_modifiers(void); - int PDC_save_key_modifiers(bool flag); - int PDC_return_key_modifiers(bool flag); + int get_wch(wint_t *wch); + int wget_wch(WINDOW *win, wint_t *wch); + int mvget_wch(int y, int x, wint_t *wch); + int mvwget_wch(WINDOW *win, int y, int x, wint_t *wch); + int unget_wch(const wchar_t wch); - Description: - With the getch(), wgetch(), mvgetch(), and mvwgetch() functions, - a character is read from the terminal associated with the window. - In nodelay mode, if there is no input waiting, the value ERR is - returned. In delay mode, the program will hang until the system - passes text through to the program. Depending on the setting of - cbreak(), this will be after one character or after the first - newline. Unless noecho() has been set, the character will also - be echoed into the designated window. + unsigned long PDC_get_key_modifiers(void); + int PDC_save_key_modifiers(bool flag); + int PDC_return_key_modifiers(bool flag); - If keypad() is TRUE, and a function key is pressed, the token for - that function key will be returned instead of the raw characters. - Possible function keys are defined in with integers - beginning with 0401, whose names begin with KEY_. +### Description - If nodelay(win, TRUE) has been called on the window and no input - is waiting, the value ERR is returned. + With the getch(), wgetch(), mvgetch(), and mvwgetch() functions, + a character is read from the terminal associated with the window. + In nodelay mode, if there is no input waiting, the value ERR is + returned. In delay mode, the program will hang until the system + passes text through to the program. Depending on the setting of + cbreak(), this will be after one character or after the first + newline. Unless noecho() has been set, the character will also + be echoed into the designated window. - ungetch() places ch back onto the input queue to be returned by - the next call to wgetch(). + If keypad() is TRUE, and a function key is pressed, the token for + that function key will be returned instead of the raw characters. + Possible function keys are defined in with integers + beginning with 0401, whose names begin with KEY_. - flushinp() throws away any type-ahead that has been typed by the - user and has not yet been read by the program. + If nodelay(win, TRUE) has been called on the window and no input + is waiting, the value ERR is returned. - PDC_get_key_modifiers() returns the keyboard modifiers (shift, - control, alt, numlock) effective at the time of the last getch() - call, if PDC_save_key_modifiers(TRUE) has been called before the - getch(). Use the macros PDC_KEY_MODIFIER_* to determine which - modifier(s) were set. PDC_return_key_modifiers() tells getch() - to return modifier keys pressed alone as keystrokes (KEY_ALT_L, - etc.). These may not work on all platforms. + ungetch() places ch back onto the input queue to be returned by + the next call to wgetch(). - NOTE: getch() and ungetch() are implemented as macros, to avoid - conflict with many DOS compiler's runtime libraries. + flushinp() throws away any type-ahead that has been typed by the + user and has not yet been read by the program. - Return Value: - These functions return ERR or the value of the character, meta - character or function key token. + PDC_get_key_modifiers() returns the keyboard modifiers (shift, + control, alt, numlock) effective at the time of the last getch() + call, if PDC_save_key_modifiers(TRUE) has been called before the + getch(). Use the macros PDC_KEY_MODIFIER_* to determine which + modifier(s) were set. PDC_return_key_modifiers() tells getch() + to return modifier keys pressed alone as keystrokes (KEY_ALT_L, + etc.). These may not work on all platforms. - Portability X/Open BSD SYS V - getch Y Y Y - wgetch Y Y Y - mvgetch Y Y Y - mvwgetch Y Y Y - ungetch Y Y Y - flushinp Y Y Y - get_wch Y - wget_wch Y - mvget_wch Y - mvwget_wch Y - unget_wch Y - PDC_get_key_modifiers - - - + NOTE: getch() and ungetch() are implemented as macros, to avoid + conflict with many DOS compiler's runtime libraries. + +### Return Value + + These functions return ERR or the value of the character, meta + character or function key token. + +### Portability + X/Open BSD SYS V + getch Y Y Y + wgetch Y Y Y + mvgetch Y Y Y + mvwgetch Y Y Y + ungetch Y Y Y + flushinp Y Y Y + get_wch Y + wget_wch Y + mvget_wch Y + mvwget_wch Y + unget_wch Y + PDC_get_key_modifiers - - - **man-end****************************************************************/ diff --git a/pdcurses/getstr.c b/pdcurses/getstr.c index b0269bb0..921a3411 100644 --- a/pdcurses/getstr.c +++ b/pdcurses/getstr.c @@ -4,61 +4,66 @@ /*man-start************************************************************** - Name: getstr +getstr +------ - Synopsis: - int getstr(char *str); - int wgetstr(WINDOW *win, char *str); - int mvgetstr(int y, int x, char *str); - int mvwgetstr(WINDOW *win, int y, int x, char *str); - int getnstr(char *str, int n); - int wgetnstr(WINDOW *win, char *str, int n); - int mvgetnstr(int y, int x, char *str, int n); - int mvwgetnstr(WINDOW *win, int y, int x, char *str, int n); +### Synopsis - int get_wstr(wint_t *wstr); - int wget_wstr(WINDOW *win, wint_t *wstr); - int mvget_wstr(int y, int x, wint_t *wstr); - int mvwget_wstr(WINDOW *win, int, int, wint_t *wstr); - int getn_wstr(wint_t *wstr, int n); - int wgetn_wstr(WINDOW *win, wint_t *wstr, int n); - int mvgetn_wstr(int y, int x, wint_t *wstr, int n); - int mvwgetn_wstr(WINDOW *win, int y, int x, wint_t *wstr, int n); + int getstr(char *str); + int wgetstr(WINDOW *win, char *str); + int mvgetstr(int y, int x, char *str); + int mvwgetstr(WINDOW *win, int y, int x, char *str); + int getnstr(char *str, int n); + int wgetnstr(WINDOW *win, char *str, int n); + int mvgetnstr(int y, int x, char *str, int n); + int mvwgetnstr(WINDOW *win, int y, int x, char *str, int n); - Description: - These routines call wgetch() repeatedly to build a string, - interpreting erase and kill characters along the way, until a - newline or carriage return is received. When PDCurses is built - with wide-character support enabled, the narrow-character - functions convert the wgetch()'d values into a multibyte string - in the current locale before returning it. The resulting string - is placed in the area pointed to by *str. The routines with n as - the last argument read at most n characters. + int get_wstr(wint_t *wstr); + int wget_wstr(WINDOW *win, wint_t *wstr); + int mvget_wstr(int y, int x, wint_t *wstr); + int mvwget_wstr(WINDOW *win, int, int, wint_t *wstr); + int getn_wstr(wint_t *wstr, int n); + int wgetn_wstr(WINDOW *win, wint_t *wstr, int n); + int mvgetn_wstr(int y, int x, wint_t *wstr, int n); + int mvwgetn_wstr(WINDOW *win, int y, int x, wint_t *wstr, int n); - Note that there's no way to know how long the buffer passed to - wgetstr() is, so use wgetnstr() to avoid buffer overflows. +### Description - Return Value: - This functions return ERR on failure or any other value on - success. + These routines call wgetch() repeatedly to build a string, + interpreting erase and kill characters along the way, until a + newline or carriage return is received. When PDCurses is built + with wide-character support enabled, the narrow-character + functions convert the wgetch()'d values into a multibyte string + in the current locale before returning it. The resulting string + is placed in the area pointed to by *str. The routines with n as + the last argument read at most n characters. - Portability X/Open BSD SYS V - getstr Y Y Y - wgetstr Y Y Y - mvgetstr Y Y Y - mvwgetstr Y Y Y - getnstr Y - 4.0 - wgetnstr Y - 4.0 - mvgetnstr Y - - - mvwgetnstr Y - - - get_wstr Y - wget_wstr Y - mvget_wstr Y - mvwget_wstr Y - getn_wstr Y - wgetn_wstr Y - mvgetn_wstr Y - mvwgetn_wstr Y + Note that there's no way to know how long the buffer passed to + wgetstr() is, so use wgetnstr() to avoid buffer overflows. + +### Return Value + + These functions return ERR on failure or any other value on + success. + +### Portability + X/Open BSD SYS V + getstr Y Y Y + wgetstr Y Y Y + mvgetstr Y Y Y + mvwgetstr Y Y Y + getnstr Y - 4.0 + wgetnstr Y - 4.0 + mvgetnstr Y - - + mvwgetnstr Y - - + get_wstr Y + wget_wstr Y + mvget_wstr Y + mvwget_wstr Y + getn_wstr Y + wgetn_wstr Y + mvgetn_wstr Y + mvwgetn_wstr Y **man-end****************************************************************/ diff --git a/pdcurses/getyx.c b/pdcurses/getyx.c index f24d08fe..a11ba547 100644 --- a/pdcurses/getyx.c +++ b/pdcurses/getyx.c @@ -4,67 +4,71 @@ /*man-start************************************************************** - Name: getyx +getyx +----- - Synopsis: - void getyx(WINDOW *win, int y, int x); - void getparyx(WINDOW *win, int y, int x); - void getbegyx(WINDOW *win, int y, int x); - void getmaxyx(WINDOW *win, int y, int x); +### Synopsis - void getsyx(int y, int x); - int setsyx(int y, int x); + void getyx(WINDOW *win, int y, int x); + void getparyx(WINDOW *win, int y, int x); + void getbegyx(WINDOW *win, int y, int x); + void getmaxyx(WINDOW *win, int y, int x); - int getbegy(WINDOW *win); - int getbegx(WINDOW *win); - int getcury(WINDOW *win); - int getcurx(WINDOW *win); - int getpary(WINDOW *win); - int getparx(WINDOW *win); - int getmaxy(WINDOW *win); - int getmaxx(WINDOW *win); + void getsyx(int y, int x); + int setsyx(int y, int x); - Description: - The getyx() macro (defined in curses.h -- the prototypes here - are merely illustrative) puts the current cursor position of the - specified window into y and x. getbegyx() and getmaxyx() return - the starting coordinates and size of the specified window, - respectively. getparyx() returns the starting coordinates of the - parent's window, if the specified window is a subwindow; - otherwise it sets y and x to -1. These are all macros. + int getbegy(WINDOW *win); + int getbegx(WINDOW *win); + int getcury(WINDOW *win); + int getcurx(WINDOW *win); + int getpary(WINDOW *win); + int getparx(WINDOW *win); + int getmaxy(WINDOW *win); + int getmaxx(WINDOW *win); - getsyx() gets the coordinates of the virtual screen cursor, and - stores them in y and x. If leaveok() is TRUE, it returns -1, -1. - If lines have been removed with ripoffline(), then getsyx() - includes these lines in its count; so, the returned y and x - values should only be used with setsyx(). +### Description - setsyx() sets the virtual screen cursor to the y, x coordinates. - If y, x are -1, -1, leaveok() is set TRUE. + The getyx() macro (defined in curses.h -- the prototypes here + are merely illustrative) puts the current cursor position of the + specified window into y and x. getbegyx() and getmaxyx() return + the starting coordinates and size of the specified window, + respectively. getparyx() returns the starting coordinates of the + parent's window, if the specified window is a subwindow; + otherwise it sets y and x to -1. These are all macros. - getsyx() and setsyx() are meant to be used by a library routine - that manipulates curses windows without altering the position of - the cursor. Note that getsyx() is defined only as a macro. + getsyx() gets the coordinates of the virtual screen cursor, and + stores them in y and x. If leaveok() is TRUE, it returns -1, -1. + If lines have been removed with ripoffline(), then getsyx() + includes these lines in its count; so, the returned y and x + values should only be used with setsyx(). - getbegy(), getbegx(), getcurx(), getcury(), getmaxy(), - getmaxx(), getpary(), and getparx() return the appropriate - coordinate or size values, or ERR in the case of a NULL window. + setsyx() sets the virtual screen cursor to the y, x coordinates. + If y, x are -1, -1, leaveok() is set TRUE. - Portability X/Open BSD SYS V - getyx Y Y Y - getparyx - - 4.0 - getbegyx - - 3.0 - getmaxyx - - 3.0 - getsyx - - 3.0 - setsyx - - 3.0 - getbegy - - - - getbegx - - - - getcury - - - - getcurx - - - - getpary - - - - getparx - - - - getmaxy - - - - getmaxx - - - + getsyx() and setsyx() are meant to be used by a library routine + that manipulates curses windows without altering the position of + the cursor. Note that getsyx() is defined only as a macro. + + getbegy(), getbegx(), getcurx(), getcury(), getmaxy(), + getmaxx(), getpary(), and getparx() return the appropriate + coordinate or size values, or ERR in the case of a NULL window. + +### Portability + X/Open BSD SYS V + getyx Y Y Y + getparyx - - 4.0 + getbegyx - - 3.0 + getmaxyx - - 3.0 + getsyx - - 3.0 + setsyx - - 3.0 + getbegy - - - + getbegx - - - + getcury - - - + getcurx - - - + getpary - - - + getparx - - - + getmaxy - - - + getmaxx - - - **man-end****************************************************************/ diff --git a/pdcurses/inch.c b/pdcurses/inch.c index 557b9173..97259b95 100644 --- a/pdcurses/inch.c +++ b/pdcurses/inch.c @@ -4,39 +4,43 @@ /*man-start************************************************************** - Name: inch +inch +---- - Synopsis: - chtype inch(void); - chtype winch(WINDOW *win); - chtype mvinch(int y, int x); - chtype mvwinch(WINDOW *win, int y, int x); +### Synopsis - int in_wch(cchar_t *wcval); - int win_wch(WINDOW *win, cchar_t *wcval); - int mvin_wch(int y, int x, cchar_t *wcval); - int mvwin_wch(WINDOW *win, int y, int x, cchar_t *wcval); + chtype inch(void); + chtype winch(WINDOW *win); + chtype mvinch(int y, int x); + chtype mvwinch(WINDOW *win, int y, int x); - Description: - The inch() functions retrieve the character and attribute from - the current or specified window position, in the form of a - chtype. If a NULL window is specified, (chtype)ERR is returned. + int in_wch(cchar_t *wcval); + int win_wch(WINDOW *win, cchar_t *wcval); + int mvin_wch(int y, int x, cchar_t *wcval); + int mvwin_wch(WINDOW *win, int y, int x, cchar_t *wcval); - The in_wch() functions are the wide-character versions; instead - of returning a chtype, they store a cchar_t at the address - specified by wcval, and return OK or ERR. (No value is stored - when ERR is returned.) Note that in PDCurses, chtype and cchar_t - are the same. +### Description - Portability X/Open BSD SYS V - inch Y Y Y - winch Y Y Y - mvinch Y Y Y - mvwinch Y Y Y - in_wch Y - win_wch Y - mvin_wch Y - mvwin_wch Y + The inch() functions retrieve the character and attribute from + the current or specified window position, in the form of a + chtype. If a NULL window is specified, (chtype)ERR is returned. + + The in_wch() functions are the wide-character versions; instead + of returning a chtype, they store a cchar_t at the address + specified by wcval, and return OK or ERR. (No value is stored + when ERR is returned.) Note that in PDCurses, chtype and cchar_t + are the same. + +### Portability + X/Open BSD SYS V + inch Y Y Y + winch Y Y Y + mvinch Y Y Y + mvwinch Y Y Y + in_wch Y + win_wch Y + mvin_wch Y + mvwin_wch Y **man-end****************************************************************/ diff --git a/pdcurses/inchstr.c b/pdcurses/inchstr.c index 1d92255a..b107fb0e 100644 --- a/pdcurses/inchstr.c +++ b/pdcurses/inchstr.c @@ -4,53 +4,58 @@ /*man-start************************************************************** - Name: inchstr +inchstr +------- - Synopsis: - int inchstr(chtype *ch); - int inchnstr(chtype *ch, int n); - int winchstr(WINDOW *win, chtype *ch); - int winchnstr(WINDOW *win, chtype *ch, int n); - int mvinchstr(int y, int x, chtype *ch); - int mvinchnstr(int y, int x, chtype *ch, int n); - int mvwinchstr(WINDOW *, int y, int x, chtype *ch); - int mvwinchnstr(WINDOW *, int y, int x, chtype *ch, int n); +### Synopsis - int in_wchstr(cchar_t *wch); - int in_wchnstr(cchar_t *wch, int n); - int win_wchstr(WINDOW *win, cchar_t *wch); - int win_wchnstr(WINDOW *win, cchar_t *wch, int n); - int mvin_wchstr(int y, int x, cchar_t *wch); - int mvin_wchnstr(int y, int x, cchar_t *wch, int n); - int mvwin_wchstr(WINDOW *win, int y, int x, cchar_t *wch); - int mvwin_wchnstr(WINDOW *win, int y, int x, cchar_t *wch, int n); + int inchstr(chtype *ch); + int inchnstr(chtype *ch, int n); + int winchstr(WINDOW *win, chtype *ch); + int winchnstr(WINDOW *win, chtype *ch, int n); + int mvinchstr(int y, int x, chtype *ch); + int mvinchnstr(int y, int x, chtype *ch, int n); + int mvwinchstr(WINDOW *, int y, int x, chtype *ch); + int mvwinchnstr(WINDOW *, int y, int x, chtype *ch, int n); - Description: - These routines read a chtype or cchar_t string from the window, - starting at the current or specified position, and ending at the - right margin, or after n elements, whichever is less. + int in_wchstr(cchar_t *wch); + int in_wchnstr(cchar_t *wch, int n); + int win_wchstr(WINDOW *win, cchar_t *wch); + int win_wchnstr(WINDOW *win, cchar_t *wch, int n); + int mvin_wchstr(int y, int x, cchar_t *wch); + int mvin_wchnstr(int y, int x, cchar_t *wch, int n); + int mvwin_wchstr(WINDOW *win, int y, int x, cchar_t *wch); + int mvwin_wchnstr(WINDOW *win, int y, int x, cchar_t *wch, int n); - Return Value: - All functions return the number of elements read, or ERR on - error. +### Description - Portability X/Open BSD SYS V - inchstr Y - 4.0 - winchstr Y - 4.0 - mvinchstr Y - 4.0 - mvwinchstr Y - 4.0 - inchnstr Y - 4.0 - winchnstr Y - 4.0 - mvinchnstr Y - 4.0 - mvwinchnstr Y - 4.0 - in_wchstr Y - win_wchstr Y - mvin_wchstr Y - mvwin_wchstr Y - in_wchnstr Y - win_wchnstr Y - mvin_wchnstr Y - mvwin_wchnstr Y + These routines read a chtype or cchar_t string from the window, + starting at the current or specified position, and ending at the + right margin, or after n elements, whichever is less. + +### Return Value + + All functions return the number of elements read, or ERR on + error. + +### Portability + X/Open BSD SYS V + inchstr Y - 4.0 + winchstr Y - 4.0 + mvinchstr Y - 4.0 + mvwinchstr Y - 4.0 + inchnstr Y - 4.0 + winchnstr Y - 4.0 + mvinchnstr Y - 4.0 + mvwinchnstr Y - 4.0 + in_wchstr Y + win_wchstr Y + mvin_wchstr Y + mvwin_wchstr Y + in_wchnstr Y + win_wchnstr Y + mvin_wchnstr Y + mvwin_wchnstr Y **man-end****************************************************************/ diff --git a/pdcurses/initscr.c b/pdcurses/initscr.c index b46d2d39..6099cc45 100644 --- a/pdcurses/initscr.c +++ b/pdcurses/initscr.c @@ -4,85 +4,90 @@ /*man-start************************************************************** - Name: initscr +initscr +------- - Synopsis: - WINDOW *initscr(void); - WINDOW *Xinitscr(int argc, char *argv[]); - int endwin(void); - bool isendwin(void); - SCREEN *newterm(const char *type, FILE *outfd, FILE *infd); - SCREEN *set_term(SCREEN *new); - void delscreen(SCREEN *sp); +### Synopsis - int resize_term(int nlines, int ncols); - bool is_termresized(void); - const char *curses_version(void); + WINDOW *initscr(void); + WINDOW *Xinitscr(int argc, char *argv[]); + int endwin(void); + bool isendwin(void); + SCREEN *newterm(const char *type, FILE *outfd, FILE *infd); + SCREEN *set_term(SCREEN *new); + void delscreen(SCREEN *sp); - Description: - initscr() should be the first curses routine called. It will - initialize all curses data structures, and arrange that the - first call to refresh() will clear the screen. In case of - error, initscr() will write a message to standard error and end - the program. + int resize_term(int nlines, int ncols); + bool is_termresized(void); + const char *curses_version(void); - endwin() should be called before exiting or escaping from curses - mode temporarily. It will restore tty modes, move the cursor to - the lower left corner of the screen and reset the terminal into - the proper non-visual mode. To resume curses after a temporary - escape, call refresh() or doupdate(). +### Description - isendwin() returns TRUE if endwin() has been called without a - subsequent refresh, unless SP is NULL. + initscr() should be the first curses routine called. It will + initialize all curses data structures, and arrange that the + first call to refresh() will clear the screen. In case of + error, initscr() will write a message to standard error and end + the program. - In some implementations of curses, newterm() allows the use of - multiple terminals. Here, it's just an alternative interface for - initscr(). It always returns SP, or NULL. + endwin() should be called before exiting or escaping from curses + mode temporarily. It will restore tty modes, move the cursor to + the lower left corner of the screen and reset the terminal into + the proper non-visual mode. To resume curses after a temporary + escape, call refresh() or doupdate(). - delscreen() frees the memory allocated by newterm() or - initscr(), since it's not freed by endwin(). This function is - usually not needed. In PDCurses, the parameter must be the - value of SP, and delscreen() sets SP to NULL. + isendwin() returns TRUE if endwin() has been called without a + subsequent refresh, unless SP is NULL. - set_term() does nothing meaningful in PDCurses, but is included - for compatibility with other curses implementations. + In some implementations of curses, newterm() allows the use of + multiple terminals. Here, it's just an alternative interface for + initscr(). It always returns SP, or NULL. - resize_term() is effectively two functions: When called with - nonzero values for nlines and ncols, it attempts to resize the - screen to the given size. When called with (0, 0), it merely - adjusts the internal structures to match the current size after - the screen is resized by the user. On the currently supported - platforms, this functionality is mutually exclusive: X11 allows - user resizing, while DOS, OS/2 and Win32 allow programmatic - resizing. If you want to support user resizing, you should check - for getch() returning KEY_RESIZE, and/or call is_termresized() - at appropriate times; if either condition occurs, call - resize_term(0, 0). Then, with either user or programmatic - resizing, you'll have to resize any windows you've created, as - appropriate; resize_term() only handles stdscr and curscr. + delscreen() frees the memory allocated by newterm() or + initscr(), since it's not freed by endwin(). This function is + usually not needed. In PDCurses, the parameter must be the + value of SP, and delscreen() sets SP to NULL. - is_termresized() returns TRUE if the curses screen has been - resized by the user, and a call to resize_term() is needed. - Checking for KEY_RESIZE is generally preferable, unless you're - not handling the keyboard. + set_term() does nothing meaningful in PDCurses, but is included + for compatibility with other curses implementations. - curses_version() returns a string describing the version of - PDCurses. + resize_term() is effectively two functions: When called with + nonzero values for nlines and ncols, it attempts to resize the + screen to the given size. When called with (0, 0), it merely + adjusts the internal structures to match the current size after + the screen is resized by the user. On the currently supported + platforms, this functionality is mutually exclusive: X11 allows + user resizing, while DOS, OS/2 and Win32 allow programmatic + resizing. If you want to support user resizing, you should check + for getch() returning KEY_RESIZE, and/or call is_termresized() + at appropriate times; if either condition occurs, call + resize_term(0, 0). Then, with either user or programmatic + resizing, you'll have to resize any windows you've created, as + appropriate; resize_term() only handles stdscr and curscr. - Return Value: - All functions return NULL on error, except endwin(), which - returns ERR on error. + is_termresized() returns TRUE if the curses screen has been + resized by the user, and a call to resize_term() is needed. + Checking for KEY_RESIZE is generally preferable, unless you're + not handling the keyboard. - Portability X/Open BSD SYS V - initscr Y Y Y - endwin Y Y Y - isendwin Y - 3.0 - newterm Y - Y - set_term Y - Y - delscreen Y - 4.0 - resize_term - - - - is_termresized - - - - curses_version - - - + curses_version() returns a string describing the version of + PDCurses. + +### Return Value + + All functions return NULL on error, except endwin(), which + returns ERR on error. + +### Portability + X/Open BSD SYS V + initscr Y Y Y + endwin Y Y Y + isendwin Y - 3.0 + newterm Y - Y + set_term Y - Y + delscreen Y - 4.0 + resize_term - - - + is_termresized - - - + curses_version - - - **man-end****************************************************************/ diff --git a/pdcurses/inopts.c b/pdcurses/inopts.c index 3157edce..166cb470 100644 --- a/pdcurses/inopts.c +++ b/pdcurses/inopts.c @@ -4,111 +4,116 @@ /*man-start************************************************************** - Name: inopts +inopts +------ - Synopsis: - int cbreak(void); - int nocbreak(void); - int echo(void); - int noecho(void); - int halfdelay(int tenths); - int intrflush(WINDOW *win, bool bf); - int keypad(WINDOW *win, bool bf); - int meta(WINDOW *win, bool bf); - int nl(void); - int nonl(void); - int nodelay(WINDOW *win, bool bf); - int notimeout(WINDOW *win, bool bf); - int raw(void); - int noraw(void); - void noqiflush(void); - void qiflush(void); - void timeout(int delay); - void wtimeout(WINDOW *win, int delay); - int typeahead(int fildes); +### Synopsis - int crmode(void); - int nocrmode(void); + int cbreak(void); + int nocbreak(void); + int echo(void); + int noecho(void); + int halfdelay(int tenths); + int intrflush(WINDOW *win, bool bf); + int keypad(WINDOW *win, bool bf); + int meta(WINDOW *win, bool bf); + int nl(void); + int nonl(void); + int nodelay(WINDOW *win, bool bf); + int notimeout(WINDOW *win, bool bf); + int raw(void); + int noraw(void); + void noqiflush(void); + void qiflush(void); + void timeout(int delay); + void wtimeout(WINDOW *win, int delay); + int typeahead(int fildes); - Description: - cbreak() and nocbreak() toggle cbreak mode. In cbreak mode, - characters typed by the user are made available immediately, and - erase/kill character processing is not performed. In nocbreak - mode, typed characters are buffered until a newline or carriage - return. Interrupt and flow control characters are unaffected by - this mode. PDCurses always starts in cbreak mode. + int crmode(void); + int nocrmode(void); - echo() and noecho() control whether typed characters are echoed - by the input routine. Initially, input characters are echoed. - Subsequent calls to echo() and noecho() do not flush type-ahead. +### Description - halfdelay() is similar to cbreak(), but allows for a time limit - to be specified, in tenths of a second. This causes getch() to - block for that period before returning ERR if no key has been - received. tenths must be between 1 and 255. + cbreak() and nocbreak() toggle cbreak mode. In cbreak mode, + characters typed by the user are made available immediately, and + erase/kill character processing is not performed. In nocbreak + mode, typed characters are buffered until a newline or carriage + return. Interrupt and flow control characters are unaffected by + this mode. PDCurses always starts in cbreak mode. - keypad() controls whether getch() returns function/special keys - as single key codes (e.g., the left arrow key as KEY_LEFT). Per - X/Open, the default for keypad mode is OFF. You'll probably want - it on. With keypad mode off, if a special key is pressed, - getch() does nothing or returns ERR. + echo() and noecho() control whether typed characters are echoed + by the input routine. Initially, input characters are echoed. + Subsequent calls to echo() and noecho() do not flush type-ahead. - nodelay() controls whether wgetch() is a non-blocking call. If - the option is enabled, and no input is ready, wgetch() will - return ERR. If disabled, wgetch() will hang until input is - ready. + halfdelay() is similar to cbreak(), but allows for a time limit + to be specified, in tenths of a second. This causes getch() to + block for that period before returning ERR if no key has been + received. tenths must be between 1 and 255. - nl() enables the translation of a carriage return into a newline - on input. nonl() disables this. Initially, the translation does - occur. + keypad() controls whether getch() returns function/special keys + as single key codes (e.g., the left arrow key as KEY_LEFT). Per + X/Open, the default for keypad mode is OFF. You'll probably want + it on. With keypad mode off, if a special key is pressed, + getch() does nothing or returns ERR. - raw() and noraw() toggle raw mode. Raw mode is similar to cbreak - mode, in that characters typed are immediately passed through to - the user program. The difference is that in raw mode, the INTR, - QUIT, SUSP, and STOP characters are passed through without being - interpreted, and without generating a signal. + nodelay() controls whether wgetch() is a non-blocking call. If + the option is enabled, and no input is ready, wgetch() will + return ERR. If disabled, wgetch() will hang until input is + ready. - In PDCurses, the meta() function sets raw mode on or off. + nl() enables the translation of a carriage return into a newline + on input. nonl() disables this. Initially, the translation does + occur. - timeout() and wtimeout() set blocking or non-blocking reads for - the specified window. The delay is measured in milliseconds. If - it's negative, a blocking read is used; if zero, then non- - blocking reads are done -- if no input is waiting, ERR is - returned immediately. If the delay is positive, the read blocks - for the delay period; if the period expires, ERR is returned. + raw() and noraw() toggle raw mode. Raw mode is similar to cbreak + mode, in that characters typed are immediately passed through to + the user program. The difference is that in raw mode, the INTR, + QUIT, SUSP, and STOP characters are passed through without being + interpreted, and without generating a signal. - intrflush(), notimeout(), noqiflush(), qiflush() and typeahead() - do nothing in PDCurses, but are included for compatibility with - other curses implementations. + In PDCurses, the meta() function sets raw mode on or off. - crmode() and nocrmode() are archaic equivalents to cbreak() and - nocbreak(), respectively. + timeout() and wtimeout() set blocking or non-blocking reads for + the specified window. The delay is measured in milliseconds. If + it's negative, a blocking read is used; if zero, then non- + blocking reads are done -- if no input is waiting, ERR is + returned immediately. If the delay is positive, the read blocks + for the delay period; if the period expires, ERR is returned. - Return Value: - All functions return OK on success and ERR on error. + intrflush(), notimeout(), noqiflush(), qiflush() and typeahead() + do nothing in PDCurses, but are included for compatibility with + other curses implementations. - Portability X/Open BSD SYS V - cbreak Y Y Y - nocbreak Y Y Y - echo Y Y Y - noecho Y Y Y - halfdelay Y - Y - intrflush Y - Y - keypad Y - Y - meta Y - Y - nl Y Y Y - nonl Y Y Y - nodelay Y - Y - notimeout Y - Y - raw Y Y Y - noraw Y Y Y - noqiflush Y - Y - qiflush Y - Y - timeout Y - Y - wtimeout Y - Y - typeahead Y - Y - crmode - - nocrmode - + crmode() and nocrmode() are archaic equivalents to cbreak() and + nocbreak(), respectively. + +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + cbreak Y Y Y + nocbreak Y Y Y + echo Y Y Y + noecho Y Y Y + halfdelay Y - Y + intrflush Y - Y + keypad Y - Y + meta Y - Y + nl Y Y Y + nonl Y Y Y + nodelay Y - Y + notimeout Y - Y + raw Y Y Y + noraw Y Y Y + noqiflush Y - Y + qiflush Y - Y + timeout Y - Y + wtimeout Y - Y + typeahead Y - Y + crmode - + nocrmode - **man-end****************************************************************/ diff --git a/pdcurses/insch.c b/pdcurses/insch.c index 5126305c..33d0c308 100644 --- a/pdcurses/insch.c +++ b/pdcurses/insch.c @@ -4,55 +4,60 @@ /*man-start************************************************************** - Name: insch +insch +----- - Synopsis: - int insch(chtype ch); - int winsch(WINDOW *win, chtype ch); - int mvinsch(int y, int x, chtype ch); - int mvwinsch(WINDOW *win, int y, int x, chtype ch); +### Synopsis - int insrawch(chtype ch); - int winsrawch(WINDOW *win, chtype ch); - int mvinsrawch(int y, int x, chtype ch); - int mvwinsrawch(WINDOW *win, int y, int x, chtype ch); + int insch(chtype ch); + int winsch(WINDOW *win, chtype ch); + int mvinsch(int y, int x, chtype ch); + int mvwinsch(WINDOW *win, int y, int x, chtype ch); - int ins_wch(const cchar_t *wch); - int wins_wch(WINDOW *win, const cchar_t *wch); - int mvins_wch(int y, int x, const cchar_t *wch); - int mvwins_wch(WINDOW *win, int y, int x, const cchar_t *wch); + int insrawch(chtype ch); + int winsrawch(WINDOW *win, chtype ch); + int mvinsrawch(int y, int x, chtype ch); + int mvwinsrawch(WINDOW *win, int y, int x, chtype ch); - Description: - The insch() functions insert a chtype into the window at the - current or specified cursor position. The cursor is NOT - advanced. A newline is equivalent to clrtoeol(); tabs are - expanded; other control characters are converted as with - unctrl(). + int ins_wch(const cchar_t *wch); + int wins_wch(WINDOW *win, const cchar_t *wch); + int mvins_wch(int y, int x, const cchar_t *wch); + int mvwins_wch(WINDOW *win, int y, int x, const cchar_t *wch); - The ins_wch() functions are the wide-character - equivalents, taking cchar_t pointers rather than chtypes. +### Description - Video attributes can be combined with a character by ORing - them into the parameter. Text, including attributes, can be - copied from one place to another using inch() and insch(). + The insch() functions insert a chtype into the window at the + current or specified cursor position. The cursor is NOT + advanced. A newline is equivalent to clrtoeol(); tabs are + expanded; other control characters are converted as with + unctrl(). - insrawch() etc. are PDCurses-specific wrappers for insch() etc. - that disable the translation of control characters. + The ins_wch() functions are the wide-character + equivalents, taking cchar_t pointers rather than chtypes. - Return Value: - All functions return OK on success and ERR on error. + Video attributes can be combined with a character by ORing + them into the parameter. Text, including attributes, can be + copied from one place to another using inch() and insch(). - Portability X/Open BSD SYS V - insch Y Y Y - winsch Y Y Y - mvinsch Y Y Y - mvwinsch Y Y Y - insrawch - - - - winsrawch - - - - ins_wch Y - wins_wch Y - mvins_wch Y - mvwins_wch Y + insrawch() etc. are PDCurses-specific wrappers for insch() etc. + that disable the translation of control characters. + +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + insch Y Y Y + winsch Y Y Y + mvinsch Y Y Y + mvwinsch Y Y Y + insrawch - - - + winsrawch - - - + ins_wch Y + wins_wch Y + mvins_wch Y + mvwins_wch Y **man-end****************************************************************/ diff --git a/pdcurses/insstr.c b/pdcurses/insstr.c index eea86f19..e93d6aec 100644 --- a/pdcurses/insstr.c +++ b/pdcurses/insstr.c @@ -4,60 +4,65 @@ /*man-start************************************************************** - Name: insstr +insstr +------ - Synopsis: - int insstr(const char *str); - int insnstr(const char *str, int n); - int winsstr(WINDOW *win, const char *str); - int winsnstr(WINDOW *win, const char *str, int n); - int mvinsstr(int y, int x, const char *str); - int mvinsnstr(int y, int x, const char *str, int n); - int mvwinsstr(WINDOW *win, int y, int x, const char *str); - int mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n); +### Synopsis - int ins_wstr(const wchar_t *wstr); - int ins_nwstr(const wchar_t *wstr, int n); - int wins_wstr(WINDOW *win, const wchar_t *wstr); - int wins_nwstr(WINDOW *win, const wchar_t *wstr, int n); - int mvins_wstr(int y, int x, const wchar_t *wstr); - int mvins_nwstr(int y, int x, const wchar_t *wstr, int n); - int mvwins_wstr(WINDOW *win, int y, int x, const wchar_t *wstr); - int mvwins_nwstr(WINDOW *win, int y, int x, const wchar_t *wstr, int n); + int insstr(const char *str); + int insnstr(const char *str, int n); + int winsstr(WINDOW *win, const char *str); + int winsnstr(WINDOW *win, const char *str, int n); + int mvinsstr(int y, int x, const char *str); + int mvinsnstr(int y, int x, const char *str, int n); + int mvwinsstr(WINDOW *win, int y, int x, const char *str); + int mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n); - Description: - The insstr() functions insert a character string into a window - at the current cursor position, by repeatedly calling winsch(). - When PDCurses is built with wide-character support enabled, the - narrow-character functions treat the string as a multibyte - string in the current locale, and convert it first. All - characters to the right of the cursor are moved to the right, - with the possibility of the rightmost characters on the line - being lost. The cursor position does not change (after moving - to y, x, if specified). The routines with n as the last - argument insert at most n characters; if n is negative, then the - entire string is inserted. + int ins_wstr(const wchar_t *wstr); + int ins_nwstr(const wchar_t *wstr, int n); + int wins_wstr(WINDOW *win, const wchar_t *wstr); + int wins_nwstr(WINDOW *win, const wchar_t *wstr, int n); + int mvins_wstr(int y, int x, const wchar_t *wstr); + int mvins_nwstr(int y, int x, const wchar_t *wstr, int n); + int mvwins_wstr(WINDOW *win, int y, int x, const wchar_t *wstr); + int mvwins_nwstr(WINDOW *win, int y, int x, const wchar_t *wstr, int n); - Return Value: - All functions return OK on success and ERR on error. +### Description - Portability X/Open BSD SYS V - insstr Y - 4.0 - winsstr Y - 4.0 - mvinsstr Y - 4.0 - mvwinsstr Y - 4.0 - insnstr Y - 4.0 - winsnstr Y - 4.0 - mvinsnstr Y - 4.0 - mvwinsnstr Y - 4.0 - ins_wstr Y - wins_wstr Y - mvins_wstr Y - mvwins_wstr Y - ins_nwstr Y - wins_nwstr Y - mvins_nwstr Y - mvwins_nwstr Y + The insstr() functions insert a character string into a window + at the current cursor position, by repeatedly calling winsch(). + When PDCurses is built with wide-character support enabled, the + narrow-character functions treat the string as a multibyte + string in the current locale, and convert it first. All + characters to the right of the cursor are moved to the right, + with the possibility of the rightmost characters on the line + being lost. The cursor position does not change (after moving + to y, x, if specified). The routines with n as the last + argument insert at most n characters; if n is negative, then the + entire string is inserted. + +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + insstr Y - 4.0 + winsstr Y - 4.0 + mvinsstr Y - 4.0 + mvwinsstr Y - 4.0 + insnstr Y - 4.0 + winsnstr Y - 4.0 + mvinsnstr Y - 4.0 + mvwinsnstr Y - 4.0 + ins_wstr Y + wins_wstr Y + mvins_wstr Y + mvwins_wstr Y + ins_nwstr Y + wins_nwstr Y + mvins_nwstr Y + mvwins_nwstr Y **man-end****************************************************************/ diff --git a/pdcurses/instr.c b/pdcurses/instr.c index 0247b8fe..babb35e2 100644 --- a/pdcurses/instr.c +++ b/pdcurses/instr.c @@ -4,57 +4,62 @@ /*man-start************************************************************** - Name: instr +instr +----- - Synopsis: - int instr(char *str); - int innstr(char *str, int n); - int winstr(WINDOW *win, char *str); - int winnstr(WINDOW *win, char *str, int n); - int mvinstr(int y, int x, char *str); - int mvinnstr(int y, int x, char *str, int n); - int mvwinstr(WINDOW *win, int y, int x, char *str); - int mvwinnstr(WINDOW *win, int y, int x, char *str, int n); +### Synopsis - int inwstr(wchar_t *wstr); - int innwstr(wchar_t *wstr, int n); - int winwstr(WINDOW *win, wchar_t *wstr); - int winnwstr(WINDOW *win, wchar_t *wstr, int n); - int mvinwstr(int y, int x, wchar_t *wstr); - int mvinnwstr(int y, int x, wchar_t *wstr, int n); - int mvwinwstr(WINDOW *win, int y, int x, wchar_t *wstr); - int mvwinnwstr(WINDOW *win, int y, int x, wchar_t *wstr, int n); + int instr(char *str); + int innstr(char *str, int n); + int winstr(WINDOW *win, char *str); + int winnstr(WINDOW *win, char *str, int n); + int mvinstr(int y, int x, char *str); + int mvinnstr(int y, int x, char *str, int n); + int mvwinstr(WINDOW *win, int y, int x, char *str); + int mvwinnstr(WINDOW *win, int y, int x, char *str, int n); - Description: - These functions take characters (or wide characters) from the - current or specified position in the window, and return them as - a string in str (or wstr). Attributes are ignored. The functions - with n as the last argument return a string at most n characters - long. + int inwstr(wchar_t *wstr); + int innwstr(wchar_t *wstr, int n); + int winwstr(WINDOW *win, wchar_t *wstr); + int winnwstr(WINDOW *win, wchar_t *wstr, int n); + int mvinwstr(int y, int x, wchar_t *wstr); + int mvinnwstr(int y, int x, wchar_t *wstr, int n); + int mvwinwstr(WINDOW *win, int y, int x, wchar_t *wstr); + int mvwinnwstr(WINDOW *win, int y, int x, wchar_t *wstr, int n); - Return Value: - Upon successful completion, innstr(), mvinnstr(), mvwinnstr() - and winnstr() return the number of characters actually read into - the string; instr(), mvinstr(), mvwinstr() and winstr() return - OK. Otherwise, all these functions return ERR. +### Description - Portability X/Open BSD SYS V - instr Y - 4.0 - winstr Y - 4.0 - mvinstr Y - 4.0 - mvwinstr Y - 4.0 - innstr Y - 4.0 - winnstr Y - 4.0 - mvinnstr Y - 4.0 - mvwinnstr Y - 4.0 - inwstr Y - winwstr Y - mvinwstr Y - mvwinwstr Y - innwstr Y - winnwstr Y - mvinnwstr Y - mvwinnwstr Y + These functions take characters (or wide characters) from the + current or specified position in the window, and return them as + a string in str (or wstr). Attributes are ignored. The functions + with n as the last argument return a string at most n characters + long. + +### Return Value + + Upon successful completion, innstr(), mvinnstr(), mvwinnstr() + and winnstr() return the number of characters actually read into + the string; instr(), mvinstr(), mvwinstr() and winstr() return + OK. Otherwise, all these functions return ERR. + +### Portability + X/Open BSD SYS V + instr Y - 4.0 + winstr Y - 4.0 + mvinstr Y - 4.0 + mvwinstr Y - 4.0 + innstr Y - 4.0 + winnstr Y - 4.0 + mvinnstr Y - 4.0 + mvwinnstr Y - 4.0 + inwstr Y + winwstr Y + mvinwstr Y + mvwinwstr Y + innwstr Y + winnwstr Y + mvinnwstr Y + mvwinnwstr Y **man-end****************************************************************/ diff --git a/pdcurses/kernel.c b/pdcurses/kernel.c index af3fc92b..0fbdb1c2 100644 --- a/pdcurses/kernel.c +++ b/pdcurses/kernel.c @@ -4,80 +4,85 @@ /*man-start************************************************************** - Name: kernel +kernel +------ - Synopsis: - int def_prog_mode(void); - int def_shell_mode(void); - int reset_prog_mode(void); - int reset_shell_mode(void); - int resetty(void); - int savetty(void); - int ripoffline(int line, int (*init)(WINDOW *, int)); - int curs_set(int visibility); - int napms(int ms); +### Synopsis - int draino(int ms); - int resetterm(void); - int fixterm(void); - int saveterm(void); + int def_prog_mode(void); + int def_shell_mode(void); + int reset_prog_mode(void); + int reset_shell_mode(void); + int resetty(void); + int savetty(void); + int ripoffline(int line, int (*init)(WINDOW *, int)); + int curs_set(int visibility); + int napms(int ms); - Description: - def_prog_mode() and def_shell_mode() save the current terminal - modes as the "program" (in curses) or "shell" (not in curses) - state for use by the reset_prog_mode() and reset_shell_mode() - functions. This is done automatically by initscr(). + int draino(int ms); + int resetterm(void); + int fixterm(void); + int saveterm(void); - reset_prog_mode() and reset_shell_mode() restore the terminal to - "program" (in curses) or "shell" (not in curses) state. These - are done automatically by endwin() and doupdate() after an - endwin(), so they would normally not be called before these - functions. +### Description - savetty() and resetty() save and restore the state of the - terminal modes. savetty() saves the current state in a buffer, - and resetty() restores the state to what it was at the last call - to savetty(). + def_prog_mode() and def_shell_mode() save the current terminal + modes as the "program" (in curses) or "shell" (not in curses) + state for use by the reset_prog_mode() and reset_shell_mode() + functions. This is done automatically by initscr(). - curs_set() alters the appearance of the cursor. A visibility of - 0 makes it disappear; 1 makes it appear "normal" (usually an - underline) and 2 makes it "highly visible" (usually a block). + reset_prog_mode() and reset_shell_mode() restore the terminal to + "program" (in curses) or "shell" (not in curses) state. These + are done automatically by endwin() and doupdate() after an + endwin(), so they would normally not be called before these + functions. - ripoffline() reduces the size of stdscr by one line. If the - "line" parameter is positive, the line is removed from the top - of the screen; if negative, from the bottom. Up to 5 lines can - be ripped off stdscr by calling ripoffline() repeatedly. The - function argument, init, is called from within initscr() or - newterm(), so ripoffline() must be called before either of these - functions. The init function receives a pointer to a one-line - WINDOW, and the width of the window. Calling ripoffline() with a - NULL init function pointer is an error. + savetty() and resetty() save and restore the state of the + terminal modes. savetty() saves the current state in a buffer, + and resetty() restores the state to what it was at the last call + to savetty(). - napms() suspends the program for the specified number of - milliseconds. draino() is an archaic equivalent. + curs_set() alters the appearance of the cursor. A visibility of + 0 makes it disappear; 1 makes it appear "normal" (usually an + underline) and 2 makes it "highly visible" (usually a block). - resetterm(), fixterm() and saveterm() are archaic equivalents - for reset_shell_mode(), reset_prog_mode() and def_prog_mode(), - respectively. + ripoffline() reduces the size of stdscr by one line. If the + "line" parameter is positive, the line is removed from the top + of the screen; if negative, from the bottom. Up to 5 lines can + be ripped off stdscr by calling ripoffline() repeatedly. The + function argument, init, is called from within initscr() or + newterm(), so ripoffline() must be called before either of these + functions. The init function receives a pointer to a one-line + WINDOW, and the width of the window. Calling ripoffline() with a + NULL init function pointer is an error. - Return Value: - All functions return OK on success and ERR on error, except - curs_set(), which returns the previous visibility. + napms() suspends the program for the specified number of + milliseconds. draino() is an archaic equivalent. - Portability X/Open BSD SYS V - def_prog_mode Y Y Y - def_shell_mode Y Y Y - reset_prog_mode Y Y Y - reset_shell_mode Y Y Y - resetty Y Y Y - savetty Y Y Y - ripoffline Y - 3.0 - curs_set Y - 3.0 - napms Y Y Y - draino - - resetterm - - fixterm - - saveterm - + resetterm(), fixterm() and saveterm() are archaic equivalents + for reset_shell_mode(), reset_prog_mode() and def_prog_mode(), + respectively. + +### Return Value + + All functions return OK on success and ERR on error, except + curs_set(), which returns the previous visibility. + +### Portability + X/Open BSD SYS V + def_prog_mode Y Y Y + def_shell_mode Y Y Y + reset_prog_mode Y Y Y + reset_shell_mode Y Y Y + resetty Y Y Y + savetty Y Y Y + ripoffline Y - 3.0 + curs_set Y - 3.0 + napms Y Y Y + draino - + resetterm - + fixterm - + saveterm - **man-end****************************************************************/ diff --git a/pdcurses/keyname.c b/pdcurses/keyname.c index 03ab3e35..c2df795b 100644 --- a/pdcurses/keyname.c +++ b/pdcurses/keyname.c @@ -4,29 +4,33 @@ /*man-start************************************************************** - Name: keyname +keyname +------- - Synopsis: - char *keyname(int key); +### Synopsis - char *key_name(wchar_t c); + char *keyname(int key); - bool has_key(int key); + char *key_name(wchar_t c); - Description: - keyname() returns a string corresponding to the argument key. - key may be any key returned by wgetch(). + bool has_key(int key); - key_name() is the wide-character version. It takes a wchar_t - parameter, but still returns a char *. +### Description - has_key() returns TRUE for recognized keys, FALSE otherwise. - This function is an ncurses extension. + keyname() returns a string corresponding to the argument key. + key may be any key returned by wgetch(). - Portability X/Open BSD SYS V - keyname Y - 3.0 - key_name Y - has_key - - - + key_name() is the wide-character version. It takes a wchar_t + parameter, but still returns a char *. + + has_key() returns TRUE for recognized keys, FALSE otherwise. + This function is an ncurses extension. + +### Portability + X/Open BSD SYS V + keyname Y - 3.0 + key_name Y + has_key - - - **man-end****************************************************************/ diff --git a/pdcurses/mouse.c b/pdcurses/mouse.c index b1a7ae95..10faec99 100644 --- a/pdcurses/mouse.c +++ b/pdcurses/mouse.c @@ -4,146 +4,150 @@ /*man-start************************************************************** - Name: mouse +mouse +----- - Synopsis: - int mouse_set(unsigned long mbe); - int mouse_on(unsigned long mbe); - int mouse_off(unsigned long mbe); - int request_mouse_pos(void); - int map_button(unsigned long button); - void wmouse_position(WINDOW *win, int *y, int *x); - unsigned long getmouse(void); - unsigned long getbmap(void); +### Synopsis - int mouseinterval(int wait); - bool wenclose(const WINDOW *win, int y, int x); - bool wmouse_trafo(const WINDOW *win, int *y, int *x, bool to_screen); - bool mouse_trafo(int *y, int *x, bool to_screen); - mmask_t mousemask(mmask_t mask, mmask_t *oldmask); - int nc_getmouse(MEVENT *event); - int ungetmouse(MEVENT *event); + int mouse_set(unsigned long mbe); + int mouse_on(unsigned long mbe); + int mouse_off(unsigned long mbe); + int request_mouse_pos(void); + int map_button(unsigned long button); + void wmouse_position(WINDOW *win, int *y, int *x); + unsigned long getmouse(void); + unsigned long getbmap(void); - Description: - As of PDCurses 3.0, there are two separate mouse interfaces: the - classic interface, which is based on the undocumented Sys V - mouse functions; and an ncurses-compatible interface. Both are - active at all times, and you can mix and match functions from - each, though it's not recommended. The ncurses interface is - essentially an emulation layer built on top of the classic - interface; it's here to allow easier porting of ncurses apps. + int mouseinterval(int wait); + bool wenclose(const WINDOW *win, int y, int x); + bool wmouse_trafo(const WINDOW *win, int *y, int *x, bool to_screen); + bool mouse_trafo(int *y, int *x, bool to_screen); + mmask_t mousemask(mmask_t mask, mmask_t *oldmask); + int nc_getmouse(MEVENT *event); + int ungetmouse(MEVENT *event); - The classic interface: mouse_set(), mouse_on(), mouse_off(), - request_mouse_pos(), map_button(), wmouse_position(), - getmouse(), and getbmap(). An application using this interface - would start by calling mouse_set() or mouse_on() with a non-zero - value, often ALL_MOUSE_EVENTS. Then it would check for a - KEY_MOUSE return from getch(). If found, it would call - request_mouse_pos() to get the current mouse status. +### Description - mouse_set(), mouse_on() and mouse_off() are analagous to - attrset(), attron() and attroff(). These functions set the - mouse button events to trap. The button masks used in these - functions are defined in curses.h and can be or'ed together. - They are the group of masks starting with BUTTON1_RELEASED. + As of PDCurses 3.0, there are two separate mouse interfaces: the + classic interface, which is based on the undocumented Sys V + mouse functions; and an ncurses-compatible interface. Both are + active at all times, and you can mix and match functions from + each, though it's not recommended. The ncurses interface is + essentially an emulation layer built on top of the classic + interface; it's here to allow easier porting of ncurses apps. - request_mouse_pos() requests curses to fill in the Mouse_status - structure with the current state of the mouse. + The classic interface: mouse_set(), mouse_on(), mouse_off(), + request_mouse_pos(), map_button(), wmouse_position(), + getmouse(), and getbmap(). An application using this interface + would start by calling mouse_set() or mouse_on() with a non-zero + value, often ALL_MOUSE_EVENTS. Then it would check for a + KEY_MOUSE return from getch(). If found, it would call + request_mouse_pos() to get the current mouse status. - map_button() enables the specified mouse action to activate the - Soft Label Keys if the action occurs over the area of the screen - where the Soft Label Keys are displayed. The mouse actions are - defined in curses.h in the group that starts with BUTTON_RELEASED. + mouse_set(), mouse_on() and mouse_off() are analagous to + attrset(), attron() and attroff(). These functions set the + mouse button events to trap. The button masks used in these + functions are defined in curses.h and can be or'ed together. + They are the group of masks starting with BUTTON1_RELEASED. - wmouse_position() determines if the current mouse position is - within the window passed as an argument. If the mouse is - outside the current window, -1 is returned in the y and x - arguments; otherwise the y and x coordinates of the mouse - (relative to the top left corner of the window) are returned in - y and x. + request_mouse_pos() requests curses to fill in the Mouse_status + structure with the current state of the mouse. - getmouse() returns the current status of the trapped mouse - buttons as set by mouse_set() or mouse_on(). + map_button() enables the specified mouse action to activate the + Soft Label Keys if the action occurs over the area of the screen + where the Soft Label Keys are displayed. The mouse actions are + defined in curses.h in the group that starts with BUTTON_RELEASED. - getbmap() returns the current status of the button action used - to map a mouse action to the Soft Label Keys as set by the - map_button() function. + wmouse_position() determines if the current mouse position is + within the window passed as an argument. If the mouse is + outside the current window, -1 is returned in the y and x + arguments; otherwise the y and x coordinates of the mouse + (relative to the top left corner of the window) are returned in + y and x. - The ncurses interface: mouseinterval(), wenclose(), - wmouse_trafo(), mouse_trafo(), mousemask(), nc_getmouse(), and - ungetmouse(). A typical application using this interface would - start by calling mousemask() with a non-zero value, often - ALL_MOUSE_EVENTS. Then it would check for a KEY_MOUSE return - from getch(). If found, it would call nc_getmouse() to get the - current mouse status. + getmouse() returns the current status of the trapped mouse + buttons as set by mouse_set() or mouse_on(). - mouseinterval() sets the timeout for a mouse click. On all - current platforms, PDCurses receives mouse button press and - release events, but must synthesize click events. It does this - by checking whether a release event is queued up after a press - event. If it gets a press event, and there are no more events - waiting, it will wait for the timeout interval, then check again - for a release. A press followed by a release is reported as - BUTTON_CLICKED; otherwise it's passed through as BUTTON_PRESSED. - The default timeout is 150ms; valid values are 0 (no clicks - reported) through 1000ms. In x11, the timeout can also be set - via the clickPeriod resource. The return value from - mouseinterval() is the old timeout. To check the old value - without setting a new one, call it with a parameter of -1. Note - that although there's no classic equivalent for this function - (apart from the clickPeriod resource), the value set applies in - both interfaces. + getbmap() returns the current status of the button action used + to map a mouse action to the Soft Label Keys as set by the + map_button() function. - wenclose() reports whether the given screen-relative y, x - coordinates fall within the given window. + The ncurses interface: mouseinterval(), wenclose(), + wmouse_trafo(), mouse_trafo(), mousemask(), nc_getmouse(), and + ungetmouse(). A typical application using this interface would + start by calling mousemask() with a non-zero value, often + ALL_MOUSE_EVENTS. Then it would check for a KEY_MOUSE return + from getch(). If found, it would call nc_getmouse() to get the + current mouse status. - wmouse_trafo() converts between screen-relative and window- - relative coordinates. A to_screen parameter of TRUE means to - convert from window to screen; otherwise the reverse. The - function returns FALSE if the coordinates aren't within the - window, or if any of the parameters are NULL. The coordinates - have been converted when the function returns TRUE. + mouseinterval() sets the timeout for a mouse click. On all + current platforms, PDCurses receives mouse button press and + release events, but must synthesize click events. It does this + by checking whether a release event is queued up after a press + event. If it gets a press event, and there are no more events + waiting, it will wait for the timeout interval, then check again + for a release. A press followed by a release is reported as + BUTTON_CLICKED; otherwise it's passed through as BUTTON_PRESSED. + The default timeout is 150ms; valid values are 0 (no clicks + reported) through 1000ms. In x11, the timeout can also be set + via the clickPeriod resource. The return value from + mouseinterval() is the old timeout. To check the old value + without setting a new one, call it with a parameter of -1. Note + that although there's no classic equivalent for this function + (apart from the clickPeriod resource), the value set applies in + both interfaces. - mouse_trafo() is the stdscr version of wmouse_trafo(). + wenclose() reports whether the given screen-relative y, x + coordinates fall within the given window. - mousemask() is nearly equivalent to mouse_set(), but instead of - OK/ERR, it returns the value of the mask after setting it. (This - isn't necessarily the same value passed in, since the mask could - be altered on some platforms.) And if the second parameter is a - non-null pointer, mousemask() stores the previous mask value - there. Also, since the ncurses interface doesn't work with - PDCurses' BUTTON_MOVED events, mousemask() filters them out. + wmouse_trafo() converts between screen-relative and window- + relative coordinates. A to_screen parameter of TRUE means to + convert from window to screen; otherwise the reverse. The + function returns FALSE if the coordinates aren't within the + window, or if any of the parameters are NULL. The coordinates + have been converted when the function returns TRUE. - nc_getmouse() returns the current mouse status in an MEVENT - struct. This is equivalent to ncurses' getmouse(), renamed to - avoid conflict with PDCurses' getmouse(). But if you define - NCURSES_MOUSE_VERSION (preferably as 2) before including - curses.h, it defines getmouse() to nc_getmouse(), along with a - few other redefintions needed for compatibility with ncurses - code. nc_getmouse() calls request_mouse_pos(), which (not - getmouse()) is the classic equivalent. + mouse_trafo() is the stdscr version of wmouse_trafo(). - ungetmouse() is the mouse equivalent of ungetch(). However, - PDCurses doesn't maintain a queue of mouse events; only one can - be pushed back, and it can overwrite or be overwritten by real - mouse events. + mousemask() is nearly equivalent to mouse_set(), but instead of + OK/ERR, it returns the value of the mask after setting it. (This + isn't necessarily the same value passed in, since the mask could + be altered on some platforms.) And if the second parameter is a + non-null pointer, mousemask() stores the previous mask value + there. Also, since the ncurses interface doesn't work with + PDCurses' BUTTON_MOVED events, mousemask() filters them out. - Portability X/Open BSD SYS V - mouse_set - - 4.0 - mouse_on - - 4.0 - mouse_off - - 4.0 - request_mouse_pos - - 4.0 - map_button - - 4.0 - wmouse_position - - 4.0 - getmouse - - 4.0 - getbmap - - 4.0 - mouseinterval - - - - wenclose - - - - wmouse_trafo - - - - mouse_trafo - - - - mousemask - - - - nc_getmouse - - - - ungetmouse - - - + nc_getmouse() returns the current mouse status in an MEVENT + struct. This is equivalent to ncurses' getmouse(), renamed to + avoid conflict with PDCurses' getmouse(). But if you define + NCURSES_MOUSE_VERSION (preferably as 2) before including + curses.h, it defines getmouse() to nc_getmouse(), along with a + few other redefintions needed for compatibility with ncurses + code. nc_getmouse() calls request_mouse_pos(), which (not + getmouse()) is the classic equivalent. + + ungetmouse() is the mouse equivalent of ungetch(). However, + PDCurses doesn't maintain a queue of mouse events; only one can + be pushed back, and it can overwrite or be overwritten by real + mouse events. + +### Portability + X/Open BSD SYS V + mouse_set - - 4.0 + mouse_on - - 4.0 + mouse_off - - 4.0 + request_mouse_pos - - 4.0 + map_button - - 4.0 + wmouse_position - - 4.0 + getmouse - - 4.0 + getbmap - - 4.0 + mouseinterval - - - + wenclose - - - + wmouse_trafo - - - + mouse_trafo - - - + mousemask - - - + nc_getmouse - - - + ungetmouse - - - **man-end****************************************************************/ diff --git a/pdcurses/move.c b/pdcurses/move.c index 172b5a61..062f115c 100644 --- a/pdcurses/move.c +++ b/pdcurses/move.c @@ -4,24 +4,29 @@ /*man-start************************************************************** - Name: move +move +---- - Synopsis: - int move(int y, int x); - int wmove(WINDOW *win, int y, int x); +### Synopsis - Description: - The cursor associated with the window is moved to the given - location. This does not move the physical cursor of the - terminal until refresh() is called. The position specified is - relative to the upper left corner of the window, which is (0,0). + int move(int y, int x); + int wmove(WINDOW *win, int y, int x); - Return Value: - All functions return OK on success and ERR on error. +### Description - Portability X/Open BSD SYS V - move Y Y Y - wmove Y Y Y + The cursor associated with the window is moved to the given + location. This does not move the physical cursor of the + terminal until refresh() is called. The position specified is + relative to the upper left corner of the window, which is (0,0). + +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + move Y Y Y + wmove Y Y Y **man-end****************************************************************/ diff --git a/pdcurses/outopts.c b/pdcurses/outopts.c index 76e54cb8..605e8872 100644 --- a/pdcurses/outopts.c +++ b/pdcurses/outopts.c @@ -4,62 +4,67 @@ /*man-start************************************************************** - Name: outopts +outopts +------- - Synopsis: - int clearok(WINDOW *win, bool bf); - int idlok(WINDOW *win, bool bf); - void idcok(WINDOW *win, bool bf); - void immedok(WINDOW *win, bool bf); - int leaveok(WINDOW *win, bool bf); - int setscrreg(int top, int bot); - int wsetscrreg(WINDOW *win, int top, int bot); - int scrollok(WINDOW *win, bool bf); +### Synopsis - int raw_output(bool bf); + int clearok(WINDOW *win, bool bf); + int idlok(WINDOW *win, bool bf); + void idcok(WINDOW *win, bool bf); + void immedok(WINDOW *win, bool bf); + int leaveok(WINDOW *win, bool bf); + int setscrreg(int top, int bot); + int wsetscrreg(WINDOW *win, int top, int bot); + int scrollok(WINDOW *win, bool bf); - Description: - With clearok(), if bf is TRUE, the next call to wrefresh() with - this window will clear the screen completely and redraw the - entire screen. + int raw_output(bool bf); - immedok(), called with a second argument of TRUE, causes an - automatic wrefresh() every time a change is made to the - specified window. +### Description - Normally, the hardware cursor is left at the location of the - window being refreshed. leaveok() allows the cursor to be - left wherever the update happens to leave it. It's useful - for applications where the cursor is not used, since it reduces - the need for cursor motions. If possible, the cursor is made - invisible when this option is enabled. + With clearok(), if bf is TRUE, the next call to wrefresh() with + this window will clear the screen completely and redraw the + entire screen. - wsetscrreg() sets a scrolling region in a window; "top" and - "bot" are the line numbers for the top and bottom margins. If - this option and scrollok() are enabled, any attempt to move off - the bottom margin will cause all lines in the scrolling region - to scroll up one line. setscrreg() is the stdscr version. + immedok(), called with a second argument of TRUE, causes an + automatic wrefresh() every time a change is made to the + specified window. - idlok() and idcok() do nothing in PDCurses, but are provided for - compatibility with other curses implementations. + Normally, the hardware cursor is left at the location of the + window being refreshed. leaveok() allows the cursor to be + left wherever the update happens to leave it. It's useful + for applications where the cursor is not used, since it reduces + the need for cursor motions. If possible, the cursor is made + invisible when this option is enabled. - raw_output() enables the output of raw characters using the - standard *add* and *ins* curses functions (that is, it disables - translation of control characters). + wsetscrreg() sets a scrolling region in a window; "top" and + "bot" are the line numbers for the top and bottom margins. If + this option and scrollok() are enabled, any attempt to move off + the bottom margin will cause all lines in the scrolling region + to scroll up one line. setscrreg() is the stdscr version. - Return Value: - All functions return OK on success and ERR on error. + idlok() and idcok() do nothing in PDCurses, but are provided for + compatibility with other curses implementations. - Portability X/Open BSD SYS V - clearok Y Y Y - idlok Y Y Y - idcok Y - 4.0 - immedok Y - 4.0 - leaveok Y Y Y - setscrreg Y Y Y - wsetscrreg Y Y Y - scrollok Y Y Y - raw_output - - - + raw_output() enables the output of raw characters using the + standard *add* and *ins* curses functions (that is, it disables + translation of control characters). + +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + clearok Y Y Y + idlok Y Y Y + idcok Y - 4.0 + immedok Y - 4.0 + leaveok Y Y Y + setscrreg Y Y Y + wsetscrreg Y Y Y + scrollok Y Y Y + raw_output - - - **man-end****************************************************************/ diff --git a/pdcurses/overlay.c b/pdcurses/overlay.c index b3f808ad..73919c6b 100644 --- a/pdcurses/overlay.c +++ b/pdcurses/overlay.c @@ -4,40 +4,45 @@ /*man-start************************************************************** - Name: overlay +overlay +------- - Synopsis: - int overlay(const WINDOW *src_w, WINDOW *dst_w) - int overwrite(const WINDOW *src_w, WINDOW *dst_w) - int copywin(const WINDOW *src_w, WINDOW *dst_w, int src_tr, - int src_tc, int dst_tr, int dst_tc, int dst_br, - int dst_bc, bool overlay) +### Synopsis - Description: - overlay() and overwrite() copy all the text from src_w into - dst_w. The windows need not be the same size. Those characters - in the source window that intersect with the destination window - are copied, so that the characters appear in the same physical - position on the screen. The difference between the two functions - is that overlay() is non-destructive (blanks are not copied) - while overwrite() is destructive (blanks are copied). + int overlay(const WINDOW *src_w, WINDOW *dst_w) + int overwrite(const WINDOW *src_w, WINDOW *dst_w) + int copywin(const WINDOW *src_w, WINDOW *dst_w, int src_tr, + int src_tc, int dst_tr, int dst_tc, int dst_br, + int dst_bc, bool overlay) - copywin() is similar, but doesn't require that the two windows - overlap. The arguments src_tc and src_tr specify the top left - corner of the region to be copied. dst_tc, dst_tr, dst_br, and - dst_bc specify the region within the destination window to copy - to. The argument "overlay", if TRUE, indicates that the copy is - done non-destructively (as in overlay()); blanks in the source - window are not copied to the destination window. When overlay is - FALSE, blanks are copied. +### Description - Return Value: - All functions return OK on success and ERR on error. + overlay() and overwrite() copy all the text from src_w into + dst_w. The windows need not be the same size. Those characters + in the source window that intersect with the destination window + are copied, so that the characters appear in the same physical + position on the screen. The difference between the two functions + is that overlay() is non-destructive (blanks are not copied) + while overwrite() is destructive (blanks are copied). - Portability X/Open BSD SYS V - overlay Y Y Y - overwrite Y Y Y - copywin Y - 3.0 + copywin() is similar, but doesn't require that the two windows + overlap. The arguments src_tc and src_tr specify the top left + corner of the region to be copied. dst_tc, dst_tr, dst_br, and + dst_bc specify the region within the destination window to copy + to. The argument "overlay", if TRUE, indicates that the copy is + done non-destructively (as in overlay()); blanks in the source + window are not copied to the destination window. When overlay is + FALSE, blanks are copied. + +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + overlay Y Y Y + overwrite Y Y Y + copywin Y - 3.0 **man-end****************************************************************/ diff --git a/pdcurses/pad.c b/pdcurses/pad.c index ed318f82..79a6d284 100644 --- a/pdcurses/pad.c +++ b/pdcurses/pad.c @@ -4,63 +4,68 @@ /*man-start************************************************************** - Name: pad +pad +--- - Synopsis: - WINDOW *newpad(int nlines, int ncols); - WINDOW *subpad(WINDOW *orig, int nlines, int ncols, - int begy, int begx); - int prefresh(WINDOW *win, int py, int px, int sy1, int sx1, - int sy2, int sx2); - int pnoutrefresh(WINDOW *w, int py, int px, int sy1, int sx1, - int sy2, int sx2); - int pechochar(WINDOW *pad, chtype ch); - int pecho_wchar(WINDOW *pad, const cchar_t *wch); +### Synopsis - Description: - A pad is a special kind of window, which is not restricted by - the screen size, and is not necessarily associated with a - particular part of the screen. You can use a pad when you need - a large window, and only a part of the window will be on the - screen at one time. Pads are not refreshed automatically (e.g., - from scrolling or echoing of input). You can't call wrefresh() - with a pad as an argument; use prefresh() or pnoutrefresh() - instead. Note that these routines require additional parameters - to specify the part of the pad to be displayed, and the location - to use on the screen. + WINDOW *newpad(int nlines, int ncols); + WINDOW *subpad(WINDOW *orig, int nlines, int ncols, + int begy, int begx); + int prefresh(WINDOW *win, int py, int px, int sy1, int sx1, + int sy2, int sx2); + int pnoutrefresh(WINDOW *w, int py, int px, int sy1, int sx1, + int sy2, int sx2); + int pechochar(WINDOW *pad, chtype ch); + int pecho_wchar(WINDOW *pad, const cchar_t *wch); - newpad() creates a new pad data structure. +### Description - subpad() creates a new sub-pad within a pad, at position (begy, - begx), with dimensions of nlines lines and ncols columns. This - position is relative to the pad, and not to the screen as with - subwin. Changes to either the parent pad or sub-pad will affect - both. When using sub-pads, you may need to call touchwin() - before calling prefresh(). + A pad is a special kind of window, which is not restricted by + the screen size, and is not necessarily associated with a + particular part of the screen. You can use a pad when you need + a large window, and only a part of the window will be on the + screen at one time. Pads are not refreshed automatically (e.g., + from scrolling or echoing of input). You can't call wrefresh() + with a pad as an argument; use prefresh() or pnoutrefresh() + instead. Note that these routines require additional parameters + to specify the part of the pad to be displayed, and the location + to use on the screen. - pnoutrefresh() copies the specified pad to the virtual screen. + newpad() creates a new pad data structure. - prefresh() calls pnoutrefresh(), followed by doupdate(). + subpad() creates a new sub-pad within a pad, at position (begy, + begx), with dimensions of nlines lines and ncols columns. This + position is relative to the pad, and not to the screen as with + subwin. Changes to either the parent pad or sub-pad will affect + both. When using sub-pads, you may need to call touchwin() + before calling prefresh(). - These routines are analogous to wnoutrefresh() and wrefresh(). - (py, px) specifies the upper left corner of the part of the pad - to be displayed; (sy1, sx1) and (sy2, sx2) describe the screen - rectangle that will contain the selected part of the pad. + pnoutrefresh() copies the specified pad to the virtual screen. - pechochar() is functionally equivalent to addch() followed by - a call to prefresh(), with the last-used coordinates and - dimensions. pecho_wchar() is the wide-character version. + prefresh() calls pnoutrefresh(), followed by doupdate(). - Return Value: - All functions return OK on success and ERR on error. + These routines are analogous to wnoutrefresh() and wrefresh(). + (py, px) specifies the upper left corner of the part of the pad + to be displayed; (sy1, sx1) and (sy2, sx2) describe the screen + rectangle that will contain the selected part of the pad. - Portability X/Open BSD SYS V - newpad Y - Y - subpad Y - Y - prefresh Y - Y - pnoutrefresh Y - Y - pechochar Y - 3.0 - pecho_wchar Y + pechochar() is functionally equivalent to addch() followed by + a call to prefresh(), with the last-used coordinates and + dimensions. pecho_wchar() is the wide-character version. + +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + newpad Y - Y + subpad Y - Y + prefresh Y - Y + pnoutrefresh Y - Y + pechochar Y - 3.0 + pecho_wchar Y **man-end****************************************************************/ diff --git a/pdcurses/panel.c b/pdcurses/panel.c index 08307902..fbee054b 100644 --- a/pdcurses/panel.c +++ b/pdcurses/panel.c @@ -4,120 +4,125 @@ /*man-start************************************************************** - Name: panel +panel +----- - Synopsis: - int bottom_panel(PANEL *pan); - int del_panel(PANEL *pan); - int hide_panel(PANEL *pan); - int move_panel(PANEL *pan, int starty, int startx); - PANEL *new_panel(WINDOW *win); - PANEL *panel_above(const PANEL *pan); - PANEL *panel_below(const PANEL *pan); - int panel_hidden(const PANEL *pan); - const void *panel_userptr(const PANEL *pan); - WINDOW *panel_window(const PANEL *pan); - int replace_panel(PANEL *pan, WINDOW *win); - int set_panel_userptr(PANEL *pan, const void *uptr); - int show_panel(PANEL *pan); - int top_panel(PANEL *pan); - void update_panels(void); +### Synopsis - Description: - The panel library is built using the curses library, and any - program using panels routines must call one of the curses - initialization routines such as initscr(). A program using these - routines must be linked with the panels and curses libraries. - The header includes the header . + int bottom_panel(PANEL *pan); + int del_panel(PANEL *pan); + int hide_panel(PANEL *pan); + int move_panel(PANEL *pan, int starty, int startx); + PANEL *new_panel(WINDOW *win); + PANEL *panel_above(const PANEL *pan); + PANEL *panel_below(const PANEL *pan); + int panel_hidden(const PANEL *pan); + const void *panel_userptr(const PANEL *pan); + WINDOW *panel_window(const PANEL *pan); + int replace_panel(PANEL *pan, WINDOW *win); + int set_panel_userptr(PANEL *pan, const void *uptr); + int show_panel(PANEL *pan); + int top_panel(PANEL *pan); + void update_panels(void); - The panels package gives the applications programmer a way to - have depth relationships between curses windows; a curses window - is associated with every panel. The panels routines allow curses - windows to overlap without making visible the overlapped - portions of underlying windows. The initial curses window, - stdscr, lies beneath all panels. The set of currently visible - panels is the 'deck' of panels. +### Description - The panels package allows the applications programmer to create - panels, fetch and set their associated windows, shuffle panels - in the deck, and manipulate panels in other ways. + The panel library is built using the curses library, and any + program using panels routines must call one of the curses + initialization routines such as initscr(). A program using these + routines must be linked with the panels and curses libraries. + The header includes the header . - bottom_panel() places pan at the bottom of the deck. The size, - location and contents of the panel are unchanged. + The panels package gives the applications programmer a way to + have depth relationships between curses windows; a curses window + is associated with every panel. The panels routines allow curses + windows to overlap without making visible the overlapped + portions of underlying windows. The initial curses window, + stdscr, lies beneath all panels. The set of currently visible + panels is the 'deck' of panels. - del_panel() deletes pan, but not its associated winwow. + The panels package allows the applications programmer to create + panels, fetch and set their associated windows, shuffle panels + in the deck, and manipulate panels in other ways. - hide_panel() removes a panel from the deck and thus hides it - from view. + bottom_panel() places pan at the bottom of the deck. The size, + location and contents of the panel are unchanged. - move_panel() moves the curses window associated with pan, so - that its upper lefthand corner is at the supplied coordinates. - (Do not use mvwin() on the window.) + del_panel() deletes pan, but not its associated winwow. - new_panel() creates a new panel associated with win and returns - the panel pointer. The new panel is placed at the top of the - deck. + hide_panel() removes a panel from the deck and thus hides it + from view. - panel_above() returns a pointer to the panel in the deck above - pan, or NULL if pan is the top panel. If the value of pan passed - is NULL, this function returns a pointer to the bottom panel in - the deck. + move_panel() moves the curses window associated with pan, so + that its upper lefthand corner is at the supplied coordinates. + (Do not use mvwin() on the window.) - panel_below() returns a pointer to the panel in the deck below - pan, or NULL if pan is the bottom panel. If the value of pan - passed is NULL, this function returns a pointer to the top panel - in the deck. + new_panel() creates a new panel associated with win and returns + the panel pointer. The new panel is placed at the top of the + deck. - panel_hidden() returns OK if pan is hidden and ERR if it is not. + panel_above() returns a pointer to the panel in the deck above + pan, or NULL if pan is the top panel. If the value of pan passed + is NULL, this function returns a pointer to the bottom panel in + the deck. - panel_userptr() - Each panel has a user pointer available for - maintaining relevant information. This function returns a - pointer to that information previously set up by - set_panel_userptr(). + panel_below() returns a pointer to the panel in the deck below + pan, or NULL if pan is the bottom panel. If the value of pan + passed is NULL, this function returns a pointer to the top panel + in the deck. - panel_window() returns a pointer to the curses window associated - with the panel. + panel_hidden() returns OK if pan is hidden and ERR if it is not. - replace_panel() replaces the current window of pan with win. + panel_userptr() - Each panel has a user pointer available for + maintaining relevant information. This function returns a + pointer to that information previously set up by + set_panel_userptr(). - set_panel_userptr() - Each panel has a user pointer available - for maintaining relevant information. This function sets the - value of that information. + panel_window() returns a pointer to the curses window associated + with the panel. - show_panel() makes a previously hidden panel visible and places - it back in the deck on top. + replace_panel() replaces the current window of pan with win. - top_panel() places pan on the top of the deck. The size, - location and contents of the panel are unchanged. + set_panel_userptr() - Each panel has a user pointer available + for maintaining relevant information. This function sets the + value of that information. - update_panels() refreshes the virtual screen to reflect the - depth relationships between the panels in the deck. The user - must use doupdate() to refresh the physical screen. + show_panel() makes a previously hidden panel visible and places + it back in the deck on top. - Return Value: - Each routine that returns a pointer to an object returns NULL if - an error occurs. Each panel routine that returns an integer, - returns OK if it executes successfully and ERR if it does not. + top_panel() places pan on the top of the deck. The size, + location and contents of the panel are unchanged. - Portability X/Open BSD SYS V - bottom_panel - - Y - del_panel - - Y - hide_panel - - Y - move_panel - - Y - new_panel - - Y - panel_above - - Y - panel_below - - Y - panel_hidden - - Y - panel_userptr - - Y - panel_window - - Y - replace_panel - - Y - set_panel_userptr - - Y - show_panel - - Y - top_panel - - Y - update_panels - - Y + update_panels() refreshes the virtual screen to reflect the + depth relationships between the panels in the deck. The user + must use doupdate() to refresh the physical screen. + +### Return Value + + Each routine that returns a pointer to an object returns NULL if + an error occurs. Each panel routine that returns an integer, + returns OK if it executes successfully and ERR if it does not. + +### Portability + X/Open BSD SYS V + bottom_panel - - Y + del_panel - - Y + hide_panel - - Y + move_panel - - Y + new_panel - - Y + panel_above - - Y + panel_below - - Y + panel_hidden - - Y + panel_userptr - - Y + panel_window - - Y + replace_panel - - Y + set_panel_userptr - - Y + show_panel - - Y + top_panel - - Y + update_panels - - Y Credits: - Original Author - Warren Tucker + Original Author - Warren Tucker **man-end****************************************************************/ diff --git a/pdcurses/printw.c b/pdcurses/printw.c index b8081e50..3961faa7 100644 --- a/pdcurses/printw.c +++ b/pdcurses/printw.c @@ -4,33 +4,38 @@ /*man-start************************************************************** - Name: printw +printw +------ - Synopsis: - int printw(const char *fmt, ...); - int wprintw(WINDOW *win, const char *fmt, ...); - int mvprintw(int y, int x, const char *fmt, ...); - int mvwprintw(WINDOW *win, int y, int x, const char *fmt,...); - int vwprintw(WINDOW *win, const char *fmt, va_list varglist); - int vw_printw(WINDOW *win, const char *fmt, va_list varglist); +### Synopsis - Description: - The printw() functions add a formatted string to the window at - the current or specified cursor position. The format strings are - the same as used in the standard C library's printf(). (printw() - can be used as a drop-in replacement for printf().) + int printw(const char *fmt, ...); + int wprintw(WINDOW *win, const char *fmt, ...); + int mvprintw(int y, int x, const char *fmt, ...); + int mvwprintw(WINDOW *win, int y, int x, const char *fmt,...); + int vwprintw(WINDOW *win, const char *fmt, va_list varglist); + int vw_printw(WINDOW *win, const char *fmt, va_list varglist); - Return Value: - All functions return the number of characters printed, or - ERR on error. +### Description - Portability X/Open BSD SYS V - printw Y Y Y - wprintw Y Y Y - mvprintw Y Y Y - mvwprintw Y Y Y - vwprintw Y - 4.0 - vw_printw Y + The printw() functions add a formatted string to the window at + the current or specified cursor position. The format strings are + the same as used in the standard C library's printf(). (printw() + can be used as a drop-in replacement for printf().) + +### Return Value + + All functions return the number of characters printed, or + ERR on error. + +### Portability + X/Open BSD SYS V + printw Y Y Y + wprintw Y Y Y + mvprintw Y Y Y + mvwprintw Y Y Y + vwprintw Y - 4.0 + vw_printw Y **man-end****************************************************************/ diff --git a/pdcurses/refresh.c b/pdcurses/refresh.c index 90161b30..7facd7d0 100644 --- a/pdcurses/refresh.c +++ b/pdcurses/refresh.c @@ -4,51 +4,56 @@ /*man-start************************************************************** - Name: refresh +refresh +------- - Synopsis: - int refresh(void); - int wrefresh(WINDOW *win); - int wnoutrefresh(WINDOW *win); - int doupdate(void); - int redrawwin(WINDOW *win); - int wredrawln(WINDOW *win, int beg_line, int num_lines); +### Synopsis - Description: - wrefresh() copies the named window to the physical terminal - screen, taking into account what is already there in order to - optimize cursor movement. refresh() does the same, using stdscr. - These routines must be called to get any output on the terminal, - as other routines only manipulate data structures. Unless - leaveok() has been enabled, the physical cursor of the terminal - is left at the location of the window's cursor. + int refresh(void); + int wrefresh(WINDOW *win); + int wnoutrefresh(WINDOW *win); + int doupdate(void); + int redrawwin(WINDOW *win); + int wredrawln(WINDOW *win, int beg_line, int num_lines); - wnoutrefresh() and doupdate() allow multiple updates with more - efficiency than wrefresh() alone. wrefresh() works by first - calling wnoutrefresh(), which copies the named window to the - virtual screen. It then calls doupdate(), which compares the - virtual screen to the physical screen and does the actual - update. A series of calls to wrefresh() will result in - alternating calls to wnoutrefresh() and doupdate(), causing - several bursts of output to the screen. By first calling - wnoutrefresh() for each window, it is then possible to call - doupdate() only once. +### Description - In PDCurses, redrawwin() is equivalent to touchwin(), and - wredrawln() is the same as touchline(). In some other curses - implementations, there's a subtle distinction, but it has no - meaning in PDCurses. + wrefresh() copies the named window to the physical terminal + screen, taking into account what is already there in order to + optimize cursor movement. refresh() does the same, using stdscr. + These routines must be called to get any output on the terminal, + as other routines only manipulate data structures. Unless + leaveok() has been enabled, the physical cursor of the terminal + is left at the location of the window's cursor. - Return Value: - All functions return OK on success and ERR on error. + wnoutrefresh() and doupdate() allow multiple updates with more + efficiency than wrefresh() alone. wrefresh() works by first + calling wnoutrefresh(), which copies the named window to the + virtual screen. It then calls doupdate(), which compares the + virtual screen to the physical screen and does the actual + update. A series of calls to wrefresh() will result in + alternating calls to wnoutrefresh() and doupdate(), causing + several bursts of output to the screen. By first calling + wnoutrefresh() for each window, it is then possible to call + doupdate() only once. - Portability X/Open BSD SYS V - refresh Y Y Y - wrefresh Y Y Y - wnoutrefresh Y Y Y - doupdate Y Y Y - redrawwin Y - 4.0 - wredrawln Y - 4.0 + In PDCurses, redrawwin() is equivalent to touchwin(), and + wredrawln() is the same as touchline(). In some other curses + implementations, there's a subtle distinction, but it has no + meaning in PDCurses. + +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + refresh Y Y Y + wrefresh Y Y Y + wnoutrefresh Y Y Y + doupdate Y Y Y + redrawwin Y - 4.0 + wredrawln Y - 4.0 **man-end****************************************************************/ diff --git a/pdcurses/scanw.c b/pdcurses/scanw.c index d0a799b7..7b974357 100644 --- a/pdcurses/scanw.c +++ b/pdcurses/scanw.c @@ -4,32 +4,37 @@ /*man-start************************************************************** - Name: scanw +scanw +----- - Synopsis: - int scanw(const char *fmt, ...); - int wscanw(WINDOW *win, const char *fmt, ...); - int mvscanw(int y, int x, const char *fmt, ...); - int mvwscanw(WINDOW *win, int y, int x, const char *fmt, ...); - int vwscanw(WINDOW *win, const char *fmt, va_list varglist); - int vw_scanw(WINDOW *win, const char *fmt, va_list varglist); +### Synopsis - Description: - These routines correspond to the standard C library's scanf() - family. Each gets a string from the window via wgetnstr(), and - uses the resulting line as input for the scan. + int scanw(const char *fmt, ...); + int wscanw(WINDOW *win, const char *fmt, ...); + int mvscanw(int y, int x, const char *fmt, ...); + int mvwscanw(WINDOW *win, int y, int x, const char *fmt, ...); + int vwscanw(WINDOW *win, const char *fmt, va_list varglist); + int vw_scanw(WINDOW *win, const char *fmt, va_list varglist); - Return Value: - On successful completion, these functions return the number of - items successfully matched. Otherwise they return ERR. +### Description - Portability X/Open BSD SYS V - scanw Y Y Y - wscanw Y Y Y - mvscanw Y Y Y - mvwscanw Y Y Y - vwscanw Y - 4.0 - vw_scanw Y + These routines correspond to the standard C library's scanf() + family. Each gets a string from the window via wgetnstr(), and + uses the resulting line as input for the scan. + +### Return Value + + On successful completion, these functions return the number of + items successfully matched. Otherwise they return ERR. + +### Portability + X/Open BSD SYS V + scanw Y Y Y + wscanw Y Y Y + mvscanw Y Y Y + mvwscanw Y Y Y + vwscanw Y - 4.0 + vw_scanw Y **man-end****************************************************************/ diff --git a/pdcurses/scr_dump.c b/pdcurses/scr_dump.c index 4b7cd380..4411cbb1 100644 --- a/pdcurses/scr_dump.c +++ b/pdcurses/scr_dump.c @@ -4,52 +4,57 @@ /*man-start************************************************************** - Name: scr_dump +scr_dump +-------- - Synopsis: - int putwin(WINDOW *win, FILE *filep); - WINDOW *getwin(FILE *filep); - int scr_dump(const char *filename); - int scr_init(const char *filename); - int scr_restore(const char *filename); - int scr_set(const char *filename); +### Synopsis - Description: - getwin() reads window-related data previously stored in a file - by putwin(). It then creates and initialises a new window using - that data. + int putwin(WINDOW *win, FILE *filep); + WINDOW *getwin(FILE *filep); + int scr_dump(const char *filename); + int scr_init(const char *filename); + int scr_restore(const char *filename); + int scr_set(const char *filename); - putwin() writes all data associated with a window into a file, - using an unspecified format. This information can be retrieved - later using getwin(). +### Description - scr_dump() writes the current contents of the virtual screen to - the file named by filename in an unspecified format. + getwin() reads window-related data previously stored in a file + by putwin(). It then creates and initialises a new window using + that data. - scr_restore() function sets the virtual screen to the contents - of the file named by filename, which must have been written - using scr_dump(). The next refresh operation restores the screen - to the way it looked in the dump file. + putwin() writes all data associated with a window into a file, + using an unspecified format. This information can be retrieved + later using getwin(). - In PDCurses, scr_init() does nothing, and scr_set() is a synonym - for scr_restore(). Also, scr_dump() and scr_restore() save and - load from curscr. This differs from some other implementations, - where scr_init() works with curscr, and scr_restore() works with - newscr; but the effect should be the same. (PDCurses has no - newscr.) + scr_dump() writes the current contents of the virtual screen to + the file named by filename in an unspecified format. - Return Value: - On successful completion, getwin() returns a pointer to the - window it created. Otherwise, it returns a null pointer. Other - functions return OK or ERR. + scr_restore() function sets the virtual screen to the contents + of the file named by filename, which must have been written + using scr_dump(). The next refresh operation restores the screen + to the way it looked in the dump file. - Portability X/Open BSD SYS V - putwin Y - getwin Y - scr_dump Y - scr_init Y - scr_restore Y - scr_set Y + In PDCurses, scr_init() does nothing, and scr_set() is a synonym + for scr_restore(). Also, scr_dump() and scr_restore() save and + load from curscr. This differs from some other implementations, + where scr_init() works with curscr, and scr_restore() works with + newscr; but the effect should be the same. (PDCurses has no + newscr.) + +### Return Value + + On successful completion, getwin() returns a pointer to the + window it created. Otherwise, it returns a null pointer. Other + functions return OK or ERR. + +### Portability + X/Open BSD SYS V + putwin Y + getwin Y + scr_dump Y + scr_init Y + scr_restore Y + scr_set Y **man-end****************************************************************/ diff --git a/pdcurses/scroll.c b/pdcurses/scroll.c index 52aaa43a..81c4aa65 100644 --- a/pdcurses/scroll.c +++ b/pdcurses/scroll.c @@ -4,32 +4,37 @@ /*man-start************************************************************** - Name: scroll +scroll +------ - Synopsis: - int scroll(WINDOW *win); - int scrl(int n); - int wscrl(WINDOW *win, int n); +### Synopsis - Description: - scroll() causes the window to scroll up one line. This involves - moving the lines in the window data strcture. + int scroll(WINDOW *win); + int scrl(int n); + int wscrl(WINDOW *win, int n); + +### Description + + scroll() causes the window to scroll up one line. This involves + moving the lines in the window data strcture. - With a positive n, scrl() and wscrl() scroll the window up n - lines (line i + n becomes i); otherwise they scroll the window - down n lines. + With a positive n, scrl() and wscrl() scroll the window up n + lines (line i + n becomes i); otherwise they scroll the window + down n lines. - For these functions to work, scrolling must be enabled via - scrollok(). Note also that scrolling is not allowed if the - supplied window is a pad. + For these functions to work, scrolling must be enabled via + scrollok(). Note also that scrolling is not allowed if the + supplied window is a pad. - Return Value: - All functions return OK on success and ERR on error. +### Return Value - Portability X/Open BSD SYS V - scroll Y Y Y - scrl Y - 4.0 - wscrl Y - 4.0 + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + scroll Y Y Y + scrl Y - 4.0 + wscrl Y - 4.0 **man-end****************************************************************/ diff --git a/pdcurses/slk.c b/pdcurses/slk.c index 6defd0da..e682abd4 100644 --- a/pdcurses/slk.c +++ b/pdcurses/slk.c @@ -4,78 +4,83 @@ /*man-start************************************************************** - Name: slk +slk +--- - Synopsis: - int slk_init(int fmt); - int slk_set(int labnum, const char *label, int justify); - int slk_refresh(void); - int slk_noutrefresh(void); - char *slk_label(int labnum); - int slk_clear(void); - int slk_restore(void); - int slk_touch(void); - int slk_attron(const chtype attrs); - int slk_attr_on(const attr_t attrs, void *opts); - int slk_attrset(const chtype attrs); - int slk_attr_set(const attr_t attrs, short color_pair, void *opts); - int slk_attroff(const chtype attrs); - int slk_attr_off(const attr_t attrs, void *opts); - int slk_color(short color_pair); +### Synopsis - int slk_wset(int labnum, const wchar_t *label, int justify); + int slk_init(int fmt); + int slk_set(int labnum, const char *label, int justify); + int slk_refresh(void); + int slk_noutrefresh(void); + char *slk_label(int labnum); + int slk_clear(void); + int slk_restore(void); + int slk_touch(void); + int slk_attron(const chtype attrs); + int slk_attr_on(const attr_t attrs, void *opts); + int slk_attrset(const chtype attrs); + int slk_attr_set(const attr_t attrs, short color_pair, void *opts); + int slk_attroff(const chtype attrs); + int slk_attr_off(const attr_t attrs, void *opts); + int slk_color(short color_pair); - int PDC_mouse_in_slk(int y, int x); - void PDC_slk_free(void); - void PDC_slk_initialize(void); + int slk_wset(int labnum, const wchar_t *label, int justify); - wchar_t *slk_wlabel(int labnum) + int PDC_mouse_in_slk(int y, int x); + void PDC_slk_free(void); + void PDC_slk_initialize(void); - Description: - These functions manipulate a window that contain Soft Label Keys - (SLK). To use the SLK functions, a call to slk_init() must be - made BEFORE initscr() or newterm(). slk_init() removes 1 or 2 - lines from the useable screen, depending on the format selected. + wchar_t *slk_wlabel(int labnum) - The line(s) removed from the screen are used as a separate - window, in which SLKs are displayed. +### Description - slk_init() requires a single parameter which describes the - format of the SLKs as follows: + These functions manipulate a window that contain Soft Label Keys + (SLK). To use the SLK functions, a call to slk_init() must be + made BEFORE initscr() or newterm(). slk_init() removes 1 or 2 + lines from the useable screen, depending on the format selected. + + The line(s) removed from the screen are used as a separate + window, in which SLKs are displayed. + + slk_init() requires a single parameter which describes the + format of the SLKs as follows: - 0 3-2-3 format - 1 4-4 format - 2 4-4-4 format (ncurses extension) - 3 4-4-4 format with index line (ncurses extension) - 2 lines used - 55 5-5 format (pdcurses format) + 0 3-2-3 format + 1 4-4 format + 2 4-4-4 format (ncurses extension) + 3 4-4-4 format with index line (ncurses extension) + 2 lines used + 55 5-5 format (pdcurses format) - slk_refresh(), slk_noutrefresh() and slk_touch() are analogous - to refresh(), noutrefresh() and touch(). + slk_refresh(), slk_noutrefresh() and slk_touch() are analogous + to refresh(), noutrefresh() and touch(). - Return Value: - All functions return OK on success and ERR on error. +### Return Value - Portability X/Open BSD SYS V - slk_init Y - Y - slk_set Y - Y - slk_refresh Y - Y - slk_noutrefresh Y - Y - slk_label Y - Y - slk_clear Y - Y - slk_restore Y - Y - slk_touch Y - Y - slk_attron Y - Y - slk_attrset Y - Y - slk_attroff Y - Y - slk_attr_on Y - slk_attr_set Y - slk_attr_off Y - slk_wset Y - PDC_mouse_in_slk - - - - PDC_slk_free - - - - PDC_slk_initialize - - - - slk_wlabel - - - + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + slk_init Y - Y + slk_set Y - Y + slk_refresh Y - Y + slk_noutrefresh Y - Y + slk_label Y - Y + slk_clear Y - Y + slk_restore Y - Y + slk_touch Y - Y + slk_attron Y - Y + slk_attrset Y - Y + slk_attroff Y - Y + slk_attr_on Y + slk_attr_set Y + slk_attr_off Y + slk_wset Y + PDC_mouse_in_slk - - - + PDC_slk_free - - - + PDC_slk_initialize - - - + slk_wlabel - - - **man-end****************************************************************/ diff --git a/pdcurses/termattr.c b/pdcurses/termattr.c index ac72b346..9e284e4f 100644 --- a/pdcurses/termattr.c +++ b/pdcurses/termattr.c @@ -4,65 +4,69 @@ /*man-start************************************************************** - Name: termattr +termattr +-------- - Synopsis: - int baudrate(void); - char erasechar(void); - bool has_ic(void); - bool has_il(void); - char killchar(void); - char *longname(void); - chtype termattrs(void); - attr_t term_attrs(void); - char *termname(void); +### Synopsis - int erasewchar(wchar_t *ch); - int killwchar(wchar_t *ch); + int baudrate(void); + char erasechar(void); + bool has_ic(void); + bool has_il(void); + char killchar(void); + char *longname(void); + chtype termattrs(void); + attr_t term_attrs(void); + char *termname(void); - char wordchar(void); + int erasewchar(wchar_t *ch); + int killwchar(wchar_t *ch); - Description: - baudrate() is supposed to return the output speed of the - terminal. In PDCurses, it simply returns INT_MAX. + char wordchar(void); - has_ic and has_il() return TRUE. These functions have meaning in - some other implementations of curses. +### Description - erasechar() and killchar() return ^H and ^U, respectively -- the - ERASE and KILL characters. In other curses implementations, - these may vary by terminal type. erasewchar() and killwchar() - are the wide-character versions; they take a pointer to a - location in which to store the character, and return OK or ERR. + baudrate() is supposed to return the output speed of the + terminal. In PDCurses, it simply returns INT_MAX. - longname() returns a pointer to a static area containing a - verbose description of the current terminal. The maximum length - of the string is 128 characters. It is defined only after the - call to initscr() or newterm(). + has_ic and has_il() return TRUE. These functions have meaning in + some other implementations of curses. - termname() returns a pointer to a static area containing a - short description of the current terminal (14 characters). + erasechar() and killchar() return ^H and ^U, respectively -- the + ERASE and KILL characters. In other curses implementations, + these may vary by terminal type. erasewchar() and killwchar() + are the wide-character versions; they take a pointer to a + location in which to store the character, and return OK or ERR. - termattrs() returns a logical OR of all video attributes - supported by the terminal. + longname() returns a pointer to a static area containing a + verbose description of the current terminal. The maximum length + of the string is 128 characters. It is defined only after the + call to initscr() or newterm(). - wordchar() is a PDCurses extension of the concept behind the - functions erasechar() and killchar(), returning the "delete - word" character, ^W. + termname() returns a pointer to a static area containing a + short description of the current terminal (14 characters). - Portability X/Open BSD SYS V - baudrate Y Y Y - erasechar Y Y Y - has_ic Y Y Y - has_il Y Y Y - killchar Y Y Y - longname Y Y Y - termattrs Y Y Y - termname Y Y Y - erasewchar Y - killwchar Y - term_attrs Y - wordchar - - - + termattrs() returns a logical OR of all video attributes + supported by the terminal. + + wordchar() is a PDCurses extension of the concept behind the + functions erasechar() and killchar(), returning the "delete + word" character, ^W. + +### Portability + X/Open BSD SYS V + baudrate Y Y Y + erasechar Y Y Y + has_ic Y Y Y + has_il Y Y Y + killchar Y Y Y + longname Y Y Y + termattrs Y Y Y + termname Y Y Y + erasewchar Y + killwchar Y + term_attrs Y + wordchar - - - **man-end****************************************************************/ diff --git a/pdcurses/terminfo.c b/pdcurses/terminfo.c index 50538407..5254ad65 100644 --- a/pdcurses/terminfo.c +++ b/pdcurses/terminfo.c @@ -4,43 +4,47 @@ /*man-start************************************************************** - Name: terminfo +terminfo +-------- - Synopsis: - int mvcur(int oldrow, int oldcol, int newrow, int newcol); - int vidattr(chtype attr); - int vid_attr(attr_t attr, short color_pair, void *opt); - int vidputs(chtype attr, int (*putfunc)(int)); - int vid_puts(attr_t attr, short color_pair, void *opt, - int (*putfunc)(int)); +### Synopsis - int del_curterm(TERMINAL *); - int putp(const char *); - int restartterm(const char *, int, int *); - TERMINAL *set_curterm(TERMINAL *); - int setterm(const char *term); - int setupterm(const char *, int, int *); - int tgetent(char *, const char *); - int tgetflag(const char *); - int tgetnum(const char *); - char *tgetstr(const char *, char **); - char *tgoto(const char *, int, int); - int tigetflag(const char *); - int tigetnum(const char *); - char *tigetstr(const char *); - char *tparm(const char *,long, long, long, long, long, long, - long, long, long); - int tputs(const char *, int, int (*)(int)); + int mvcur(int oldrow, int oldcol, int newrow, int newcol); + int vidattr(chtype attr); + int vid_attr(attr_t attr, short color_pair, void *opt); + int vidputs(chtype attr, int (*putfunc)(int)); + int vid_puts(attr_t attr, short color_pair, void *opt, + int (*putfunc)(int)); - Description: - mvcur() lets you move the physical cursor without updating any - window cursor positions. It returns OK or ERR. + int del_curterm(TERMINAL *); + int putp(const char *); + int restartterm(const char *, int, int *); + TERMINAL *set_curterm(TERMINAL *); + int setterm(const char *term); + int setupterm(const char *, int, int *); + int tgetent(char *, const char *); + int tgetflag(const char *); + int tgetnum(const char *); + char *tgetstr(const char *, char **); + char *tgoto(const char *, int, int); + int tigetflag(const char *); + int tigetnum(const char *); + char *tigetstr(const char *); + char *tparm(const char *,long, long, long, long, long, long, + long, long, long); + int tputs(const char *, int, int (*)(int)); - The rest of these functions are currently implemented as stubs, - returning the appropriate errors and doing nothing else. +### Description - Portability X/Open BSD SYS V - mvcur Y Y Y + mvcur() lets you move the physical cursor without updating any + window cursor positions. It returns OK or ERR. + + The rest of these functions are currently implemented as stubs, + returning the appropriate errors and doing nothing else. + +### Portability + X/Open BSD SYS V + mvcur Y Y Y **man-end****************************************************************/ diff --git a/pdcurses/touch.c b/pdcurses/touch.c index a36ec5d1..21111624 100644 --- a/pdcurses/touch.c +++ b/pdcurses/touch.c @@ -4,50 +4,55 @@ /*man-start************************************************************** - Name: touch +touch +----- - Synopsis: - int touchwin(WINDOW *win); - int touchline(WINDOW *win, int start, int count); - int untouchwin(WINDOW *win); - int wtouchln(WINDOW *win, int y, int n, int changed); - bool is_linetouched(WINDOW *win, int line); - bool is_wintouched(WINDOW *win); +### Synopsis - Description: - touchwin() and touchline() throw away all information about - which parts of the window have been touched, pretending that the - entire window has been drawn on. This is sometimes necessary - when using overlapping windows, since a change to one window - will affect the other window, but the records of which lines - have been changed in the other window will not reflect the - change. + int touchwin(WINDOW *win); + int touchline(WINDOW *win, int start, int count); + int untouchwin(WINDOW *win); + int wtouchln(WINDOW *win, int y, int n, int changed); + bool is_linetouched(WINDOW *win, int line); + bool is_wintouched(WINDOW *win); - untouchwin() marks all lines in the window as unchanged since - the last call to wrefresh(). +### Description - wtouchln() makes n lines in the window, starting at line y, look - as if they have (changed == 1) or have not (changed == 0) been - changed since the last call to wrefresh(). + touchwin() and touchline() throw away all information about + which parts of the window have been touched, pretending that the + entire window has been drawn on. This is sometimes necessary + when using overlapping windows, since a change to one window + will affect the other window, but the records of which lines + have been changed in the other window will not reflect the + change. - is_linetouched() returns TRUE if the specified line in the - specified window has been changed since the last call to - wrefresh(). + untouchwin() marks all lines in the window as unchanged since + the last call to wrefresh(). - is_wintouched() returns TRUE if the specified window - has been changed since the last call to wrefresh(). + wtouchln() makes n lines in the window, starting at line y, look + as if they have (changed == 1) or have not (changed == 0) been + changed since the last call to wrefresh(). - Return Value: - All functions return OK on success and ERR on error except - is_wintouched() and is_linetouched(). + is_linetouched() returns TRUE if the specified line in the + specified window has been changed since the last call to + wrefresh(). - Portability X/Open BSD SYS V - touchwin Y Y Y - touchline Y - 3.0 - untouchwin Y - 4.0 - wtouchln Y Y Y - is_linetouched Y - 4.0 - is_wintouched Y - 4.0 + is_wintouched() returns TRUE if the specified window + has been changed since the last call to wrefresh(). + +### Return Value + + All functions return OK on success and ERR on error except + is_wintouched() and is_linetouched(). + +### Portability + X/Open BSD SYS V + touchwin Y Y Y + touchline Y - 3.0 + untouchwin Y - 4.0 + wtouchln Y Y Y + is_linetouched Y - 4.0 + is_wintouched Y - 4.0 **man-end****************************************************************/ diff --git a/pdcurses/util.c b/pdcurses/util.c index 225d630c..81f29a0b 100644 --- a/pdcurses/util.c +++ b/pdcurses/util.c @@ -4,71 +4,76 @@ /*man-start************************************************************** - Name: util +util +---- - Synopsis: - char *unctrl(chtype c); - void filter(void); - void use_env(bool x); - int delay_output(int ms); +### Synopsis - int getcchar(const cchar_t *wcval, wchar_t *wch, attr_t *attrs, - short *color_pair, void *opts); - int setcchar(cchar_t *wcval, const wchar_t *wch, const attr_t attrs, - short color_pair, const void *opts); - wchar_t *wunctrl(cchar_t *wc); + char *unctrl(chtype c); + void filter(void); + void use_env(bool x); + int delay_output(int ms); - int PDC_mbtowc(wchar_t *pwc, const char *s, size_t n); - size_t PDC_mbstowcs(wchar_t *dest, const char *src, size_t n); - size_t PDC_wcstombs(char *dest, const wchar_t *src, size_t n); + int getcchar(const cchar_t *wcval, wchar_t *wch, attr_t *attrs, + short *color_pair, void *opts); + int setcchar(cchar_t *wcval, const wchar_t *wch, const attr_t attrs, + short color_pair, const void *opts); + wchar_t *wunctrl(cchar_t *wc); - Description: - unctrl() expands the text portion of the chtype c into a - printable string. Control characters are changed to the "^X" - notation; others are passed through. wunctrl() is the wide- - character version of the function. + int PDC_mbtowc(wchar_t *pwc, const char *s, size_t n); + size_t PDC_mbstowcs(wchar_t *dest, const char *src, size_t n); + size_t PDC_wcstombs(char *dest, const wchar_t *src, size_t n); - filter() and use_env() are no-ops in PDCurses. +### Description - delay_output() inserts an ms millisecond pause in output. + unctrl() expands the text portion of the chtype c into a + printable string. Control characters are changed to the "^X" + notation; others are passed through. wunctrl() is the wide- + character version of the function. - getcchar() works in two modes: When wch is not NULL, it reads - the cchar_t pointed to by wcval and stores the attributes in - attrs, the color pair in color_pair, and the text in the - wide-character string wch. When wch is NULL, getcchar() merely - returns the number of wide characters in wcval. In either mode, - the opts argument is unused. + filter() and use_env() are no-ops in PDCurses. - setcchar constructs a cchar_t at wcval from the wide-character - text at wch, the attributes in attr and the color pair in - color_pair. The opts argument is unused. + delay_output() inserts an ms millisecond pause in output. - Currently, the length returned by getcchar() is always 1 or 0. - Similarly, setcchar() will only take the first wide character - from wch, and ignore any others that it "should" take (i.e., - combining characters). Nor will it correctly handle any - character outside the basic multilingual plane (UCS-2). + getcchar() works in two modes: When wch is not NULL, it reads + the cchar_t pointed to by wcval and stores the attributes in + attrs, the color pair in color_pair, and the text in the + wide-character string wch. When wch is NULL, getcchar() merely + returns the number of wide characters in wcval. In either mode, + the opts argument is unused. - Return Value: - unctrl() and wunctrl() return NULL on failure. delay_output() - always returns OK. + setcchar constructs a cchar_t at wcval from the wide-character + text at wch, the attributes in attr and the color pair in + color_pair. The opts argument is unused. - getcchar() returns the number of wide characters wcval points to - when wch is NULL; when it's not, getcchar() returns OK or ERR. + Currently, the length returned by getcchar() is always 1 or 0. + Similarly, setcchar() will only take the first wide character + from wch, and ignore any others that it "should" take (i.e., + combining characters). Nor will it correctly handle any + character outside the basic multilingual plane (UCS-2). - setcchar() returns OK or ERR. +### Return Value - Portability X/Open BSD SYS V - unctrl Y Y Y - filter Y - 3.0 - use_env Y - 4.0 - delay_output Y Y Y - getcchar Y - setcchar Y - wunctrl Y - PDC_mbtowc - - - - PDC_mbstowcs - - - - PDC_wcstombs - - - + unctrl() and wunctrl() return NULL on failure. delay_output() + always returns OK. + + getcchar() returns the number of wide characters wcval points to + when wch is NULL; when it's not, getcchar() returns OK or ERR. + + setcchar() returns OK or ERR. + +### Portability + X/Open BSD SYS V + unctrl Y Y Y + filter Y - 3.0 + use_env Y - 4.0 + delay_output Y Y Y + getcchar Y + setcchar Y + wunctrl Y + PDC_mbtowc - - - + PDC_mbstowcs - - - + PDC_wcstombs - - - **man-end****************************************************************/ diff --git a/pdcurses/window.c b/pdcurses/window.c index ad83e4d1..86f6c81b 100644 --- a/pdcurses/window.c +++ b/pdcurses/window.c @@ -4,127 +4,133 @@ /*man-start************************************************************** - Name: window +window +------ - Synopsis: - WINDOW *newwin(int nlines, int ncols, int begy, int begx); - WINDOW *derwin(WINDOW* orig, int nlines, int ncols, - int begy, int begx); - WINDOW *subwin(WINDOW* orig, int nlines, int ncols, - int begy, int begx); - WINDOW *dupwin(WINDOW *win); - int delwin(WINDOW *win); - int mvwin(WINDOW *win, int y, int x); - int mvderwin(WINDOW *win, int pary, int parx); - int syncok(WINDOW *win, bool bf); - void wsyncup(WINDOW *win); - void wcursyncup(WINDOW *win); - void wsyncdown(WINDOW *win); +### Synopsis - WINDOW *resize_window(WINDOW *win, int nlines, int ncols); - int wresize(WINDOW *win, int nlines, int ncols); - WINDOW *PDC_makelines(WINDOW *win); - WINDOW *PDC_makenew(int nlines, int ncols, int begy, int begx); - void PDC_sync(WINDOW *win); + WINDOW *newwin(int nlines, int ncols, int begy, int begx); + WINDOW *derwin(WINDOW* orig, int nlines, int ncols, + int begy, int begx); + WINDOW *subwin(WINDOW* orig, int nlines, int ncols, + int begy, int begx); + WINDOW *dupwin(WINDOW *win); + int delwin(WINDOW *win); + int mvwin(WINDOW *win, int y, int x); + int mvderwin(WINDOW *win, int pary, int parx); + int syncok(WINDOW *win, bool bf); + void wsyncup(WINDOW *win); + void wcursyncup(WINDOW *win); + void wsyncdown(WINDOW *win); - Description: - newwin() creates a new window with the given number of lines, - nlines and columns, ncols. The upper left corner of the window - is at line begy, column begx. If nlines is zero, it defaults to - LINES - begy; ncols to COLS - begx. Create a new full-screen - window by calling newwin(0, 0, 0, 0). + WINDOW *resize_window(WINDOW *win, int nlines, int ncols); + int wresize(WINDOW *win, int nlines, int ncols); + WINDOW *PDC_makelines(WINDOW *win); + WINDOW *PDC_makenew(int nlines, int ncols, int begy, int begx); + void PDC_sync(WINDOW *win); - delwin() deletes the named window, freeing all associated - memory. In the case of overlapping windows, subwindows should be - deleted before the main window. +### Description - mvwin() moves the window so that the upper left-hand corner is - at position (y,x). If the move would cause the window to be off - the screen, it is an error and the window is not moved. Moving - subwindows is allowed. + newwin() creates a new window with the given number of lines, + nlines and columns, ncols. The upper left corner of the window + is at line begy, column begx. If nlines is zero, it defaults to + LINES - begy; ncols to COLS - begx. Create a new full-screen + window by calling newwin(0, 0, 0, 0). - subwin() creates a new subwindow within a window. The - dimensions of the subwindow are nlines lines and ncols columns. - The subwindow is at position (begy, begx) on the screen. This - position is relative to the screen, and not to the window orig. - Changes made to either window will affect both. When using this - routine, you will often need to call touchwin() before calling - wrefresh(). + delwin() deletes the named window, freeing all associated + memory. In the case of overlapping windows, subwindows should be + deleted before the main window. - derwin() is the same as subwin(), except that begy and begx are - relative to the origin of the window orig rather than the - screen. There is no difference between subwindows and derived - windows. + mvwin() moves the window so that the upper left-hand corner is + at position (y,x). If the move would cause the window to be off + the screen, it is an error and the window is not moved. Moving + subwindows is allowed. - mvderwin() moves a derived window (or subwindow) inside its - parent window. The screen-relative parameters of the window are - not changed. This routine is used to display different parts of - the parent window at the same physical position on the screen. + subwin() creates a new subwindow within a window. The + dimensions of the subwindow are nlines lines and ncols columns. + The subwindow is at position (begy, begx) on the screen. This + position is relative to the screen, and not to the window orig. + Changes made to either window will affect both. When using this + routine, you will often need to call touchwin() before calling + wrefresh(). - dupwin() creates an exact duplicate of the window win. + derwin() is the same as subwin(), except that begy and begx are + relative to the origin of the window orig rather than the + screen. There is no difference between subwindows and derived + windows. - wsyncup() causes a touchwin() of all of the window's parents. + mvderwin() moves a derived window (or subwindow) inside its + parent window. The screen-relative parameters of the window are + not changed. This routine is used to display different parts of + the parent window at the same physical position on the screen. - If wsyncok() is called with a second argument of TRUE, this - causes a wsyncup() to be called every time the window is - changed. + dupwin() creates an exact duplicate of the window win. - wcursyncup() causes the current cursor position of all of a - window's ancestors to reflect the current cursor position of the - current window. + wsyncup() causes a touchwin() of all of the window's parents. - wsyncdown() causes a touchwin() of the current window if any of - its parent's windows have been touched. + If wsyncok() is called with a second argument of TRUE, this + causes a wsyncup() to be called every time the window is + changed. - resize_window() allows the user to resize an existing window. It - returns the pointer to the new window, or NULL on failure. + wcursyncup() causes the current cursor position of all of a + window's ancestors to reflect the current cursor position of the + current window. - wresize() is an ncurses-compatible wrapper for resize_window(). - Note that, unlike ncurses, it will NOT process any subwindows of - the window. (However, you still can call it _on_ subwindows.) It - returns OK or ERR. + wsyncdown() causes a touchwin() of the current window if any of + its parent's windows have been touched. - PDC_makenew() allocates all data for a new WINDOW * except the - actual lines themselves. If it's unable to allocate memory for - the window structure, it will free all allocated memory and - return a NULL pointer. + resize_window() allows the user to resize an existing window. It + returns the pointer to the new window, or NULL on failure. - PDC_makelines() allocates the memory for the lines. + wresize() is an ncurses-compatible wrapper for resize_window(). + Note that, unlike ncurses, it will NOT process any subwindows of + the window. (However, you still can call it _on_ subwindows.) It + returns OK or ERR. - PDC_sync() handles wrefresh() and wsyncup() calls when a window - is changed. + PDC_makenew() allocates all data for a new WINDOW * except the + actual lines themselves. If it's unable to allocate memory for + the window structure, it will free all allocated memory and + return a NULL pointer. - Return Value: - newwin(), subwin(), derwin() and dupwin() return a pointer - to the new window, or NULL on failure. delwin(), mvwin(), - mvderwin() and syncok() return OK or ERR. wsyncup(), - wcursyncup() and wsyncdown() return nothing. + PDC_makelines() allocates the memory for the lines. - Errors: - It is an error to call resize_window() before calling initscr(). - Also, an error will be generated if we fail to create a newly - sized replacement window for curscr, or stdscr. This could - happen when increasing the window size. NOTE: If this happens, - the previously successfully allocated windows are left alone; - i.e., the resize is NOT cancelled for those windows. + PDC_sync() handles wrefresh() and wsyncup() calls when a window + is changed. - Portability X/Open BSD SYS V - newwin Y Y Y - delwin Y Y Y - mvwin Y Y Y - subwin Y Y Y - derwin Y - Y - mvderwin Y - Y - dupwin Y - 4.0 - wsyncup Y - 4.0 - syncok Y - 4.0 - wcursyncup Y - 4.0 - wsyncdown Y - 4.0 - resize_window - - - - wresize - - - - PDC_makelines - - - - PDC_makenew - - - - PDC_sync - - - +### Return Value + + newwin(), subwin(), derwin() and dupwin() return a pointer + to the new window, or NULL on failure. delwin(), mvwin(), + mvderwin() and syncok() return OK or ERR. wsyncup(), + wcursyncup() and wsyncdown() return nothing. + +### Errors + + It is an error to call resize_window() before calling initscr(). + Also, an error will be generated if we fail to create a newly + sized replacement window for curscr, or stdscr. This could + happen when increasing the window size. NOTE: If this happens, + the previously successfully allocated windows are left alone; + i.e., the resize is NOT cancelled for those windows. + +### Portability + X/Open BSD SYS V + newwin Y Y Y + delwin Y Y Y + mvwin Y Y Y + subwin Y Y Y + derwin Y - Y + mvderwin Y - Y + dupwin Y - 4.0 + wsyncup Y - 4.0 + syncok Y - 4.0 + wcursyncup Y - 4.0 + wsyncdown Y - 4.0 + resize_window - - - + wresize - - - + PDC_makelines - - - + PDC_makenew - - - + PDC_sync - - - **man-end****************************************************************/ diff --git a/sdl1/pdcclip.c b/sdl1/pdcclip.c index 33b53683..8501ceb9 100644 --- a/sdl1/pdcclip.c +++ b/sdl1/pdcclip.c @@ -6,40 +6,45 @@ /*man-start************************************************************** - Name: clipboard +clipboard +--------- - Synopsis: - int PDC_getclipboard(char **contents, long *length); - int PDC_setclipboard(const char *contents, long length); - int PDC_freeclipboard(char *contents); - int PDC_clearclipboard(void); +### Synopsis - Description: - PDC_getclipboard() gets the textual contents of the system's - clipboard. This function returns the contents of the clipboard - in the contents argument. It is the responsibilitiy of the - caller to free the memory returned, via PDC_freeclipboard(). - The length of the clipboard contents is returned in the length - argument. + int PDC_getclipboard(char **contents, long *length); + int PDC_setclipboard(const char *contents, long length); + int PDC_freeclipboard(char *contents); + int PDC_clearclipboard(void); - PDC_setclipboard copies the supplied text into the system's - clipboard, emptying the clipboard prior to the copy. +### Description - PDC_clearclipboard() clears the internal clipboard. + PDC_getclipboard() gets the textual contents of the system's + clipboard. This function returns the contents of the clipboard + in the contents argument. It is the responsibilitiy of the + caller to free the memory returned, via PDC_freeclipboard(). + The length of the clipboard contents is returned in the length + argument. - Return Values: - indicator of success/failure of call. - PDC_CLIP_SUCCESS the call was successful - PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for - the clipboard contents - PDC_CLIP_EMPTY the clipboard contains no text - PDC_CLIP_ACCESS_ERROR no clipboard support + PDC_setclipboard copies the supplied text into the system's + clipboard, emptying the clipboard prior to the copy. - Portability X/Open BSD SYS V - PDC_getclipboard - - - - PDC_setclipboard - - - - PDC_freeclipboard - - - - PDC_clearclipboard - - - + PDC_clearclipboard() clears the internal clipboard. + +### Return Values + + indicator of success/failure of call. + PDC_CLIP_SUCCESS the call was successful + PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for + the clipboard contents + PDC_CLIP_EMPTY the clipboard contains no text + PDC_CLIP_ACCESS_ERROR no clipboard support + +### Portability + X/Open BSD SYS V + PDC_getclipboard - - - + PDC_setclipboard - - - + PDC_freeclipboard - - - + PDC_clearclipboard - - - **man-end****************************************************************/ diff --git a/sdl1/pdckbd.c b/sdl1/pdckbd.c index 26085b14..36779ba9 100644 --- a/sdl1/pdckbd.c +++ b/sdl1/pdckbd.c @@ -4,17 +4,21 @@ /*man-start************************************************************** - Name: pdckbd +pdckbd +------ - Synopsis: - unsigned long PDC_get_input_fd(void); +### Synopsis - Description: - PDC_get_input_fd() returns the file descriptor that PDCurses - reads its input from. It can be used for select(). + unsigned long PDC_get_input_fd(void); - Portability X/Open BSD SYS V - PDC_get_input_fd - - - +### Description + + PDC_get_input_fd() returns the file descriptor that PDCurses + reads its input from. It can be used for select(). + +### Portability + X/Open BSD SYS V + PDC_get_input_fd - - - **man-end****************************************************************/ diff --git a/sdl1/pdcsetsc.c b/sdl1/pdcsetsc.c index 544eaac4..3d96da20 100644 --- a/sdl1/pdcsetsc.c +++ b/sdl1/pdcsetsc.c @@ -4,28 +4,32 @@ /*man-start************************************************************** - Name: pdcsetsc +pdcsetsc +-------- - Synopsis: - int PDC_set_blink(bool blinkon); - void PDC_set_title(const char *title); +### Synopsis - Description: - PDC_set_blink() toggles whether the A_BLINK attribute sets an - actual blink mode (TRUE), or sets the background color to high - intensity (FALSE). The default is platform-dependent (FALSE in - most cases). It returns OK if it could set the state to match - the given parameter, ERR otherwise. Current platforms also - adjust the value of COLORS according to this function -- 16 for - FALSE, and 8 for TRUE. + int PDC_set_blink(bool blinkon); + void PDC_set_title(const char *title); - PDC_set_title() sets the title of the window in which the curses - program is running. This function may not do anything on some - platforms. (Currently it only works in Win32 and X11.) +### Description - Portability X/Open BSD SYS V - PDC_set_blink - - - - PDC_set_title - - - + PDC_set_blink() toggles whether the A_BLINK attribute sets an + actual blink mode (TRUE), or sets the background color to high + intensity (FALSE). The default is platform-dependent (FALSE in + most cases). It returns OK if it could set the state to match + the given parameter, ERR otherwise. Current platforms also + adjust the value of COLORS according to this function -- 16 for + FALSE, and 8 for TRUE. + + PDC_set_title() sets the title of the window in which the curses + program is running. This function may not do anything on some + platforms. (Currently it only works in Win32 and X11.) + +### Portability + X/Open BSD SYS V + PDC_set_blink - - - + PDC_set_title - - - **man-end****************************************************************/ diff --git a/win32/pdcclip.c b/win32/pdcclip.c index 35bfdb81..1c25eaf8 100644 --- a/win32/pdcclip.c +++ b/win32/pdcclip.c @@ -4,40 +4,45 @@ /*man-start************************************************************** - Name: clipboard +clipboard +--------- - Synopsis: - int PDC_getclipboard(char **contents, long *length); - int PDC_setclipboard(const char *contents, long length); - int PDC_freeclipboard(char *contents); - int PDC_clearclipboard(void); +### Synopsis - Description: - PDC_getclipboard() gets the textual contents of the system's - clipboard. This function returns the contents of the clipboard - in the contents argument. It is the responsibilitiy of the - caller to free the memory returned, via PDC_freeclipboard(). - The length of the clipboard contents is returned in the length - argument. + int PDC_getclipboard(char **contents, long *length); + int PDC_setclipboard(const char *contents, long length); + int PDC_freeclipboard(char *contents); + int PDC_clearclipboard(void); - PDC_setclipboard copies the supplied text into the system's - clipboard, emptying the clipboard prior to the copy. +### Description - PDC_clearclipboard() clears the internal clipboard. + PDC_getclipboard() gets the textual contents of the system's + clipboard. This function returns the contents of the clipboard + in the contents argument. It is the responsibilitiy of the + caller to free the memory returned, via PDC_freeclipboard(). + The length of the clipboard contents is returned in the length + argument. - Return Values: - indicator of success/failure of call. - PDC_CLIP_SUCCESS the call was successful - PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for - the clipboard contents - PDC_CLIP_EMPTY the clipboard contains no text - PDC_CLIP_ACCESS_ERROR no clipboard support + PDC_setclipboard copies the supplied text into the system's + clipboard, emptying the clipboard prior to the copy. - Portability X/Open BSD SYS V - PDC_getclipboard - - - - PDC_setclipboard - - - - PDC_freeclipboard - - - - PDC_clearclipboard - - - + PDC_clearclipboard() clears the internal clipboard. + +### Return Values + + indicator of success/failure of call. + PDC_CLIP_SUCCESS the call was successful + PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for + the clipboard contents + PDC_CLIP_EMPTY the clipboard contains no text + PDC_CLIP_ACCESS_ERROR no clipboard support + +### Portability + X/Open BSD SYS V + PDC_getclipboard - - - + PDC_setclipboard - - - + PDC_freeclipboard - - - + PDC_clearclipboard - - - **man-end****************************************************************/ diff --git a/win32/pdckbd.c b/win32/pdckbd.c index a73ed7a9..ff8464b4 100644 --- a/win32/pdckbd.c +++ b/win32/pdckbd.c @@ -4,17 +4,21 @@ /*man-start************************************************************** - Name: pdckbd +pdckbd +------ - Synopsis: - unsigned long PDC_get_input_fd(void); +### Synopsis - Description: - PDC_get_input_fd() returns the file descriptor that PDCurses - reads its input from. It can be used for select(). + unsigned long PDC_get_input_fd(void); - Portability X/Open BSD SYS V - PDC_get_input_fd - - - +### Description + + PDC_get_input_fd() returns the file descriptor that PDCurses + reads its input from. It can be used for select(). + +### Portability + X/Open BSD SYS V + PDC_get_input_fd - - - **man-end****************************************************************/ diff --git a/win32/pdcsetsc.c b/win32/pdcsetsc.c index bbc9781c..2c40d1da 100644 --- a/win32/pdcsetsc.c +++ b/win32/pdcsetsc.c @@ -4,28 +4,32 @@ /*man-start************************************************************** - Name: pdcsetsc +pdcsetsc +-------- - Synopsis: - int PDC_set_blink(bool blinkon); - void PDC_set_title(const char *title); +### Synopsis - Description: - PDC_set_blink() toggles whether the A_BLINK attribute sets an - actual blink mode (TRUE), or sets the background color to high - intensity (FALSE). The default is platform-dependent (FALSE in - most cases). It returns OK if it could set the state to match - the given parameter, ERR otherwise. Current platforms also - adjust the value of COLORS according to this function -- 16 for - FALSE, and 8 for TRUE. + int PDC_set_blink(bool blinkon); + void PDC_set_title(const char *title); - PDC_set_title() sets the title of the window in which the curses - program is running. This function may not do anything on some - platforms. (Currently it only works in Win32 and X11.) +### Description - Portability X/Open BSD SYS V - PDC_set_blink - - - - PDC_set_title - - - + PDC_set_blink() toggles whether the A_BLINK attribute sets an + actual blink mode (TRUE), or sets the background color to high + intensity (FALSE). The default is platform-dependent (FALSE in + most cases). It returns OK if it could set the state to match + the given parameter, ERR otherwise. Current platforms also + adjust the value of COLORS according to this function -- 16 for + FALSE, and 8 for TRUE. + + PDC_set_title() sets the title of the window in which the curses + program is running. This function may not do anything on some + platforms. (Currently it only works in Win32 and X11.) + +### Portability + X/Open BSD SYS V + PDC_set_blink - - - + PDC_set_title - - - **man-end****************************************************************/ diff --git a/x11/pdcclip.c b/x11/pdcclip.c index 2386aed3..20de260e 100644 --- a/x11/pdcclip.c +++ b/x11/pdcclip.c @@ -6,40 +6,45 @@ /*man-start************************************************************** - Name: clipboard +clipboard +--------- - Synopsis: - int PDC_getclipboard(char **contents, long *length); - int PDC_setclipboard(const char *contents, long length); - int PDC_freeclipboard(char *contents); - int PDC_clearclipboard(void); +### Synopsis - Description: - PDC_getclipboard() gets the textual contents of the system's - clipboard. This function returns the contents of the clipboard - in the contents argument. It is the responsibilitiy of the - caller to free the memory returned, via PDC_freeclipboard(). - The length of the clipboard contents is returned in the length - argument. + int PDC_getclipboard(char **contents, long *length); + int PDC_setclipboard(const char *contents, long length); + int PDC_freeclipboard(char *contents); + int PDC_clearclipboard(void); - PDC_setclipboard copies the supplied text into the system's - clipboard, emptying the clipboard prior to the copy. +### Description - PDC_clearclipboard() clears the internal clipboard. + PDC_getclipboard() gets the textual contents of the system's + clipboard. This function returns the contents of the clipboard + in the contents argument. It is the responsibilitiy of the + caller to free the memory returned, via PDC_freeclipboard(). + The length of the clipboard contents is returned in the length + argument. - Return Values: - indicator of success/failure of call. - PDC_CLIP_SUCCESS the call was successful - PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for - the clipboard contents - PDC_CLIP_EMPTY the clipboard contains no text - PDC_CLIP_ACCESS_ERROR no clipboard support + PDC_setclipboard copies the supplied text into the system's + clipboard, emptying the clipboard prior to the copy. - Portability X/Open BSD SYS V - PDC_getclipboard - - - - PDC_setclipboard - - - - PDC_freeclipboard - - - - PDC_clearclipboard - - - + PDC_clearclipboard() clears the internal clipboard. + +### Return Values + + indicator of success/failure of call. + PDC_CLIP_SUCCESS the call was successful + PDC_CLIP_MEMORY_ERROR unable to allocate sufficient memory for + the clipboard contents + PDC_CLIP_EMPTY the clipboard contains no text + PDC_CLIP_ACCESS_ERROR no clipboard support + +### Portability + X/Open BSD SYS V + PDC_getclipboard - - - + PDC_setclipboard - - - + PDC_freeclipboard - - - + PDC_clearclipboard - - - **man-end****************************************************************/ diff --git a/x11/pdckbd.c b/x11/pdckbd.c index c0d1adb5..781b50ca 100644 --- a/x11/pdckbd.c +++ b/x11/pdckbd.c @@ -4,17 +4,21 @@ /*man-start************************************************************** - Name: pdckbd +pdckbd +------ - Synopsis: - unsigned long PDC_get_input_fd(void); +### Synopsis - Description: - PDC_get_input_fd() returns the file descriptor that PDCurses - reads its input from. It can be used for select(). + unsigned long PDC_get_input_fd(void); - Portability X/Open BSD SYS V - PDC_get_input_fd - - - +### Description + + PDC_get_input_fd() returns the file descriptor that PDCurses + reads its input from. It can be used for select(). + +### Portability + X/Open BSD SYS V + PDC_get_input_fd - - - **man-end****************************************************************/ diff --git a/x11/pdcsetsc.c b/x11/pdcsetsc.c index 8278f273..5d85c502 100644 --- a/x11/pdcsetsc.c +++ b/x11/pdcsetsc.c @@ -6,28 +6,32 @@ /*man-start************************************************************** - Name: pdcsetsc +pdcsetsc +-------- - Synopsis: - int PDC_set_blink(bool blinkon); - void PDC_set_title(const char *title); +### Synopsis - Description: - PDC_set_blink() toggles whether the A_BLINK attribute sets an - actual blink mode (TRUE), or sets the background color to high - intensity (FALSE). The default is platform-dependent (FALSE in - most cases). It returns OK if it could set the state to match - the given parameter, ERR otherwise. Current platforms also - adjust the value of COLORS according to this function -- 16 for - FALSE, and 8 for TRUE. + int PDC_set_blink(bool blinkon); + void PDC_set_title(const char *title); - PDC_set_title() sets the title of the window in which the curses - program is running. This function may not do anything on some - platforms. (Currently it only works in Win32 and X11.) +### Description - Portability X/Open BSD SYS V - PDC_set_blink - - - - PDC_set_title - - - + PDC_set_blink() toggles whether the A_BLINK attribute sets an + actual blink mode (TRUE), or sets the background color to high + intensity (FALSE). The default is platform-dependent (FALSE in + most cases). It returns OK if it could set the state to match + the given parameter, ERR otherwise. Current platforms also + adjust the value of COLORS according to this function -- 16 for + FALSE, and 8 for TRUE. + + PDC_set_title() sets the title of the window in which the curses + program is running. This function may not do anything on some + platforms. (Currently it only works in Win32 and X11.) + +### Portability + X/Open BSD SYS V + PDC_set_blink - - - + PDC_set_title - - - **man-end****************************************************************/ diff --git a/x11/sb.c b/x11/sb.c index f2f22a42..10f8c9ba 100644 --- a/x11/sb.c +++ b/x11/sb.c @@ -4,29 +4,34 @@ /*man-start************************************************************** - Name: sb +sb +-- - Synopsis: - int sb_init(void) - int sb_set_horz(int total, int viewport, int cur) - int sb_set_vert(int total, int viewport, int cur) - int sb_get_horz(int *total, int *viewport, int *cur) - int sb_get_vert(int *total, int *viewport, int *cur) - int sb_refresh(void); +### Synopsis - Description: - These functions manipulate the scrollbar. + int sb_init(void) + int sb_set_horz(int total, int viewport, int cur) + int sb_set_vert(int total, int viewport, int cur) + int sb_get_horz(int *total, int *viewport, int *cur) + int sb_get_vert(int *total, int *viewport, int *cur) + int sb_refresh(void); - Return Value: - All functions return OK on success and ERR on error. +### Description - Portability X/Open BSD SYS V - sb_init - - - - sb_set_horz - - - - sb_set_vert - - - - sb_get_horz - - - - sb_get_vert - - - - sb_refresh - - - + These functions manipulate the scrollbar. + +### Return Value + + All functions return OK on success and ERR on error. + +### Portability + X/Open BSD SYS V + sb_init - - - + sb_set_horz - - - + sb_set_vert - - - + sb_get_horz - - - + sb_get_vert - - - + sb_refresh - - - **man-end****************************************************************/ From d74ee76dd6a654139c7958993e8f661fc7122471 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Thu, 7 Jan 2016 14:06:36 -0500 Subject: [PATCH 39/46] Indent --- pdcurses/terminfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdcurses/terminfo.c b/pdcurses/terminfo.c index 5254ad65..fadba230 100644 --- a/pdcurses/terminfo.c +++ b/pdcurses/terminfo.c @@ -31,7 +31,7 @@ terminfo int tigetnum(const char *); char *tigetstr(const char *); char *tparm(const char *,long, long, long, long, long, long, - long, long, long); + long, long, long); int tputs(const char *, int, int (*)(int)); ### Description From a0b23da3811ca2af379c207895aa435b731440f7 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 10 Jan 2016 02:40:20 -0500 Subject: [PATCH 40/46] All documentation to markdown format; removed some redundancies. --- IMPLEMNT.md | 2 +- Makefile.in | 4 +- curses.h | 16 +- doc/Makefile | 34 +- doc/README.md | 12 +- doc/intro.md | 361 +++++++++++++++++ doc/intro.txt | 833 ---------------------------------------- doc/{sdl.txt => sdl.md} | 54 +-- doc/x11.md | 407 ++++++++++++++++++++ doc/x11.txt | 416 -------------------- 10 files changed, 829 insertions(+), 1310 deletions(-) create mode 100644 doc/intro.md delete mode 100644 doc/intro.txt rename doc/{sdl.txt => sdl.md} (95%) create mode 100644 doc/x11.md delete mode 100644 doc/x11.txt diff --git a/IMPLEMNT.md b/IMPLEMNT.md index dabcabda..0f97558a 100644 --- a/IMPLEMNT.md +++ b/IMPLEMNT.md @@ -10,7 +10,7 @@ PDCurses Implementor's Guide This document is for those wishing to port PDCurses to a new platform, or just wanting to better understand how it works. Nothing here should -be needed for application programming; for that, refer to PDCurses.txt, +be needed for application programming; for that, refer to PDCurses.md, as built in doc/, or distributed as a file separate from this source package. This document assumes that you've read the user-level documentation and are very familiar with application-level curses diff --git a/Makefile.in b/Makefile.in index c409b590..a03eb2a5 100644 --- a/Makefile.in +++ b/Makefile.in @@ -75,7 +75,7 @@ $(ZIPFILE): os2/*.lrf sdl1/README.md sdl1/*.c sdl1/*.h sdl1/Make* \ win32/README.md win32/*.c win32/*.h win32/*.mak \ win32/*.ico win32/*.rc x11/README.md x11/*.c x11/*.h x11/Makefile.* \ - x11/*.xbm doc/*.txt doc/manext.c doc/Makefile + x11/*.xbm doc/*.md doc/manext.c doc/Makefile zip: $(ZIPFILE) @@ -90,7 +90,7 @@ zip: $(ZIPFILE) $(PDC_DIR)/panel.h $(PDC_DIR)/term.h \ $(PDC_DIR)/pdcurses/README.md $(PDC_DIR)/pdcurses/*.c \ $(PDC_DIR)/demos/README.md $(PDC_DIR)/demos/*.c $(PDC_DIR)/demos/*.h \ - $(PDC_DIR)/doc/*.txt $(PDC_DIR)/dos/README.md $(PDC_DIR)/dos/*.c \ + $(PDC_DIR)/doc/*.md $(PDC_DIR)/dos/README.md $(PDC_DIR)/dos/*.c \ $(PDC_DIR)/dos/*.h $(PDC_DIR)/dos/*.mak $(PDC_DIR)/dos/*.lrf \ $(PDC_DIR)/os2/README.md $(PDC_DIR)/os2/*.c $(PDC_DIR)/os2/*.h \ $(PDC_DIR)/os2/*.mak $(PDC_DIR)/os2/*.lrf \ diff --git a/curses.h b/curses.h index 29738c7a..fbbf8952 100644 --- a/curses.h +++ b/curses.h @@ -369,10 +369,10 @@ The following is the structure of a win->_attrs chtype: short form: -------------------------------------------------- -|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0| -------------------------------------------------- - color number | attrs | character eg 'a' + +-----------------------------------------------+ + |15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0| + +-----------------------------------------------+ + color number | attrs | character eg 'a' The available non-color attributes are bold, reverse and blink. Others have no effect. The high order char is an index into an array of @@ -381,10 +381,10 @@ pairs (5 bits) plus 3 bits for other attributes. long form: ----------------------------------------------------------------------------- -|31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|..| 3| 2| 1| 0| ----------------------------------------------------------------------------- - color number | modifiers | character eg 'a' + +--------------------------------------------------------------------+ + |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|..| 2| 1| 0| + +--------------------------------------------------------------------+ + color number | modifiers | character eg 'a' The available non-color attributes are bold, underline, invisible, right-line, left-line, protect, reverse and blink. 256 color pairs (8 diff --git a/doc/Makefile b/doc/Makefile index 8b5f3377..30a40a3d 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -2,25 +2,25 @@ all: manual -manual: PDCurses.txt +manual: PDCurses.md -PDCurses.txt: manext - cat intro.txt > PDCurses.txt - echo PDCurses Definitions and Variables >> PDCurses.txt - echo ================================== >> PDCurses.txt - ./manext ../curses.h >> PDCurses.txt - echo PDCurses Functions >> PDCurses.txt - echo ================== >> PDCurses.txt - ./manext ../pdcurses/*.c >> PDCurses.txt - ./manext ../x11/*.c >> PDCurses.txt - cat x11.txt >> PDCurses.txt - echo >> PDCurses.txt - echo >> PDCurses.txt +PDCurses.md: manext intro.md x11.md sdl.md ../curses.h + cat intro.md > PDCurses.md + echo PDCurses Definitions and Variables >> PDCurses.md + echo ================================== >> PDCurses.md + ./manext ../curses.h >> PDCurses.md + echo PDCurses Functions >> PDCurses.md + echo ================== >> PDCurses.md + ./manext ../pdcurses/*.c >> PDCurses.md + ./manext ../x11/*.c >> PDCurses.md + cat x11.md >> PDCurses.md + echo >> PDCurses.md + echo >> PDCurses.md echo \ -------------------------------------------------------------------------- \ ->> PDCurses.txt - echo >> PDCurses.txt - cat sdl.txt >> PDCurses.txt +>> PDCurses.md + echo >> PDCurses.md + cat sdl.md >> PDCurses.md manext: manext.c @@ -28,7 +28,7 @@ install: echo Does nothing at the moment clean: - -rm -rf *.o manext PDCurses.txt + -rm -rf *.o manext PDCurses.md distclean: clean diff --git a/doc/README.md b/doc/README.md index f769099a..595b47d8 100644 --- a/doc/README.md +++ b/doc/README.md @@ -1,17 +1,17 @@ PDCurses Documentation ====================== -Some plain text documents to provide a basic overview of PDCurses and -details for specific platforms, along with a program to combine them -with the "man page" sections from the source code files, into -"PDCurses.txt". +Some plain text documents to provide a basic overview of PDCurses and +details for specific platforms, along with a program to combine them +with the "man page" sections from the source code files, into +"PDCurses.md". Building -------- -- Type "make". ("make clean" to remove the built files.) A Unix-like - environment is required for the Makefile. This is called automatically +- Type "make". ("make clean" to remove the built files.) A Unix-like + environment is required for the Makefile. This is called automatically when doing a top-level make of the X11 port. diff --git a/doc/intro.md b/doc/intro.md new file mode 100644 index 00000000..f7582e0a --- /dev/null +++ b/doc/intro.md @@ -0,0 +1,361 @@ +PDCurses User's Guide +===================== + +Curses Overview +--------------- + +The X/Open Curses Interface Definition describes a set of C-Language +functions that provide screen-handling and updating, which are +collectively known as the curses library. + +The curses library permits manipulation of data structures called +windows which may be thought of as two-dimensional arrays of +characters representing all or part of a terminal's screen. The +windows are manipulated using a procedural interface described +elsewhere. The curses package maintains a record of what characters +are on the screen. At the most basic level, manipulation is done with +the routines move() and addch() which are used to "move" the curses +around and add characters to the default window, stdscr, which +represents the whole screen. + +An application may use these routines to add data to the window in any +convenient order. Once all data have been added, the routine +refresh() is called. The package then determines what changes have +been made which affect the screen. The screen contents are then +changed to reflect those characters now in the window, using a +sequence of operations optimized for the type of terminal in use. + +At a higher level routines combining the actions of move() and addch() +are defined, as are routines to add whole strings and to perform +format conversions in the manner of printf(). + +Interfaces are also defined to erase the entire window and to specify +the attributes of individual characters in the window. Attributes +such as inverse video, underline and blink can be used on a +per-character basis. + +New windows can be created by allowing the application to build +several images of the screen and display the appropriate one very +quickly. New windows are created using the routine newwin(). For +each routine that manipulates the default window, stdscr, there is a +corresponding routine prefixed with w to manipulate the contents of a +specified window; for example, move() and wmove(). In fact, move(...) +is functionally equivalent to wmove( stdscr, ...). This is similar to +the interface offered by printf(...) and fprintf(stdout, ...). + +Windows do not have to correspond to the entire screen. It is +possible to create smaller windows, and also to indicate that the +window is only partially visible on the screen. Furthermore, large +windows or pads, which are bigger than the actual screen size, may be +created. + +Interfaces are also defined to allow input character manipulation and +to disable and enable many input attributes: character echo, single +character input with or without signal processing (cbreak or raw +modes), carriage returns mapping to newlines, screen scrolling, etc. + + +Data Types and the \ Header +-------------------------------------- + +The data types supported by curses are described in this section. + +As the library supports a procedural interface to the data types, actual +structure contents are not described. All curses data are manipulated +using the routines provided. + + +### The \ Header + +The \ header defines various constants and declares the data +types that are available to the application. + + +### Data Types + +The following data types are declared: + + WINDOW * pointer to screen representation + SCREEN * pointer to terminal descriptor + bool boolean data type + chtype representation of a character in a window + cchar_t the wide-character equivalent of chtype + attr_t for WA_-style attributes + +The actual WINDOW and SCREEN objects used to store information are +created by the corresponding routines and a pointer to them is provided. +All manipulation is through that pointer. + + +### Variables + +The following variables are defined: + + LINES number of lines on terminal screen + COLS number of columns on terminal screen + stdscr pointer to the default screen window + curscr pointer to the current screen image + SP pointer to the current SCREEN struct + Mouse_status status of the mouse + COLORS number of colors available + COLOR_PAIRS number of color pairs available + TABSIZE size of one TAB block + acs_map[] alternate character set map + ttytype[] terminal name/description + + +### Constants + +The following constants are defined: + +#### General + + FALSE boolean false value + TRUE boolean true value + NULL zero pointer value + ERR value returned on error condition + OK value returned on successful completion + +#### Video Attributes + +Normally, attributes are a property of the character. + +For chtype: + + A_ALTCHARSET use the alternate character set + A_BLINK bright background or blinking + A_BOLD bright foreground or bold + A_DIM half bright -- no effect in PDCurses + A_INVIS invisible + A_ITALIC italic + A_LEFTLINE line along the left edge + A_PROTECT protected (?) -- PDCurses renders this as a + combination of the *LINE attributes + A_REVERSE reverse video + A_RIGHTLINE line along the right edge + A_STANDOUT terminal's best highlighting mode + A_UNDERLINE underline + + A_ATTRIBUTES bit-mask to extract attributes + A_CHARTEXT bit-mask to extract a character + A_COLOR bit-mask to extract a color-pair + +Not all attributes will work on all terminals. A_RIGHTLINE, A_LEFTLINE +and A_ITALIC are specific to PDCurses. A_INVIS and A_ITALIC are given +the same value in PDCurses. + +For attr_t: + + WA_ALTCHARSET same as A_ALTCHARSET + WA_BLINK same as A_BLINK + WA_BOLD same as A_BOLD + WA_DIM same as A_DIM + WA_INVIS same as A_INVIS + WA_LEFT same as A_LEFTLINE + WA_PROTECT same as A_PROTECT + WA_REVERSE same as A_REVERSE + WA_RIGHT same as A_RIGHTLINE + WA_STANDOUT same as A_STANDOUT + WA_UNDERLINE same as A_UNDERLINE + +Note that while A_LEFTLINE and A_RIGHTLINE are PDCurses-specific, +WA_LEFT and WA_RIGHT are standard. The following are also defined, for +compatibility, but currently have no effect in PDCurses: WA_HORIZONTAL, +WA_LOW, WA_TOP, WA_VERTICAL. + +### The Alternate Character Set + +For use in chtypes and with related functions. These are a portable way +to represent graphics characters on different terminals. + +VT100-compatible symbols -- box characters: + + ACS_ULCORNER upper left box corner + ACS_LLCORNER lower left box corner + ACS_URCORNER upper right box corner + ACS_LRCORNER lower right box corner + ACS_RTEE right "T" + ACS_LTEE left "T" + ACS_BTEE bottom "T" + ACS_TTEE top "T" + ACS_HLINE horizontal line + ACS_VLINE vertical line + ACS_PLUS plus sign, cross, or four-corner piece + +VT100-compatible symbols -- other: + + ACS_S1 scan line 1 + ACS_S9 scan line 9 + ACS_DIAMOND diamond + ACS_CKBOARD checkerboard -- 50% grey + ACS_DEGREE degree symbol + ACS_PLMINUS plus/minus sign + ACS_BULLET bullet + +Teletype 5410v1 symbols -- these are defined in SysV curses, but are not +well-supported by most terminals. Stick to VT100 characters for optimum +portability: + + ACS_LARROW left arrow + ACS_RARROW right arrow + ACS_DARROW down arrow + ACS_UARROW up arrow + ACS_BOARD checkerboard -- lighter (less dense) than + ACS_CKBOARD + ACS_LANTERN lantern symbol + ACS_BLOCK solid block + +That goes double for these -- undocumented SysV symbols. Don't use them: + + ACS_S3 scan line 3 + ACS_S7 scan line 7 + ACS_LEQUAL less than or equal + ACS_GEQUAL greater than or equal + ACS_PI pi + ACS_NEQUAL not equal + ACS_STERLING pounds sterling symbol + +Box character aliases: + + ACS_BSSB same as ACS_ULCORNER + ACS_SSBB same as ACS_LLCORNER + ACS_BBSS same as ACS_URCORNER + ACS_SBBS same as ACS_LRCORNER + ACS_SBSS same as ACS_RTEE + ACS_SSSB same as ACS_LTEE + ACS_SSBS same as ACS_BTEE + ACS_BSSS same as ACS_TTEE + ACS_BSBS same as ACS_HLINE + ACS_SBSB same as ACS_VLINE + ACS_SSSS same as ACS_PLUS + +For cchar_t and wide-character functions, WACS_ equivalents are also +defined. + +### Colors + +For use with init_pair(), color_set(), etc.: + + COLOR_BLACK + COLOR_BLUE + COLOR_GREEN + COLOR_CYAN + COLOR_RED + COLOR_MAGENTA + COLOR_YELLOW + COLOR_WHITE + +Use these instead of numeric values. The definition of the colors +depends on the implementation of curses. + + +### Input Values + +The following constants might be returned by getch() if keypad() has +been enabled. Note that not all of these may be supported on a +particular terminal: + + KEY_BREAK break key + KEY_DOWN the four arrow keys + KEY_UP + KEY_LEFT + KEY_RIGHT + KEY_HOME home key (upward+left arrow) + KEY_BACKSPACE backspace + KEY_F0 function keys; space for 64 keys is reserved + KEY_F(n) (KEY_F0+(n)) + KEY_DL delete line + KEY_IL insert line + KEY_DC delete character + KEY_IC insert character + KEY_EIC exit insert character mode + KEY_CLEAR clear screen + KEY_EOS clear to end of screen + KEY_EOL clear to end of line + KEY_SF scroll 1 line forwards + KEY_SR scroll 1 line backwards (reverse) + KEY_NPAGE next page + KEY_PPAGE previous page + KEY_STAB set tab + KEY_CTAB clear tab + KEY_CATAB clear all tabs + KEY_ENTER enter or send + KEY_SRESET soft (partial) reset + KEY_RESET reset or hard reset + KEY_PRINT print or copy + KEY_LL home down or bottom (lower left) + KEY_A1 upper left of virtual keypad + KEY_A3 upper right of virtual keypad + KEY_B2 center of virtual keypad + KEY_C1 lower left of virtual keypad + KEY_C3 lower right of virtual keypad + + KEY_BTAB Back tab key + KEY_BEG Beginning key + KEY_CANCEL Cancel key + KEY_CLOSE Close key + KEY_COMMAND Cmd (command) key + KEY_COPY Copy key + KEY_CREATE Create key + KEY_END End key + KEY_EXIT Exit key + KEY_FIND Find key + KEY_HELP Help key + KEY_MARK Mark key + KEY_MESSAGE Message key + KEY_MOVE Move key + KEY_NEXT Next object key + KEY_OPEN Open key + KEY_OPTIONS Options key + KEY_PREVIOUS Previous object key + KEY_REDO Redo key + KEY_REFERENCE Reference key + KEY_REFRESH Refresh key + KEY_REPLACE Replace key + KEY_RESTART Restart key + KEY_RESUME Resume key + KEY_SAVE Save key + KEY_SBEG Shifted beginning key + KEY_SCANCEL Shifted cancel key + KEY_SCOMMAND Shifted command key + KEY_SCOPY Shifted copy key + KEY_SCREATE Shifted create key + KEY_SDC Shifted delete char key + KEY_SDL Shifted delete line key + KEY_SELECT Select key + KEY_SEND Shifted end key + KEY_SEOL Shifted clear line key + KEY_SEXIT Shifted exit key + KEY_SFIND Shifted find key + KEY_SHELP Shifted help key + KEY_SHOME Shifted home key + KEY_SIC Shifted input key + KEY_SLEFT Shifted left arrow key + KEY_SMESSAGE Shifted message key + KEY_SMOVE Shifted move key + KEY_SNEXT Shifted next key + KEY_SOPTIONS Shifted options key + KEY_SPREVIOUS Shifted prev key + KEY_SPRINT Shifted print key + KEY_SREDO Shifted redo key + KEY_SREPLACE Shifted replace key + KEY_SRIGHT Shifted right arrow + KEY_SRSUME Shifted resume key + KEY_SSAVE Shifted save key + KEY_SSUSPEND Shifted suspend key + KEY_SUNDO Shifted undo key + KEY_SUSPEND Suspend key + KEY_UNDO Undo key + +The virtual keypad is arranged like this: + + A1 up A3 + left B2 right + C1 down C3 + +This list is incomplete -- see curses.h for the full list, and use the +testcurs demo to see what values are actually returned. The above are +just the keys required by X/Open. In particular, PDCurses defines many +CTL_ and ALT_ combinations; these are not portable. + +-------------------------------------------------------------------------- diff --git a/doc/intro.txt b/doc/intro.txt deleted file mode 100644 index b54dcf01..00000000 --- a/doc/intro.txt +++ /dev/null @@ -1,833 +0,0 @@ -PDCurses User's Guide -===================== - -Curses Overview ---------------- - -The X/Open Curses Interface Definition describes a set of C-Language -functions that provide screen-handling and updating, which are -collectively known as the curses library. - -The curses library permits manipulation of data structures called -windows which may be thought of as two-dimensional arrays of -characters representing all or part of a terminal's screen. The -windows are manipulated using a procedural interface described -elsewhere. The curses package maintains a record of what characters -are on the screen. At the most basic level, manipulation is done with -the routines move() and addch() which are used to "move" the curses -around and add characters to the default window, stdscr, which -represents the whole screen. - -An application may use these routines to add data to the window in any -convenient order. Once all data have been added, the routine -refresh() is called. The package then determines what changes have -been made which affect the screen. The screen contents are then -changed to reflect those characters now in the window, using a -sequence of operations optimized for the type of terminal in use. - -At a higher level routines combining the actions of move() and addch() -are defined, as are routines to add whole strings and to perform -format conversions in the manner of printf(). - -Interfaces are also defined to erase the entire window and to specify -the attributes of individual characters in the window. Attributes -such as inverse video, underline and blink can be used on a -per-character basis. - -New windows can be created by allowing the application to build -several images of the screen and display the appropriate one very -quickly. New windows are created using the routine newwin(). For -each routine that manipulates the default window, stdscr, there is a -corresponding routine prefixed with w to manipulate the contents of a -specified window; for example, move() and wmove(). In fact, move(...) -is functionally equivalent to wmove( stdscr, ...). This is similar to -the interface offered by printf(...) and fprintf(stdout, ...). - -Windows do not have to correspond to the entire screen. It is -possible to create smaller windows, and also to indicate that the -window is only partially visible on the screen. Furthermore, large -windows or pads, which are bigger than the actual screen size, may be -created. - -Interfaces are also defined to allow input character manipulation and -to disable and enable many input attributes: character echo, single -character input with or without signal processing (cbreak or raw -modes), carriage returns mapping to newlines, screen scrolling, etc. - - -Data Types and the Header ------------------------------------- - -The data types supported by curses are described in this section. - -As the library supports a procedural interface to the data types, actual -structure contents are not described. All curses data are manipulated -using the routines provided. - - -THE HEADER - -The header defines various constants and declares the data -types that are available to the application. - - -DATA TYPES - -The following data types are declared: - - WINDOW * pointer to screen representation - SCREEN * pointer to terminal descriptor - bool boolean data type - chtype representation of a character in a window - cchar_t the wide-character equivalent of chtype - attr_t for WA_-style attributes - -The actual WINDOW and SCREEN objects used to store information are -created by the corresponding routines and a pointer to them is provided. -All manipulation is through that pointer. - - -VARIABLES - -The following variables are defined: - - LINES number of lines on terminal screen - COLS number of columns on terminal screen - stdscr pointer to the default screen window - curscr pointer to the current screen image - SP pointer to the current SCREEN struct - Mouse_status status of the mouse - COLORS number of colors available - COLOR_PAIRS number of color pairs available - TABSIZE size of one TAB block - acs_map[] alternate character set map - ttytype[] terminal name/description - - -CONSTANTS - -The following constants are defined: - -GENERAL - - FALSE boolean false value - TRUE boolean true value - NULL zero pointer value - ERR value returned on error condition - OK value returned on successful completion - -VIDEO ATTRIBUTES - -Normally, attributes are a property of the character. - -For chtype: - - A_ALTCHARSET use the alternate character set - A_BLINK bright background or blinking - A_BOLD bright foreground or bold - A_DIM half bright -- no effect in PDCurses - A_INVIS invisible - A_ITALIC italic - A_LEFTLINE line along the left edge - A_PROTECT protected (?) -- PDCurses renders this as a - combination of the *LINE attributes - A_REVERSE reverse video - A_RIGHTLINE line along the right edge - A_STANDOUT terminal's best highlighting mode - A_UNDERLINE underline - - A_ATTRIBUTES bit-mask to extract attributes - A_CHARTEXT bit-mask to extract a character - A_COLOR bit-mask to extract a color-pair - -Not all attributes will work on all terminals. A_RIGHTLINE, A_LEFTLINE -and A_ITALIC are specific to PDCurses. A_INVIS and A_ITALIC are given -the same value in PDCurses. - -For attr_t: - - WA_ALTCHARSET same as A_ALTCHARSET - WA_BLINK same as A_BLINK - WA_BOLD same as A_BOLD - WA_DIM same as A_DIM - WA_INVIS same as A_INVIS - WA_LEFT same as A_LEFTLINE - WA_PROTECT same as A_PROTECT - WA_REVERSE same as A_REVERSE - WA_RIGHT same as A_RIGHTLINE - WA_STANDOUT same as A_STANDOUT - WA_UNDERLINE same as A_UNDERLINE - -Note that while A_LEFTLINE and A_RIGHTLINE are PDCurses-specific, -WA_LEFT and WA_RIGHT are standard. The following are also defined, for -compatibility, but currently have no effect in PDCurses: WA_HORIZONTAL, -WA_LOW, WA_TOP, WA_VERTICAL. - -THE ALTERNATE CHARACTER SET - -For use in chtypes and with related functions. These are a portable way -to represent graphics characters on different terminals. - -VT100-compatible symbols -- box characters: - - ACS_ULCORNER upper left box corner - ACS_LLCORNER lower left box corner - ACS_URCORNER upper right box corner - ACS_LRCORNER lower right box corner - ACS_RTEE right "T" - ACS_LTEE left "T" - ACS_BTEE bottom "T" - ACS_TTEE top "T" - ACS_HLINE horizontal line - ACS_VLINE vertical line - ACS_PLUS plus sign, cross, or four-corner piece - -VT100-compatible symbols -- other: - - ACS_S1 scan line 1 - ACS_S9 scan line 9 - ACS_DIAMOND diamond - ACS_CKBOARD checkerboard -- 50% grey - ACS_DEGREE degree symbol - ACS_PLMINUS plus/minus sign - ACS_BULLET bullet - -Teletype 5410v1 symbols -- these are defined in SysV curses, but -are not well-supported by most terminals. Stick to VT100 characters -for optimum portability: - - ACS_LARROW left arrow - ACS_RARROW right arrow - ACS_DARROW down arrow - ACS_UARROW up arrow - ACS_BOARD checkerboard -- lighter (less dense) than - ACS_CKBOARD - ACS_LANTERN lantern symbol - ACS_BLOCK solid block - -That goes double for these -- undocumented SysV symbols. Don't use -them: - - ACS_S3 scan line 3 - ACS_S7 scan line 7 - ACS_LEQUAL less than or equal - ACS_GEQUAL greater than or equal - ACS_PI pi - ACS_NEQUAL not equal - ACS_STERLING pounds sterling symbol - -Box character aliases: - - ACS_BSSB same as ACS_ULCORNER - ACS_SSBB same as ACS_LLCORNER - ACS_BBSS same as ACS_URCORNER - ACS_SBBS same as ACS_LRCORNER - ACS_SBSS same as ACS_RTEE - ACS_SSSB same as ACS_LTEE - ACS_SSBS same as ACS_BTEE - ACS_BSSS same as ACS_TTEE - ACS_BSBS same as ACS_HLINE - ACS_SBSB same as ACS_VLINE - ACS_SSSS same as ACS_PLUS - -For cchar_t and wide-character functions, WACS_ equivalents are also -defined. - -COLORS - -For use with init_pair(), color_set(), etc.: - - COLOR_BLACK - COLOR_BLUE - COLOR_GREEN - COLOR_CYAN - COLOR_RED - COLOR_MAGENTA - COLOR_YELLOW - COLOR_WHITE - -Use these instead of numeric values. The definition of the colors -depends on the implementation of curses. - - -INPUT VALUES - -The following constants might be returned by getch() if keypad() has -been enabled. Note that not all of these may be supported on a -particular terminal: - - KEY_BREAK break key - KEY_DOWN the four arrow keys - KEY_UP - KEY_LEFT - KEY_RIGHT - KEY_HOME home key (upward+left arrow) - KEY_BACKSPACE backspace - KEY_F0 function keys; space for 64 keys is reserved - KEY_F(n) (KEY_F0+(n)) - KEY_DL delete line - KEY_IL insert line - KEY_DC delete character - KEY_IC insert character - KEY_EIC exit insert character mode - KEY_CLEAR clear screen - KEY_EOS clear to end of screen - KEY_EOL clear to end of line - KEY_SF scroll 1 line forwards - KEY_SR scroll 1 line backwards (reverse) - KEY_NPAGE next page - KEY_PPAGE previous page - KEY_STAB set tab - KEY_CTAB clear tab - KEY_CATAB clear all tabs - KEY_ENTER enter or send - KEY_SRESET soft (partial) reset - KEY_RESET reset or hard reset - KEY_PRINT print or copy - KEY_LL home down or bottom (lower left) - KEY_A1 upper left of virtual keypad - KEY_A3 upper right of virtual keypad - KEY_B2 center of virtual keypad - KEY_C1 lower left of virtual keypad - KEY_C3 lower right of virtual keypad - - KEY_BTAB Back tab key - KEY_BEG Beginning key - KEY_CANCEL Cancel key - KEY_CLOSE Close key - KEY_COMMAND Cmd (command) key - KEY_COPY Copy key - KEY_CREATE Create key - KEY_END End key - KEY_EXIT Exit key - KEY_FIND Find key - KEY_HELP Help key - KEY_MARK Mark key - KEY_MESSAGE Message key - KEY_MOVE Move key - KEY_NEXT Next object key - KEY_OPEN Open key - KEY_OPTIONS Options key - KEY_PREVIOUS Previous object key - KEY_REDO Redo key - KEY_REFERENCE Reference key - KEY_REFRESH Refresh key - KEY_REPLACE Replace key - KEY_RESTART Restart key - KEY_RESUME Resume key - KEY_SAVE Save key - KEY_SBEG Shifted beginning key - KEY_SCANCEL Shifted cancel key - KEY_SCOMMAND Shifted command key - KEY_SCOPY Shifted copy key - KEY_SCREATE Shifted create key - KEY_SDC Shifted delete char key - KEY_SDL Shifted delete line key - KEY_SELECT Select key - KEY_SEND Shifted end key - KEY_SEOL Shifted clear line key - KEY_SEXIT Shifted exit key - KEY_SFIND Shifted find key - KEY_SHELP Shifted help key - KEY_SHOME Shifted home key - KEY_SIC Shifted input key - KEY_SLEFT Shifted left arrow key - KEY_SMESSAGE Shifted message key - KEY_SMOVE Shifted move key - KEY_SNEXT Shifted next key - KEY_SOPTIONS Shifted options key - KEY_SPREVIOUS Shifted prev key - KEY_SPRINT Shifted print key - KEY_SREDO Shifted redo key - KEY_SREPLACE Shifted replace key - KEY_SRIGHT Shifted right arrow - KEY_SRSUME Shifted resume key - KEY_SSAVE Shifted save key - KEY_SSUSPEND Shifted suspend key - KEY_SUNDO Shifted undo key - KEY_SUSPEND Suspend key - KEY_UNDO Undo key - -The virtual keypad is arranged like this: - - A1 up A3 - left B2 right - C1 down C3 - -This list is incomplete -- see curses.h for the full list, and use the -testcurs demo to see what values are actually returned. The above are -just the keys required by X/Open. In particular, PDCurses defines many -CTL_ and ALT_ combinations; these are not portable. - - -FUNCTIONS - -The following table lists each curses routine and the name of the manual -page on which it is described. - -Functions from the X/Open curses standard -- complete, except for -getch() and ungetch(), which are implemented as macros for DOS -compatibility: - - Curses Function Manual Page Name - - addch addch - addchnstr addchstr - addchstr addchstr - addnstr addstr - addstr addstr - attroff attr - attron attr - attrset attr - attr_get attr - attr_off attr - attr_on attr - attr_set attr - baudrate termattr - beep beep - bkgd bkgd - bkgdset bkgd - border border - box border - can_change_color color - cbreak inopts - chgat attr - clearok outopts - clear clear - clrtobot clear - clrtoeol clear - color_content color - color_set attr - copywin overlay - curs_set kernel - def_prog_mode kernel - def_shell_mode kernel - del_curterm terminfo - delay_output util - delch delch - deleteln deleteln - delscreen initscr - delwin window - derwin window - doupdate refresh - dupwin window - echochar addch - echo inopts - endwin initscr - erasechar termattr - erase clear - filter util - flash beep - flushinp getch - getbkgd bkgd - getnstr getstr - getstr getstr - getwin scr_dump - halfdelay inopts - has_colors color - has_ic termattr - has_il termattr - hline border - idcok outopts - idlok outopts - immedok outopts - inchnstr inchstr - inchstr inchstr - inch inch - init_color color - init_pair color - initscr initscr - innstr instr - insch insch - insdelln deleteln - insertln deleteln - insnstr innstr - insstr innstr - instr instr - intrflush inopts - isendwin initscr - is_linetouched touch - is_wintouched touch - keyname keyname - keypad inopts - killchar termattr - leaveok outopts - longname termattr - meta inopts - move move - mvaddch addch - mvaddchnstr addchstr - mvaddchstr addchstr - mvaddnstr addstr - mvaddstr addstr - mvchgat attr - mvcur terminfo - mvdelch delch - mvderwin window - mvgetch getch - mvgetnstr getstr - mvgetstr getstr - mvhline border - mvinch inch - mvinchnstr inchstr - mvinchstr inchstr - mvinnstr instr - mvinsch insch - mvinsnstr insstr - mvinsstr insstr - mvinstr instr - mvprintw printw - mvscanw scanw - mvvline border - mvwaddchnstr addchstr - mvwaddchstr addchstr - mvwaddch addch - mvwaddnstr addstr - mvwaddstr addstr - mvwchgat attr - mvwdelch delch - mvwgetch getch - mvwgetnstr getstr - mvwgetstr getstr - mvwhline border - mvwinchnstr inchstr - mvwinchstr inchstr - mvwinch inch - mvwinnstr instr - mvwinsch insch - mvwinsnstr insstr - mvwinsstr insstr - mvwinstr instr - mvwin window - mvwprintw printw - mvwscanw scanw - mvwvline border - napms kernel - newpad pad - newterm initscr - newwin window - nl inopts - nocbreak inopts - nodelay inopts - noecho inopts - nonl inopts - noqiflush inopts - noraw inopts - notimeout inopts - overlay overlay - overwrite overlay - pair_content color - pechochar pad - pnoutrefresh pad - prefresh pad - printw printw - putp terminfo - putwin scr_dump - qiflush inopts - raw inopts - redrawwin refresh - refresh refresh - reset_prog_mode kernel - reset_shell_mode kernel - resetty kernel - restartterm terminfo - ripoffline kernel - savetty kernel - scanw scanw - scr_dump scr_dump - scr_init scr_dump - scr_restore scr_dump - scr_set scr_dump - scrl scroll - scroll scroll - scrollok outopts - set_term initscr - setscrreg outopts - setterm terminfo - setupterm terminfo - slk_attroff slk - slk_attr_off slk - slk_attron slk - slk_attr_on slk - slk_attrset slk - slk_attr_set slk - slk_clear slk - slk_color slk - slk_init slk - slk_label slk - slk_noutrefresh slk - slk_refresh slk - slk_restore slk - slk_set slk - slk_touch slk - standend attr - standout attr - start_color color - subpad pad - subwin window - syncok window - termattrs termattrs - term_attrs termattrs - termname termattrs - tgetent termcap - tgetflag termcap - tgetnum termcap - tgetstr termcap - tgoto termcap - tigetflag terminfo - tigetnum terminfo - tigetstr terminfo - timeout inopts - touchline touch - touchwin touch - tparm terminfo - tputs terminfo - typeahead inopts - untouchwin touch - use_env util - vidattr terminfo - vid_attr terminfo - vidputs terminfo - vid_puts terminfo - vline border - vw_printw printw - vwprintw printw - vw_scanw scanw - vwscanw scanw - waddchnstr addchstr - waddchstr addchstr - waddch addch - waddnstr addstr - waddstr addstr - wattroff attr - wattron attr - wattrset attr - wattr_get attr - wattr_off attr - wattr_on attr - wattr_set attr - wbkgdset bkgd - wbkgd bkgd - wborder border - wchgat attr - wclear clear - wclrtobot clear - wclrtoeol clear - wcolor_set attr - wcursyncup window - wdelch delch - wdeleteln deleteln - wechochar addch - werase clear - wgetch getch - wgetnstr getstr - wgetstr getstr - whline border - winchnstr inchstr - winchstr inchstr - winch inch - winnstr instr - winsch insch - winsdelln deleteln - winsertln deleteln - winsnstr insstr - winsstr insstr - winstr instr - wmove move - wnoutrefresh refresh - wprintw printw - wredrawln refresh - wrefresh refresh - wscanw scanw - wscrl scroll - wsetscrreg outopts - wstandend attr - wstandout attr - wsyncdown window - wsyncup window - wtimeout inopts - wtouchln touch - wvline border - -Wide-character functions from the X/Open standard -- these are only -available when PDCurses is built with PDC_WIDE defined, and the -prototypes are only available from curses.h when PDC_WIDE is defined -before its inclusion in your app: - - addnwstr addstr - addwstr addstr - add_wch addch - add_wchnstr addchstr - add_wchstr addchstr - border_set border - box_set border - echo_wchar addch - erasewchar termattr - getbkgrnd bkgd - getcchar util - getn_wstr getstr - get_wch getch - get_wstr getstr - hline_set border - innwstr instr - ins_nwstr insstr - ins_wch insch - ins_wstr insstr - inwstr instr - in_wch inch - in_wchnstr inchstr - in_wchstr inchstr - key_name keyname - killwchar termattr - mvaddnwstr addstr - mvaddwstr addstr - mvadd_wch addch - mvadd_wchnstr addchstr - mvadd_wchstr addchstr - mvgetn_wstr getstr - mvget_wch getch - mvget_wstr getstr - mvhline_set border - mvinnwstr instr - mvins_nwstr insstr - mvins_wch insch - mvins_wstr insstr - mvinwstr instr - mvwaddnwstr addstr - mvwaddwstr addstr - mvwadd_wch addch - mvwadd_wchnstr addchstr - mvwadd_wchstr addchstr - mvwgetn_wstr getstr - mvwget_wch getch - mvwget_wstr getstr - mvwhline_set border - mvwinnwstr instr - mvwins_nwstr insstr - mvwins_wch insch - mvwins_wstr insstr - mvwin_wch inch - mvwin_wchnstr inchstr - mvwin_wchstr inchstr - mvwinwstr instr - mvwvline_set border - pecho_wchar pad - setcchar util - slk_wset slk - unget_wch getch - vline_set border - waddnwstr addstr - waddwstr addstr - wadd_wch addch - wadd_wchnstr addchstr - wadd_wchstr addchstr - wbkgrnd bkgd - wbkgrndset bkgd - wborder_set border - wecho_wchar addch - wgetbkgrnd bkgd - wgetn_wstr getstr - wget_wch getch - wget_wstr getstr - whline_set border - winnwstr instr - wins_nwstr insstr - wins_wch insch - wins_wstr insstr - winwstr instr - win_wch inch - win_wchnstr inchstr - win_wchstr inchstr - wunctrl util - wvline_set border - -Quasi-standard functions, from Sys V or BSD curses: - - getattrs attr - getbegx getyx - getbegy getyx - getmaxx getyx - getmaxy getyx - getparx getyx - getparx getyx - traceoff debug - traceon debug - unctrl util - -Classic PDCurses mouse functions, based on Sys V: - - mouse_set mouse - mouse_on mouse - mouse_off mouse - request_mouse_pos mouse - map_button mouse - wmouse_position mouse - getmouse mouse - getbmap mouse - -Functions from ncurses: - - assume_default_colors color - curses_version initscr - has_key keyname - use_default_colors color - wresize window - - mouseinterval mouse - mousemask mouse - mouse_trafo mouse - nc_getmouse mouse - ungetmouse mouse - wenclose mouse - wmouse_trafo mouse - -PDCurses-specific functions -- avoid these in code that's intended to be -portable: - - addrawch addch - insrawch insch - is_termresized initscr - mvaddrawch addch - mvdeleteln deleteln - mvinsertln deleteln - mvinsrawch insch - mvwaddrawch addch - mvwdeleteln deleteln - mvwinsertln deleteln - mvwinsrawch insch - raw_output outopts - resize_term initscr - resize_window window - slk_wlabel slk - waddrawch addch - winsrawch insch - wordchar termattr - - PDC_debug debug - PDC_ungetch getch - PDC_set_blink pdcsetsc - PDC_set_line_color color - PDC_set_title pdcsetsc - - PDC_clearclipboard pdcclip - PDC_freeclipboard pdcclip - PDC_getclipboard pdcclip - PDC_setclipboard pdcclip - - PDC_get_input_fd pdckbd - PDC_get_key_modifiers getch - PDC_return_key_modifiers getch - PDC_save_key_modifiers getch - -Functions specific to the X11 port of PDCurses: - - Xinitscr initscr - XCursesExit - - sb_init sb - sb_set_horz sb - sb_set_vert sb - sb_get_horz sb - sb_get_vert sb - sb_refresh sb - --------------------------------------------------------------------------- diff --git a/doc/sdl.txt b/doc/sdl.md similarity index 95% rename from doc/sdl.txt rename to doc/sdl.md index 6a54b9b4..cbfcd8ee 100644 --- a/doc/sdl.txt +++ b/doc/sdl.md @@ -1,43 +1,43 @@ SDL Considerations ================== -There are no special requirements to use PDCurses for SDL -- all -PDCurses-compatible code should work fine. (In fact, you can even build -against the Win32 console pdcurses.dll, and then swap in the SDL -pdcurses.dll.) Nothing extra is needed beyond the base SDL library. +There are no special requirements to use PDCurses for SDL -- all +PDCurses-compatible code should work fine. (In fact, you can even build +against the Win32 console pdcurses.dll, and then swap in the SDL +pdcurses.dll.) Nothing extra is needed beyond the base SDL library. However, there are some optional special features, described here. -The principal limitation of this port is that input is currently -restricted to ASCII (i.e., 0-127), plus the special keys like KEY_LEFT. -(You could have Unicode input, but then the input wouldn't match the -output, which is in Code Page 437.) Also, see the note about the +The principal limitation of this port is that input is currently +restricted to ASCII (i.e., 0-127), plus the special keys like KEY_LEFT. +(You could have Unicode input, but then the input wouldn't match the +output, which is in Code Page 437.) Also, see the note about the potential for incomplete output under "PDC_update_rects()", below. Fonts ----- -The font is a simple BMP, 32 characters wide by 8 characters tall, -preferably with a palette. (BMPs without palettes still work, but in -that case, no attributes will be available, nor will the cursor work.) -The first entry in the palette (usually black) is treated as the -background color; the last entry (usually white) is treated as the -foreground. These are changed or made transparent as appropriate; any -other colors in the palette are passed through unchanged. So -- although -a one-bit depth is sufficient for a normal font -- you could redraw some +The font is a simple BMP, 32 characters wide by 8 characters tall, +preferably with a palette. (BMPs without palettes still work, but in +that case, no attributes will be available, nor will the cursor work.) +The first entry in the palette (usually black) is treated as the +background color; the last entry (usually white) is treated as the +foreground. These are changed or made transparent as appropriate; any +other colors in the palette are passed through unchanged. So -- although +a one-bit depth is sufficient for a normal font -- you could redraw some characters as multi-colored tiles. -The font must be monospaced. The size of each character is derived by -dividing the width of the BMP by 32 and the height by 8. There is no +The font must be monospaced. The size of each character is derived by +dividing the width of the BMP by 32 and the height by 8. There is no constraint on the dimensions. -As provided in the default font and expected by acs_map[], the font is -in Code Page 437 form. But you can of course use any layout if you're +As provided in the default font and expected by acs_map[], the font is +in Code Page 437 form. But you can of course use any layout if you're not relying on correct values for the ACS_* macros. -The font can be set via the environment variable PDC_FONT. If it's not -set, PDCurses looks for a file named "pdcfont.bmp" in the current -directory at the time of initscr(). If neither is found, it uses the +The font can be set via the environment variable PDC_FONT. If it's not +set, PDCurses looks for a file named "pdcfont.bmp" in the current +directory at the time of initscr(). If neither is found, it uses the built-in default font encoded in deffont.h. @@ -90,11 +90,11 @@ course this is extremely non-portable!) To aid you, there are several external variables and functions specific to the SDL port; you could include pdcsdl.h, or just add the declarations you need in your code: - PDCEX SDL_Surface *pdc_screen, *pdc_font, *pdc_icon, *pdc_back; - PDCEX int pdc_sheight, pdc_swidth, pdc_yoffset, pdc_xoffset; + PDCEX SDL_Surface *pdc_screen, *pdc_font, *pdc_icon, *pdc_back; + PDCEX int pdc_sheight, pdc_swidth, pdc_yoffset, pdc_xoffset; - void PDC_update_rects(void); - void PDC_retile(void); + void PDC_update_rects(void); + void PDC_retile(void); pdc_screen is the main surface, created by SDL_SetVideoMode(), unless it's preset before initscr(). You can perform normal SDL operations on diff --git a/doc/x11.md b/doc/x11.md new file mode 100644 index 00000000..e68bb3a5 --- /dev/null +++ b/doc/x11.md @@ -0,0 +1,407 @@ +X11 Considerations +================== + +PDCurses for X11 uses the System V IPC shared memory facility, along +with sockets, to share data between the curses program and the child +process created to manage the X stuff. + +When compiling your application, you need to include the \ or +\ that comes with PDCurses. You also need to link your code +with libXCurses. You may need to link with the following libraries under +X11R5: + + Xaw Xmu Xt X11 + +or, under X11R6: + + Xaw Xmu Xt X11 SM ICE Xext + +You can run "xcurses-config --libs" to show the link parameters for your +system. If using dynamic linking, on some systems, "-lXCurses" suffices. + +By calling Xinitscr() rather than initscr(), you can pass your program +name and resource overrides to PDCurses. The program name is used as the +title of the X window, and for defining X resources specific to your +program. + + +Interaction with stdio +---------------------- + +Be aware that curses programs that expect to have a normal tty +underneath them will be very disappointed! Output directed to stdout +will go to the xterm that invoked the PDCurses application, or to the +console if not invoked directly from an xterm. Similarly, stdin will +expect its input from the same place as stdout. + + +X Resources +----------- + +PDCurses for X11 recognizes the following resources: + +### lines + +Specifies the number of lines the "screen" will have. Directly equates +to LINES. There is no theoretical maximum. The minimum value must be 2. +Default: 24 + +### cols + +Specifies the number of columns the "screen" will have. Directly equates +to COLS. There is no theoretical maximum. The minimum value must be 2. +Default: 80 + +### normalFont + +The name of a fixed width font. Default: 7x13 + +### italicFont + +The name of a fixed width font to be used for characters with A_ITALIC +attributes. Must have the same cell size as normalFont. Default: 7x13 +(obviously not an italic font) + +### pointer + +The name of a valid pointer cursor. Default: xterm + +### pointerForeColor + +The foreground color of the pointer. Default: black + +### pointerBackColor + +The background color of the pointer. Default: white + +### cursorColor + +### textCursor + +The alignment of the text cursor; horizontal or vertical. Default: +horizontal + +### colorBlack + +The color of the COLOR_BLACK attribute. Default: Black + +### colorRed + +The color of the COLOR_RED attribute. Default: red3 + +### colorGreen + +The color of the COLOR_GREEN attribute. Default: green3 + +### colorYellow + +The color of the COLOR_YELLOW attribute. Default: yellow3 + +### colorBlue + +The color of the COLOR_BLUE attribute. Default: blue3 + +### colorMagenta + +The color of the COLOR_MAGENTA attribute. Default: magenta3 + +### colorCyan + +The color of the COLOR_CYAN attribute. Default: cyan3 + +### colorWhite + +The color of the COLOR_WHITE attribute. Default: Grey + +### colorBoldBlack + +COLOR_BLACK combined with A_BOLD. Default: grey40 + +### colorBoldRed + +COLOR_RED combined with A_BOLD. Default: red1 + +### colorBoldGreen + +COLOR_GREEN combined with A_BOLD. Default: green1 + +### colorBoldYellow + +COLOR_YELLOW combined with A_BOLD. Default: yellow1 + +### colorBoldBlue + +COLOR_BLUE combined with A_BOLD. Default: blue1 + +### colorBoldMagenta + +COLOR_MAGENTA combined with A_BOLD. Default: magenta1 + +### colorBoldCyan + +COLOR_CYAN combined with A_BOLD. Default: cyan1 + +### colorBoldWhite + +COLOR_WHITE combined with A_BOLD. Default: White + +### bitmap + +The name of a valid bitmap file of depth 1 (black and white) used for +the application's icon. The file is an X bitmap. Default: a 32x32 or +64x64 pixmap depending on the window manager + +### pixmap + +The name of a valid pixmap file of any depth supported by the window +manager (color) for the application's icon, The file is an X11 pixmap. +This resource is only available if the libXpm package has been installed +(most systems have this by default). This resource overrides the +"bitmap" resource. Default: none, uses default bitmap above + +### translations + +Translations enable the user to customize the action that occurs when a +key, combination of keys, or a button is pressed. The translations are +similar to those used by xterm. + +Defaults: + + : XCursesKeyPress() + : XCursesKeyPress() + : XCursesButton() + : XCursesButton() + : XCursesButton() + +The most useful action for KeyPress translations is string(). The +argument to the string() action can be either a string or a hex +representation of a character; e.g., string(0x1b) will send the ASCII +escape character to the application; string("[11~") will send [ 1 1 ~ , +as separate keystrokes. + +### shmmin + +On most systems, there are two Unix kernel parameters that determine the +allowable size of a shared memory segment. These parameters are usually +something like SHMMIN and SHMMAX. To use shared memory, a program must +allocate a segment of shared memory that is between these two values. +Usually these values are like 1 for SHMMIN and some large number for +SHMMAX. Sometimes the Unix kernel is configured to have a value of +SHMMIN that is bigger than the size of one of the shared memory segments +that libXCurses uses. On these systems an error message like: + + Cannot allocate shared memory for SCREEN: Invalid argument + +will result. To overcome this problem, this resource should be set to +the kernel value for SHMMIN. This ensures that a shared memory segment +will always be bigger than the kernel value for SHMMIN (and hopefully +less than SHMMAX!) Default: 0 + +### borderColor + +The color of the border around the screen. Default: black + +### borderWidth + +The width in pixels of the border around the screen. Default: 0 + +### clickPeriod + +The period (in milliseconds) between a button press and a button release +that determines if a click of a button has occurred. Default: 100 + +### doubleClickPeriod + +The period (in milliseconds) between two button press events that +determines if a double click of a button has occurred. Default: 200 + +### composeKey + +The name of the X key that defines the "compose key", which is used to +enter characters in the Latin-1 character set above 0xA0. (See "Compose +Keys for Latin-1" below.) This is used only when PDCurses is built +without XIM support. While in compose mode, the text cursor will appear +as a hollow rectangle. Default: Multi_key + + +Using Resources +--------------- + +All applications have a top-level class name of "XCurses". If Xinitscr() +is used, it sets an application's top-level widget name. (Otherwise the +name defaults to "PDCurses".) + +Examples for app-defaults or .Xdefaults: + + ! + ! resources for XCurses class of programs + ! + XCurses*lines: 30 + XCurses*cols: 80 + XCurses*normalFont: 9x13 + XCurses*bitmap: /tmp/xcurses.xbm + XCurses*pointer: top_left_arrow + ! + ! resources for testcurs - XCurses + ! + testcurs.colorRed: orange + testcurs.colorBlack: midnightblue + testcurs.lines: 25 + *testcurs.Translations: #override \n \ + F12: string(0x1b) string("[11~") \n + ! + ! resources for THE - XCurses + ! + ! resources with the * wildcard can be overridden by a parameter passed + ! to initscr() + ! + the*normalFont: 9x15 + the*lines: 40 + the*cols: 86 + the*pointer: xterm + the*pointerForeColor: white + the*pointerBackColor: black + ! + ! resources with the . format can not be overridden by a parameter passed + ! to Xinitscr() + ! + the.bitmap: /home/mark/the/the64.xbm + the.pixmap: /home/mark/the/the64.xpm + +Resources may also be passed as parameters to the Xinitscr() function. +Parameters are strings in the form of switches; e.g., to set the color +"red" to "indianred", and the number of lines to 30, the string passed +to Xinitscr would be: "-colorRed indianred -lines 30" + + +Compose Keys for Latin-1 +------------------------ + +When built without XIM support, PDCurses for X11 provides its own, +limited compose key system for Latin-1 characters. The available +combinations are listed here. For a given character, any of the +combinations shown in the last column may be used. To generate a +character, press the "compose" key followed by one of the pairs of +keystrokes. Where no key is evident, the spacebar is used. Thus, to +generate the NO-BREAK SPACE, press the "compose" key followed by two +hits of the spacebar. + +With a typical modern X server, you can get many more compose key +combinations by using XIM instead. Configure PDCurses with --enable-xim +to use XIM support. + +This document is encoded in UTF-8. + + Hex| Dec |Chr| Description ISO 10646-1:1993(E) | Compose key combinations + ---+-----+---+---------------------------------+------------------------- + A0 | 160 | | NO-BREAK SPACE | + A1 | 161 | ¡ | INVERTED EXCLAMATION MARK | ! !! + A2 | 162 | ¢ | CENT SIGN | c| |c c/ c$ C$ C| + A3 | 163 | £ | POUND SIGN | L- L$ L= l- l$ l= |- + A4 | 164 | ¤ | CURRENCY SIGN | xo ox XO g$ + A5 | 165 | ¥ | YEN SIGN | =y y= =Y Y= Y- y$ y- + A6 | 166 | ¦ | BROKEN BAR | | || vb VB |^ + A7 | 167 | § | SECTION SIGN | SO SS s! S! so + A8 | 168 | ¨ | DIAERESIS | " "" + A9 | 169 | © | COPYRIGHT SIGN | CO co OC + AA | 170 | ª | FEMININE ORDINAL INDICATOR | sa SA a_ A_ + AB | 171 | « | LEFT DOUBLE ANGLE QUOTES | << + AC | 172 | ¬ | NOT SIGN | -, no NO + AD | 173 | ­ | SOFT HYPHEN | - -- + AE | 174 | ® | REGISTERED SIGN | RO ro OR + AF | 175 | ¯ | MACRON | -^ _^ __ + B0 | 176 | ° | DEGREE SIGN | o 0^ 0* de DE ^0 + B1 | 177 | ± | PLUS-MINUS SIGN | -+ +- + B2 | 178 | ² | SUPERSCRIPT TWO | 2 2^ s2 ^2 + B3 | 179 | ³ | SUPERSCRIPT THREE | 3 3^ s3 ^3 + B4 | 180 | ´ | ACUTE ACCENT | ' '' + B5 | 181 | µ | MICRO SIGN | u /u /U *m *M + B6 | 182 | ¶ | PILCROW SIGN | p! P! pg PG + B7 | 183 | · | MIDDLE DOT | . .^ .. + B8 | 184 | ¸ | CEDILLA | , ,, + B9 | 185 | ¹ | SUPERSCRIPT ONE | 1 1^ s1 ^1 + BA | 186 | º | MASCULINE ORDINAL INDICATOR | o_ s0 S0 + BB | 187 | » | RIGHT DOUBLE ANGLE QUOTES | >> + BC | 188 | ¼ | VULGAR FRACTION ONE QUARTER | 14 + BD | 189 | ½ | VULGAR FRACTION ONE HALF | 12 + BE | 190 | ¾ | VULGAR FRACTION THREE QUARTERS | 34 + BF | 191 | ¿ | INVERTED QUESTION MARK | ? ?? + C0 | 192 | À | CAPITAL A WITH GRAVE ACCENT | `A A` + C1 | 193 | Á | CAPITAL A WITH ACUTE ACCENT | 'A A' + C2 | 194 | Â | CAPITAL A WITH CIRCUMFLEX ACCENT| ^A A^ A> + C3 | 195 | Ã | CAPITAL A WITH TILDE | ~A A~ A- + C4 | 196 | Ä | CAPITAL A WITH DIAERESIS | "A A" + C5 | 197 | Å | CAPITAL A WITH RING ABOVE | oA Ao A* OA *A + C6 | 198 | Æ | CAPITAL LIGATURE AE | AE + C7 | 199 | Ç | CAPITAL C WITH CEDILLA | ,C C, + C8 | 200 | È | CAPITAL E WITH GRAVE ACCENT | `E E` + C9 | 201 | É | CAPITAL E WITH ACUTE ACCENT | 'E E' + CA | 202 | Ê | CAPITAL E WITH CIRCUMFLEX ACCENT| ^E E^ E> + CB | 203 | Ë | CAPITAL E WITH DIAERESIS | "E E" + CC | 204 | Ì | CAPITAL I WITH GRAVE ACCENT | `I I` + CD | 205 | Í | CAPITAL I WITH ACUTE ACCENT | 'I I' + CE | 206 | Î | CAPITAL I WITH CIRCUMFLEX ACCENT| ^I I^ I> + CF | 207 | Ï | CAPITAL I WITH DIAERESIS | "I I" + D0 | 208 | Ð | CAPITAL ETH | D- + D1 | 209 | Ñ | CAPITAL N WITH TILDE | ~N N~ N- + D2 | 210 | Ò | CAPITAL O WITH GRAVE ACCENT | `O O` + D3 | 211 | Ó | CAPITAL O WITH ACUTE ACCENT | 'O O' + D4 | 212 | Ô | CAPITAL O WITH CIRCUMFLEX ACCENT| ^O O^ O> + D5 | 213 | Õ | CAPITAL O WITH TILDE | ~O O~ O- + D6 | 214 | Ö | CAPITAL O WITH DIAERESIS | "O O" + D7 | 215 | × | MULTIPLICATION SIGN | x xx XX mu MU + D8 | 216 | Ø | CAPITAL O WITH STROKE | /O O/ + D9 | 217 | Ù | CAPITAL U WITH GRAVE ACCENT | `U U` + DA | 218 | Ú | CAPITAL U WITH ACUTE ACCENT | 'U U' + DB | 219 | Û | CAPITAL U WITH CIRCUMFLEX ACCENT| ^U U^ U> + DC | 220 | Ü | CAPITAL U WITH DIAERESIS | "U U" + DD | 221 | Ý | CAPITAL Y WITH ACUTE ACCENT | 'Y Y' + DE | 222 | Þ | CAPITAL THORN | P TH |P + DF | 223 | ß | SMALL SHARP S | ss + E0 | 224 | à | SMALL A WITH GRAVE ACCENT | `a a` + E1 | 225 | á | SMALL A WITH ACUTE ACCENT | 'a a' + E2 | 226 | â | SMALL A WITH CIRCUMFLEX ACCENT | ^a a^ a> + E3 | 227 | ã | SMALL A WITH TILDE | ~a a~ a- + E4 | 228 | ä | SMALL A WITH DIAERESIS | "a a" + E5 | 229 | å | SMALL A WITH RING ABOVE | oa ao Oa a* *a + E6 | 230 | æ | SMALL LIGATURE AE | ae + E7 | 231 | ç | SMALL C WITH CEDILLA | ,c c, + E8 | 232 | è | SMALL E WITH GRAVE ACCENT | `e e` + E9 | 233 | é | SMALL E WITH ACUTE ACCENT | 'e e' + EA | 234 | ê | SMALL E WITH CIRCUMFLEX ACCENT | ^e e^ e> + EB | 235 | ë | SMALL E WITH DIAERESIS | "e e" + EC | 236 | ì | SMALL I WITH GRAVE ACCENT | `i i` + ED | 237 | í | SMALL I WITH ACUTE ACCENT | 'i i' + EE | 238 | î | SMALL I WITH CIRCUMFLEX ACCENT | ^i i^ i> + EF | 239 | ï | SMALL I WITH DIAERESIS | "i i" + F0 | 240 | ð | SMALL ETH | d- + F1 | 241 | ñ | SMALL N WITH TILDE | ~n n~ n- + F2 | 242 | ò | SMALL O WITH GRAVE ACCENT | `o o` + F3 | 243 | ó | SMALL O WITH ACUTE ACCENT | 'o o' + F4 | 244 | ô | SMALL O WITH CIRCUMFLEX ACCENT | ^o o^ o> + F5 | 245 | õ | SMALL O WITH TILDE | ~o o~ o- + F6 | 246 | ö | SMALL O WITH DIAERESIS | "o o" + F7 | 247 | ÷ | DIVISION SIGN | -: :- + F8 | 248 | ø | SMALL O WITH OBLIQUE BAR | /o o/ + F9 | 249 | ù | SMALL U WITH GRAVE ACCENT | `u u` + FA | 250 | ú | SMALL U WITH ACUTE ACCENT | 'u u' + FB | 251 | û | SMALL U WITH CIRCUMFLEX ACCENT | ^u u^ u> + FC | 252 | ü | SMALL U WITH DIAERESIS | "u u" + FD | 253 | ý | SMALL Y WITH ACUTE ACCENT | 'y y' + FE | 254 | þ | SMALL THORN | p th |p + FF | 255 | ÿ | SMALL Y WITH DIAERESIS | "y y" + + +Deprecated +---------- + +XCursesProgramName is no longer used. To set the program name, you must +use Xinitscr(), or PDC_set_title() to set just the window title. + +The XCursesExit() function is now called automatically via atexit(). +(Multiple calls to it are OK, so you don't need to remove it if you've +already added it for previous versions of PDCurses.) + +XCURSES is no longer defined automatically, but need not be defined, +unless you want the X11-specific prototypes. (Normal curses programs +won't need it.) diff --git a/doc/x11.txt b/doc/x11.txt deleted file mode 100644 index db05683d..00000000 --- a/doc/x11.txt +++ /dev/null @@ -1,416 +0,0 @@ -X11 Considerations -================== - -PDCurses for X11 uses the System V IPC shared memory facility, along -with sockets, to share data between the curses program and the child -process created to manage the X stuff. - -When compiling your application, you need to include the or - that comes with PDCurses. You also need to link your code -with libXCurses. You may need to link with the following libraries under -X11R5: - Xaw Xmu Xt X11 - -or, under X11R6: - Xaw Xmu Xt X11 SM ICE Xext - -You can run "xcurses-config --libs" to show the link parameters for your -system. If using dynamic linking, on some systems, "-lXCurses" suffices. - -By calling Xinitscr() rather than initscr(), you can pass your program -name and resource overrides to PDCurses. The program name is used as the -title of the X window, and for defining X resources specific to your -program. - - -Interaction with stdio ----------------------- - -Be aware that curses programs that expect to have a normal tty -underneath them will be very disappointed! Output directed to stdout -will go to the xterm that invoked the PDCurses application, or to the -console if not invoked directly from an xterm. Similarly, stdin will -expect its input from the same place as stdout. - - -X Resources ------------ - -PDCurses for X11 recognizes the following resources: - - lines - cols - normalFont - italicFont - pointer - pointerForeColor - pointerBackColor - cursorColor - textCursor - colorBlack - colorRed - colorGreen - colorYellow - colorBlue - colorMagenta - colorCyan - colorWhite - colorBoldBlack - colorBoldRed - colorBoldGreen - colorBoldYellow - colorBoldBlue - colorBoldMagenta - colorBoldCyan - colorBoldWhite - bitmap - pixmap - translations - shmmin - borderWidth - borderColor - clickPeriod - doubleClickPeriod - composeKey - -lines: Specifies the number of lines the "screen" will have. - Directly equates to LINES. - There is no theoretical maximum. - The minimum value must be 2. - Default: 24 - -cols: Specifies the number of columns the "screen" will have. - Directly equates to COLS. - There is no theoretical maximum. - The minimum value must be 2. - Default: 80 - -normalFont: The name of a fixed width font. - Default: 7x13 - -italicFont: The name of a fixed width font to be used for - characters with A_ITALIC attributes. Must have the - same cell size as normalFont. - Default: 7x13 (obviously not an italic font) - -pointer: The name of a valid pointer cursor. - Default: xterm - -pointerForeColor: The foreground color of the pointer. - Default: black - -pointerBackColor: The background color of the pointer. - Default: white - -textCursor: The alignment of the text cursor; horizontal or vertical. - Default: horizontal - -colorBlack: The color of the COLOR_BLACK attribute. - Default: Black - -colorRed: The color of the COLOR_RED attribute. - Default: red3 - -colorGreen: The color of the COLOR_GREEN attribute. - Default: green3 - -colorYellow: The color of the COLOR_YELLOW attribute. - Default: yellow3 - -colorBlue: The color of the COLOR_BLUE attribute. - Default: blue3 - -colorMagenta: The color of the COLOR_MAGENTA attribute. - Default: magenta3 - -colorCyan: The color of the COLOR_CYAN attribute. - Default: cyan3 - -colorWhite: The color of the COLOR_WHITE attribute. - Default: Grey - -colorBoldBlack: COLOR_BLACK combined with A_BOLD. - Default: grey40 - -colorBoldRed: COLOR_RED combined with A_BOLD. - Default: red1 - -colorBoldGreen: COLOR_GREEN combined with A_BOLD. - Default: green1 - -colorBoldYellow: COLOR_YELLOW combined with A_BOLD. - Default: yellow1 - -colorBoldBlue: COLOR_BLUE combined with A_BOLD. - Default: blue1 - -colorBoldMagenta: COLOR_MAGENTA combined with A_BOLD. - Default: magenta1 - -colorBoldCyan: COLOR_CYAN combined with A_BOLD. - Default: cyan1 - -colorBoldWhite: COLOR_WHITE combined with A_BOLD. - Default: White - -bitmap: The name of a valid bitmap file of depth 1 (black and white) - used for the application's icon. The file is an X bitmap. - Default: a 32x32 or 64x64 pixmap depending on the - window manager - -pixmap: The name of a valid pixmap file of any depth - supported by the window manager (color) for the - application's icon, The file is an X11 pixmap. This - resource is only available if the libXpm package has - been installed (most systems have this by default). - This resource overrides the "bitmap" resource. - Default: none, uses default bitmap above - -translations: Translations enable the user to customize the action - that occurs when a key, combination of keys, or a - button is pressed. The translations are similar to - those used by xterm. - Defaults: - : XCursesKeyPress() - : XCursesKeyPress() - : XCursesButton() - : XCursesButton() - : XCursesButton() - - The most useful action for KeyPress translations is - string(). The argument to the string() action can be - either a string or a hex representation of a - character; e.g., string(0x1b) will send the ASCII - escape character to the application; string("[11~") - will send [ 1 1 ~ , as separate keystrokes. - -shmmin: On most systems, there are two Unix kernel parameters - that determine the allowable size of a shared memory - segment. These parameters are usually something like - SHMMIN and SHMMAX. To use shared memory, a program - must allocate a segment of shared memory that is - between these two values. Usually these values are - like 1 for SHMMIN and some large number for SHMMAX. - Sometimes the Unix kernel is configured to have a - value of SHMMIN that is bigger than the size of one - of the shared memory segments that libXCurses uses. - On these systems an error message like: - - Cannot allocate shared memory for SCREEN: Invalid argument - - will result. To overcome this problem, this resource - should be set to the kernel value for SHMMIN. This - ensures that a shared memory segment will always be - bigger than the kernel value for SHMMIN (and - hopefully less than SHMMAX!) - - Default: 0 - -borderColor: The color of the border around the screen. - Default: black - -borderWidth: The width in pixels of the border around the screen. - Default: 0 - -clickPeriod: The period (in milliseconds) between a button - press and a button release that determines if a click - of a button has occurred. - Default: 100 - -doubleClickPeriod: The period (in milliseconds) between two button - press events that determines if a double click - of a button has occurred. - Default: 200 - -composeKey: The name of the X key that defines the "compose key", - which is used to enter characters in the Latin-1 - character set above 0xA0. (See "Compose Keys for - Latin-1" below.) This is used only when PDCurses is - built without XIM support. While in compose mode, the - text cursor will appear as a hollow rectangle. - Default: Multi_key - - -Using Resources ---------------- - -All applications have a top-level class name of "XCurses". If Xinitscr() -is used, it sets an application's top-level widget name. (Otherwise the -name defaults to "PDCurses".) - -Examples for app-defaults or .Xdefaults: - -! -! resources for XCurses class of programs -! -XCurses*lines: 30 -XCurses*cols: 80 -XCurses*normalFont: 9x13 -XCurses*bitmap: /tmp/xcurses.xbm -XCurses*pointer: top_left_arrow -! -! resources for testcurs - XCurses -! -testcurs.colorRed: orange -testcurs.colorBlack: midnightblue -testcurs.lines: 25 -*testcurs.Translations: #override \n \ - F12: string(0x1b) string("[11~") \n -! -! resources for THE - XCurses -! -! resources with the * wildcard can be overridden by a parameter passed -! to initscr() -! -the*normalFont: 9x15 -the*lines: 40 -the*cols: 86 -the*pointer: xterm -the*pointerForeColor: white -the*pointerBackColor: black -! -! resources with the . format can not be overridden by a parameter passed -! to Xinitscr() -! -the.bitmap: /home/mark/the/the64.xbm -the.pixmap: /home/mark/the/the64.xpm - -Resources may also be passed as parameters to the Xinitscr() function. -Parameters are strings in the form of switches; e.g., to set the color -"red" to "indianred", and the number of lines to 30, the string passed -to Xinitscr would be: "-colorRed indianred -lines 30" - - -Compose Keys for Latin-1 ------------------------- - -When built without XIM support, PDCurses for X11 provides its own, -limited compose key system for Latin-1 characters. The available -combinations are listed here. For a given character, any of the -combinations shown in the last column may be used. To generate a -character, press the "compose" key followed by one of the pairs of -keystrokes. Where no key is evident, the spacebar is used. Thus, to -generate the NO-BREAK SPACE, press the "compose" key followed by two -hits of the spacebar. - -With a typical modern X server, you can get many more compose key -combinations by using XIM instead. Configure PDCurses with --enable-xim -to use XIM support. - -This document is encoded in UTF-8. - -+----+-----+---+---------------------------------+---------------------------+ -|Hex | Dec |Chr| Description ISO 10646-1:1993(E) | Compose key combinations | -+----+-----+---+---------------------------------+---------------------------+ -| A0 | 160 | | NO-BREAK SPACE | | -| A1 | 161 | ¡ | INVERTED EXCLAMATION MARK | ! !! | -| A2 | 162 | ¢ | CENT SIGN | c| |c c/ c$ C$ C| | -| A3 | 163 | £ | POUND SIGN | L- L$ L= l- l$ l= |-| -| A4 | 164 | ¤ | CURRENCY SIGN | xo ox XO g$ | -| A5 | 165 | ¥ | YEN SIGN | =y y= =Y Y= Y- y$ y-| -| A6 | 166 | ¦ | BROKEN BAR | | || vb VB |^ | -| A7 | 167 | § | SECTION SIGN | SO SS s! S! so | -| A8 | 168 | ¨ | DIAERESIS | " "" | -| A9 | 169 | © | COPYRIGHT SIGN | CO co OC | -| AA | 170 | ª | FEMININE ORDINAL INDICATOR | sa SA a_ A_ | -| AB | 171 | « | LEFT DOUBLE ANGLE QUOTES | << | -| AC | 172 | ¬ | NOT SIGN | -, no NO | -| AD | 173 | ­ | SOFT HYPHEN | - -- | -| AE | 174 | ® | REGISTERED SIGN | RO ro OR | -| AF | 175 | ¯ | MACRON | -^ _^ __ | -| B0 | 176 | ° | DEGREE SIGN | o 0^ 0* de DE ^0 | -| B1 | 177 | ± | PLUS-MINUS SIGN | -+ +- | -| B2 | 178 | ² | SUPERSCRIPT TWO | 2 2^ s2 ^2 | -| B3 | 179 | ³ | SUPERSCRIPT THREE | 3 3^ s3 ^3 | -| B4 | 180 | ´ | ACUTE ACCENT | ' '' | -| B5 | 181 | µ | MICRO SIGN | u /u /U *m *M | -| B6 | 182 | ¶ | PILCROW SIGN | p! P! pg PG | -| B7 | 183 | · | MIDDLE DOT | . .^ .. | -| B8 | 184 | ¸ | CEDILLA | , ,, | -| B9 | 185 | ¹ | SUPERSCRIPT ONE | 1 1^ s1 ^1 | -| BA | 186 | º | MASCULINE ORDINAL INDICATOR | o_ s0 S0 | -| BB | 187 | » | RIGHT DOUBLE ANGLE QUOTES | >> | -| BC | 188 | ¼ | VULGAR FRACTION ONE QUARTER | 14 | -| BD | 189 | ½ | VULGAR FRACTION ONE HALF | 12 | -| BE | 190 | ¾ | VULGAR FRACTION THREE QUARTERS | 34 | -| BF | 191 | ¿ | INVERTED QUESTION MARK | ? ?? | -| C0 | 192 | À | CAPITAL A WITH GRAVE ACCENT | `A A` | -| C1 | 193 | Á | CAPITAL A WITH ACUTE ACCENT | 'A A' | -| C2 | 194 | Â | CAPITAL A WITH CIRCUMFLEX ACCENT| ^A A^ A> | -| C3 | 195 | Ã | CAPITAL A WITH TILDE | ~A A~ A- | -| C4 | 196 | Ä | CAPITAL A WITH DIAERESIS | "A A" | -| C5 | 197 | Å | CAPITAL A WITH RING ABOVE | oA Ao A* OA *A | -| C6 | 198 | Æ | CAPITAL LIGATURE AE | AE | -| C7 | 199 | Ç | CAPITAL C WITH CEDILLA | ,C C, | -| C8 | 200 | È | CAPITAL E WITH GRAVE ACCENT | `E E` | -| C9 | 201 | É | CAPITAL E WITH ACUTE ACCENT | 'E E' | -| CA | 202 | Ê | CAPITAL E WITH CIRCUMFLEX ACCENT| ^E E^ E> | -| CB | 203 | Ë | CAPITAL E WITH DIAERESIS | "E E" | -| CC | 204 | Ì | CAPITAL I WITH GRAVE ACCENT | `I I` | -| CD | 205 | Í | CAPITAL I WITH ACUTE ACCENT | 'I I' | -| CE | 206 | Î | CAPITAL I WITH CIRCUMFLEX ACCENT| ^I I^ I> | -| CF | 207 | Ï | CAPITAL I WITH DIAERESIS | "I I" | -| D0 | 208 | Ð | CAPITAL ETH | D- | -| D1 | 209 | Ñ | CAPITAL N WITH TILDE | ~N N~ N- | -| D2 | 210 | Ò | CAPITAL O WITH GRAVE ACCENT | `O O` | -| D3 | 211 | Ó | CAPITAL O WITH ACUTE ACCENT | 'O O' | -| D4 | 212 | Ô | CAPITAL O WITH CIRCUMFLEX ACCENT| ^O O^ O> | -| D5 | 213 | Õ | CAPITAL O WITH TILDE | ~O O~ O- | -| D6 | 214 | Ö | CAPITAL O WITH DIAERESIS | "O O" | -| D7 | 215 | × | MULTIPLICATION SIGN | x xx XX mu MU | -| D8 | 216 | Ø | CAPITAL O WITH STROKE | /O O/ | -| D9 | 217 | Ù | CAPITAL U WITH GRAVE ACCENT | `U U` | -| DA | 218 | Ú | CAPITAL U WITH ACUTE ACCENT | 'U U' | -| DB | 219 | Û | CAPITAL U WITH CIRCUMFLEX ACCENT| ^U U^ U> | -| DC | 220 | Ü | CAPITAL U WITH DIAERESIS | "U U" | -| DD | 221 | Ý | CAPITAL Y WITH ACUTE ACCENT | 'Y Y' | -| DE | 222 | Þ | CAPITAL THORN | P TH |P | -| DF | 223 | ß | SMALL SHARP S | ss | -| E0 | 224 | à | SMALL A WITH GRAVE ACCENT | `a a` | -| E1 | 225 | á | SMALL A WITH ACUTE ACCENT | 'a a' | -| E2 | 226 | â | SMALL A WITH CIRCUMFLEX ACCENT | ^a a^ a> | -| E3 | 227 | ã | SMALL A WITH TILDE | ~a a~ a- | -| E4 | 228 | ä | SMALL A WITH DIAERESIS | "a a" | -| E5 | 229 | å | SMALL A WITH RING ABOVE | oa ao Oa a* *a | -| E6 | 230 | æ | SMALL LIGATURE AE | ae | -| E7 | 231 | ç | SMALL C WITH CEDILLA | ,c c, | -| E8 | 232 | è | SMALL E WITH GRAVE ACCENT | `e e` | -| E9 | 233 | é | SMALL E WITH ACUTE ACCENT | 'e e' | -| EA | 234 | ê | SMALL E WITH CIRCUMFLEX ACCENT | ^e e^ e> | -| EB | 235 | ë | SMALL E WITH DIAERESIS | "e e" | -| EC | 236 | ì | SMALL I WITH GRAVE ACCENT | `i i` | -| ED | 237 | í | SMALL I WITH ACUTE ACCENT | 'i i' | -| EE | 238 | î | SMALL I WITH CIRCUMFLEX ACCENT | ^i i^ i> | -| EF | 239 | ï | SMALL I WITH DIAERESIS | "i i" | -| F0 | 240 | ð | SMALL ETH | d- | -| F1 | 241 | ñ | SMALL N WITH TILDE | ~n n~ n- | -| F2 | 242 | ò | SMALL O WITH GRAVE ACCENT | `o o` | -| F3 | 243 | ó | SMALL O WITH ACUTE ACCENT | 'o o' | -| F4 | 244 | ô | SMALL O WITH CIRCUMFLEX ACCENT | ^o o^ o> | -| F5 | 245 | õ | SMALL O WITH TILDE | ~o o~ o- | -| F6 | 246 | ö | SMALL O WITH DIAERESIS | "o o" | -| F7 | 247 | ÷ | DIVISION SIGN | -: :- | -| F8 | 248 | ø | SMALL O WITH OBLIQUE BAR | /o o/ | -| F9 | 249 | ù | SMALL U WITH GRAVE ACCENT | `u u` | -| FA | 250 | ú | SMALL U WITH ACUTE ACCENT | 'u u' | -| FB | 251 | û | SMALL U WITH CIRCUMFLEX ACCENT | ^u u^ u> | -| FC | 252 | ü | SMALL U WITH DIAERESIS | "u u" | -| FD | 253 | ý | SMALL Y WITH ACUTE ACCENT | 'y y' | -| FE | 254 | þ | SMALL THORN | p th |p | -| FF | 255 | ÿ | SMALL Y WITH DIAERESIS | "y y" | -+----+-----+---+---------------------------------+---------------------------+ - - -Deprecated ----------- - -XCursesProgramName is no longer used. To set the program name, you must -use Xinitscr(), or PDC_set_title() to set just the window title. - -The XCursesExit() function is now called automatically via atexit(). -(Multiple calls to it are OK, so you don't need to remove it if you've -already added it for previous versions of PDCurses.) - -XCURSES is no longer defined automatically, but need not be defined, -unless you want the X11-specific prototypes. (Normal curses programs -won't need it.) From a78a0953a44afb3273e3ce20da189c847e7af908 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 10 Jan 2016 02:45:42 -0500 Subject: [PATCH 41/46] Excess spaces. --- IMPLEMNT.md | 220 ++++++++++++++++++++++++++-------------------------- 1 file changed, 110 insertions(+), 110 deletions(-) diff --git a/IMPLEMNT.md b/IMPLEMNT.md index 0f97558a..a549f287 100644 --- a/IMPLEMNT.md +++ b/IMPLEMNT.md @@ -8,65 +8,65 @@ PDCurses Implementor's Guide - Version 1.1 - 2007/06/06 - minor cosmetic change - Version 1.0 - 2007/04/01 - initial revision -This document is for those wishing to port PDCurses to a new platform, -or just wanting to better understand how it works. Nothing here should -be needed for application programming; for that, refer to PDCurses.md, -as built in doc/, or distributed as a file separate from this source -package. This document assumes that you've read the user-level -documentation and are very familiar with application-level curses +This document is for those wishing to port PDCurses to a new platform, +or just wanting to better understand how it works. Nothing here should +be needed for application programming; for that, refer to PDCurses.md, +as built in doc/, or distributed as a file separate from this source +package. This document assumes that you've read the user-level +documentation and are very familiar with application-level curses programming. -If you want to submit your port for possible inclusion into the main +If you want to submit your port for possible inclusion into the main PDCurses distribution, please follow these guidelines: - - Don't modify anything in the pdcurses directory or in other port - directories. Don't modify curses.h or curspriv.h unless absolutely + - Don't modify anything in the pdcurses directory or in other port + directories. Don't modify curses.h or curspriv.h unless absolutely necessary. (And prefer modifying curspriv.h over curses.h.) - - Use the same indentation style, naming and scope conventions as the + - Use the same indentation style, naming and scope conventions as the existing code. - - Release all your code to the public domain -- no copyright. Code + - Release all your code to the public domain -- no copyright. Code under GPL, BSD, etc. will not be accepted. Data Structures =============== -A port of PDCurses must provide acs_map[], a 128-element array of -chtypes, with values laid out based on the Alternate Character Set of -the VT100 (see curses.h). PDC_transform_line() must use this table; when -it encounters a chtype with the A_ALTCHARSET flag set, and an A_CHARTEXT -value in the range 0-127, it must render it using the A_CHARTEXT portion -of the corresponding value from this table, instead of the original -value. Also, values may be read from this table by apps, and passed -through functions such as waddch(), which does no special processing on -control characters (0-31 and 127) when the A_ALTCHARSET flag is set. -Thus, any control characters used in acs_map[] should also have the -A_ALTCHARSET flag set. Implementations should provide suitable values -for all the ACS_ macros defined in curses.h; other values in the table -should be filled with their own indices (e.g., acs_map['E'] == 'E'). The -table can be either hardwired, or filled by PDC_scr_open(). Existing +A port of PDCurses must provide acs_map[], a 128-element array of +chtypes, with values laid out based on the Alternate Character Set of +the VT100 (see curses.h). PDC_transform_line() must use this table; when +it encounters a chtype with the A_ALTCHARSET flag set, and an A_CHARTEXT +value in the range 0-127, it must render it using the A_CHARTEXT portion +of the corresponding value from this table, instead of the original +value. Also, values may be read from this table by apps, and passed +through functions such as waddch(), which does no special processing on +control characters (0-31 and 127) when the A_ALTCHARSET flag is set. +Thus, any control characters used in acs_map[] should also have the +A_ALTCHARSET flag set. Implementations should provide suitable values +for all the ACS_ macros defined in curses.h; other values in the table +should be filled with their own indices (e.g., acs_map['E'] == 'E'). The +table can be either hardwired, or filled by PDC_scr_open(). Existing ports define it in pdcdisp.c, but this is not required. Functions ========= -A port of PDCurses must implement the following functions, with extern -scope. These functions are traditionally divided into several modules, -as indicated below; this division is not required (only the functions -are), but may make it easier to follow for someone familiar with the +A port of PDCurses must implement the following functions, with extern +scope. These functions are traditionally divided into several modules, +as indicated below; this division is not required (only the functions +are), but may make it easier to follow for someone familiar with the existing ports. -Any other functions you create as part of your implementation should -have static scope, if possible. If they can't be static, they should be -named with the "PDC_" prefix. This minimizes the risk of collision with +Any other functions you create as part of your implementation should +have static scope, if possible. If they can't be static, they should be +named with the "PDC_" prefix. This minimizes the risk of collision with an application's choices. -Current PDCurses style also uses a single leading underscore with the -name of any static function; and modified BSD/Allman-style indentation, -approximately equivalent to "indent -kr -nut -bl -bli0", with +Current PDCurses style also uses a single leading underscore with the +name of any static function; and modified BSD/Allman-style indentation, +approximately equivalent to "indent -kr -nut -bl -bli0", with adjustments to keep every line under 80 columns. @@ -75,17 +75,17 @@ pdcdisp.c: ### void PDC_gotoyx(int y, int x); -Move the physical cursor (as opposed to the logical cursor affected by -wmove()) to the given location. This is called mainly from doupdate(). -In general, this function need not compare the old location with the new +Move the physical cursor (as opposed to the logical cursor affected by +wmove()) to the given location. This is called mainly from doupdate(). +In general, this function need not compare the old location with the new one, and should just move the cursor unconditionally. ### void PDC_transform_line(int lineno, int x, int len, const chtype *srcp); -The core output routine. It takes len chtype entities from srcp (a -pointer into curscr) and renders them to the physical screen at line -lineno, column x. It must also translate characters 0-127 via acs_map[], -if they're flagged with A_ALTCHARSET in the attribute portion of the +The core output routine. It takes len chtype entities from srcp (a +pointer into curscr) and renders them to the physical screen at line +lineno, column x. It must also translate characters 0-127 via acs_map[], +if they're flagged with A_ALTCHARSET in the attribute portion of the chtype. @@ -94,22 +94,22 @@ pdcgetsc.c: ### int PDC_get_columns(void); -Returns the size of the screen in columns. It's used in resize_term() to -set the new value of COLS. (Some existing implementations also call it +Returns the size of the screen in columns. It's used in resize_term() to +set the new value of COLS. (Some existing implementations also call it internally from PDC_scr_open(), but this is not required.) ### int PDC_get_cursor_mode(void); -Returns the size/shape of the cursor. The format of the result is -unspecified, except that it must be returned as an int. This function is -called from initscr(), and the result is stored in SP->orig_cursor, -which is used by PDC_curs_set() to determine the size/shape of the +Returns the size/shape of the cursor. The format of the result is +unspecified, except that it must be returned as an int. This function is +called from initscr(), and the result is stored in SP->orig_cursor, +which is used by PDC_curs_set() to determine the size/shape of the cursor in normal visibility mode (curs_set(1)). ### int PDC_get_rows(void); -Returns the size of the screen in rows. It's used in resize_term() to -set the new value of LINES. (Some existing implementations also call it +Returns the size of the screen in rows. It's used in resize_term() to +set the new value of LINES. (Some existing implementations also call it internally from PDC_scr_open(), but this is not required.) @@ -148,23 +148,23 @@ TRUE). ### int PDC_modifiers_set(void); -Called from PDC_return_key_modifiers(). If your platform needs to do -anything in response to a change in SP->return_key_modifiers, do it +Called from PDC_return_key_modifiers(). If your platform needs to do +anything in response to a change in SP->return_key_modifiers, do it here. Returns OK or ERR, which is passed on by the caller. ### int PDC_mouse_set(void); -Called by mouse_set(), mouse_on(), and mouse_off() -- all the functions -that modify SP->_trap_mbe. If your platform needs to do anything in -response to a change in SP->_trap_mbe (for example, turning the mouse -cursor on or off), do it here. Returns OK or ERR, which is passed on by +Called by mouse_set(), mouse_on(), and mouse_off() -- all the functions +that modify SP->_trap_mbe. If your platform needs to do anything in +response to a change in SP->_trap_mbe (for example, turning the mouse +cursor on or off), do it here. Returns OK or ERR, which is passed on by the caller. ### void PDC_set_keyboard_binary(bool on); -Set keyboard input to "binary" mode. If you need to do something to keep -the OS from processing ^C, etc. on your platform, do it here. TRUE turns -the mode on; FALSE reverts it. This function is called from raw() and +Set keyboard input to "binary" mode. If you need to do something to keep +the OS from processing ^C, etc. on your platform, do it here. TRUE turns +the mode on; FALSE reverts it. This function is called from raw() and noraw(). @@ -173,90 +173,90 @@ pdcscrn.c: ### bool PDC_can_change_color(void); -Returns TRUE if init_color() and color_content() give meaningful +Returns TRUE if init_color() and color_content() give meaningful results, FALSE otherwise. Called from can_change_color(). ### int PDC_color_content(short color, short *red, short *green, short *blue); -The core of color_content(). This does all the work of that function, +The core of color_content(). This does all the work of that function, except checking for values out of range and null pointers. ### int PDC_init_color(short color, short red, short green, short blue); -The core of init_color(). This does all the work of that function, +The core of init_color(). This does all the work of that function, except checking for values out of range. ### void PDC_init_pair(short pair, short fg, short bg); -The core of init_pair(). This does all the work of that function, except -checking for values out of range. The values passed to this function -should be returned by a call to PDC_pair_content() with the same pair -number. PDC_transform_line() should use the specified colors when +The core of init_pair(). This does all the work of that function, except +checking for values out of range. The values passed to this function +should be returned by a call to PDC_pair_content() with the same pair +number. PDC_transform_line() should use the specified colors when rendering a chtype with the given pair number. ### int PDC_pair_content(short pair, short *fg, short *bg); -The core of pair_content(). This does all the work of that function, +The core of pair_content(). This does all the work of that function, except checking for values out of range and null pointers. ### void PDC_reset_prog_mode(void); -The non-portable functionality of reset_prog_mode() is handled here -- -whatever's not done in _restore_mode(). In current ports: In OS/2, this -sets the keyboard to binary mode; in Win32, it enables or disables the +The non-portable functionality of reset_prog_mode() is handled here -- +whatever's not done in _restore_mode(). In current ports: In OS/2, this +sets the keyboard to binary mode; in Win32, it enables or disables the mouse pointer to match the saved mode; in others it does nothing. ### void PDC_reset_shell_mode(void); -The same thing, for reset_shell_mode(). In OS/2 and Win32, it restores +The same thing, for reset_shell_mode(). In OS/2 and Win32, it restores the default console mode; in others it does nothing. ### int PDC_resize_screen(int nlines, int ncols); -This does the main work of resize_term(). It may respond to non-zero -parameters, by setting the screen to the specified size; to zero -parameters, by setting the screen to a size chosen by the user at -runtime, in an unspecified way (e.g., by dragging the edges of the -window); or both. It may also do nothing, if there's no appropriate +This does the main work of resize_term(). It may respond to non-zero +parameters, by setting the screen to the specified size; to zero +parameters, by setting the screen to a size chosen by the user at +runtime, in an unspecified way (e.g., by dragging the edges of the +window); or both. It may also do nothing, if there's no appropriate action for the platform. ### void PDC_restore_screen_mode(int i); -Called from _restore_mode() in kernel.c, this function does the actual +Called from _restore_mode() in kernel.c, this function does the actual mode changing, if applicable. Currently used only in DOS and OS/2. ### void PDC_save_screen_mode(int i); -Called from _save_mode() in kernel.c, this function saves the actual +Called from _save_mode() in kernel.c, this function saves the actual screen mode, if applicable. Currently used only in DOS and OS/2. ### void PDC_scr_close(void); -The platform-specific part of endwin(). It may restore the image of the -original screen saved by PDC_scr_open(), if the PDC_RESTORE_SCREEN -environment variable is set; either way, if using an existing terminal, -this function should restore it to the mode it had at startup, and move +The platform-specific part of endwin(). It may restore the image of the +original screen saved by PDC_scr_open(), if the PDC_RESTORE_SCREEN +environment variable is set; either way, if using an existing terminal, +this function should restore it to the mode it had at startup, and move the cursor to the lower left corner. (The X11 port does nothing.) ### void PDC_scr_free(void); -Frees the memory for SP allocated by PDC_scr_open(). Called by +Frees the memory for SP allocated by PDC_scr_open(). Called by delscreen(). ### int PDC_scr_open(int argc, char **argv); -The platform-specific part of initscr(). It's actually called from -Xinitscr(); the arguments, if present, correspond to those used with -main(), and may be used to set the title of the terminal window, or for -other, platform-specific purposes. (The arguments are currently used -only in X11.) PDC_scr_open() must allocate memory for SP, and must -initialize acs_map[] (unless it's preset) and several members of SP, -including lines, cols, mouse_wait, orig_attr (and if orig_attr is TRUE, -orig_fore and orig_back), mono, _restore and _preserve. (Although SP is -used the same way in all ports, it's allocated here in order to allow -the X11 port to map it to a block of shared memory.) If using an -existing terminal, and the environment variable PDC_RESTORE_SCREEN is -set, this function may also store the existing screen image for later +The platform-specific part of initscr(). It's actually called from +Xinitscr(); the arguments, if present, correspond to those used with +main(), and may be used to set the title of the terminal window, or for +other, platform-specific purposes. (The arguments are currently used +only in X11.) PDC_scr_open() must allocate memory for SP, and must +initialize acs_map[] (unless it's preset) and several members of SP, +including lines, cols, mouse_wait, orig_attr (and if orig_attr is TRUE, +orig_fore and orig_back), mono, _restore and _preserve. (Although SP is +used the same way in all ports, it's allocated here in order to allow +the X11 port to map it to a block of shared memory.) If using an +existing terminal, and the environment variable PDC_RESTORE_SCREEN is +set, this function may also store the existing screen image for later restoration by PDC_scr_close(). @@ -265,9 +265,9 @@ pdcsetsc.c: ### int PDC_curs_set(int visibility); -Called from curs_set(). Changes the appearance of the cursor -- 0 turns -it off, 1 is normal (the terminal's default, if applicable, as -determined by SP->orig_cursor), and 2 is high visibility. The exact +Called from curs_set(). Changes the appearance of the cursor -- 0 turns +it off, 1 is normal (the terminal's default, if applicable, as +determined by SP->orig_cursor), and 2 is high visibility. The exact appearance of these modes is not specified. @@ -276,32 +276,32 @@ pdcutil.c: ### void PDC_beep(void); -Emits a short audible beep. If this is not possible on your platform, -you must set SP->audible to FALSE during initialization (i.e., from -PDC_scr_open() -- not here); otherwise, set it to TRUE. This function is +Emits a short audible beep. If this is not possible on your platform, +you must set SP->audible to FALSE during initialization (i.e., from +PDC_scr_open() -- not here); otherwise, set it to TRUE. This function is called from beep(). ### void PDC_napms(int ms); -This is the core delay routine, called by napms(). It pauses for about -(the X/Open spec says "at least") ms milliseconds, then returns. High -degrees of accuracy and precision are not expected (though desirable, if -you can achieve them). More important is that this function gives back -the process' time slice to the OS, so that PDCurses idles at low CPU +This is the core delay routine, called by napms(). It pauses for about +(the X/Open spec says "at least") ms milliseconds, then returns. High +degrees of accuracy and precision are not expected (though desirable, if +you can achieve them). More important is that this function gives back +the process' time slice to the OS, so that PDCurses idles at low CPU usage. ### const char *PDC_sysname(void); -Returns a short string describing the platform, such as "DOS" or "X11". -This is used by longname(). It must be no more than 100 characters; it +Returns a short string describing the platform, such as "DOS" or "X11". +This is used by longname(). It must be no more than 100 characters; it should be much, much shorter (existing platforms use no more than 5). More functions ============== -The following functions are implemented in the platform directories, but -are accessed directly by apps. Refer to the user documentation for their +The following functions are implemented in the platform directories, but +are accessed directly by apps. Refer to the user documentation for their descriptions: From 701d7821dc19570eb68be8e5efccd107c1cc81a6 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 10 Jan 2016 13:37:18 -0500 Subject: [PATCH 42/46] Remaining Id tags. --- PDCurses.spec | 2 -- configure.ac | 1 - x11/xcurses-config.in | 2 -- 3 files changed, 5 deletions(-) diff --git a/PDCurses.spec b/PDCurses.spec index b485d423..5addfcd1 100644 --- a/PDCurses.spec +++ b/PDCurses.spec @@ -1,5 +1,3 @@ -# $Id: PDCurses.spec,v 1.18 2008/07/21 12:25:20 wmcbrine Exp $ - %define ver 34 %define verdot 3.4 %define base /usr diff --git a/configure.ac b/configure.ac index 7a285b4b..aee5983a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,3 @@ -dnl $Id: configure.ac,v 1.35 2008/07/21 12:19:21 wmcbrine Exp $ dnl Process this file with autoconf to produce a configure script. AC_INIT([PDCurses], [3.4], [wmcbrine@gmail.com], [PDCurses]) diff --git a/x11/xcurses-config.in b/x11/xcurses-config.in index 55b4704c..d58dbbba 100644 --- a/x11/xcurses-config.in +++ b/x11/xcurses-config.in @@ -3,8 +3,6 @@ # The idea to this kind of setup info script was stolen from numerous # other packages, such as neon, libxml and gnome. # -# $Id: xcurses-config.in,v 1.6 2007/11/07 23:33:07 wmcbrine Exp $ -# verdot=3.4 From d4f3231c6ee62efb7f63d666617098a8c70d1b28 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Tue, 12 Jan 2016 01:06:59 -0500 Subject: [PATCH 43/46] Move configure script etc. to the x11 directory. --- Makefile | 27 + Makefile.in | 108 - curspriv.h | 4 - x11/Makefile.aix.in | 234 -- x11/Makefile.in | 29 +- PDCurses.spec => x11/PDCurses.spec | 0 x11/README.md | 6 +- aclocal.m4 => x11/aclocal.m4 | 0 config.guess => x11/config.guess | 0 config.h.in => x11/config.h.in | 42 - config.sub => x11/config.sub | 0 configure => x11/configure | 5412 +++++++++++++--------------- configure.ac => x11/configure.ac | 22 +- install-sh => x11/install-sh | 0 x11/pdcx11.h | 4 + 15 files changed, 2486 insertions(+), 3402 deletions(-) create mode 100644 Makefile delete mode 100644 Makefile.in delete mode 100644 x11/Makefile.aix.in rename PDCurses.spec => x11/PDCurses.spec (100%) rename aclocal.m4 => x11/aclocal.m4 (100%) rename config.guess => x11/config.guess (100%) rename config.h.in => x11/config.h.in (67%) rename config.sub => x11/config.sub (100%) rename configure => x11/configure (50%) rename configure.ac => x11/configure.ac (93%) rename install-sh => x11/install-sh (100%) diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..869c13bd --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +# Make archives for distribution + +include version.mif + +PDC_DIR=PDCurses-$(VERDOT) + +ZIPFILE = pdcurs$(VER).zip +TARBALL = $(PDC_DIR).tar.gz + +all: + @echo Look in folders for platform-specific build instructions. + +manual: + cd doc; $(MAKE) $(MFLAGS) $@ + +$(ZIPFILE): + zip -9ory $(ZIPFILE) * + +zip: $(ZIPFILE) + +../$(TARBALL): + (cd ..; tar cvf - $(PDC_DIR)/* | gzip -9 > $(TARBALL)) + +dist: ../$(TARBALL) + +rpm: ../$(TARBALL) + rpmbuild -ba x11/PDCurses.spec diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index a03eb2a5..00000000 --- a/Makefile.in +++ /dev/null @@ -1,108 +0,0 @@ -# Makefile for PDCurses library for X11 - -SHELL = @SHELL@ - -@SET_MAKE@ - -srcdir =@srcdir@ -prefix =@prefix@ -exec_prefix =$(DESTDIR)@exec_prefix@ -libdir =$(exec_prefix)/lib -bindir =$(exec_prefix)/bin -includedir =$(exec_prefix)/include -pdcursesdir =./x11 - -INSTALL =$(srcdir)/install-sh -RANLIB =@RANLIB@ -SHLPRE = @SHLPRE@ -SHLPST = @SHLPST@ -SHLFILE = XCurses - -include $(srcdir)/version.mif - -PDC_DIR=PDCurses-$(VERDOT) - -ZIPFILE = pdcurs$(VER).zip -TARBALL = $(PDC_DIR).tar.gz - -all \ -clean \ -distclean \ -mostlyclean \ -realclean :: - cd x11; $(MAKE) $(MFLAGS) $@ - cd doc; $(MAKE) $(MFLAGS) $@ - -install :: - $(INSTALL) -d -m 755 $(libdir) - $(INSTALL) -d -m 755 $(bindir) - $(INSTALL) -d -m 755 $(includedir) - $(INSTALL) -d -m 755 $(includedir)/xcurses - $(INSTALL) -c -m 644 $(srcdir)/curses.h $(includedir)/xcurses.h - $(INSTALL) -c -m 644 $(srcdir)/curses.h $(includedir)/xcurses/curses.h - sed -e 's/#include /#include /' \ - < $(srcdir)/panel.h > ./xpanel.h - $(INSTALL) -m 644 ./xpanel.h $(includedir)/xpanel.h - $(INSTALL) -c -m 644 $(srcdir)/panel.h $(includedir)/xcurses/panel.h - $(INSTALL) -c -m 644 $(srcdir)/term.h $(includedir)/xcurses/term.h - $(INSTALL) -c -m 644 $(pdcursesdir)/libXCurses.a $(libdir)/libXCurses.a - -$(RANLIB) $(libdir)/libXCurses.a - -$(INSTALL) -c -m 755 $(pdcursesdir)/$(SHLPRE)$(SHLFILE)$(SHLPST) \ - $(libdir)/$(SHLPRE)$(SHLFILE)$(SHLPST) - ln -f -s $(libdir)/$(SHLPRE)$(SHLFILE)$(SHLPST) \ - $(libdir)/$(SHLPRE)Xpanel$(SHLPST) - ln -f -s $(libdir)/libXCurses.a $(libdir)/libXpanel.a - -$(RANLIB) $(libdir)/libXpanel.a - $(INSTALL) -c -m 755 x11/xcurses-config $(bindir)/xcurses-config - -clean :: - rm -f config.log config.cache config.status - -distclean :: - rm -f config.log config.cache config.status - rm -f config.h Makefile x11/xcurses-config - -manual: - cd doc; $(MAKE) $(MFLAGS) $@ - -$(ZIPFILE): - zip -9y $(ZIPFILE) README.md HISTORY.md IMPLEMNT.md *.spec *.mif *.def \ - Makefile.in config.h.in configure configure.ac config.guess \ - config.sub x11/xcurses-config.in install-sh aclocal.m4 curses.h \ - curspriv.h panel.h term.h pdcurses/README.md \ - pdcurses/*.c demos/README.md demos/*.c demos/*.h dos/README.md dos/*.c \ - dos/*.h dos/*.mak dos/*.lrf os2/README.md os2/*.c os2/*.h os2/*.mak \ - os2/*.lrf sdl1/README.md sdl1/*.c sdl1/*.h sdl1/Make* \ - win32/README.md win32/*.c win32/*.h win32/*.mak \ - win32/*.ico win32/*.rc x11/README.md x11/*.c x11/*.h x11/Makefile.* \ - x11/*.xbm doc/*.md doc/manext.c doc/Makefile - -zip: $(ZIPFILE) - -../$(TARBALL): - (cd ..; tar cvf - $(PDC_DIR)/README.md $(PDC_DIR)/HISTORY.md \ - $(PDC_DIR)/IMPLEMNT.md $(PDC_DIR)/*.spec $(PDC_DIR)/*.mif \ - $(PDC_DIR)/*.def $(PDC_DIR)/Makefile.in $(PDC_DIR)/aclocal.m4 \ - $(PDC_DIR)/config.h.in $(PDC_DIR)/configure \ - $(PDC_DIR)/config.guess $(PDC_DIR)/x11/xcurses-config.in \ - $(PDC_DIR)/config.sub $(PDC_DIR)/configure.ac \ - $(PDC_DIR)/install-sh $(PDC_DIR)/curses.h $(PDC_DIR)/curspriv.h \ - $(PDC_DIR)/panel.h $(PDC_DIR)/term.h \ - $(PDC_DIR)/pdcurses/README.md $(PDC_DIR)/pdcurses/*.c \ - $(PDC_DIR)/demos/README.md $(PDC_DIR)/demos/*.c $(PDC_DIR)/demos/*.h \ - $(PDC_DIR)/doc/*.md $(PDC_DIR)/dos/README.md $(PDC_DIR)/dos/*.c \ - $(PDC_DIR)/dos/*.h $(PDC_DIR)/dos/*.mak $(PDC_DIR)/dos/*.lrf \ - $(PDC_DIR)/os2/README.md $(PDC_DIR)/os2/*.c $(PDC_DIR)/os2/*.h \ - $(PDC_DIR)/os2/*.mak $(PDC_DIR)/os2/*.lrf \ - $(PDC_DIR)/sdl1/README.md $(PDC_DIR)/sdl1/*.c $(PDC_DIR)/sdl1/*.h \ - $(PDC_DIR)/sdl1/Make* $(PDC_DIR)/win32/README.md $(PDC_DIR)/win32/*.c \ - $(PDC_DIR)/win32/*.h $(PDC_DIR)/win32/*.mak \ - $(PDC_DIR)/win32/*.ico $(PDC_DIR)/win32/*.rc $(PDC_DIR)/x11/README.md \ - $(PDC_DIR)/x11/*.c $(PDC_DIR)/x11/*.xbm $(PDC_DIR)/x11/*.h \ - $(PDC_DIR)/x11/Makefile.* $(PDC_DIR)/doc/manext.c \ - $(PDC_DIR)/doc/Makefile | gzip -9 > $(TARBALL)) - -dist: ../$(TARBALL) - -rpm: ../$(TARBALL) - rpmbuild -ba $(srcdir)/PDCurses.spec diff --git a/curspriv.h b/curspriv.h index dcfd6479..299c8a5e 100644 --- a/curspriv.h +++ b/curspriv.h @@ -6,10 +6,6 @@ #ifndef __CURSES_INTERNALS__ #define __CURSES_INTERNALS__ 1 -#ifdef HAVE_CONFIG_H -# include -#endif - #define CURSES_LIBRARY #include diff --git a/x11/Makefile.aix.in b/x11/Makefile.aix.in deleted file mode 100644 index 0fe5db78..00000000 --- a/x11/Makefile.aix.in +++ /dev/null @@ -1,234 +0,0 @@ -# Makefile for PDCurses library for AIX/X11 - -SHELL = @SHELL@ -THIS = Makefile - -@SET_MAKE@ - -PDCURSES_SRCDIR = .. - -osdir = . -srcdir = $(PDCURSES_SRCDIR)/pdcurses - -PDCURSES_CONFIG_H =$(PDCURSES_SRCDIR)/config.h -PDCURSES_CURSES_H =$(PDCURSES_SRCDIR)/curses.h -PDCURSES_CURSPRIV_H =$(PDCURSES_SRCDIR)/curspriv.h -PDCURSES_HEADERS =$(PDCURSES_CONFIG_H) $(PDCURSES_CURSES_H) \ -$(PDCURSES_CURSPRIV_H) -PDCURSES_X11_H =$(osdir)/pdcx11.h - -MH_EXTRA_LIBS = @MH_EXTRA_LIBS@ - -CFLAGS = @CFLAGS@ @DYN_COMP@ - -CPPFLAGS = @DEFS@ -DXCURSES @SYS_DEFS@ -I$(PDCURSES_SRCDIR) - -BUILD = @CC@ -c $(CFLAGS) $(CPPFLAGS) @MH_XINC_DIR@ - -LINK = @CC@ -LDFLAGS = - -LIBCURSES = libXCurses.a - -all : $(LIBCURSES) - -install : - echo Does nothing at the moment - -clean : - -rm -rf *.o *.sho trace $(LIBCURSES) - -distclean: clean - -rm -f Makefile - -mostlyclean: clean - -realclean: distclean - -LIBOBJS = addch.o addchstr.o addstr.o attr.o beep.o bkgd.o border.o \ -clear.o color.o delch.o deleteln.o deprec.o getch.o getstr.o getyx.o \ -inch.o inchstr.o initscr.o inopts.o insch.o insstr.o instr.o kernel.o \ -keyname.o mouse.o move.o outopts.o overlay.o pad.o panel.o printw.o \ -refresh.o scanw.o scr_dump.o scroll.o slk.o termattr.o terminfo.o \ -touch.o util.o window.o debug.o - -PDCOBJS = pdcclip.o pdcdisp.o pdcgetsc.o pdckbd.o pdcscrn.o pdcsetsc.o \ -pdcutil.o pdcx11.o x11.o sb.o ScrollBox.o - -$(LIBCURSES) : $(LIBOBJS) $(PDCOBJS) curses.exp - ld -bnoentry -bM:SRE -bE:curses.exp $(MH_LIBS) $(MH_EXTRA_LIBS) \ -$(LIBOBJS) $(PDCOBJS) -o $@ - -$(LIBOBJS) $(PDCOBJS) : $(PDCURSES_HEADERS) -$(PDCOBJS) : $(PDCURSES_X11_H) -terminfo.o: $(TERM_HEADER) - -curses.exp: ../exp-base.def - cat ../exp-base.def > curses.exp - echo Xinitscr >> curses.exp - echo XCursesExit >> curses.exp - echo sb_init >> curses.exp - echo sb_set_horz >> curses.exp - echo sb_set_vert >> curses.exp - echo sb_get_horz >> curses.exp - echo sb_get_vert >> curses.exp - echo sb_refresh >> curses.exp - -addch.o: $(srcdir)/addch.c - $(BUILD) $(srcdir)/addch.c - -addchstr.o: $(srcdir)/addchstr.c - $(BUILD) $(srcdir)/addchstr.c - -addstr.o: $(srcdir)/addstr.c - $(BUILD) $(srcdir)/addstr.c - -attr.o: $(srcdir)/attr.c - $(BUILD) $(srcdir)/attr.c - -beep.o: $(srcdir)/beep.c - $(BUILD) $(srcdir)/beep.c - -bkgd.o: $(srcdir)/bkgd.c - $(BUILD) $(srcdir)/bkgd.c - -border.o: $(srcdir)/border.c - $(BUILD) $(srcdir)/border.c - -clear.o: $(srcdir)/clear.c - $(BUILD) $(srcdir)/clear.c - -color.o: $(srcdir)/color.c - $(BUILD) $(srcdir)/color.c - -delch.o: $(srcdir)/delch.c - $(BUILD) $(srcdir)/delch.c - -deleteln.o: $(srcdir)/deleteln.c - $(BUILD) $(srcdir)/deleteln.c - -deprec.o: $(srcdir)/deprec.c - $(BUILD) $(srcdir)/deprec.c - -getch.o: $(srcdir)/getch.c - $(BUILD) $(srcdir)/getch.c - -getstr.o: $(srcdir)/getstr.c - $(BUILD) $(srcdir)/getstr.c - -getyx.o: $(srcdir)/getyx.c - $(BUILD) $(srcdir)/getyx.c - -inch.o: $(srcdir)/inch.c - $(BUILD) $(srcdir)/inch.c - -inchstr.o: $(srcdir)/inchstr.c - $(BUILD) $(srcdir)/inchstr.c - -initscr.o: $(srcdir)/initscr.c - $(BUILD) $(srcdir)/initscr.c - -inopts.o: $(srcdir)/inopts.c - $(BUILD) $(srcdir)/inopts.c - -insch.o: $(srcdir)/insch.c - $(BUILD) $(srcdir)/insch.c - -insstr.o: $(srcdir)/insstr.c - $(BUILD) $(srcdir)/insstr.c - -instr.o: $(srcdir)/instr.c - $(BUILD) $(srcdir)/instr.c - -kernel.o: $(srcdir)/kernel.c - $(BUILD) $(srcdir)/kernel.c - -keyname.o: $(srcdir)/keyname.c - $(BUILD) $(srcdir)/keyname.c - -mouse.o: $(srcdir)/mouse.c - $(BUILD) $(srcdir)/mouse.c - -move.o: $(srcdir)/move.c - $(BUILD) $(srcdir)/move.c - -outopts.o: $(srcdir)/outopts.c - $(BUILD) $(srcdir)/outopts.c - -overlay.o: $(srcdir)/overlay.c - $(BUILD) $(srcdir)/overlay.c - -pad.o: $(srcdir)/pad.c - $(BUILD) $(srcdir)/pad.c - -panel.o: $(srcdir)/panel.c $(PDCURSES_SRCDIR)/panel.h - $(BUILD) $(srcdir)/panel.c - -printw.o: $(srcdir)/printw.c - $(BUILD) $(srcdir)/printw.c - -refresh.o: $(srcdir)/refresh.c - $(BUILD) $(srcdir)/refresh.c - -scanw.o: $(srcdir)/scanw.c - $(BUILD) $(srcdir)/scanw.c - -scr_dump.o: $(srcdir)/scr_dump.c - $(BUILD) $(srcdir)/scr_dump.c - -scroll.o: $(srcdir)/scroll.c - $(BUILD) $(srcdir)/scroll.c - -slk.o: $(srcdir)/slk.c - $(BUILD) $(srcdir)/slk.c - -termattr.o: $(srcdir)/termattr.c - $(BUILD) $(srcdir)/termattr.c - -terminfo.o: $(srcdir)/terminfo.c - $(BUILD) $(srcdir)/terminfo.c - -touch.o: $(srcdir)/touch.c - $(BUILD) $(srcdir)/touch.c - -util.o: $(srcdir)/util.c - $(BUILD) $(srcdir)/util.c - -window.o: $(srcdir)/window.c - $(BUILD) $(srcdir)/window.c - -debug.o: $(srcdir)/debug.c - $(BUILD) $(srcdir)/debug.c - -pdcclip.o: $(osdir)/pdcclip.c - $(BUILD) $(osdir)/pdcclip.c - -pdcdisp.o: $(osdir)/pdcdisp.c - $(BUILD) $(osdir)/pdcdisp.c - -pdcgetsc.o: $(osdir)/pdcgetsc.c - $(BUILD) $(osdir)/pdcgetsc.c - -pdckbd.o: $(osdir)/pdckbd.c - $(BUILD) $(osdir)/pdckbd.c - -pdcscrn.o: $(osdir)/pdcscrn.c - $(BUILD) $(osdir)/pdcscrn.c - -pdcsetsc.o: $(osdir)/pdcsetsc.c - $(BUILD) $(osdir)/pdcsetsc.c - -pdcutil.o: $(osdir)/pdcutil.c - $(BUILD) $(osdir)/pdcutil.c - -pdcx11.o: $(osdir)/pdcx11.c - $(BUILD) $(osdir)/pdcx11.c - -ScrollBox.o: $(osdir)/ScrollBox.c - $(BUILD) $(osdir)/ScrollBox.c - -sb.o: $(osdir)/sb.c - $(BUILD) $(osdir)/sb.c - -x11.o: $(osdir)/x11.c - $(BUILD) $(osdir)/x11.c diff --git a/x11/Makefile.in b/x11/Makefile.in index d23a214f..fdd41123 100644 --- a/x11/Makefile.in +++ b/x11/Makefile.in @@ -11,7 +11,7 @@ osdir = . srcdir = $(PDCURSES_SRCDIR)/pdcurses demodir = $(PDCURSES_SRCDIR)/demos -PDCURSES_CONFIG_H =$(PDCURSES_SRCDIR)/config.h +PDCURSES_CONFIG_H =$(osdir)/config.h PDCURSES_CURSES_H =$(PDCURSES_SRCDIR)/curses.h PDCURSES_CURSPRIV_H =$(PDCURSES_SRCDIR)/curspriv.h PDCURSES_HEADERS =$(PDCURSES_CONFIG_H) $(PDCURSES_CURSES_H) \ @@ -34,6 +34,7 @@ LINK = @PURIFY@ @CC@ #LDFLAGS = $(LIB_DEPS) @LDFLAGS@ @LIBS@ @MH_XLIBS@ @MH_EXTRA_LIBS@ LDFLAGS = $(LIBCURSES) @LDFLAGS@ @LIBS@ @MH_XLIBS@ @MH_EXTRA_LIBS@ +INSTALL = $(osdir)/install-sh RANLIB = @RANLIB@ LIBCURSES = libXCurses.a @@ -51,15 +52,35 @@ SHLFILE = XCurses all: $(PDCLIBS) $(DEMOS) install: - echo Does nothing at the moment + $(INSTALL) -d -m 755 $(libdir) + $(INSTALL) -d -m 755 $(bindir) + $(INSTALL) -d -m 755 $(includedir) + $(INSTALL) -d -m 755 $(includedir)/xcurses + $(INSTALL) -c -m 644 $(srcdir)/curses.h $(includedir)/xcurses.h + $(INSTALL) -c -m 644 $(srcdir)/curses.h $(includedir)/xcurses/curses.h + sed -e 's/#include /#include /' \ + < $(srcdir)/panel.h > ./xpanel.h + $(INSTALL) -m 644 ./xpanel.h $(includedir)/xpanel.h + $(INSTALL) -c -m 644 $(srcdir)/panel.h $(includedir)/xcurses/panel.h + $(INSTALL) -c -m 644 $(srcdir)/term.h $(includedir)/xcurses/term.h + $(INSTALL) -c -m 644 $(osdir)/libXCurses.a $(libdir)/libXCurses.a + -$(RANLIB) $(libdir)/libXCurses.a + -$(INSTALL) -c -m 755 $(osdir)/$(SHLPRE)$(SHLFILE)$(SHLPST) \ + $(libdir)/$(SHLPRE)$(SHLFILE)$(SHLPST) + ln -f -s $(libdir)/$(SHLPRE)$(SHLFILE)$(SHLPST) \ + $(libdir)/$(SHLPRE)Xpanel$(SHLPST) + ln -f -s $(libdir)/libXCurses.a $(libdir)/libXpanel.a + -$(RANLIB) $(libdir)/libXpanel.a + $(INSTALL) -c -m 755 $(osdir)/xcurses-config $(bindir)/xcurses-config clean: - -rm -rf *.o *.sho trace $(PDCLIBS) $(DEMOS) + -rm -rf *.o *.sho trace $(PDCLIBS) $(DEMOS) config.log \ + config.cache config.status demos: $(DEMOS) distclean: clean - -rm -f Makefile + -rm -f Makefile config.h xcurses-config mostlyclean: clean diff --git a/PDCurses.spec b/x11/PDCurses.spec similarity index 100% rename from PDCurses.spec rename to x11/PDCurses.spec diff --git a/x11/README.md b/x11/README.md index 967ac552..3f597052 100644 --- a/x11/README.md +++ b/x11/README.md @@ -9,10 +9,8 @@ resulting in native X11 programs. Building -------- -- Run "./configure" in the top-level directory. - - To build the wide-character version of the library, specify - "--enable-widec" as a parameter. To use X Input Methods, add +- Run "./configure". To build the wide-character version of the library, + specify "--enable-widec" as a parameter. To use X Input Methods, add "--enable-xim". I recommend these options, but I haven't yet made them the defaults, for the sake of backwards compatibility and due to their new and relatively untested status. diff --git a/aclocal.m4 b/x11/aclocal.m4 similarity index 100% rename from aclocal.m4 rename to x11/aclocal.m4 diff --git a/config.guess b/x11/config.guess similarity index 100% rename from config.guess rename to x11/config.guess diff --git a/config.h.in b/x11/config.h.in similarity index 67% rename from config.h.in rename to x11/config.h.in index 28e9e48e..485ea727 100644 --- a/config.h.in +++ b/x11/config.h.in @@ -3,51 +3,12 @@ /* Define if you have the header file */ #undef HAVE_DECKEYSYM_H -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_DL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - /* Define to 1 if you have the `poll' function. */ #undef HAVE_POLL -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - /* Define if you have the header file */ #undef HAVE_SUNKEYSYM_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H @@ -117,9 +78,6 @@ /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME diff --git a/config.sub b/x11/config.sub similarity index 100% rename from config.sub rename to x11/config.sub diff --git a/configure b/x11/configure similarity index 50% rename from configure rename to x11/configure index 9d14bd8c..57e78122 100755 --- a/configure +++ b/x11/configure @@ -1,62 +1,83 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for PDCurses 3.4. +# Generated by GNU Autoconf 2.69 for PDCurses 3.4. # # Report bugs to . # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -65,20 +86,19 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -89,32 +109,316 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and wmcbrine@gmail.com +$0: about your system, including any error possibly output +$0: before this message. Then install a modern shell, or +$0: manually run the script under such a shell if you do +$0: have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -128,13 +432,17 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -149,294 +457,19 @@ echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -453,9 +486,12 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -464,84 +500,55 @@ test \$exitcode = 0") || { exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -550,11 +557,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -569,7 +576,6 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='PDCurses' @@ -577,8 +583,9 @@ PACKAGE_TARNAME='PDCurses' PACKAGE_VERSION='3.4' PACKAGE_STRING='PDCurses 3.4' PACKAGE_BUGREPORT='wmcbrine@gmail.com' +PACKAGE_URL='' -ac_unique_file="curspriv.h" +ac_unique_file="pdcx11.h" # Factoring default headers for most tests. ac_includes_default="\ #include @@ -615,88 +622,100 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -target -target_cpu -target_vendor -target_os -SYS_DEFS -RANLIB -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -SET_MAKE -CPP -GREP -EGREP -MH_EXTRA_LIBS -XMKMF -MH_XINC_DIR -MH_XLIBS -PURIFY -SHLPST -DYN_COMP -LD_RXLIB1 -SHLPRE -SHL_TARGETS -O2SAVE -CC2O -SAVE2O -RXPACKEXPORTS +ac_subst_vars='LTLIBOBJS LIBOBJS -LTLIBOBJS' +RXPACKEXPORTS +SAVE2O +CC2O +O2SAVE +SHL_TARGETS +SHLPRE +LD_RXLIB1 +DYN_COMP +SHLPST +PURIFY +MH_XLIBS +MH_XINC_DIR +XMKMF +MH_EXTRA_LIBS +EGREP +GREP +CPP +SET_MAKE +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +RANLIB +SYS_DEFS +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +with_x +enable_debug +enable_widec +enable_xim +enable_force_utf8 +enable_purify +with_xaw3d +with_nextaw +' ac_precious_vars='build_alias host_alias target_alias @@ -712,6 +731,8 @@ XMKMF' # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -767,8 +788,9 @@ do fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -810,13 +832,20 @@ do datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -829,13 +858,20 @@ do dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1026,22 +1062,36 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1061,26 +1111,26 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1088,23 +1138,36 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" fi -# Be sure to have absolute directory names. +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1118,8 +1181,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1134,23 +1195,21 @@ test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1177,13 +1236,11 @@ else fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1223,7 +1280,7 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1231,9 +1288,9 @@ Configuration: Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1243,25 +1300,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/PDCurses] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PDCurses] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1284,6 +1341,7 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-debug turn on debugging @@ -1305,7 +1363,7 @@ Some influential environment variables: LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor XMKMF Path to xmkmf, Makefile generator for X Window System @@ -1321,15 +1379,17 @@ fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1365,7 +1425,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1375,21 +1435,376 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF PDCurses configure 3.4 -generated by GNU Autoconf 2.61 +generated by GNU Autoconf 2.69 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## --------------------------------- ## +## Report this to wmcbrine@gmail.com ## +## --------------------------------- ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by PDCurses $as_me 3.4, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -1425,8 +1840,8 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -1460,12 +1875,12 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1481,13 +1896,13 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1499,11 +1914,9 @@ trap 'exit_status=$? { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1512,12 +1925,13 @@ _ASBOX case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1536,128 +1950,136 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1671,68 +2093,56 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi - - - - - - - - - - - - - - - - - - - - - - - - +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1753,10 +2163,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1766,25 +2176,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1793,10 +2203,10 @@ if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1806,25 +2216,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -1832,12 +2242,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -1850,10 +2256,10 @@ if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1863,25 +2269,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1890,10 +2296,10 @@ fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1904,18 +2310,18 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -1934,11 +2340,11 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1949,10 +2355,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1962,25 +2368,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -1993,10 +2399,10 @@ if test -z "$CC"; then do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2006,25 +2412,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2036,12 +2442,8 @@ done else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2051,51 +2453,37 @@ fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2107,42 +2495,38 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -2152,14 +2536,14 @@ for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -2178,78 +2562,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } fi - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2257,37 +2604,90 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi - -rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2299,51 +2699,46 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2357,54 +2752,34 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_compiler_gnu=no + ac_compiler_gnu=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2415,34 +2790,11 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2453,35 +2805,12 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2492,42 +2821,18 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2543,23 +2848,18 @@ else CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -2611,31 +2911,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -2646,17 +2924,19 @@ fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -2684,9 +2964,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -2700,35 +2978,27 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -2744,28 +3014,24 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -2781,28 +3047,24 @@ IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -{ echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6; } -if test "${ac_cv_target+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if ${ac_cv_target+:} false; then : + $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 -echo "$as_me: error: invalid value of canonical target" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' @@ -2825,16 +3087,12 @@ test -n "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- -mymakefile="Makefile" + on_qnx=no case "$target" in *hp-hpux*) SYS_DEFS="-D_HPUX_SOURCE" ;; - *ibm-aix*) - SYS_DEFS="-D_ALL_SOURCE" - mymakefile="Makefile.aix" - ;; *dec-osf*) SYS_DEFS="-D_XOPEN_SOURCE_EXTENDED" ;; @@ -2853,19 +3111,15 @@ esac save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $SYS_DEFS" -{ echo "$as_me:$LINENO: checking for maximum signal specifier:" >&5 -echo $ECHO_N "checking for maximum signal specifier:... $ECHO_C" >&6; } -if test "${mh_cv_max_signals+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for maximum signal specifier:" >&5 +$as_echo_n "checking for maximum signal specifier:... " >&6; } +if ${mh_cv_max_signals+:} false; then : + $as_echo_n "(cached) " >&6 else mh_found="no" for mh_sigs in NSIG __sys_nsig; do -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -2876,31 +3130,9 @@ return $mh_sigs; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : mh_found="yes"; mh_cv_max_signals="$mh_sigs" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$mh_found" = "yes"; then break; @@ -2910,26 +3142,24 @@ fi CPPFLAGS="$save_CPPFLAGS" if test "$mh_found" = "no"; then - { { echo "$as_me:$LINENO: error: Cannot find a system limit for number of signals. PDCurses cannot be configured on this machine." >&5 -echo "$as_me: error: Cannot find a system limit for number of signals. PDCurses cannot be configured on this machine." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Cannot find a system limit for number of signals. PDCurses cannot be configured on this machine." "$LINENO" 5 else cat >>confdefs.h <<_ACEOF #define PDC_MAX_SIGNALS $mh_cv_max_signals _ACEOF - { echo "$as_me:$LINENO: result: $mh_cv_max_signals" >&5 -echo "${ECHO_T}$mh_cv_max_signals" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mh_cv_max_signals" >&5 +$as_echo "$mh_cv_max_signals" >&6; } fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -2939,25 +3169,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2966,10 +3196,10 @@ if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. @@ -2979,25 +3209,25 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -3005,12 +3235,8 @@ fi else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -3032,22 +3258,23 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -3055,7 +3282,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -3065,17 +3292,29 @@ case $as_dir/ in # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac -done + + done IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -3088,8 +3327,8 @@ fi INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -3099,18 +3338,19 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -3120,12 +3360,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -3135,15 +3375,15 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -3157,11 +3397,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3170,76 +3406,34 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -3251,8 +3445,8 @@ fi else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3262,11 +3456,7 @@ do # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3275,83 +3465,40 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -3361,45 +3508,40 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 else + if test -z "$GREP"; then ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -3411,77 +3553,61 @@ case `"$ac_path_GREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_GREP_found && break 3 + $ac_path_GREP_found && break 3 + done + done done -done - -done IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else ac_cv_path_GREP=$GREP fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + if test -z "$EGREP"; then ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -3493,46 +3619,31 @@ case `"$ac_path_EGREP" --version 2>&1` in rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_EGREP_found && break 3 + $ac_path_EGREP_found && break 3 + done + done done -done - -done IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else ac_cv_path_EGREP=$EGREP fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3547,47 +3658,23 @@ main () return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3597,18 +3684,14 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -3618,14 +3701,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3652,113 +3731,35 @@ main () return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : +if ac_fn_c_try_run "$LINENO"; then : + else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - - for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -3767,300 +3768,32 @@ done -if test "${ac_cv_header_sys_ipc_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/ipc.h" >&5 -echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_ipc_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5 -echo $ECHO_N "checking sys/ipc.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5 -echo $ECHO_N "checking sys/ipc.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/ipc.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/ipc.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## --------------------------------- ## -## Report this to wmcbrine@gmail.com ## -## --------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for sys/ipc.h" >&5 -echo $ECHO_N "checking for sys/ipc.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_ipc_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_sys_ipc_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_ipc_h" >&6; } +ac_fn_c_check_header_mongrel "$LINENO" "sys/ipc.h" "ac_cv_header_sys_ipc_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_ipc_h" = xyes; then : fi if test $ac_cv_header_sys_ipc_h = no; then - { { echo "$as_me:$LINENO: error: Cannot find required header file sys/ipc.h; PDCurses cannot be configured" >&5 -echo "$as_me: error: Cannot find required header file sys/ipc.h; PDCurses cannot be configured" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Cannot find required header file sys/ipc.h; PDCurses cannot be configured" "$LINENO" 5 fi if test $ac_cv_header_stdc != yes; then - { { echo "$as_me:$LINENO: error: Need ANSI C headers" >&5 -echo "$as_me: error: Need ANSI C headers" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Need ANSI C headers" "$LINENO" 5 fi - - - - - for ac_header in fcntl.h \ sys/time.h \ - sys/select.h \ - dlfcn.h \ - dl.h + sys/select.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## --------------------------------- ## -## Report this to wmcbrine@gmail.com ## -## --------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -4068,16 +3801,12 @@ fi done -{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } -if test "${ac_cv_header_time+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if ${ac_cv_header_time+:} false; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4092,40 +3821,18 @@ return 0; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_time=no + ac_cv_header_time=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 -_ACEOF +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi @@ -4133,30 +3840,26 @@ fi MH_EXTRA_LIBS='' for mh_lib in socket nls; do if test "$on_qnx" = yes; then - { echo "$as_me:$LINENO: checking for library -l${mh_lib}" >&5 -echo $ECHO_N "checking for library -l${mh_lib}... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library -l${mh_lib}" >&5 +$as_echo_n "checking for library -l${mh_lib}... " >&6; } if test -r /usr/lib/${mh_lib}3r.lib; then - { echo "$as_me:$LINENO: result: found" >&5 -echo "${ECHO_T}found" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } MH_EXTRA_LIBS="${MH_EXTRA_LIBS} -l${mh_lib}" else - { echo "$as_me:$LINENO: result: not found" >&5 -echo "${ECHO_T}not found" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } fi else - as_ac_Lib=`echo "ac_cv_lib_$mh_lib''_main" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for main in -l$mh_lib" >&5 -echo $ECHO_N "checking for main in -l$mh_lib... $ECHO_C" >&6; } -if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_ac_Lib=`$as_echo "ac_cv_lib_$mh_lib''_main" | $as_tr_sh` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -l$mh_lib" >&5 +$as_echo_n "checking for main in -l$mh_lib... " >&6; } +if eval \${$as_ac_Lib+:} false; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$mh_lib $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4168,40 +3871,19 @@ return main (); return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Lib=no" + eval "$as_ac_Lib=no" fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -ac_res=`eval echo '${'$as_ac_Lib'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Lib'}'` = yes; then +eval ac_res=\$$as_ac_Lib + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : mh_lib_found=yes else mh_lib_found=no @@ -4215,38 +3897,38 @@ done -{ echo "$as_me:$LINENO: checking whether $CC understand -c and -o together" >&5 -echo $ECHO_N "checking whether $CC understand -c and -o together... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understand -c and -o together" >&5 +$as_echo_n "checking whether $CC understand -c and -o together... " >&6; } set dummy $CC; ac_cc="`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" -if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : + $as_echo_n "(cached) " >&6 else echo 'foo(){}' > conftest.c # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. eval ac_cv_prog_cc_${ac_cc}_c_o=no ac_try='${CC-cc} -c conftest.c -o conftest.ooo 1>&5' -if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -f conftest.ooo && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -f conftest.ooo && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then ac_try='${CC-cc} -c conftest.c -o conftest.ooo 1>&5' - if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -f conftest.ooo && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -f conftest.ooo && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes fi @@ -4258,27 +3940,23 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then O2SAVE="" SAVE2O="" CC2O="-o $"'@' - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else O2SAVE="-mv \`basename "$'@'" .sho\`.o \`basename "$'@'" .sho\`.o.save;" SAVE2O="-mv \`basename "$'@'" .sho\`.o "$'@'"; mv \`basename "$'@'" .sho\`.o.save \`basename "$'@'" .sho\`.o" CC2O="" - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } -if test "${ac_cv_type_signal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if ${ac_cv_type_signal+:} false; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4291,145 +3969,40 @@ return *(signal (0, 0)) (0) == 1; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_signal=void + ac_cv_type_signal=void fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -echo "${ECHO_T}$ac_cv_type_signal" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF - - - - for ac_func in vsscanf usleep poll vsnprintf -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -{ echo "$as_me:$LINENO: checking for X" >&5 -echo $ECHO_N "checking for X... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 +$as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. -if test "${with_x+set}" = set; then +if test "${with_x+set}" = set; then : withval=$with_x; fi @@ -4439,11 +4012,9 @@ if test "x$with_x" = xno; then have_x=disabled else case $x_includes,$x_libraries in #( - *\'*) { { echo "$as_me:$LINENO: error: Cannot use X directory names containing '" >&5 -echo "$as_me: error: Cannot use X directory names containing '" >&2;} - { (exit 1); exit 1; }; };; #( - *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( + *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : + $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no @@ -4459,12 +4030,12 @@ libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl; do + for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break @@ -4478,7 +4049,7 @@ _ACEOF *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in - /usr/lib | /lib) ;; + /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi @@ -4490,21 +4061,25 @@ fi # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include +/usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 +/usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include +/usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 +/usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 @@ -4526,36 +4101,14 @@ ac_x_header_dirs=' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir @@ -4563,8 +4116,7 @@ sed 's/^/| /' conftest.$ac_ext >&5 fi done fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then @@ -4573,11 +4125,7 @@ if test "$ac_x_libraries" = no; then # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -4588,36 +4136,16 @@ XrmInitialize () return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - LIBS=$ac_save_LIBS -for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` + LIBS=$ac_save_LIBS +for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl; do + for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 @@ -4625,9 +4153,8 @@ do done done fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( @@ -4648,8 +4175,8 @@ fi fi # $with_x != no if test "$have_x" != yes; then - { echo "$as_me:$LINENO: result: $have_x" >&5 -echo "${ECHO_T}$have_x" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 +$as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. @@ -4659,8 +4186,8 @@ else ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" - { echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 -echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 +$as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi @@ -4716,9 +4243,7 @@ if test "x$mh_x11_dir" != "x" ; then MH_XINC_DIR="-I$mh_x11_dir" fi else - { { echo "$as_me:$LINENO: error: Cannot find required header file Intrinsic.h; PDCurses cannot be configured" >&5 -echo "$as_me: error: Cannot find required header file Intrinsic.h; PDCurses cannot be configured" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Cannot find required header file Intrinsic.h; PDCurses cannot be configured" "$LINENO" 5 fi if test "x$mh_x11_xaw_dir" != "x"; then @@ -4726,9 +4251,7 @@ if test "x$mh_x11_xaw_dir" != "x"; then MH_XINC_DIR="-I$mh_x11_xaw_dir $MH_XINC_DIR" fi else - { { echo "$as_me:$LINENO: error: Cannot find required Xaw header file Box.h; PDCurses cannot be configured" >&5 -echo "$as_me: error: Cannot find required Xaw header file Box.h; PDCurses cannot be configured" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Cannot find required Xaw header file Box.h; PDCurses cannot be configured" "$LINENO" 5 fi @@ -4819,9 +4342,7 @@ for mh_lib in $mh_libs; do done done if test "$mh_lib_found" = no; then - { { echo "$as_me:$LINENO: error: Cannot find required X library; lib$mh_lib. PDCurses cannot be configured" >&5 -echo "$as_me: error: Cannot find required X library; lib$mh_lib. PDCurses cannot be configured" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "Cannot find required X library; lib$mh_lib. PDCurses cannot be configured" "$LINENO" 5 fi done @@ -4844,17 +4365,15 @@ if test "$mh_hpux9_flag" = yes ; then done done if test "$mh_found_xtshellstrings" = no ; then - { echo "$as_me:$LINENO: WARNING: The X11 development environment has not been installed correctly." >&5 -echo "$as_me: WARNING: The X11 development environment has not been installed correctly." >&2;} - { echo "$as_me:$LINENO: WARNING: The header file; Intrinsic.h" >&5 -echo "$as_me: WARNING: The header file; Intrinsic.h" >&2;} - { echo "$as_me:$LINENO: WARNING: Set library; libXaw is for X11R4. This is a common problem with" >&5 -echo "$as_me: WARNING: Set library; libXaw is for X11R4. This is a common problem with" >&2;} - { echo "$as_me:$LINENO: WARNING: HP-UX 9.x." >&5 -echo "$as_me: WARNING: HP-UX 9.x." >&2;} - { { echo "$as_me:$LINENO: error: X11 installation incomplete; cannot continue" >&5 -echo "$as_me: error: X11 installation incomplete; cannot continue" >&2;} - { (exit 1); exit 1; }; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The X11 development environment has not been installed correctly." >&5 +$as_echo "$as_me: WARNING: The X11 development environment has not been installed correctly." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The header file; Intrinsic.h" >&5 +$as_echo "$as_me: WARNING: The header file; Intrinsic.h" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Set library; libXaw is for X11R4. This is a common problem with" >&5 +$as_echo "$as_me: WARNING: Set library; libXaw is for X11R4. This is a common problem with" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: HP-UX 9.x." >&5 +$as_echo "$as_me: WARNING: HP-UX 9.x." >&2;} + as_fn_error $? "X11 installation incomplete; cannot continue" "$LINENO" 5 fi fi fi @@ -4866,145 +4385,13 @@ fi save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $MH_XINC_DIR" for mh_header in DECkeysym.h Sunkeysym.h xpm.h; do - -for ac_header in $mh_header -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( cat <<\_ASBOX -## --------------------------------- ## -## Report this to wmcbrine@gmail.com ## -## --------------------------------- ## -_ASBOX - ) | sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then + for ac_header in $mh_header +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -5019,14 +4406,10 @@ save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $MH_XINC_DIR" for mh_keydef in XK_KP_Delete XK_KP_Insert XK_KP_End XK_KP_Down XK_KP_Next \ XK_KP_Left XK_KP_Right XK_KP_Home XK_KP_Up XK_KP_Prior XK_KP_Begin; do - { echo "$as_me:$LINENO: checking for $mh_keydef in keysym.h" >&5 -echo $ECHO_N "checking for $mh_keydef in keysym.h... $ECHO_C" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $mh_keydef in keysym.h" >&5 +$as_echo_n "checking for $mh_keydef in keysym.h... " >&6; } mh_upper_name="HAVE_`echo $mh_keydef | tr 'a-z' 'A-Z'`" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -5037,37 +4420,17 @@ int i = $mh_keydef; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : mh_have_key=yes; cat >>confdefs.h <<_ACEOF #define $mh_upper_name 1 _ACEOF else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - mh_have_key=no + mh_have_key=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { echo "$as_me:$LINENO: result: $mh_have_key" >&5 -echo "${ECHO_T}$mh_have_key" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $mh_have_key" >&5 +$as_echo "$mh_have_key" >&6; } done CPPFLAGS="$save_CPPFLAGS" @@ -5075,13 +4438,9 @@ CPPFLAGS="$save_CPPFLAGS" save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $SYS_DEFS $MH_XINC_DIR" for td in XPointer ; do -{ echo "$as_me:$LINENO: checking if $td is typedefed:" >&5 -echo $ECHO_N "checking if $td is typedefed:... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $td is typedefed:" >&5 +$as_echo_n "checking if $td is typedefed:... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "X11/Xlib.h" int @@ -5092,32 +4451,12 @@ $td fred return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : mh_td=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - mh_td=no + mh_td=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$mh_td" = yes ; then TD_upper=`echo $td | tr a-z A-Z` @@ -5126,8 +4465,8 @@ if test "$mh_td" = yes ; then _ACEOF fi -{ echo "$as_me:$LINENO: result: $mh_td" >&5 -echo "${ECHO_T}$mh_td" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mh_td" >&5 +$as_echo "$mh_td" >&6; } done CPPFLAGS="$save_CPPFLAGS" @@ -5135,7 +4474,7 @@ if test $ac_cv_header_xpm_h = yes; then MH_XLIBS="$MH_XLIBS -lXpm" fi # Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then +if test "${enable_debug+set}" = set; then : enableval=$enable_debug; with_debug=$enableval else with_debug=no @@ -5176,7 +4515,7 @@ if test "$on_qnx" = yes; then fi # Check whether --enable-widec was given. -if test "${enable_widec+set}" = set; then +if test "${enable_widec+set}" = set; then : enableval=$enable_widec; with_widec=$enableval else with_widec=no @@ -5187,7 +4526,7 @@ if test "$with_widec" = yes; then fi # Check whether --enable-xim was given. -if test "${enable_xim+set}" = set; then +if test "${enable_xim+set}" = set; then : enableval=$enable_xim; with_xim=$enableval else with_xim=no @@ -5198,7 +4537,7 @@ if test "$with_xim" = yes; then fi # Check whether --enable-force-utf8 was given. -if test "${enable_force_utf8+set}" = set; then +if test "${enable_force_utf8+set}" = set; then : enableval=$enable_force_utf8; force_utf8=$enableval else force_utf8=no @@ -5209,7 +4548,7 @@ if test "$force_utf8" = yes; then fi # Check whether --enable-purify was given. -if test "${enable_purify+set}" = set; then +if test "${enable_purify+set}" = set; then : enableval=$enable_purify; with_purify=$enableval else with_purify=no @@ -5224,7 +4563,7 @@ fi # Check whether --with-xaw3d was given. -if test "${with_xaw3d+set}" = set; then +if test "${with_xaw3d+set}" = set; then : withval=$with_xaw3d; with_xaw3d=$withval else with_xaw3d=no @@ -5232,15 +4571,13 @@ fi if test "$with_xaw3d" = yes; then -cat >>confdefs.h <<\_ACEOF -#define USE_XAW3D 1 -_ACEOF +$as_echo "#define USE_XAW3D 1" >>confdefs.h fi # Check whether --with-nextaw was given. -if test "${with_nextaw+set}" = set; then +if test "${with_nextaw+set}" = set; then : withval=$with_nextaw; with_nextaw=$withval else with_nextaw=no @@ -5248,15 +4585,13 @@ fi if test "$with_nextaw" = yes; then -cat >>confdefs.h <<\_ACEOF -#define USE_NEXTAW 1 -_ACEOF +$as_echo "#define USE_NEXTAW 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking shared library extension" >&5 -echo $ECHO_N "checking shared library extension... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking shared library extension" >&5 +$as_echo_n "checking shared library extension... " >&6; } SHLPST=".so" case "$target" in @@ -5277,8 +4612,8 @@ case "$target" in ;; esac -{ echo "$as_me:$LINENO: result: $SHLPST" >&5 -echo "${ECHO_T}$SHLPST" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLPST" >&5 +$as_echo "$SHLPST" >&6; } @@ -5361,11 +4696,11 @@ esac if test "$DYN_COMP" = ""; then -{ echo "$as_me:$LINENO: checking compiler flags for a dynamic object" >&5 -echo $ECHO_N "checking compiler flags for a dynamic object... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for a dynamic object" >&5 +$as_echo_n "checking compiler flags for a dynamic object... " >&6; } cat > conftest.$ac_ext <&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$mh_compile\""; } >&5 (eval $mh_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then DYN_COMP="" else slash="\\" mh_dyncomp="`egrep -c $slash$a conftest.tmp`" if test "$mh_dyncomp" = "0"; then DYN_COMP="$a -DDYNAMIC" - { echo "$as_me:$LINENO: result: $a" >&5 -echo "${ECHO_T}$a" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $a" >&5 +$as_echo "$a" >&6; } break else DYN_COMP="" @@ -5397,31 +4732,31 @@ echo "${ECHO_T}$a" >&6; } fi done if test "$DYN_COMP" = ""; then - { echo "$as_me:$LINENO: result: none of $mh_cv_flags supported" >&5 -echo "${ECHO_T}none of $mh_cv_flags supported" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none of $mh_cv_flags supported" >&5 +$as_echo "none of $mh_cv_flags supported" >&6; } fi if test "$LD_RXLIB1" = ""; then mh_compile='${CC-cc} -c $DYN_COMP conftest.$ac_ext 1>&5' cat > conftest.$ac_ext <&5 +if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$mh_compile\""; } >&5 (eval $mh_compile) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest.o; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest.o; then mh_dyn_link='ld -shared -o conftest.rxlib conftest.o -lc 1>&5' # mh_dyn_link='${CC} -Wl,-shared -o conftest.rxlib conftest.o -lc 1>&AC_FD_CC' - if { (eval echo "$as_me:$LINENO: \"$mh_dyn_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$mh_dyn_link\""; } >&5 (eval $mh_dyn_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest.rxlib; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest.rxlib; then LD_RXLIB1="ld -shared" # LD_RXLIB1="${CC} -Wl,-shared" SHLPRE="lib" @@ -5429,11 +4764,11 @@ if { (eval echo "$as_me:$LINENO: \"$mh_compile\"") >&5 else mh_dyn_link='ld -G -o conftest.rxlib conftest.o 1>&5' # mh_dyn_link='${CC} -Wl,-G -o conftest.rxlib conftest.o 1>&AC_FD_CC' - if { (eval echo "$as_me:$LINENO: \"$mh_dyn_link\"") >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$mh_dyn_link\""; } >&5 (eval $mh_dyn_link) 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && test -s conftest.rxlib; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && test -s conftest.rxlib; then LD_RXLIB1="ld -G" # LD_RXLIB1="${CC} -Wl,-G" SHLPRE="lib" @@ -5486,7 +4821,7 @@ fi -ac_config_files="$ac_config_files Makefile x11/$mymakefile x11/xcurses-config" +ac_config_files="$ac_config_files Makefile xcurses-config" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -5515,12 +4850,13 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -5528,8 +4864,8 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -5551,13 +4887,24 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -5570,14 +4917,15 @@ DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -5585,12 +4933,14 @@ LTLIBOBJS=$ac_ltlibobjs -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -5600,59 +4950,79 @@ cat >$CONFIG_STATUS <<_ACEOF debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -5661,20 +5031,19 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +as_myself= +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -5685,32 +5054,111 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + -# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -5724,13 +5172,17 @@ else as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -5745,131 +5197,118 @@ echo X/"$0" | } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -5879,13 +5318,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by PDCurses $as_me 3.4, which was -generated by GNU Autoconf 2.61. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5898,29 +5343,41 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q` _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -5928,36 +5385,42 @@ $config_files Configuration headers: $config_headers -Report bugs to ." +Report bugs to ." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ PDCurses config.status 3.4 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -5970,34 +5433,41 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -6012,30 +5482,32 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + exec "\$@" fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - echo "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets @@ -6043,12 +5515,9 @@ do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "x11/$mymakefile") CONFIG_FILES="$CONFIG_FILES x11/$mymakefile" ;; - "x11/xcurses-config") CONFIG_FILES="$CONFIG_FILES x11/xcurses-config" ;; + "xcurses-config") CONFIG_FILES="$CONFIG_FILES xcurses-config" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -6070,192 +5539,302 @@ fi # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF - +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -target!$target$ac_delim -target_cpu!$target_cpu$ac_delim -target_vendor!$target_vendor$ac_delim -target_os!$target_os$ac_delim -SYS_DEFS!$SYS_DEFS$ac_delim -RANLIB!$RANLIB$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -MH_EXTRA_LIBS!$MH_EXTRA_LIBS$ac_delim -XMKMF!$XMKMF$ac_delim -MH_XINC_DIR!$MH_XINC_DIR$ac_delim -MH_XLIBS!$MH_XLIBS$ac_delim -PURIFY!$PURIFY$ac_delim -SHLPST!$SHLPST$ac_delim -DYN_COMP!$DYN_COMP$ac_delim -LD_RXLIB1!$LD_RXLIB1$ac_delim -SHLPRE!$SHLPRE$ac_delim -SHL_TARGETS!$SHL_TARGETS$ac_delim -O2SAVE!$O2SAVE$ac_delim -CC2O!$CC2O$ac_delim -SAVE2O!$SAVE2O$ac_delim -RXPACKEXPORTS!$RXPACKEXPORTS$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 81; then + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " +shift +for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -6274,7 +5853,7 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;} for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -6283,26 +5862,34 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;} [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - ac_file_inputs="$ac_file_inputs $ac_f" + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -6312,7 +5899,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -6330,55 +5917,15 @@ echo X"$ac_file" | q } s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -6418,12 +5965,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { +ac_sed_dataroot=' +/datarootdir/ { p q } @@ -6431,36 +5978,37 @@ case `sed -n '/datarootdir/ { /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' $ac_file_inputs` in +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t +s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -6470,119 +6018,49 @@ s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # -_ACEOF - -# Transform confdefs.h into a sed script `conftest.defines', that -# substitutes the proper values into config.h.in to produce config.h. -rm -f conftest.defines conftest.tail -# First, append a space to every undef/define line, to ease matching. -echo 's/$/ /' >conftest.defines -# Then, protect against being on the right side of a sed subst, or in -# an unquoted here document, in config.status. If some macros were -# called several times there might be several #defines for the same -# symbol, which is useless. But do not sort them, since the last -# AC_DEFINE must be honored. -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where -# NAME is the cpp macro being defined, VALUE is the value it is being given. -# PARAMS is the parameter list in the macro definition--in most cases, it's -# just an empty string. -ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' -ac_dB='\\)[ (].*,\\1define\\2' -ac_dC=' ' -ac_dD=' ,' - -uniq confdefs.h | - sed -n ' - t rset - :rset - s/^[ ]*#[ ]*define[ ][ ]*// - t ok - d - :ok - s/[\\&,]/\\&/g - s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p - s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p - ' >>conftest.defines - -# Remove the space that was appended to ease matching. -# Then replace #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -# (The regexp can be short, since the line contains either #define or #undef.) -echo 's/ $// -s,^[ #]*u.*,/* & */,' >>conftest.defines - -# Break up conftest.defines: -ac_max_sed_lines=50 - -# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" -# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" -# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" -# et cetera. -ac_in='$ac_file_inputs' -ac_out='"$tmp/out1"' -ac_nxt='"$tmp/out2"' - -while : -do - # Write a here document: - cat >>$CONFIG_STATUS <<_ACEOF - # First, check the format of the line: - cat >"\$tmp/defines.sed" <<\\CEOF -/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def -/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def -b -:def -_ACEOF - sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS - ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in - sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail - grep . conftest.tail >/dev/null || break - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines conftest.tail - -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else - rm -f $ac_file - mv "$tmp/config.h" $ac_file + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - echo "/* $configure_input */" - cat "$ac_result" + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi - rm -f "$tmp/out12" ;; @@ -6591,11 +6069,13 @@ echo "$as_me: $ac_file is unchanged" >&6;} done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -6615,124 +6095,82 @@ if test "$no_create" != yes; then exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi -case "$target" in - *ibm-aix*) - mv x11/Makefile.aix x11/Makefile - { echo "$as_me:$LINENO: result: renaming x11/Makefile.aix to x11/Makefile" >&5 -echo "${ECHO_T}renaming x11/Makefile.aix to x11/Makefile" >&6; } - ;; - *) - ;; -esac - -cat >>confdefs.h <<\_ACEOF -#define PDC_MAX_SIGNALS -_ACEOF +$as_echo "#define PDC_MAX_SIGNALS /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_DECKEYSYM_H -_ACEOF +$as_echo "#define HAVE_DECKEYSYM_H /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_SUNKEYSYM_H -_ACEOF +$as_echo "#define HAVE_SUNKEYSYM_H /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_XPM_H -_ACEOF +$as_echo "#define HAVE_XPM_H /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_XK_KP_DELETE -_ACEOF +$as_echo "#define HAVE_XK_KP_DELETE /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_XK_KP_INSERT -_ACEOF +$as_echo "#define HAVE_XK_KP_INSERT /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_XK_KP_END -_ACEOF +$as_echo "#define HAVE_XK_KP_END /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_XK_KP_DOWN -_ACEOF +$as_echo "#define HAVE_XK_KP_DOWN /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_XK_KP_NEXT -_ACEOF +$as_echo "#define HAVE_XK_KP_NEXT /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_XK_KP_LEFT -_ACEOF +$as_echo "#define HAVE_XK_KP_LEFT /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_XK_KP_RIGHT -_ACEOF +$as_echo "#define HAVE_XK_KP_RIGHT /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_XK_KP_HOME -_ACEOF +$as_echo "#define HAVE_XK_KP_HOME /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_XK_KP_UP -_ACEOF +$as_echo "#define HAVE_XK_KP_UP /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_XK_KP_PRIOR -_ACEOF +$as_echo "#define HAVE_XK_KP_PRIOR /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define HAVE_XK_KP_BEGIN -_ACEOF +$as_echo "#define HAVE_XK_KP_BEGIN /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define USE_XAW3D -_ACEOF +$as_echo "#define USE_XAW3D /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define USE_NEXTAW -_ACEOF +$as_echo "#define USE_NEXTAW /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define XPOINTER_TYPEDEFED -_ACEOF +$as_echo "#define XPOINTER_TYPEDEFED /**/" >>confdefs.h diff --git a/configure.ac b/x11/configure.ac similarity index 93% rename from configure.ac rename to x11/configure.ac index aee5983a..c8019c60 100644 --- a/configure.ac +++ b/x11/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT([PDCurses], [3.4], [wmcbrine@gmail.com], [PDCurses]) -AC_CONFIG_SRCDIR([curspriv.h]) +AC_CONFIG_SRCDIR([pdcx11.h]) AC_SUBST(prefix) @@ -11,16 +11,11 @@ AC_CONFIG_HEADER(config.h) dnl Checks for system first AC_CANONICAL_SYSTEM([]) -mymakefile="Makefile" on_qnx=no case "$target" in *hp-hpux*) SYS_DEFS="-D_HPUX_SOURCE" ;; - *ibm-aix*) - SYS_DEFS="-D_ALL_SOURCE" - mymakefile="Makefile.aix" - ;; *dec-osf*) SYS_DEFS="-D_XOPEN_SOURCE_EXTENDED" ;; @@ -54,9 +49,7 @@ dnl Checks for libraries. AC_CHECK_HEADERS(fcntl.h \ sys/time.h \ - sys/select.h \ - dlfcn.h \ - dl.h + sys/select.h ) dnl Checks for typedefs, structures, and compiler characteristics. @@ -199,18 +192,9 @@ dnl -------------- check how to make shared libraries ---------------- dnl Force the ability of shared library usage MH_SHARED_LIBRARY(XCurses) -AC_CONFIG_FILES([Makefile x11/$mymakefile x11/xcurses-config]) +AC_CONFIG_FILES([Makefile xcurses-config]) AC_OUTPUT -case "$target" in - *ibm-aix*) - mv x11/Makefile.aix x11/Makefile - AC_MSG_RESULT(renaming x11/Makefile.aix to x11/Makefile) - ;; - *) - ;; -esac - AC_DEFINE([PDC_MAX_SIGNALS], [], [Define as the system defined limit for number of signals] ) diff --git a/install-sh b/x11/install-sh similarity index 100% rename from install-sh rename to x11/install-sh diff --git a/x11/pdcx11.h b/x11/pdcx11.h index d0b5af7d..68e86ba0 100644 --- a/x11/pdcx11.h +++ b/x11/pdcx11.h @@ -1,5 +1,9 @@ /* Public Domain Curses */ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include #ifdef HAVE_UNISTD_H From 850a9573591a706dca018d3554640210fd0d1ce3 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 7 Feb 2016 11:17:05 -0500 Subject: [PATCH 44/46] Parameters not given here. --- pdcurses/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdcurses/window.c b/pdcurses/window.c index 86f6c81b..34ae0287 100644 --- a/pdcurses/window.c +++ b/pdcurses/window.c @@ -195,7 +195,7 @@ WINDOW *PDC_makelines(WINDOW *win) { int i, j, nlines, ncols; - PDC_LOG(("PDC_makelines() - called: lines %d cols %d\n", nlines, ncols)); + PDC_LOG(("PDC_makelines() - called\n")); if (!win) return (WINDOW *)NULL; From 0d7e8edd7cd139ca5ceab70665d4b60deb620389 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 7 Feb 2016 11:23:59 -0500 Subject: [PATCH 45/46] Warning suppression. --- demos/tuidemo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/demos/tuidemo.c b/demos/tuidemo.c index cb2ffcc7..e3e49c27 100644 --- a/demos/tuidemo.c +++ b/demos/tuidemo.c @@ -74,7 +74,7 @@ void showfile(char *fname) { int i, bh = bodylen(); FILE *fp; - char buf[MAXSTRLEN]; + char buf[MAXSTRLEN], *result; bool ateof = FALSE; statusmsg("FileBrowser: Hit key to continue, Q to quit"); @@ -88,9 +88,9 @@ void showfile(char *fname) for (i = 0; i < bh - 1 && !ateof; i++) { buf[0] = '\0'; - fgets(buf, MAXSTRLEN, fp); + result = fgets(buf, MAXSTRLEN, fp); - if (strlen(buf)) + if (result && strlen(buf)) bodymsg(buf); else ateof = TRUE; From dc1d35e8a211a9da208b6950931d551aff6d1f47 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sat, 13 Feb 2016 12:42:16 -0500 Subject: [PATCH 46/46] TTF and 16-bit Unicode output for SDL 1.2, after Laura Michaels. ("make WIDE=Y" builds against SDL_ttf, if available.) --- sdl1/Makefile | 13 +++++- sdl1/Makefile.mng | 15 ++++++- sdl1/README.md | 2 +- sdl1/pdcclip.c | 2 +- sdl1/pdcdisp.c | 106 +++++++++++++++++++++++++++++++++++++++++++--- sdl1/pdcscrn.c | 75 +++++++++++++++++++++++++++++++- sdl1/pdcsdl.h | 7 +++ 7 files changed, 207 insertions(+), 13 deletions(-) diff --git a/sdl1/Makefile b/sdl1/Makefile index 61a9f7e4..3ca797c1 100644 --- a/sdl1/Makefile +++ b/sdl1/Makefile @@ -19,9 +19,18 @@ SLIBS = $(shell sdl-config --libs) SFLAGS += -DHAVE_VSNPRINTF -DHAVE_VSSCANF ifeq ($(DEBUG),Y) - CFLAGS = -g -Wall -DPDCDEBUG + CFLAGS = -g -Wall -DPDCDEBUG -fPIC else - CFLAGS = -O2 -Wall + CFLAGS = -O2 -Wall -fPIC +endif + +ifeq ($(WIDE),Y) + CFLAGS += -DPDC_WIDE + SLIBS += -lSDL_ttf +endif + +ifeq ($(UTF8),Y) + CFLAGS += -DPDC_FORCE_UTF8 endif BUILD = $(CC) $(CFLAGS) -I$(PDCURSES_SRCDIR) diff --git a/sdl1/Makefile.mng b/sdl1/Makefile.mng index 427edc67..59292403 100644 --- a/sdl1/Makefile.mng +++ b/sdl1/Makefile.mng @@ -12,12 +12,23 @@ osdir = $(PDCURSES_SRCDIR)/sdl1 PDCURSES_SDL_H = $(osdir)/pdcsdl.h +SLIBS = -lSDL + ifeq ($(DEBUG),Y) CFLAGS = -g -Wall -DPDCDEBUG else CFLAGS = -O2 -Wall endif +ifeq ($(WIDE),Y) + CFLAGS += -DPDC_WIDE + SLIBS += -lSDL_ttf +endif + +ifeq ($(UTF8),Y) + CFLAGS += -DPDC_FORCE_UTF8 +endif + CC = gcc BUILD = $(CC) $(CFLAGS) -I$(PDCURSES_SRCDIR) LDFLAGS = -mwindows $(LIBCURSES) @@ -34,13 +45,13 @@ ifeq ($(DLL),Y) LIBFLAGS = -Wl,--out-implib,libpdcurses.a -shared -o LIBCURSES = pdcurses.dll CLEAN = $(LIBCURSES) *.a $(DEFFILE) - POST = -lSDL + POST = $(SLIBS) else LIBEXE = ar LIBFLAGS = rcv LIBCURSES = libpdcurses.a CLEAN = *.a - LDFLAGS += -lSDL + LDFLAGS += $(SLIBS) endif DEMOS += sdltest.exe diff --git a/sdl1/README.md b/sdl1/README.md index 2ac02a07..fc371d3c 100644 --- a/sdl1/README.md +++ b/sdl1/README.md @@ -12,7 +12,7 @@ Building assumes a working sdl-config, and GNU make. It builds the library libpdcurses.a (dynamic lib not implemented). - With MinGW, run "make -f Makefile.mng". This assumes SDL is installed +- With MinGW, run "make -f Makefile.mng". This assumes SDL is installed in the standard directories. The MinGW makefile accepts the optional parameters "DLL=Y" and "DEBUG=Y", as with the console version. (Wide- character support is not yet implemented for SDL.) Both makefiles diff --git a/sdl1/pdcclip.c b/sdl1/pdcclip.c index 8501ceb9..3eb951af 100644 --- a/sdl1/pdcclip.c +++ b/sdl1/pdcclip.c @@ -121,7 +121,7 @@ int PDC_clearclipboard(void) { PDC_LOG(("PDC_clearclipboard() - called\n")); - if (pdc_SDL_clipboard) + if (pdc_SDL_clipboard) { free(pdc_SDL_clipboard); pdc_SDL_clipboard = NULL; diff --git a/sdl1/pdcdisp.c b/sdl1/pdcdisp.c index b15eb30f..f088d05a 100644 --- a/sdl1/pdcdisp.c +++ b/sdl1/pdcdisp.c @@ -17,24 +17,43 @@ chtype acs_map[128] = A(28), A(29), A(30), A(31), ' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', +# ifdef PDC_WIDE + 0x2192, 0x2190, 0x2191, 0x2193, +# else A(0x1a), A(0x1b), A(0x18), A(0x19), +# endif '/', +# ifdef PDC_WIDE + 0x2588, +# else 0xdb, +# endif '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', +# ifdef PDC_WIDE + 0x2666, 0x2592, +# else A(0x04), 0xb1, +# endif 'b', 'c', 'd', 'e', +# ifdef PDC_WIDE + 0x00b0, 0x00b1, 0x2591, 0x00a4, 0x2518, 0x2510, 0x250c, 0x2514, + 0x253c, 0x23ba, 0x23bb, 0x2500, 0x23bc, 0x23bd, 0x251c, 0x2524, + 0x2534, 0x252c, 0x2502, 0x2264, 0x2265, 0x03c0, 0x2260, 0x00a3, + 0x00b7, +# else 0xf8, 0xf1, 0xb0, A(0x0f), 0xd9, 0xbf, 0xda, 0xc0, 0xc5, 0x2d, 0x2d, 0xc4, 0x2d, 0x5f, 0xc3, 0xb4, 0xc1, 0xc2, 0xb3, 0xf3, 0xf2, 0xe3, 0xd8, 0x9c, 0xf9, +# endif A(127) }; @@ -60,7 +79,7 @@ void PDC_update_rects(void) { if (rectcount) { - /* if the maximum number of rects has been reached, we're + /* if the maximum number of rects has been reached, we're probably better off doing a full screen update */ if (rectcount == MAXRECT) @@ -100,13 +119,16 @@ static void _set_attr(chtype ch) if (newfg != foregr) { - SDL_SetPalette(pdc_font, SDL_LOGPAL, +#ifndef PDC_WIDE + SDL_SetPalette(pdc_font, SDL_LOGPAL, pdc_color + newfg, pdc_flastc, 1); +#endif foregr = newfg; } if (newbg != backgr) { +#ifndef PDC_WIDE if (newbg == -1) SDL_SetColorKey(pdc_font, SDL_SRCCOLORKEY, 0); else @@ -117,7 +139,7 @@ static void _set_attr(chtype ch) SDL_SetPalette(pdc_font, SDL_LOGPAL, pdc_color + newbg, 0, 1); } - +#endif backgr = newbg; } @@ -132,6 +154,9 @@ void PDC_gotoyx(int row, int col) SDL_Rect src, dest; chtype ch; int oldrow, oldcol; +#ifdef PDC_WIDE + Uint16 chstr[2] = {0, 0}; +#endif PDC_LOG(("PDC_gotoyx() - called: row %d col %d from row %d col %d\n", row, col, SP->cursrow, SP->curscol)); @@ -149,8 +174,8 @@ void PDC_gotoyx(int row, int col) if (!SP->visibility) return; - /* draw a new cursor by overprinting the existing character in - reverse, either the full cell (when visibility == 2) or the + /* draw a new cursor by overprinting the existing character in + reverse, either the full cell (when visibility == 2) or the lowest quarter of it (when visibility == 1) */ ch = curscr->_y[row][col] ^ A_REVERSE; @@ -167,10 +192,29 @@ void PDC_gotoyx(int row, int col) dest.y = (row + 1) * pdc_fheight - src.h + pdc_yoffset; dest.x = col * pdc_fwidth + pdc_xoffset; +#ifdef PDC_WIDE + chstr[0] = ch & A_CHARTEXT; + + pdc_font = TTF_RenderUNICODE_Solid(pdc_ttffont, chstr, pdc_color[foregr]); + if (pdc_font) + { + dest.h = src.h; + dest.w = src.w; + src.x = 0; + src.y = 0; + SDL_SetColorKey(pdc_font, 0, 0); + SDL_SetPalette(pdc_font, SDL_LOGPAL, pdc_color + backgr, 0, 1); + SDL_BlitSurface(pdc_font, &src, pdc_screen, &dest); + SDL_FreeSurface(pdc_font); + pdc_font = NULL; + } +#else + src.x = (ch & 0xff) % 32 * pdc_fwidth; src.y = (ch & 0xff) / 32 * pdc_fheight + (pdc_fheight - src.h); SDL_BlitSurface(pdc_font, &src, pdc_screen, &dest); +#endif if (oldrow != row || oldcol != col) { @@ -186,12 +230,33 @@ void PDC_gotoyx(int row, int col) static void _highlight(SDL_Rect *src, SDL_Rect *dest, chtype ch) { short col = SP->line_color; +#ifdef PDC_WIDE + Uint16 chstr[2] = {'_', 0}; +#endif if (SP->mono) return; if (ch & A_UNDERLINE) { +#ifdef PDC_WIDE + if (col == -1) + col = foregr; + + pdc_font = TTF_RenderUNICODE_Solid(pdc_ttffont, chstr, pdc_color[col]); + if (pdc_font) + { + src->x = 0; + src->y = 0; + + if (backgr != -1) + SDL_SetColorKey(pdc_font, SDL_SRCCOLORKEY, 0); + + SDL_BlitSurface(pdc_font, src, pdc_screen, dest); + SDL_FreeSurface(pdc_font); + pdc_font = NULL; + } +#else if (col != -1) SDL_SetPalette(pdc_font, SDL_LOGPAL, pdc_color + col, pdc_flastc, 1); @@ -210,6 +275,7 @@ static void _highlight(SDL_Rect *src, SDL_Rect *dest, chtype ch) if (col != -1) SDL_SetPalette(pdc_font, SDL_LOGPAL, pdc_color + foregr, pdc_flastc, 1); +#endif } if (ch & (A_LEFTLINE|A_RIGHTLINE)) @@ -240,6 +306,9 @@ void PDC_transform_line(int lineno, int x, int len, const chtype *srcp) { SDL_Rect src, dest, lastrect; int j; +#ifdef PDC_WIDE + Uint16 chstr[2] = {0, 0}; +#endif PDC_LOG(("PDC_transform_line() - called: lineno=%d\n", lineno)); @@ -268,17 +337,23 @@ void PDC_transform_line(int lineno, int x, int len, const chtype *srcp) else if (lastrect.y != dest.y) uprect[rectcount++] = dest; - } + } else uprect[rectcount++] = dest; dest.w = pdc_fwidth; +#ifdef PDC_WIDE + src.x = 0; + src.y = 0; +#endif + for (j = 0; j < len; j++) { chtype ch = srcp[j]; _set_attr(ch); + #ifdef CHTYPE_LONG if (ch & A_ALTCHARSET && !(ch & 0xff80)) ch = (ch & (A_ATTRIBUTES ^ A_ALTCHARSET)) | acs_map[ch & 0x7f]; @@ -286,10 +361,29 @@ void PDC_transform_line(int lineno, int x, int len, const chtype *srcp) if (backgr == -1) SDL_LowerBlit(pdc_tileback, &dest, pdc_screen, &dest); +#ifdef PDC_WIDE + chstr[0] = ch & A_CHARTEXT; + pdc_font = TTF_RenderUNICODE_Solid(pdc_ttffont, chstr, + pdc_color[foregr]); + + if (pdc_font) + { + if (backgr != -1) + { + SDL_SetColorKey(pdc_font, 0, 0); + SDL_SetPalette(pdc_font, SDL_LOGPAL, + pdc_color + backgr, 0, 1); + } + SDL_BlitSurface(pdc_font, &src, pdc_screen, &dest); + SDL_FreeSurface(pdc_font); + pdc_font = NULL; + } +#else src.x = (ch & 0xff) % 32 * pdc_fwidth; src.y = (ch & 0xff) / 32 * pdc_fheight; SDL_LowerBlit(pdc_font, &src, pdc_screen, &dest); +#endif if (ch & (A_UNDERLINE|A_LEFTLINE|A_RIGHTLINE)) _highlight(&src, &dest, ch); diff --git a/sdl1/pdcscrn.c b/sdl1/pdcscrn.c index 4a76c8de..8e9a0e60 100644 --- a/sdl1/pdcscrn.c +++ b/sdl1/pdcscrn.c @@ -3,9 +3,25 @@ #include "pdcsdl.h" #include +#ifndef PDC_WIDE #include "deffont.h" +#endif #include "deficon.h" +#ifdef PDC_WIDE +# ifndef PDC_FONT_PATH +# ifdef _WIN32 +#define PDC_FONT_PATH "C:/Windows/Fonts/lucon.ttf" +# elif defined(__APPLE__) +#define PDC_FONT_PATH "/Library/Fonts/Courier New.ttf" +# else +#define PDC_FONT_PATH "/usr/share/fonts/truetype/freefont/FreeMono.ttf" +# endif +# endif +TTF_Font *pdc_ttffont = NULL; +int pdc_font_size = 18; +#endif + SDL_Surface *pdc_screen = NULL, *pdc_font = NULL, *pdc_icon = NULL, *pdc_back = NULL, *pdc_tileback = NULL; int pdc_sheight = 0, pdc_swidth = 0, pdc_yoffset = 0, pdc_xoffset = 0; @@ -19,12 +35,31 @@ bool pdc_own_screen; static struct {short f, b;} atrtab[PDC_COLOR_PAIRS]; +static void _clean(void) +{ +#ifdef PDC_WIDE + if (pdc_ttffont) + { + TTF_CloseFont(pdc_ttffont); + TTF_Quit(); + } +#endif + SDL_FreeSurface(pdc_tileback); + SDL_FreeSurface(pdc_back); + SDL_FreeSurface(pdc_icon); + SDL_FreeSurface(pdc_font); + + SDL_Quit(); +} + void PDC_retile(void) { if (pdc_tileback) SDL_FreeSurface(pdc_tileback); pdc_tileback = SDL_DisplayFormat(pdc_screen); + if (pdc_tileback == NULL) + return; if (pdc_back) { @@ -83,9 +118,42 @@ int PDC_scr_open(int argc, char **argv) return ERR; } - atexit(SDL_Quit); + atexit(_clean); } +#ifdef PDC_WIDE + if (!pdc_ttffont) + { + const char *ptsz, *fname; + + if (TTF_Init() == -1) + { + fprintf(stderr, "Could not start SDL_TTF: %s\n", SDL_GetError()); + return ERR; + } + + ptsz = getenv("PDC_FONT_SIZE"); + if (ptsz != NULL) + pdc_font_size = atoi(ptsz); + if (pdc_font_size <= 0) + pdc_font_size = 18; + + fname = getenv("PDC_FONT"); + pdc_ttffont = TTF_OpenFont(fname ? fname : PDC_FONT_PATH, + pdc_font_size); + } + + if (!pdc_ttffont) + { + fprintf(stderr, "Could not load font\n"); + return ERR; + } + + TTF_SetFontKerning(pdc_ttffont, 0); + TTF_SetFontHinting(pdc_ttffont, TTF_HINTING_MONO); + + SP->mono = FALSE; +#else if (!pdc_font) { const char *fname = getenv("PDC_FONT"); @@ -102,6 +170,7 @@ int PDC_scr_open(int argc, char **argv) } SP->mono = !pdc_font->format->palette; +#endif if (!SP->mono && !pdc_back) { @@ -118,11 +187,15 @@ int PDC_scr_open(int argc, char **argv) else SP->orig_attr = FALSE; +#ifdef PDC_WIDE + TTF_SizeText(pdc_ttffont, "W", &pdc_fwidth, &pdc_fheight); +#else pdc_fheight = pdc_font->h / 8; pdc_fwidth = pdc_font->w / 32; if (!SP->mono) pdc_flastc = pdc_font->format->palette->ncolors - 1; +#endif if (pdc_own_screen && !pdc_icon) { diff --git a/sdl1/pdcsdl.h b/sdl1/pdcsdl.h index 70d87052..a7f84031 100644 --- a/sdl1/pdcsdl.h +++ b/sdl1/pdcsdl.h @@ -3,7 +3,14 @@ #include #include +#ifdef PDC_WIDE +#include +#endif +#ifdef PDC_WIDE +PDCEX TTF_Font *pdc_ttffont; +PDCEX int pdc_font_size; +#endif PDCEX SDL_Surface *pdc_screen, *pdc_font, *pdc_icon, *pdc_back; PDCEX int pdc_sheight, pdc_swidth, pdc_yoffset, pdc_xoffset;