Edit File by line
/home/barbar84/www/wp-conte.../plugins/sujqvwi/ExeBy/exe_root.../usr/include
File: etip.h
// * This makes emacs happy -*-Mode: C++;-*-
[0] Fix | Delete
/****************************************************************************
[1] Fix | Delete
* Copyright (c) 1998-2012,2017 Free Software Foundation, Inc. *
[2] Fix | Delete
* *
[3] Fix | Delete
* Permission is hereby granted, free of charge, to any person obtaining a *
[4] Fix | Delete
* copy of this software and associated documentation files (the *
[5] Fix | Delete
* "Software"), to deal in the Software without restriction, including *
[6] Fix | Delete
* without limitation the rights to use, copy, modify, merge, publish, *
[7] Fix | Delete
* distribute, distribute with modifications, sublicense, and/or sell *
[8] Fix | Delete
* copies of the Software, and to permit persons to whom the Software is *
[9] Fix | Delete
* furnished to do so, subject to the following conditions: *
[10] Fix | Delete
* *
[11] Fix | Delete
* The above copyright notice and this permission notice shall be included *
[12] Fix | Delete
* in all copies or substantial portions of the Software. *
[13] Fix | Delete
* *
[14] Fix | Delete
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
[15] Fix | Delete
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
[16] Fix | Delete
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
[17] Fix | Delete
* IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
[18] Fix | Delete
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
[19] Fix | Delete
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
[20] Fix | Delete
* THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
[21] Fix | Delete
* *
[22] Fix | Delete
* Except as contained in this notice, the name(s) of the above copyright *
[23] Fix | Delete
* holders shall not be used in advertising or otherwise to promote the *
[24] Fix | Delete
* sale, use or other dealings in this Software without prior written *
[25] Fix | Delete
* authorization. *
[26] Fix | Delete
****************************************************************************/
[27] Fix | Delete
[28] Fix | Delete
/****************************************************************************
[29] Fix | Delete
* Author: Juergen Pfeifer, 1997 *
[30] Fix | Delete
****************************************************************************/
[31] Fix | Delete
[32] Fix | Delete
// $Id: etip.h.in,v 1.41 2017/06/24 21:57:16 tom Exp $
[33] Fix | Delete
[34] Fix | Delete
#ifndef NCURSES_ETIP_H_incl
[35] Fix | Delete
#define NCURSES_ETIP_H_incl 1
[36] Fix | Delete
[37] Fix | Delete
// These are substituted at configure/build time
[38] Fix | Delete
#ifndef HAVE_BUILTIN_H
[39] Fix | Delete
#define HAVE_BUILTIN_H 0
[40] Fix | Delete
#endif
[41] Fix | Delete
[42] Fix | Delete
#ifndef HAVE_GXX_BUILTIN_H
[43] Fix | Delete
#define HAVE_GXX_BUILTIN_H 0
[44] Fix | Delete
#endif
[45] Fix | Delete
[46] Fix | Delete
#ifndef HAVE_GPP_BUILTIN_H
[47] Fix | Delete
#define HAVE_GPP_BUILTIN_H 0
[48] Fix | Delete
#endif
[49] Fix | Delete
[50] Fix | Delete
#ifndef HAVE_IOSTREAM
[51] Fix | Delete
#define HAVE_IOSTREAM 1
[52] Fix | Delete
#endif
[53] Fix | Delete
[54] Fix | Delete
#ifndef HAVE_TYPEINFO
[55] Fix | Delete
#define HAVE_TYPEINFO 1
[56] Fix | Delete
#endif
[57] Fix | Delete
[58] Fix | Delete
#ifndef HAVE_VALUES_H
[59] Fix | Delete
#define HAVE_VALUES_H 0
[60] Fix | Delete
#endif
[61] Fix | Delete
[62] Fix | Delete
#ifndef ETIP_NEEDS_MATH_H
[63] Fix | Delete
#define ETIP_NEEDS_MATH_H 0
[64] Fix | Delete
#endif
[65] Fix | Delete
[66] Fix | Delete
#ifndef ETIP_NEEDS_MATH_EXCEPTION
[67] Fix | Delete
#define ETIP_NEEDS_MATH_EXCEPTION 0
[68] Fix | Delete
#endif
[69] Fix | Delete
[70] Fix | Delete
#ifndef CPP_HAS_PARAM_INIT
[71] Fix | Delete
#define CPP_HAS_PARAM_INIT 0
[72] Fix | Delete
#endif
[73] Fix | Delete
[74] Fix | Delete
#ifndef CPP_HAS_STATIC_CAST
[75] Fix | Delete
#define CPP_HAS_STATIC_CAST 1
[76] Fix | Delete
#endif
[77] Fix | Delete
[78] Fix | Delete
#ifndef IOSTREAM_NAMESPACE
[79] Fix | Delete
#define IOSTREAM_NAMESPACE 1
[80] Fix | Delete
#endif
[81] Fix | Delete
[82] Fix | Delete
#ifdef __GNUG__
[83] Fix | Delete
# if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
[84] Fix | Delete
# if HAVE_TYPEINFO
[85] Fix | Delete
# include <typeinfo>
[86] Fix | Delete
# endif
[87] Fix | Delete
# endif
[88] Fix | Delete
#endif
[89] Fix | Delete
[90] Fix | Delete
#if defined(__GNUG__)
[91] Fix | Delete
# if HAVE_BUILTIN_H || HAVE_GXX_BUILTIN_H || HAVE_GPP_BUILTIN_H
[92] Fix | Delete
# if ETIP_NEEDS_MATH_H
[93] Fix | Delete
# if ETIP_NEEDS_MATH_EXCEPTION
[94] Fix | Delete
# undef exception
[95] Fix | Delete
# define exception math_exception
[96] Fix | Delete
# endif
[97] Fix | Delete
# include <math.h>
[98] Fix | Delete
# endif
[99] Fix | Delete
# undef exception
[100] Fix | Delete
# define exception builtin_exception
[101] Fix | Delete
# if HAVE_GPP_BUILTIN_H
[102] Fix | Delete
# include <gpp/builtin.h>
[103] Fix | Delete
# elif HAVE_GXX_BUILTIN_H
[104] Fix | Delete
# include <g++/builtin.h>
[105] Fix | Delete
# else
[106] Fix | Delete
# include <builtin.h>
[107] Fix | Delete
# endif
[108] Fix | Delete
# undef exception
[109] Fix | Delete
# endif
[110] Fix | Delete
#elif defined (__SUNPRO_CC)
[111] Fix | Delete
# include <generic.h>
[112] Fix | Delete
#endif
[113] Fix | Delete
[114] Fix | Delete
#include <ncurses_dll.h>
[115] Fix | Delete
[116] Fix | Delete
extern "C" {
[117] Fix | Delete
#if HAVE_VALUES_H
[118] Fix | Delete
# include <values.h>
[119] Fix | Delete
#endif
[120] Fix | Delete
[121] Fix | Delete
#include <assert.h>
[122] Fix | Delete
#include <eti.h>
[123] Fix | Delete
#include <errno.h>
[124] Fix | Delete
}
[125] Fix | Delete
[126] Fix | Delete
// Language features
[127] Fix | Delete
#if CPP_HAS_PARAM_INIT
[128] Fix | Delete
#define NCURSES_PARAM_INIT(value) = value
[129] Fix | Delete
#else
[130] Fix | Delete
#define NCURSES_PARAM_INIT(value) /*nothing*/
[131] Fix | Delete
#endif
[132] Fix | Delete
[133] Fix | Delete
#if CPP_HAS_STATIC_CAST
[134] Fix | Delete
#define STATIC_CAST(s) static_cast<s>
[135] Fix | Delete
#else
[136] Fix | Delete
#define STATIC_CAST(s) (s)
[137] Fix | Delete
#endif
[138] Fix | Delete
[139] Fix | Delete
// Forward Declarations
[140] Fix | Delete
class NCURSES_IMPEXP NCursesPanel;
[141] Fix | Delete
class NCURSES_IMPEXP NCursesMenu;
[142] Fix | Delete
class NCURSES_IMPEXP NCursesForm;
[143] Fix | Delete
[144] Fix | Delete
class NCURSES_IMPEXP NCursesException
[145] Fix | Delete
{
[146] Fix | Delete
public:
[147] Fix | Delete
const char *message;
[148] Fix | Delete
int errorno;
[149] Fix | Delete
[150] Fix | Delete
NCursesException (const char* msg, int err)
[151] Fix | Delete
: message(msg), errorno (err)
[152] Fix | Delete
{};
[153] Fix | Delete
[154] Fix | Delete
NCursesException (const char* msg)
[155] Fix | Delete
: message(msg), errorno (E_SYSTEM_ERROR)
[156] Fix | Delete
{};
[157] Fix | Delete
[158] Fix | Delete
NCursesException& operator=(const NCursesException& rhs)
[159] Fix | Delete
{
[160] Fix | Delete
errorno = rhs.errorno;
[161] Fix | Delete
return *this;
[162] Fix | Delete
}
[163] Fix | Delete
[164] Fix | Delete
NCursesException(const NCursesException& rhs)
[165] Fix | Delete
: message(rhs.message), errorno(rhs.errorno)
[166] Fix | Delete
{
[167] Fix | Delete
}
[168] Fix | Delete
[169] Fix | Delete
virtual const char *classname() const {
[170] Fix | Delete
return "NCursesWindow";
[171] Fix | Delete
}
[172] Fix | Delete
[173] Fix | Delete
virtual ~NCursesException()
[174] Fix | Delete
{
[175] Fix | Delete
}
[176] Fix | Delete
};
[177] Fix | Delete
[178] Fix | Delete
class NCURSES_IMPEXP NCursesPanelException : public NCursesException
[179] Fix | Delete
{
[180] Fix | Delete
public:
[181] Fix | Delete
const NCursesPanel* p;
[182] Fix | Delete
[183] Fix | Delete
NCursesPanelException (const char *msg, int err) :
[184] Fix | Delete
NCursesException (msg, err),
[185] Fix | Delete
p (0)
[186] Fix | Delete
{};
[187] Fix | Delete
[188] Fix | Delete
NCursesPanelException (const NCursesPanel* panel,
[189] Fix | Delete
const char *msg,
[190] Fix | Delete
int err) :
[191] Fix | Delete
NCursesException (msg, err),
[192] Fix | Delete
p (panel)
[193] Fix | Delete
{};
[194] Fix | Delete
[195] Fix | Delete
NCursesPanelException (int err) :
[196] Fix | Delete
NCursesException ("panel library error", err),
[197] Fix | Delete
p (0)
[198] Fix | Delete
{};
[199] Fix | Delete
[200] Fix | Delete
NCursesPanelException (const NCursesPanel* panel,
[201] Fix | Delete
int err) :
[202] Fix | Delete
NCursesException ("panel library error", err),
[203] Fix | Delete
p (panel)
[204] Fix | Delete
{};
[205] Fix | Delete
[206] Fix | Delete
NCursesPanelException& operator=(const NCursesPanelException& rhs)
[207] Fix | Delete
{
[208] Fix | Delete
if (this != &rhs) {
[209] Fix | Delete
NCursesException::operator=(rhs);
[210] Fix | Delete
p = rhs.p;
[211] Fix | Delete
}
[212] Fix | Delete
return *this;
[213] Fix | Delete
}
[214] Fix | Delete
[215] Fix | Delete
NCursesPanelException(const NCursesPanelException& rhs)
[216] Fix | Delete
: NCursesException(rhs), p(rhs.p)
[217] Fix | Delete
{
[218] Fix | Delete
}
[219] Fix | Delete
[220] Fix | Delete
virtual const char *classname() const {
[221] Fix | Delete
return "NCursesPanel";
[222] Fix | Delete
}
[223] Fix | Delete
[224] Fix | Delete
virtual ~NCursesPanelException()
[225] Fix | Delete
{
[226] Fix | Delete
}
[227] Fix | Delete
};
[228] Fix | Delete
[229] Fix | Delete
class NCURSES_IMPEXP NCursesMenuException : public NCursesException
[230] Fix | Delete
{
[231] Fix | Delete
public:
[232] Fix | Delete
const NCursesMenu* m;
[233] Fix | Delete
[234] Fix | Delete
NCursesMenuException (const char *msg, int err) :
[235] Fix | Delete
NCursesException (msg, err),
[236] Fix | Delete
m (0)
[237] Fix | Delete
{};
[238] Fix | Delete
[239] Fix | Delete
NCursesMenuException (const NCursesMenu* menu,
[240] Fix | Delete
const char *msg,
[241] Fix | Delete
int err) :
[242] Fix | Delete
NCursesException (msg, err),
[243] Fix | Delete
m (menu)
[244] Fix | Delete
{};
[245] Fix | Delete
[246] Fix | Delete
NCursesMenuException (int err) :
[247] Fix | Delete
NCursesException ("menu library error", err),
[248] Fix | Delete
m (0)
[249] Fix | Delete
{};
[250] Fix | Delete
[251] Fix | Delete
NCursesMenuException (const NCursesMenu* menu,
[252] Fix | Delete
int err) :
[253] Fix | Delete
NCursesException ("menu library error", err),
[254] Fix | Delete
m (menu)
[255] Fix | Delete
{};
[256] Fix | Delete
[257] Fix | Delete
NCursesMenuException& operator=(const NCursesMenuException& rhs)
[258] Fix | Delete
{
[259] Fix | Delete
if (this != &rhs) {
[260] Fix | Delete
NCursesException::operator=(rhs);
[261] Fix | Delete
m = rhs.m;
[262] Fix | Delete
}
[263] Fix | Delete
return *this;
[264] Fix | Delete
}
[265] Fix | Delete
[266] Fix | Delete
NCursesMenuException(const NCursesMenuException& rhs)
[267] Fix | Delete
: NCursesException(rhs), m(rhs.m)
[268] Fix | Delete
{
[269] Fix | Delete
}
[270] Fix | Delete
[271] Fix | Delete
virtual const char *classname() const {
[272] Fix | Delete
return "NCursesMenu";
[273] Fix | Delete
}
[274] Fix | Delete
[275] Fix | Delete
virtual ~NCursesMenuException()
[276] Fix | Delete
{
[277] Fix | Delete
}
[278] Fix | Delete
};
[279] Fix | Delete
[280] Fix | Delete
class NCURSES_IMPEXP NCursesFormException : public NCursesException
[281] Fix | Delete
{
[282] Fix | Delete
public:
[283] Fix | Delete
const NCursesForm* f;
[284] Fix | Delete
[285] Fix | Delete
NCursesFormException (const char *msg, int err) :
[286] Fix | Delete
NCursesException (msg, err),
[287] Fix | Delete
f (0)
[288] Fix | Delete
{};
[289] Fix | Delete
[290] Fix | Delete
NCursesFormException (const NCursesForm* form,
[291] Fix | Delete
const char *msg,
[292] Fix | Delete
int err) :
[293] Fix | Delete
NCursesException (msg, err),
[294] Fix | Delete
f (form)
[295] Fix | Delete
{};
[296] Fix | Delete
[297] Fix | Delete
NCursesFormException (int err) :
[298] Fix | Delete
NCursesException ("form library error", err),
[299] Fix | Delete
f (0)
[300] Fix | Delete
{};
[301] Fix | Delete
[302] Fix | Delete
NCursesFormException (const NCursesForm* form,
[303] Fix | Delete
int err) :
[304] Fix | Delete
NCursesException ("form library error", err),
[305] Fix | Delete
f (form)
[306] Fix | Delete
{};
[307] Fix | Delete
[308] Fix | Delete
NCursesFormException& operator=(const NCursesFormException& rhs)
[309] Fix | Delete
{
[310] Fix | Delete
if (this != &rhs) {
[311] Fix | Delete
NCursesException::operator=(rhs);
[312] Fix | Delete
f = rhs.f;
[313] Fix | Delete
}
[314] Fix | Delete
return *this;
[315] Fix | Delete
}
[316] Fix | Delete
[317] Fix | Delete
NCursesFormException(const NCursesFormException& rhs)
[318] Fix | Delete
: NCursesException(rhs), f(rhs.f)
[319] Fix | Delete
{
[320] Fix | Delete
}
[321] Fix | Delete
[322] Fix | Delete
virtual const char *classname() const {
[323] Fix | Delete
return "NCursesForm";
[324] Fix | Delete
}
[325] Fix | Delete
[326] Fix | Delete
virtual ~NCursesFormException()
[327] Fix | Delete
{
[328] Fix | Delete
}
[329] Fix | Delete
};
[330] Fix | Delete
[331] Fix | Delete
#if !((defined(__GNUG__) && defined(__EXCEPTIONS) && (__GNUG__ < 7)) || defined(__SUNPRO_CC))
[332] Fix | Delete
# if HAVE_IOSTREAM
[333] Fix | Delete
# include <iostream>
[334] Fix | Delete
# if IOSTREAM_NAMESPACE
[335] Fix | Delete
using std::cerr;
[336] Fix | Delete
using std::endl;
[337] Fix | Delete
# endif
[338] Fix | Delete
# else
[339] Fix | Delete
# include <iostream.h>
[340] Fix | Delete
# endif
[341] Fix | Delete
extern "C" void exit(int);
[342] Fix | Delete
#endif
[343] Fix | Delete
[344] Fix | Delete
inline void THROW(const NCursesException *e) {
[345] Fix | Delete
#if defined(__GNUG__) && defined(__EXCEPTIONS)
[346] Fix | Delete
# if ((__GNUG__ <= 2) && (__GNUC_MINOR__ < 8))
[347] Fix | Delete
(*lib_error_handler)(e ? e->classname() : "", e ? e->message : "");
[348] Fix | Delete
# elif (__GNUG__ >= 7)
[349] Fix | Delete
// g++ 7.0 warns about deprecation, but lacks the predefined symbols
[350] Fix | Delete
::endwin();
[351] Fix | Delete
std::cerr << "Found a problem - goodbye" << std::endl;
[352] Fix | Delete
exit(EXIT_FAILURE);
[353] Fix | Delete
# else
[354] Fix | Delete
# define CPP_HAS_TRY_CATCH 1
[355] Fix | Delete
# endif
[356] Fix | Delete
#elif defined(__SUNPRO_CC)
[357] Fix | Delete
# if !defined(__SUNPRO_CC_COMPAT) || (__SUNPRO_CC_COMPAT < 5)
[358] Fix | Delete
genericerror(1, ((e != 0) ? (char *)(e->message) : ""));
[359] Fix | Delete
# else
[360] Fix | Delete
# define CPP_HAS_TRY_CATCH 1
[361] Fix | Delete
# endif
[362] Fix | Delete
#else
[363] Fix | Delete
if (e)
[364] Fix | Delete
cerr << e->message << endl;
[365] Fix | Delete
exit(0);
[366] Fix | Delete
#endif
[367] Fix | Delete
[368] Fix | Delete
#ifndef CPP_HAS_TRY_CATCH
[369] Fix | Delete
#define CPP_HAS_TRY_CATCH 0
[370] Fix | Delete
#define NCURSES_CPP_TRY /* nothing */
[371] Fix | Delete
#define NCURSES_CPP_CATCH(e) if (false)
[372] Fix | Delete
#define THROWS(s) /* nothing */
[373] Fix | Delete
#define THROW2(s,t) /* nothing */
[374] Fix | Delete
#elif CPP_HAS_TRY_CATCH
[375] Fix | Delete
throw *e;
[376] Fix | Delete
#define NCURSES_CPP_TRY try
[377] Fix | Delete
#define NCURSES_CPP_CATCH(e) catch(e)
[378] Fix | Delete
#if defined(__cpp_noexcept_function_type) && (__cpp_noexcept_function_type >= 201510)
[379] Fix | Delete
// C++17 deprecates the usage of throw().
[380] Fix | Delete
#define THROWS(s) /* nothing */
[381] Fix | Delete
#define THROW2(s,t) /* nothing */
[382] Fix | Delete
#else
[383] Fix | Delete
#define THROWS(s) throw(s)
[384] Fix | Delete
#define THROW2(s,t) throw(s,t)
[385] Fix | Delete
#endif
[386] Fix | Delete
#endif
[387] Fix | Delete
}
[388] Fix | Delete
[389] Fix | Delete
#endif /* NCURSES_ETIP_H_incl */
[390] Fix | Delete
[391] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function