]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - include/term_entry.h
ncurses 6.4 - patch 20240420
[ncurses.git] / include / term_entry.h
index c0222d057d41898fd6f3d958702f3cec4be0e991..24389ad3837e2cd78fa549ec9412c64e2d62670e 100644 (file)
@@ -1,5 +1,6 @@
 /****************************************************************************
- * Copyright (c) 1998-2015,2017 Free Software Foundation, Inc.              *
+ * Copyright 2018-2022,2023 Thomas E. Dickey                                *
+ * Copyright 1998-2015,2017 Free Software Foundation, Inc.                  *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -32,7 +33,7 @@
  *     and: Thomas E. Dickey                        1998-on                 *
  ****************************************************************************/
 
-/* $Id: term_entry.h,v 1.54 2017/04/03 21:36:00 tom Exp $ */
+/* $Id: term_entry.h,v 1.64 2023/04/22 13:37:14 tom Exp $ */
 
 /*
  *     term_entry.h -- interface to entry-manipulation code
@@ -46,6 +47,7 @@
 extern "C" {
 #endif
 
+#include <curses.h>
 #include <term.h>
 
 /*
@@ -118,8 +120,7 @@ typedef struct {
 } ENTRY_USES;
 
 struct entry {
-       TERMTYPE tterm;
-       int *XNumbers;          /* array of integer values */
+       TERMTYPE2 tterm;
        unsigned nuses;
        ENTRY_USES uses[MAX_USES];
        int ncrosslinks;
@@ -134,6 +135,7 @@ struct entry {
 extern NCURSES_EXPORT_VAR(ENTRY *) _nc_head;
 extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
 #define for_entry_list(qp)     for (qp = _nc_head; qp; qp = qp->next)
+#define for_entry_list2(qp,q0) for (qp = q0; qp; qp = qp->next)
 
 #define MAX_LINE       132
 
@@ -141,7 +143,7 @@ extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
 
 /*
  * Note that WANTED and PRESENT are not simple inverses!  If a capability
- * has been explicitly cancelled, it's not considered WANTED.
+ * has been explicitly cancelled, it is not considered WANTED.
  */
 #define WANTED(s)      ((s) == ABSENT_STRING)
 #define PRESENT(s)     (((s) != ABSENT_STRING) && ((s) != CANCELLED_STRING))
@@ -167,15 +169,20 @@ extern NCURSES_EXPORT_VAR(ENTRY *) _nc_tail;
 /* alloc_entry.c: elementary allocation code */
 extern NCURSES_EXPORT(ENTRY *) _nc_copy_entry (ENTRY *oldp);
 extern NCURSES_EXPORT(char *) _nc_save_str (const char *const);
-extern NCURSES_EXPORT(void) _nc_init_entry (TERMTYPE *const);
-extern NCURSES_EXPORT(void) _nc_merge_entry (TERMTYPE *const, TERMTYPE *const);
+extern NCURSES_EXPORT(void) _nc_init_entry (ENTRY *const);
+extern NCURSES_EXPORT(void) _nc_merge_entry (ENTRY *const, ENTRY *const);
 extern NCURSES_EXPORT(void) _nc_wrap_entry (ENTRY *const, bool);
 
 /* alloc_ttype.c: elementary allocation code */
-extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE *, TERMTYPE *);
+extern NCURSES_EXPORT(void) _nc_align_termtype (TERMTYPE2 *, TERMTYPE2 *);
+
+/* free_ttype.c: elementary allocation code */
+extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *);
+extern NCURSES_EXPORT(void) _nc_free_termtype1 (TERMTYPE *);
+extern NCURSES_EXPORT(void) _nc_free_termtype2 (TERMTYPE2 *);
 
 /* lib_termcap.c: trim sgr0 string for termcap users */
-extern NCURSES_EXPORT(char *) _nc_trim_sgr0 (TERMTYPE *);
+extern NCURSES_EXPORT(char *) _nc_trim_sgr0 (TERMTYPE2 *);
 
 /* parse_entry.c: entry-parsing code */
 #if NCURSES_XNAMES
@@ -187,8 +194,8 @@ extern NCURSES_EXPORT(int) _nc_capcmp (const char *, const char *);
 
 /* write_entry.c: writing an entry to the file system */
 extern NCURSES_EXPORT(void) _nc_set_writedir (const char *);
-extern NCURSES_EXPORT(void) _nc_write_entry (TERMTYPE *const);
-extern NCURSES_EXPORT(int) _nc_write_object(TERMTYPE *, char *, unsigned *, unsigned);
+extern NCURSES_EXPORT(void) _nc_write_entry (TERMTYPE2 *const);
+extern NCURSES_EXPORT(int) _nc_write_object (TERMTYPE2 *, char *, unsigned *, unsigned);
 
 /* comp_parse.c: entry list handling */
 extern NCURSES_EXPORT(void) _nc_read_entry_source (FILE*, char*, int, bool, bool (*)(ENTRY*));
@@ -196,27 +203,14 @@ extern NCURSES_EXPORT(bool) _nc_entry_match (char *, char *);
 extern NCURSES_EXPORT(int) _nc_resolve_uses (bool); /* obs 20040705 */
 extern NCURSES_EXPORT(int) _nc_resolve_uses2 (bool, bool);
 extern NCURSES_EXPORT(void) _nc_free_entries (ENTRY *);
-extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */
-extern NCURSES_IMPEXP void NCURSES_API (*_nc_check_termtype2)(TERMTYPE *, bool);
+extern NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype)(TERMTYPE *); /* obs 20040705 */
+extern NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2)(TERMTYPE2 *, bool);
 
 /* trace_xnames.c */
 extern NCURSES_EXPORT(void) _nc_trace_xnames (TERMTYPE *);
 
 #endif /* NCURSES_INTERNALS */
 
-/*
- * These entrypoints are used by tack.
- */
-
-/* alloc_ttype.c: elementary allocation code */
-extern NCURSES_EXPORT(void) _nc_copy_termtype (TERMTYPE *, const TERMTYPE *);
-
-/* lib_acs.c */
-extern NCURSES_EXPORT(void) _nc_init_acs (void);       /* corresponds to traditional 'init_acs()' */
-
-/* free_ttype.c: elementary allocation code */
-extern NCURSES_EXPORT(void) _nc_free_termtype (TERMTYPE *);
-
 #ifdef __cplusplus
 }
 #endif