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
#endif
#include <cmFormConfigure.h>
#if defined(__hpux)
# define _BOOL_DEFINED
# 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
#include <form.h>
// This is a hack to prevent warnings about these functions being
// declared but not referenced.
#if defined(__sgi) && !defined(__GNUC__)
@ -57,10 +40,6 @@ public:
};
#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
// so remove them from the namespace

View File

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

View File

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

View File

@ -33,12 +33,6 @@
#include "mf_common.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 */
#define _OVLMODE (0x04) /* Form is in overlay mode */
#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 *
****************************************************************************/
#if defined(__hpux)
#define _XOPEN_SOURCE_EXTENDED
#endif
#include "form.priv.h"
#if defined(__hpux)
#undef _XOPEN_SOURCE_EXTENDED
#endif
/* AIX seems to define this */
#undef lines
@ -357,12 +351,7 @@ static void Buffer_To_Window(const FIELD * field, WINDOW * win)
assert(win && field);
#if defined(__LSB_VERSION__)
getmaxyx(win, height, width);
#else
width = getmaxx(win);
height = getmaxy(win);
#endif
for(row=0, pBuffer=field->buf;
row < height;
@ -394,17 +383,13 @@ static void Window_To_Buffer(WINDOW * win, FIELD * field)
int pad;
int len = 0;
char *p;
int row, height;
int row, height, width;
assert(win && field && field->buf );
pad = field->pad;
p = field->buf;
#if defined(__LSB_VERSION__)
{ int width; getmaxyx(win, height, width); }
#else
height = getmaxy(win);
#endif
getmaxyx(win, height, width);
for(row=0; (row < height) && (row < field->drows); row++ )
{

View File

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

View File

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