1 /****************************************************************************
2 * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
4 * Permission is hereby granted, free of charge, to any person obtaining a *
5 * copy of this software and associated documentation files (the *
6 * "Software"), to deal in the Software without restriction, including *
7 * without limitation the rights to use, copy, modify, merge, publish, *
8 * distribute, distribute with modifications, sublicense, and/or sell *
9 * copies of the Software, and to permit persons to whom the Software is *
10 * furnished to do so, subject to the following conditions: *
12 * The above copyright notice and this permission notice shall be included *
13 * in all copies or substantial portions of the Software. *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
16 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
18 * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
19 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
20 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
21 * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23 * Except as contained in this notice, the name(s) of the above copyright *
24 * holders shall not be used in advertising or otherwise to promote the *
25 * sale, use or other dealings in this Software without prior written *
27 ****************************************************************************/
29 /****************************************************************************
30 * Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 *
31 * and: Eric S. Raymond <esr@snark.thyrsus.com> *
32 ****************************************************************************/
36 * $Id: curses.priv.h,v 1.162 2000/06/24 21:06:10 tom Exp $
40 * Header file for curses library objects which are private to
46 #define CURSES_PRIV_H 1
52 #include <ncurses_cfg.h>
55 #define MODULE_ID(id) static const char Ident[] = id;
57 #define MODULE_ID(id) /*nothing*/
62 #include <sys/types.h>
68 #if HAVE_SYS_BSDTYPES_H
69 #include <sys/bsdtypes.h> /* needed for ISC */
74 #elif HAVE_SYS_PARAM_H
75 # include <sys/param.h>
79 # if defined(_POSIX_PATH_MAX)
80 # define PATH_MAX _POSIX_PATH_MAX
81 # elif defined(MAXPATHLEN)
82 # define PATH_MAX MAXPATHLEN
84 # define PATH_MAX 255 /* the Posix minimum path-size */
99 /* Some systems have a broken 'select()', but workable 'poll()'. Use that */
100 #if HAVE_WORKING_POLL
101 #define USE_FUNC_POLL 1
105 #include <sys/poll.h>
108 #define USE_FUNC_POLL 0
111 /* Alessandro Rubini's GPM (general-purpose mouse) */
112 #if HAVE_LIBGPM && HAVE_GPM_H
113 #define USE_GPM_SUPPORT 1
115 #define USE_GPM_SUPPORT 0
118 /* QNX mouse support */
119 #if defined(__QNX__) && !defined(__QNXNTO__)
120 #define USE_QNX_MOUSE 1
122 #define USE_QNX_MOUSE 0
125 /* EMX mouse support */
127 #define USE_EMX_MOUSE
130 #define DEFAULT_MAXCLICK 166
131 #define EV_MAX 8 /* size of mouse circular event queue */
134 * If we don't have signals to support it, don't add a sigwinch handler.
135 * In any case, resizing is an extended feature. Use it if we've got it.
137 #ifndef NCURSES_EXT_FUNCS
138 #undef HAVE_SIZECHANGE
142 #define USE_SIZECHANGE 1
148 * Not all platforms have memmove; some have an equivalent bcopy. (Some may
152 #define memmove(d,s,n) bcopy(s,d,n)
154 #define memmove(d,s,n) _nc_memmove(d,s,n)
155 extern void * _nc_memmove(void *, const void *, size_t);
159 * Scroll hints are useless when hashmap is used
161 #if !USE_SCROLL_HINTS
163 #define USE_SCROLL_HINTS 1
165 #define USE_SCROLL_HINTS 0
170 #define if_USE_SCROLL_HINTS(stmt) stmt
172 #define if_USE_SCROLL_HINTS(stmt) /*nothing*/
176 * Note: ht/cbt expansion flakes out randomly under Linux 1.1.47, but only
177 * when we're throwing control codes at the screen at high volume. To see
178 * this, re-enable USE_HARD_TABS and run worm for a while. Other systems
179 * probably don't want to define this either due to uncertainties about tab
180 * delays and expansion in raw mode.
184 struct tries *child; /* ptr to child. NULL if none */
185 struct tries *sibling; /* ptr to sibling. NULL if none */
186 unsigned char ch; /* character at this node */
187 unsigned short value; /* code of string so far. 0 if none. */
191 * Definitions for color pairs
193 #define C_SHIFT 8 /* we need more bits than there are colors */
194 #define C_MASK ((1 << C_SHIFT) - 1)
196 #define PAIR_OF(fg, bg) ((((fg) & C_MASK) << C_SHIFT) | ((bg) & C_MASK))
199 * Common/troublesome character definitions
206 * Structure for palette tables
211 short red, green, blue;
215 #define MAXCOLUMNS 135
217 #define FIFO_SIZE MAXCOLUMNS+2 /* for nocbreak mode input */
221 #define WINDOWLIST struct _win_list
223 #include <curses.h> /* we'll use -Ipath directive to get the right one! */
226 * Structure for soft labels.
231 char *text; /* text for the label */
232 char *form_text; /* formatted text (left/center/...) */
233 int x; /* x coordinate of this field */
234 char dirty; /* this label has changed */
235 char visible; /* field is visible */
239 char dirty; /* all labels have changed */
240 char hidden; /* soft labels are hidden */
243 char* buffer; /* buffer for labels */
244 short maxlab; /* number of available labels */
245 short labcnt; /* number of allocated labels */
246 short maxlen; /* length of labels */
247 chtype attr; /* soft label attribute */
251 int _ifd; /* input file ptr for screen */
252 FILE *_ofp; /* output file ptr for screen */
253 char *_setbuf; /* buffered I/O for output */
254 int _buffered; /* setvbuf uses _setbuf data */
255 int _checkfd; /* filedesc for typeahead check */
256 struct term *_term; /* terminal type information */
257 short _lines; /* screen lines */
258 short _columns; /* screen columns */
259 short _lines_avail; /* lines available for stdscr */
260 short _topstolen; /* lines stolen from top */
262 WINDOW *_curscr; /* current screen */
263 WINDOW *_newscr; /* virtual screen to be updated to */
264 WINDOW *_stdscr; /* screen's full-window context */
266 struct tries *_keytry; /* "Try" for use with keypad mode */
267 struct tries *_key_ok; /* Disabled keys via keyok(,FALSE) */
268 int _tried; /* keypad mode was initialized */
270 unsigned int _fifo[FIFO_SIZE]; /* input push-back buffer */
271 short _fifohead, /* head of fifo queue */
272 _fifotail, /* tail of fifo queue */
273 _fifopeek, /* where to peek for next char */
274 _fifohold; /* set if breakout marked */
276 int _endwin; /* are we out of window mode? */
277 unsigned long _current_attr; /* terminal attribute current set */
278 int _coloron; /* is color enabled? */
279 int _cursor; /* visibility of the cursor */
280 int _cursrow; /* physical cursor row */
281 int _curscol; /* physical cursor column */
282 int _nl; /* True if NL -> CR/NL is on */
283 int _raw; /* True if in raw mode */
284 int _cbreak; /* 1 if in cbreak mode */
285 /* > 1 if in halfdelay mode */
286 int _echo; /* True if echo on */
287 int _use_meta; /* use the meta key? */
288 SLK *_slk; /* ptr to soft key struct / NULL */
289 int slk_format; /* selected format for this screen */
290 /* cursor movement costs; units are 10ths of milliseconds */
291 #ifdef NCURSES_NO_PADDING
292 int _no_padding; /* flag to set if padding disabled */
294 int _char_padding; /* cost of character put */
295 int _cr_cost; /* cost of (carriage_return) */
296 int _cup_cost; /* cost of (cursor_address) */
297 int _home_cost; /* cost of (cursor_home) */
298 int _ll_cost; /* cost of (cursor_to_ll) */
300 int _ht_cost; /* cost of (tab) */
301 int _cbt_cost; /* cost of (backtab) */
302 #endif /* USE_HARD_TABS */
303 int _cub1_cost; /* cost of (cursor_left) */
304 int _cuf1_cost; /* cost of (cursor_right) */
305 int _cud1_cost; /* cost of (cursor_down) */
306 int _cuu1_cost; /* cost of (cursor_up) */
307 int _cub_cost; /* cost of (parm_cursor_left) */
308 int _cuf_cost; /* cost of (parm_cursor_right) */
309 int _cud_cost; /* cost of (parm_cursor_down) */
310 int _cuu_cost; /* cost of (parm_cursor_up) */
311 int _hpa_cost; /* cost of (column_address) */
312 int _vpa_cost; /* cost of (row_address) */
313 /* used in tty_update.c, must be chars */
314 int _ed_cost; /* cost of (clr_eos) */
315 int _el_cost; /* cost of (clr_eol) */
316 int _el1_cost; /* cost of (clr_bol) */
317 int _dch1_cost; /* cost of (delete_character) */
318 int _ich1_cost; /* cost of (insert_character) */
319 int _dch_cost; /* cost of (parm_dch) */
320 int _ich_cost; /* cost of (parm_ich) */
321 int _ech_cost; /* cost of (erase_chars) */
322 int _rep_cost; /* cost of (repeat_char) */
323 int _hpa_ch_cost; /* cost of (column_address) */
324 int _cup_ch_cost; /* cost of (cursor_address) */
325 int _cuf_ch_cost; /* cost of (parm_cursor_right) */
326 int _inline_cost; /* cost of inline-move */
327 int _smir_cost; /* cost of (enter_insert_mode) */
328 int _rmir_cost; /* cost of (exit_insert_mode) */
329 int _ip_cost; /* cost of (insert_padding) */
330 /* used in lib_mvcur.c */
331 char * _address_cursor;
332 int _carriage_return_length;
333 int _cursor_home_length;
334 int _cursor_to_ll_length;
335 int _scrolling; /* 1 if terminal's smart enough to */
337 /* used in lib_color.c */
338 color_t *_color_table; /* screen's color palette */
339 int _color_count; /* count of colors in palette */
340 unsigned short *_color_pairs; /* screen's color pair list */
341 int _pair_count; /* count of color pairs */
342 #ifdef NCURSES_EXT_FUNCS
343 bool _default_color; /* use default colors */
344 bool _has_sgr_39_49; /* has ECMA default color support */
345 int _default_fg; /* assumed default foreground */
346 int _default_bg; /* assumed default background */
348 chtype _xmc_suppress; /* attributes to suppress if xmc */
349 chtype _xmc_triggers; /* attributes to process if xmc */
350 chtype _acs_map[ACS_LEN];
352 /* used in lib_vidattr.c */
353 bool _use_rmso; /* true if we may use 'rmso' */
354 bool _use_rmul; /* true if we may use 'rmul' */
357 * These data correspond to the state of the idcok() and idlok()
358 * functions. A caveat is in order here: the XSI and SVr4
359 * documentation specify that these functions apply to the window which
360 * is given as an argument. However, ncurses implements this logic
361 * only for the newscr/curscr update process, _not_ per-window.
365 #define _nc_idlok SP->_nc_sp_idlok
366 #define _nc_idcok SP->_nc_sp_idcok
369 * These are the data that support the mouse interface.
372 bool (*_mouse_event) (SCREEN *);
373 bool (*_mouse_inline)(SCREEN *);
374 bool (*_mouse_parse) (int);
375 void (*_mouse_resume)(SCREEN *);
376 void (*_mouse_wrap) (SCREEN *);
377 int _mouse_fd; /* file-descriptor, if any */
380 * This supports automatic resizing
383 int (*_resize)(int,int);
387 * These are data that support the proper handling of the panel stack on an
390 struct panelhook _panelHook;
392 * Linked-list of all windows, to support '_nc_resizeall()' and
395 WINDOWLIST *_nc_sp_windows;
396 #define _nc_windows SP->_nc_sp_windows
399 SCREEN *_next_screen;
401 /* hashes for old and new lines */
402 unsigned long *oldhash, *newhash;
404 bool _cleanup; /* cleanup after int/quit signal */
405 int (*_outch)(int); /* output handler if not putc */
408 extern SCREEN *_nc_screen_chain;
410 #ifdef NCURSES_NOMACROS
411 #include <nomacros.h>
420 int line; /* lines to take, < 0 => from bottom*/
421 int (*hook)(struct _win_st *, int); /* callback for user */
422 struct _win_st *w; /* maybe we need this for cleanup */
425 /* The terminfo source is assumed to be 7-bit ASCII */
426 #define is7bits(c) ((unsigned)(c) < 128)
429 #define min(a,b) ((a) > (b) ? (b) : (a))
433 #define max(a,b) ((a) < (b) ? (b) : (a))
436 /* usually in <unistd.h> */
438 #define STDIN_FILENO 0
441 #ifndef STDOUT_FILENO
442 #define STDOUT_FILENO 1
445 #ifndef STDERR_FILENO
446 #define STDERR_FILENO 2
450 #define EXIT_SUCCESS 0
454 #define EXIT_FAILURE 1
458 #define R_OK 4 /* Test for read permission. */
461 #define W_OK 2 /* Test for write permission. */
464 #define X_OK 1 /* Test for execute permission. */
467 #define F_OK 0 /* Test for existence. */
471 #include <fcntl.h> /* may define O_BINARY */
478 #define TextOf(c) ((c) & (chtype)A_CHARTEXT)
479 #define AttrOf(c) ((c) & (chtype)A_ATTRIBUTES)
481 #define BLANK (' '|A_NORMAL)
485 #define CHANGED_CELL(line,col) \
486 if (line->firstchar == _NOCHANGE) \
487 line->firstchar = line->lastchar = col; \
488 else if ((col) < line->firstchar) \
489 line->firstchar = col; \
490 else if ((col) > line->lastchar) \
493 #define CHANGED_RANGE(line,start,end) \
494 if (line->firstchar == _NOCHANGE \
495 || line->firstchar > (start)) \
496 line->firstchar = start; \
497 if (line->lastchar == _NOCHANGE \
498 || line->lastchar < (end)) \
501 #define CHANGED_TO_EOL(line,start,end) \
502 if (line->firstchar == _NOCHANGE \
503 || line->firstchar > (start)) \
504 line->firstchar = start; \
507 #define SIZEOF(v) (sizeof(v)/sizeof(v[0]))
509 #define FreeIfNeeded(p) if ((p) != 0) free(p)
511 /* FreeAndNull() is not a comma-separated expression because some compilers
512 * do not accept a mixture of void with values.
514 #define FreeAndNull(p) free(p); p = 0
516 #include <nc_alloc.h>
519 * Prefixes for call/return points of library function traces. We use these to
520 * instrument the public functions so that the traces can be easily transformed
521 * into regression scripts.
523 #define T_CALLED(fmt) "called " fmt
524 #define T_CREATE(fmt) "create " fmt
525 #define T_RETURN(fmt) "return " fmt
528 #define TR(n, a) if (_nc_tracing & (n)) _tracef a
529 #define T(a) TR(TRACE_CALLS, a)
530 #define TPUTS_TRACE(s) _nc_tputs_trace = s;
531 #define TRACE_RETURN(value,type) return _nc_retrace_##type(value)
532 #define returnAttr(code) TRACE_RETURN(code,attr_t)
533 #define returnCode(code) TRACE_RETURN(code,int)
534 #define returnPtr(code) TRACE_RETURN(code,ptr)
535 #define returnVoid T((T_RETURN(""))); return
536 #define returnWin(code) TRACE_RETURN(code,win)
537 extern WINDOW * _nc_retrace_win(WINDOW *);
538 extern attr_t _nc_retrace_attr_t(attr_t);
539 extern char *_nc_retrace_ptr(char *);
540 extern const char *_nc_tputs_trace;
541 extern int _nc_retrace_int(int);
542 extern long _nc_outchars;
543 extern void _nc_fifo_dump(void);
547 #define TPUTS_TRACE(s)
548 #define returnAttr(code) return code
549 #define returnCode(code) return code
550 #define returnPtr(code) return code
551 #define returnVoid return
552 #define returnWin(code) return code
555 extern unsigned _nc_tracing;
556 extern const char *_nc_visbuf2(int, const char *);
558 #define _trace_key(ch) ((ch > KEY_MIN) ? keyname(ch) : _tracechar((unsigned char)ch))
560 #define ALL_BUT_COLOR ((chtype)~(A_COLOR))
561 #define IGNORE_COLOR_OFF FALSE
562 #define NONBLANK_ATTR (A_BOLD|A_DIM|A_BLINK)
563 #define XMC_CHANGES(c) ((c) & SP->_xmc_suppress)
566 #define toggle_attr_on(S,at) {\
567 if (PAIR_NUMBER(at) > 0)\
568 (S) = ((S) & ALL_BUT_COLOR) | (at);\
571 T(("new attribute is %s", _traceattr((S))));}
574 #define toggle_attr_off(S,at) {\
575 if (IGNORE_COLOR_OFF == TRUE) {\
576 if (PAIR_NUMBER(at) == 0xff) /* turn off color */\
578 else /* leave color alone */\
579 (S) &= ~((at)&ALL_BUT_COLOR);\
581 if (PAIR_NUMBER(at) > 0x00) /* turn off color */\
582 (S) &= ~(at|A_COLOR);\
583 else /* leave color alone */\
586 T(("new attribute is %s", _traceattr((S))));}
588 #define DelCharCost(count) \
591 : ((delete_character != 0) \
592 ? (SP->_dch1_cost * count) \
595 #define InsCharCost(count) \
598 : ((enter_insert_mode && exit_insert_mode) \
599 ? SP->_smir_cost + SP->_rmir_cost + (SP->_ip_cost * count) \
600 : ((insert_character != 0) \
601 ? (SP->_ich1_cost * count) \
605 #define UpdateAttrs(c) if (SP->_current_attr != AttrOf(c)) { \
606 attr_t chg = SP->_current_attr; \
607 vidattr(AttrOf(c)); \
608 if (magic_cookie_glitch > 0 \
609 && XMC_CHANGES((chg ^ SP->_current_attr))) { \
610 T(("%s @%d before glitch %d,%d", \
611 __FILE__, __LINE__, \
614 _nc_do_xmc_glitch(chg); \
618 #define UpdateAttrs(c) if (SP->_current_attr != AttrOf(c)) \
622 #if defined(NCURSES_EXPANDED) && defined(NCURSES_EXT_FUNCS)
624 #undef toggle_attr_on
625 #define toggle_attr_on(S,at) _nc_toggle_attr_on(&(S), at)
626 extern void _nc_toggle_attr_on(attr_t *, attr_t);
628 #undef toggle_attr_off
629 #define toggle_attr_off(S,at) _nc_toggle_attr_off(&(S), at)
630 extern void _nc_toggle_attr_off(attr_t *, attr_t);
633 #define DelCharCost(count) _nc_DelCharCost(count)
634 extern int _nc_DelCharCost(int);
637 #define InsCharCost(count) _nc_InsCharCost(count)
638 extern int _nc_InsCharCost(int);
641 #define UpdateAttrs(c) _nc_UpdateAttrs(c)
642 extern void _nc_UpdateAttrs(chtype);
646 extern void _nc_expanded(void);
651 #define getcwd(buf,len) getwd(buf)
656 extern void _nc_do_xmc_glitch(attr_t);
660 #if defined(TRACE) || defined(SCROLLDEBUG) || defined(HASHDEBUG)
661 extern void _nc_linedump(void);
665 extern void _nc_init_acs(void); /* corresponds to traditional 'init_acs()' */
666 extern int _nc_msec_cost(const char *const, int); /* used by 'tack' program */
669 #define INFINITY 1000000 /* cost: too high to use */
671 extern void _nc_mvcur_init(void);
672 extern void _nc_mvcur_resume(void);
673 extern void _nc_mvcur_wrap(void);
675 extern int _nc_scrolln(int, int, int, int);
677 extern void _nc_screen_init(void);
678 extern void _nc_screen_resume(void);
679 extern void _nc_screen_wrap(void);
682 #define strstr _nc_strstr
683 extern char *_nc_strstr(const char *, const char *);
687 extern int _nc_has_mouse(void);
690 extern char * _nc_printf_string(const char *fmt, va_list ap);
693 extern void _nc_add_to_try(struct tries **tree, const char *str, unsigned short code);
694 extern char *_nc_expand_try(struct tries *tree, unsigned short code, int *count, size_t len);
695 extern int _nc_remove_key(struct tries **tree, unsigned short code);
696 extern int _nc_remove_string(struct tries **tree, char *string);
699 extern WINDOW *_nc_makenew(int, int, int, int, int);
700 extern char *_nc_home_terminfo(void);
701 extern char *_nc_trace_buf(int, size_t);
702 extern chtype _nc_background(WINDOW *);
703 extern chtype _nc_render(WINDOW *, chtype);
704 extern int _nc_access(const char *, int);
705 extern int _nc_baudrate(int);
706 extern int _nc_getenv_num(const char *);
707 extern int _nc_keypad(bool);
708 extern int _nc_ospeed(int);
709 extern int _nc_outch(int);
710 extern int _nc_setupscreen(short, short const, FILE *);
711 extern int _nc_timed_wait(int, int, int *);
712 extern int _nc_waddch_nosync(WINDOW *, const chtype);
713 extern void _nc_do_color(int, int, bool, int (*)(int));
714 extern void _nc_freeall(void);
715 extern void _nc_freewin(WINDOW *win);
716 extern void _nc_hash_map(void);
717 extern void _nc_init_keytry(void);
718 extern void _nc_keep_tic_dir(const char *);
719 extern void _nc_make_oldhash(int i);
720 extern void _nc_flush(void);
721 extern void _nc_outstr(const char *str);
722 extern void _nc_scroll_oldhash(int n, int top, int bot);
723 extern void _nc_scroll_optimize(void);
724 extern void _nc_scroll_window(WINDOW *, int const, short const, short const, chtype);
725 extern void _nc_set_buffer(FILE *, bool);
726 extern void _nc_signal_handler(bool);
727 extern void _nc_synchook(WINDOW *win);
728 extern void _nc_trace_tries(struct tries *tree);
731 extern void _nc_update_screensize(void);
734 #ifdef USE_WIDEC_SUPPORT
735 extern int _nc_utf8_outch(int);
739 extern int *_nc_oldnums;
741 #define USE_SETBUF_0 0
743 #define NC_BUFFERED(flag) \
744 if ((SP->_buffered != 0) != flag) \
745 _nc_set_buffer(SP->_ofp, flag)
747 #define NC_OUTPUT ((SP != 0) ? SP->_ofp : stdout)
750 * On systems with a broken linker, define 'SP' as a function to force the
751 * linker to pull in the data-only module with 'SP'.
753 #ifndef BROKEN_LINKER
754 #define BROKEN_LINKER 0
758 #define SP _nc_screen()
759 extern SCREEN *_nc_screen(void);
760 extern int _nc_alloc_screen(void);
761 extern void _nc_set_screen(SCREEN *);
763 /* current screen is private data; avoid possible linking conflicts too */
765 #define _nc_alloc_screen() ((SP = typeCalloc(SCREEN, 1)) != 0)
766 #define _nc_set_screen(sp) SP = sp
770 * We don't want to use the lines or columns capabilities internally,
771 * because if the application is running multiple screens under
772 * X windows, it's quite possible they could all have type xterm
773 * but have different sizes! So...
775 #define screen_lines SP->_lines
776 #define screen_columns SP->_columns
778 extern int _nc_slk_format; /* != 0 if slk_init() called */
779 extern int _nc_slk_initialize(WINDOW *, int);
782 * Some constants related to SLK's
784 #define MAX_SKEY_OLD 8 /* count of soft keys */
785 #define MAX_SKEY_LEN_OLD 8 /* max length of soft key text */
786 #define MAX_SKEY_PC 12 /* This is what most PC's have */
787 #define MAX_SKEY_LEN_PC 5
789 /* Macro to check whether or not we use a standard format */
790 #define SLK_STDFMT(fmt) (fmt < 3)
791 /* Macro to determine height of label window */
792 #define SLK_LINES(fmt) (SLK_STDFMT(fmt) ? 1 : ((fmt) - 2))
794 #define MAX_SKEY(fmt) (SLK_STDFMT(fmt)? MAX_SKEY_OLD : MAX_SKEY_PC)
795 #define MAX_SKEY_LEN(fmt) (SLK_STDFMT(fmt)? MAX_SKEY_LEN_OLD : MAX_SKEY_LEN_PC)
797 extern int _nc_ripoffline(int line, int (*init)(WINDOW *,int));
803 #endif /* CURSES_PRIV_H */