]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/curses.priv.h
ncurses 5.9 - patch 20121117
[ncurses.git] / ncurses / curses.priv.h
index 5d43b4e7efdf521b5b9afaead01903a9460dd366..4aca76f7ca66e57de52f3b448975655e967bae75 100644 (file)
@@ -34,7 +34,7 @@
  ****************************************************************************/
 
 /*
- * $Id: curses.priv.h,v 1.505 2012/08/25 20:49:15 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.
  */
@@ -1451,7 +1440,7 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
 #define ARG_CH_T       NCURSES_CH_T
 #define CARG_CH_T      NCURSES_CH_T
 #define PUTC_DATA      /* nothing */
-#define PUTC(ch)       NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_ARGx ch)
+#define PUTC(ch)       NCURSES_SP_NAME(_nc_outch) (NCURSES_SP_ARGx (int) ch)
 
 #define BLANK          (' '|A_NORMAL)
 #define ZEROS          ('\0'|A_NORMAL)
@@ -1510,6 +1499,20 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch;
 
 #include <nc_alloc.h>
 
+/*
+ * 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.
  */