Merge topic 'ccmake-hpux'

7a687292 ccmake: Cleanup and simplify conditional blocks for HP-UX
44f02b42 ccmake: Use standard getmaxyx instead of non-standard getmax[xy]
ee3d06a4 ccmake: Remove incomplete support for cur_colr on old HP-UX
This commit is contained in:
Brad King 2014-11-25 10:18:21 -05:00 committed by CMake Topic Stage
commit a5531950cc
7 changed files with 15 additions and 64 deletions

View File

@ -15,30 +15,13 @@
#define _MSE_INT_H #define _MSE_INT_H
#endif #endif
#include <cmFormConfigure.h>
#if defined(__hpux) #if defined(__hpux)
# define _BOOL_DEFINED # define _BOOL_DEFINED
# include <sys/time.h> # include <sys/time.h>
# define _XOPEN_SOURCE_EXTENDED
# include <curses.h>
# include <form.h>
# undef _XOPEN_SOURCE_EXTENDED
#else
/* figure out which curses.h to include */
# if defined(CURSES_HAVE_NCURSES_H)
# include <ncurses.h>
# elif defined(CURSES_HAVE_NCURSES_NCURSES_H)
# include <ncurses/ncurses.h>
# elif defined(CURSES_HAVE_NCURSES_CURSES_H)
# include <ncurses/curses.h>
# else
# include <curses.h>
# endif
# include <form.h>
#endif #endif
#include <form.h>
// This is a hack to prevent warnings about these functions being // This is a hack to prevent warnings about these functions being
// declared but not referenced. // declared but not referenced.
#if defined(__sgi) && !defined(__GNUC__) #if defined(__sgi) && !defined(__GNUC__)
@ -57,10 +40,6 @@ public:
}; };
#endif #endif
#ifndef getmaxyx
#define getmaxyx(w,y,x) ((y) = getmaxy(w), (x) = getmaxx(w))
#endif
// on some machines move erase and clear conflict with stl // on some machines move erase and clear conflict with stl
// so remove them from the namespace // so remove them from the namespace

View File

@ -29,13 +29,7 @@
/**************************************************************************** /****************************************************************************
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1995,1997 * * Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1995,1997 *
****************************************************************************/ ****************************************************************************/
#if defined(__hpux) #include "form.priv.h"
#define _XOPEN_SOURCE_EXTENDED
#endif
#include "form.priv.h"
#if defined(__hpux)
#undef _XOPEN_SOURCE_EXTENDED
#endif
MODULE_ID("$Id$") MODULE_ID("$Id$")
/*---------------------------------------------------------------------------- /*----------------------------------------------------------------------------

View File

@ -47,7 +47,17 @@
# elif defined(CURSES_HAVE_NCURSES_CURSES_H) # elif defined(CURSES_HAVE_NCURSES_CURSES_H)
# include <ncurses/curses.h> # include <ncurses/curses.h>
# else # else
# if defined(__hpux)
# if defined(_XOPEN_SOURCE_EXTENDED)
# define HAVE__XOPEN_SOURCE_EXTENDED
# else
# define _XOPEN_SOURCE_EXTENDED
# endif
# endif
# include <curses.h> # include <curses.h>
# if defined(__hpux) && !defined(HAVE__XOPEN_SOURCE_EXTENDED)
# undef _XOPEN_SOURCE_EXTENDED
# endif
# endif # endif
#include <eti.h> #include <eti.h>

View File

@ -33,12 +33,6 @@
#include "mf_common.h" #include "mf_common.h"
#include "form.h" #include "form.h"
/* get around odd bug on aCC and itanium */
#if defined(__hpux) && defined(__ia64)
#define getmaxx __getmaxx
#define getmaxy __getmaxy
#endif
/* form status values */ /* form status values */
#define _OVLMODE (0x04) /* Form is in overlay mode */ #define _OVLMODE (0x04) /* Form is in overlay mode */
#define _WINDOW_MODIFIED (0x10) /* Current field window has been modified */ #define _WINDOW_MODIFIED (0x10) /* Current field window has been modified */

View File

@ -29,13 +29,7 @@
/**************************************************************************** /****************************************************************************
* Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1995,1997 * * Author: Juergen Pfeifer <juergen.pfeifer@gmx.net> 1995,1997 *
****************************************************************************/ ****************************************************************************/
#if defined(__hpux)
#define _XOPEN_SOURCE_EXTENDED
#endif
#include "form.priv.h" #include "form.priv.h"
#if defined(__hpux)
#undef _XOPEN_SOURCE_EXTENDED
#endif
/* AIX seems to define this */ /* AIX seems to define this */
#undef lines #undef lines
@ -357,12 +351,7 @@ static void Buffer_To_Window(const FIELD * field, WINDOW * win)
assert(win && field); assert(win && field);
#if defined(__LSB_VERSION__)
getmaxyx(win, height, width); getmaxyx(win, height, width);
#else
width = getmaxx(win);
height = getmaxy(win);
#endif
for(row=0, pBuffer=field->buf; for(row=0, pBuffer=field->buf;
row < height; row < height;
@ -394,17 +383,13 @@ static void Window_To_Buffer(WINDOW * win, FIELD * field)
int pad; int pad;
int len = 0; int len = 0;
char *p; char *p;
int row, height; int row, height, width;
assert(win && field && field->buf ); assert(win && field && field->buf );
pad = field->pad; pad = field->pad;
p = field->buf; p = field->buf;
#if defined(__LSB_VERSION__) getmaxyx(win, height, width);
{ int width; getmaxyx(win, height, width); }
#else
height = getmaxy(win);
#endif
for(row=0; (row < height) && (row < field->drows); row++ ) for(row=0; (row < height) && (row < field->drows); row++ )
{ {

View File

@ -63,12 +63,7 @@ int post_form(FORM * form)
RETURN(E_NOT_CONNECTED); RETURN(E_NOT_CONNECTED);
formwin = Get_Form_Window(form); formwin = Get_Form_Window(form);
#if defined(__LSB_VERSION__)
getmaxyx(formwin, height, width); getmaxyx(formwin, height, width);
#else
width = getmaxx(formwin);
height = getmaxy(formwin);
#endif
if ((form->cols > width) || (form->rows > height)) if ((form->cols > width) || (form->rows > height))
RETURN(E_NO_ROOM); RETURN(E_NO_ROOM);

View File

@ -35,13 +35,7 @@
* Routines to handle external names of menu requests * * Routines to handle external names of menu requests *
***************************************************************************/ ***************************************************************************/
#if defined(__hpux)
#define _XOPEN_SOURCE_EXTENDED
#endif
#include "form.priv.h" #include "form.priv.h"
#if defined(__hpux)
#undef _XOPEN_SOURCE_EXTENDED
#endif
MODULE_ID("$Id$") MODULE_ID("$Id$")