aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/curses.priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/ncurses/curses.priv.h')
-rw-r--r--contrib/ncurses/ncurses/curses.priv.h77
1 files changed, 56 insertions, 21 deletions
diff --git a/contrib/ncurses/ncurses/curses.priv.h b/contrib/ncurses/ncurses/curses.priv.h
index d3d5f296ef8b..d82e3aad752a 100644
--- a/contrib/ncurses/ncurses/curses.priv.h
+++ b/contrib/ncurses/ncurses/curses.priv.h
@@ -33,7 +33,7 @@
/*
- * $Id: curses.priv.h,v 1.162 2000/06/24 21:06:10 tom Exp $
+ * $Id: curses.priv.h,v 1.168 2000/10/08 01:24:59 tom Exp $
*
* curses.priv.h
*
@@ -99,7 +99,7 @@ extern int errno;
/* Some systems have a broken 'select()', but workable 'poll()'. Use that */
#if HAVE_WORKING_POLL
#define USE_FUNC_POLL 1
-#ifdef HAVE_POLL_H
+#if HAVE_POLL_H
#include <poll.h>
#else
#include <sys/poll.h>
@@ -134,7 +134,7 @@ extern int errno;
* If we don't have signals to support it, don't add a sigwinch handler.
* In any case, resizing is an extended feature. Use it if we've got it.
*/
-#ifndef NCURSES_EXT_FUNCS
+#if !NCURSES_EXT_FUNCS
#undef HAVE_SIZECHANGE
#endif
@@ -145,6 +145,17 @@ extern int errno;
#endif
/*
+ * If desired, one can configure this, disabling environment variables that
+ * point to custom terminfo/termcap locations.
+ */
+#ifdef USE_ROOT_ENVIRON
+#define use_terminfo_vars() 1
+#else
+#define use_terminfo_vars() _nc_env_access()
+extern int _nc_env_access(void);
+#endif
+
+/*
* Not all platforms have memmove; some have an equivalent bcopy. (Some may
* have neither).
*/
@@ -288,7 +299,7 @@ struct screen {
SLK *_slk; /* ptr to soft key struct / NULL */
int slk_format; /* selected format for this screen */
/* cursor movement costs; units are 10ths of milliseconds */
-#ifdef NCURSES_NO_PADDING
+#if NCURSES_NO_PADDING
int _no_padding; /* flag to set if padding disabled */
#endif
int _char_padding; /* cost of character put */
@@ -329,9 +340,7 @@ struct screen {
int _ip_cost; /* cost of (insert_padding) */
/* used in lib_mvcur.c */
char * _address_cursor;
- int _carriage_return_length;
- int _cursor_home_length;
- int _cursor_to_ll_length;
+ /* used in tty_update.c */
int _scrolling; /* 1 if terminal's smart enough to */
/* used in lib_color.c */
@@ -339,7 +348,7 @@ struct screen {
int _color_count; /* count of colors in palette */
unsigned short *_color_pairs; /* screen's color pair list */
int _pair_count; /* count of color pairs */
-#ifdef NCURSES_EXT_FUNCS
+#if NCURSES_EXT_FUNCS
bool _default_color; /* use default colors */
bool _has_sgr_39_49; /* has ECMA default color support */
int _default_fg; /* assumed default foreground */
@@ -407,7 +416,7 @@ struct screen {
extern SCREEN *_nc_screen_chain;
-#ifdef NCURSES_NOMACROS
+#if NCURSES_NOMACROS
#include <nomacros.h>
#endif
@@ -530,12 +539,14 @@ typedef struct {
#define TPUTS_TRACE(s) _nc_tputs_trace = s;
#define TRACE_RETURN(value,type) return _nc_retrace_##type(value)
#define returnAttr(code) TRACE_RETURN(code,attr_t)
+#define returnChar(code) TRACE_RETURN(code,chtype)
#define returnCode(code) TRACE_RETURN(code,int)
#define returnPtr(code) TRACE_RETURN(code,ptr)
#define returnVoid T((T_RETURN(""))); return
#define returnWin(code) TRACE_RETURN(code,win)
extern WINDOW * _nc_retrace_win(WINDOW *);
extern attr_t _nc_retrace_attr_t(attr_t);
+extern attr_t _nc_retrace_chtype(chtype);
extern char *_nc_retrace_ptr(char *);
extern const char *_nc_tputs_trace;
extern int _nc_retrace_int(int);
@@ -546,6 +557,7 @@ extern void _nc_fifo_dump(void);
#define TR(n, a)
#define TPUTS_TRACE(s)
#define returnAttr(code) return code
+#define returnChar(code) return code
#define returnCode(code) return code
#define returnPtr(code) return code
#define returnVoid return
@@ -568,7 +580,7 @@ extern const char *_nc_visbuf2(int, const char *);
(S) = ((S) & ALL_BUT_COLOR) | (at);\
else\
(S) |= (at);\
- T(("new attribute is %s", _traceattr((S))));}
+ TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}
#define toggle_attr_off(S,at) {\
@@ -583,7 +595,7 @@ extern const char *_nc_visbuf2(int, const char *);
else /* leave color alone */\
(S) &= ~(at);\
}\
- T(("new attribute is %s", _traceattr((S))));}
+ TR(TRACE_ATTRS, ("new attribute is %s", _traceattr((S))));}
#define DelCharCost(count) \
((parm_dch != 0) \
@@ -607,7 +619,8 @@ extern const char *_nc_visbuf2(int, const char *);
vidattr(AttrOf(c)); \
if (magic_cookie_glitch > 0 \
&& XMC_CHANGES((chg ^ SP->_current_attr))) { \
- T(("%s @%d before glitch %d,%d", \
+ TR(TRACE_ATTRS, \
+ ("%s @%d before glitch %d,%d", \
__FILE__, __LINE__, \
SP->_cursrow, \
SP->_curscol)); \
@@ -619,7 +632,7 @@ extern const char *_nc_visbuf2(int, const char *);
vidattr(AttrOf(c))
#endif
-#if defined(NCURSES_EXPANDED) && defined(NCURSES_EXT_FUNCS)
+#if NCURSES_EXPANDED && NCURSES_EXT_FUNCS
#undef toggle_attr_on
#define toggle_attr_on(S,at) _nc_toggle_attr_on(&(S), at)
@@ -678,14 +691,40 @@ extern void _nc_screen_init(void);
extern void _nc_screen_resume(void);
extern void _nc_screen_wrap(void);
+/* lib_mouse.c */
+extern int _nc_has_mouse(void);
+
+/* lib_mvcur.c */
+#define INFINITY 1000000 /* cost: too high to use */
+
+typedef struct {
+ char *s_head;
+ char *s_tail;
+ size_t s_size;
+} string_desc;
+
+/* strings.c */
+extern string_desc *_nc_str_init(string_desc * dst, char *src, size_t len);
+extern string_desc *_nc_str_null(string_desc * dst, size_t len);
+extern string_desc *_nc_str_copy(string_desc * dst, string_desc * src);
+extern bool _nc_safe_strcat(string_desc * dst, const char *src);
+extern bool _nc_safe_strcpy(string_desc * dst, const char *src);
+
+extern void _nc_mvcur_init(void);
+extern void _nc_mvcur_resume(void);
+extern void _nc_mvcur_wrap(void);
+
+extern int _nc_scrolln(int, int, int, int);
+
+extern void _nc_screen_init(void);
+extern void _nc_screen_resume(void);
+extern void _nc_screen_wrap(void);
+
#if !HAVE_STRSTR
#define strstr _nc_strstr
extern char *_nc_strstr(const char *, const char *);
#endif
-/* lib_mouse.c */
-extern int _nc_has_mouse(void);
-
/* safe_sprintf.c */
extern char * _nc_printf_string(const char *fmt, va_list ap);
@@ -731,7 +770,7 @@ extern void _nc_trace_tries(struct tries *tree);
extern void _nc_update_screensize(void);
#endif
-#ifdef USE_WIDEC_SUPPORT
+#if USE_WIDEC_SUPPORT
extern int _nc_utf8_outch(int);
#endif
@@ -750,10 +789,6 @@ extern int *_nc_oldnums;
* On systems with a broken linker, define 'SP' as a function to force the
* linker to pull in the data-only module with 'SP'.
*/
-#ifndef BROKEN_LINKER
-#define BROKEN_LINKER 0
-#endif
-
#if BROKEN_LINKER
#define SP _nc_screen()
extern SCREEN *_nc_screen(void);