X-Git-Url: http://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Fcurses.priv.h;h=4aca76f7ca66e57de52f3b448975655e967bae75;hb=98d8891f42d8acac5c2ade39d163f386057a22e4;hp=c13410727cc7f78c0a34f672a705caa3d0a7746e;hpb=0573f2d712e4b5cb2a02a3fe52d513843d536b34;p=ncurses.git diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index c1341072..4aca76f7 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -34,7 +34,7 @@ ****************************************************************************/ /* - * $Id: curses.priv.h,v 1.506 2012/09/01 19:21:05 tom Exp $ + * $Id: curses.priv.h,v 1.508 2012/11/03 19:41:04 tom Exp $ * * curses.priv.h * @@ -184,17 +184,6 @@ extern int errno; extern NCURSES_EXPORT(int) _nc_env_access (void); #endif -/* - * Not all platforms have memmove; some have an equivalent bcopy. (Some may - * have neither). - */ -#if USE_OK_BCOPY -#define memmove(d,s,n) bcopy(s,d,n) -#elif USE_MY_MEMMOVE -#define memmove(d,s,n) _nc_memmove(d,s,n) -extern NCURSES_EXPORT(void *) _nc_memmove (void *, const void *, size_t); -#endif - /* * If we have va_copy(), use it for assigning va_list's. */ @@ -1510,6 +1499,20 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; #include +/* + * Use these for tic/infocmp malloc failures. Generally the ncurses library + * tries to limp along after a failure. + */ +#define TYPE_MALLOC(type, size, name) \ + name = typeMalloc(type, size); \ + if (name == 0) \ + _nc_err_abort(MSG_NO_MEMORY) + +#define TYPE_REALLOC(type, size, name) \ + name = typeRealloc(type, size, name); \ + if (name == 0) \ + _nc_err_abort(MSG_NO_MEMORY) + /* * TTY bit definition for converting tabs to spaces. */