[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * nfo/terminal.c (keys, keys2), info/variables.c
From: |
Patrice Dumas |
Subject: |
branch master updated: * nfo/terminal.c (keys, keys2), info/variables.c (styles), tp/Texinfo/XS/main/utils.c (def_aliases, default_expanded_formats), tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line), tp/Texinfo/XS/parsetexi/indices.c (default_indices) (def_command_indices), tp/Texinfo/XS/parsetexi/def.c (def_maps): add braces for each structure in arrays initialization. |
Date: |
Thu, 10 Oct 2024 18:21:43 -0400 |
This is an automated email from the git hooks/post-receive script.
pertusus pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 319736b23d * nfo/terminal.c (keys, keys2), info/variables.c (styles),
tp/Texinfo/XS/main/utils.c (def_aliases, default_expanded_formats),
tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line),
tp/Texinfo/XS/parsetexi/indices.c (default_indices) (def_command_indices),
tp/Texinfo/XS/parsetexi/def.c (def_maps): add braces for each structure in
arrays initialization.
319736b23d is described below
commit 319736b23d8b65860a362ee6c74996de01de2fae
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Fri Oct 11 00:21:32 2024 +0200
* nfo/terminal.c (keys, keys2), info/variables.c (styles),
tp/Texinfo/XS/main/utils.c (def_aliases, default_expanded_formats),
tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line),
tp/Texinfo/XS/parsetexi/indices.c (default_indices)
(def_command_indices), tp/Texinfo/XS/parsetexi/def.c (def_maps): add
braces for each structure in arrays initialization.
---
ChangeLog | 9 +++++
info/terminal.c | 38 +++++++++----------
info/variables.c | 60 +++++++++++++++---------------
tp/Texinfo/XS/main/utils.c | 76 +++++++++++++++++++-------------------
tp/Texinfo/XS/parsetexi/def.c | 22 +++++------
tp/Texinfo/XS/parsetexi/end_line.c | 24 ++++++------
tp/Texinfo/XS/parsetexi/indices.c | 27 ++++++++------
7 files changed, 134 insertions(+), 122 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index ac26c0e885..4c9749c92c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-10-10 Patrice Dumas <pertusus@free.fr>
+
+ * nfo/terminal.c (keys, keys2), info/variables.c (styles),
+ tp/Texinfo/XS/main/utils.c (def_aliases, default_expanded_formats),
+ tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line),
+ tp/Texinfo/XS/parsetexi/indices.c (default_indices)
+ (def_command_indices), tp/Texinfo/XS/parsetexi/def.c (def_maps): add
+ braces for each structure in arrays initialization.
+
2024-10-10 Patrice Dumas <pertusus@free.fr>
* tp/Texinfo/XS/main/command_data.awk,
diff --git a/info/terminal.c b/info/terminal.c
index 7ee10a167c..5e6a05d9e9 100644
--- a/info/terminal.c
+++ b/info/terminal.c
@@ -805,17 +805,17 @@ initialize_byte_map (void)
int key_id;
char **byte_seq;
} keys[] = {
- KEY_RIGHT_ARROW, &term_kr,
- KEY_LEFT_ARROW, &term_kl,
- KEY_UP_ARROW, &term_ku,
- KEY_DOWN_ARROW, &term_kd,
- KEY_PAGE_UP, &term_kP,
- KEY_PAGE_DOWN, &term_kN,
- KEY_HOME, &term_kh,
- KEY_END, &term_ke,
- KEY_DELETE, &term_kD,
- KEY_INSERT, &term_ki,
- KEY_BACK_TAB, &term_kB
+ {KEY_RIGHT_ARROW, &term_kr},
+ {KEY_LEFT_ARROW, &term_kl},
+ {KEY_UP_ARROW, &term_ku},
+ {KEY_DOWN_ARROW, &term_kd},
+ {KEY_PAGE_UP, &term_kP},
+ {KEY_PAGE_DOWN, &term_kN},
+ {KEY_HOME, &term_kh},
+ {KEY_END, &term_ke},
+ {KEY_DELETE, &term_kD},
+ {KEY_INSERT, &term_ki},
+ {KEY_BACK_TAB, &term_kB}
};
/* Recognize arrow key sequences with both of the usual prefixes in case
they
@@ -824,14 +824,14 @@ initialize_byte_map (void)
int key_id;
char *byte_seq;
} keys2[] = {
- KEY_RIGHT_ARROW, "\033[C",
- KEY_RIGHT_ARROW, "\033OC",
- KEY_LEFT_ARROW, "\033[D",
- KEY_LEFT_ARROW, "\033OD",
- KEY_UP_ARROW, "\033[A",
- KEY_UP_ARROW, "\033OA",
- KEY_DOWN_ARROW, "\033[B",
- KEY_DOWN_ARROW, "\033OB"
+ {KEY_RIGHT_ARROW, "\033[C"},
+ {KEY_RIGHT_ARROW, "\033OC"},
+ {KEY_LEFT_ARROW, "\033[D"},
+ {KEY_LEFT_ARROW, "\033OD"},
+ {KEY_UP_ARROW, "\033[A"},
+ {KEY_UP_ARROW, "\033OA"},
+ {KEY_DOWN_ARROW, "\033[B"},
+ {KEY_DOWN_ARROW, "\033OB"}
};
byte_seq_to_key = xmalloc (256 * sizeof (BYTEMAP_ENTRY));
diff --git a/info/variables.c b/info/variables.c
index a4dc24d7e6..e85d53b224 100644
--- a/info/variables.c
+++ b/info/variables.c
@@ -418,36 +418,36 @@ update_rendition_from_string (RENDITION *rendition, char
*value)
unsigned long value;
char *name;
} styles[] = {
- COLOUR_MASK, COLOUR_BLACK, "black",
- COLOUR_MASK, COLOUR_RED, "red",
- COLOUR_MASK, COLOUR_GREEN, "green",
- COLOUR_MASK, COLOUR_YELLOW, "yellow",
- COLOUR_MASK, COLOUR_BLUE, "blue",
- COLOUR_MASK, COLOUR_MAGENTA, "magenta",
- COLOUR_MASK, COLOUR_CYAN, "cyan",
- COLOUR_MASK, COLOUR_WHITE, "white",
- COLOUR_MASK, 0, "nocolour",
- COLOUR_MASK, 0, "nocolor",
- BGCOLOUR_MASK, BGCOLOUR_BLACK, "bgblack",
- BGCOLOUR_MASK, BGCOLOUR_RED, "bgred",
- BGCOLOUR_MASK, BGCOLOUR_GREEN, "bggreen",
- BGCOLOUR_MASK, BGCOLOUR_YELLOW, "bgyellow",
- BGCOLOUR_MASK, BGCOLOUR_BLUE, "bgblue",
- BGCOLOUR_MASK, BGCOLOUR_MAGENTA, "bgmagenta",
- BGCOLOUR_MASK, BGCOLOUR_CYAN, "bgcyan",
- BGCOLOUR_MASK, BGCOLOUR_WHITE, "bgwhite",
- BGCOLOUR_MASK, 0, "nobgcolour",
- BGCOLOUR_MASK, 0, "nobgcolor",
- UNDERLINE_MASK, UNDERLINE_MASK, "underline",
- UNDERLINE_MASK, 0, "nounderline",
- STANDOUT_MASK, STANDOUT_MASK, "standout",
- STANDOUT_MASK, 0, "nostandout",
- BOLD_MASK, BOLD_MASK, "bold",
- BOLD_MASK, 0, "regular",
- BOLD_MASK, 0, "nobold",
- BLINK_MASK, BLINK_MASK, "blink",
- BLINK_MASK, 0, "noblink",
- 0, 0, NULL
+ {COLOUR_MASK, COLOUR_BLACK, "black"},
+ {COLOUR_MASK, COLOUR_RED, "red"},
+ {COLOUR_MASK, COLOUR_GREEN, "green"},
+ {COLOUR_MASK, COLOUR_YELLOW, "yellow"},
+ {COLOUR_MASK, COLOUR_BLUE, "blue"},
+ {COLOUR_MASK, COLOUR_MAGENTA, "magenta"},
+ {COLOUR_MASK, COLOUR_CYAN, "cyan"},
+ {COLOUR_MASK, COLOUR_WHITE, "white"},
+ {COLOUR_MASK, 0, "nocolour"},
+ {COLOUR_MASK, 0, "nocolor"},
+ {BGCOLOUR_MASK, BGCOLOUR_BLACK, "bgblack"},
+ {BGCOLOUR_MASK, BGCOLOUR_RED, "bgred"},
+ {BGCOLOUR_MASK, BGCOLOUR_GREEN, "bggreen"},
+ {BGCOLOUR_MASK, BGCOLOUR_YELLOW, "bgyellow"},
+ {BGCOLOUR_MASK, BGCOLOUR_BLUE, "bgblue"},
+ {BGCOLOUR_MASK, BGCOLOUR_MAGENTA, "bgmagenta"},
+ {BGCOLOUR_MASK, BGCOLOUR_CYAN, "bgcyan"},
+ {BGCOLOUR_MASK, BGCOLOUR_WHITE, "bgwhite"},
+ {BGCOLOUR_MASK, 0, "nobgcolour"},
+ {BGCOLOUR_MASK, 0, "nobgcolor"},
+ {UNDERLINE_MASK, UNDERLINE_MASK, "underline"},
+ {UNDERLINE_MASK, 0, "nounderline"},
+ {STANDOUT_MASK, STANDOUT_MASK, "standout"},
+ {STANDOUT_MASK, 0, "nostandout"},
+ {BOLD_MASK, BOLD_MASK, "bold"},
+ {BOLD_MASK, 0, "regular"},
+ {BOLD_MASK, 0, "nobold"},
+ {BLINK_MASK, BLINK_MASK, "blink"},
+ {BLINK_MASK, 0, "noblink"},
+ {0, 0, NULL}
};
int i;
char *component;
diff --git a/tp/Texinfo/XS/main/utils.c b/tp/Texinfo/XS/main/utils.c
index 623d0e281c..357e944fe4 100644
--- a/tp/Texinfo/XS/main/utils.c
+++ b/tp/Texinfo/XS/main/utils.c
@@ -74,47 +74,47 @@ const char *whitespace_chars = " \t\v\f\r\n";
const char *digit_chars = "0123456789";
DEF_ALIAS def_aliases[] = {
- CM_defun, CM_deffn, pgdt_context_noop("category of functions for @defun",
- "Function"),
+ {CM_defun, CM_deffn, pgdt_context_noop("category of functions for @defun",
+ "Function")},
/* TRANSLATORS: category of macros for @defmac */
- CM_defmac, CM_deffn, gdt_noop("Macro"), 0,
+ {CM_defmac, CM_deffn, gdt_noop("Macro"), 0},
/* TRANSLATORS: category of special forms for @defspec */
- CM_defspec, CM_deffn, gdt_noop("Special Form"), 0,
- CM_defvar, CM_defvr, pgdt_context_noop("category of variables for @defvar",
- "Variable"),
+ {CM_defspec, CM_deffn, gdt_noop("Special Form"), 0},
+ {CM_defvar, CM_defvr, pgdt_context_noop("category of variables for @defvar",
+ "Variable")},
/* TRANSLATORS: category of user-modifiable options for @defopt */
- CM_defopt, CM_defvr, gdt_noop("User Option"), 0,
- CM_deftypefun, CM_deftypefn,
- pgdt_context_noop("category of functions for @deftypefun", "Function"),
- CM_deftypevar, CM_deftypevr,
+ {CM_defopt, CM_defvr, gdt_noop("User Option"), 0},
+ {CM_deftypefun, CM_deftypefn,
+ pgdt_context_noop("category of functions for @deftypefun", "Function")},
+ {CM_deftypevar, CM_deftypevr,
pgdt_context_noop("category of variables in typed languages for
@deftypevar",
- "Variable"),
- CM_defivar, CM_defcv,
+ "Variable")},
+ {CM_defivar, CM_defcv,
pgdt_context_noop("category of instance variables in object-oriented
programming for @defivar",
- "Instance Variable"),
- CM_deftypeivar, CM_deftypecv,
+ "Instance Variable")},
+ {CM_deftypeivar, CM_deftypecv,
pgdt_context_noop("category of instance variables with data type in
object-oriented programming for @deftypeivar",
- "Instance Variable"),
- CM_defmethod, CM_defop,
+ "Instance Variable")},
+ {CM_defmethod, CM_defop,
pgdt_context_noop("category of methods in object-oriented programming for
@defmethod",
- "Method"),
- CM_deftypemethod, CM_deftypeop,
+ "Method")},
+ {CM_deftypemethod, CM_deftypeop,
pgdt_context_noop("category of methods with data type in object-oriented
programming for @deftypemethod",
- "Method"),
+ "Method")},
/* the following aliases are not used in the XS parser */
- CM_defunx, CM_deffnx, "Function", "category of functions for @defun",
- CM_defmacx, CM_deffnx, "Macro", 0,
- CM_defspecx, CM_deffnx, "Special Form", 0,
- CM_defvarx, CM_defvrx, "Variable", "category of variables for @defvar",
- CM_defoptx, CM_defvrx, "User Option", 0,
- CM_deftypefunx, CM_deftypefnx, "Function", "category of functions for
@deftypefun",
- CM_deftypevarx, CM_deftypevrx, "Variable", "category of variables in typed
languages for @deftypevar",
- CM_defivarx, CM_defcvx, "Instance Variable", "category of instance variables
in object-oriented programming for @defivar",
- CM_deftypeivarx, CM_deftypecvx, "Instance Variable", "category of instance
variables with data type in object-oriented programming for @deftypeivar",
- CM_defmethodx, CM_defopx, "Method", "category of methods in object-oriented
programming for @defmethod",
- CM_deftypemethodx, CM_deftypeopx, "Method", "category of methods with data
type in object-oriented programming for @deftypemethod",
- 0, 0, 0, 0
+ {CM_defunx, CM_deffnx, "Function", "category of functions for @defun"},
+ {CM_defmacx, CM_deffnx, "Macro", 0},
+ {CM_defspecx, CM_deffnx, "Special Form", 0},
+ {CM_defvarx, CM_defvrx, "Variable", "category of variables for @defvar"},
+ {CM_defoptx, CM_defvrx, "User Option", 0},
+ {CM_deftypefunx, CM_deftypefnx, "Function", "category of functions for
@deftypefun"},
+ {CM_deftypevarx, CM_deftypevrx, "Variable", "category of variables in typed
languages for @deftypevar"},
+ {CM_defivarx, CM_defcvx, "Instance Variable", "category of instance
variables in object-oriented programming for @defivar"},
+ {CM_deftypeivarx, CM_deftypecvx, "Instance Variable", "category of instance
variables with data type in object-oriented programming for @deftypeivar"},
+ {CM_defmethodx, CM_defopx, "Method", "category of methods in object-oriented
programming for @defmethod"},
+ {CM_deftypemethodx, CM_deftypeopx, "Method", "category of methods with data
type in object-oriented programming for @deftypemethod"},
+ {0, 0, 0, 0}
};
/* to keep synchronized with enum directions in tree_types.h */
@@ -145,13 +145,13 @@ const char *command_location_names[]
/* NOTE if you add a format, increase the size of CONF.expanded_formats
*/
const EXPANDED_FORMAT default_expanded_formats[] = {
- "html", 0,
- "docbook", 0,
- "plaintext", 0,
- "tex", 0,
- "xml", 0,
- "info", 0,
- "latex", 0,
+ {"html", 0},
+ {"docbook", 0},
+ {"plaintext", 0},
+ {"tex", 0},
+ {"xml", 0},
+ {"info", 0},
+ {"latex", 0},
};
/* special output units global directions are not there, they are
diff --git a/tp/Texinfo/XS/parsetexi/def.c b/tp/Texinfo/XS/parsetexi/def.c
index 80b34c576b..669b4618fc 100644
--- a/tp/Texinfo/XS/parsetexi/def.c
+++ b/tp/Texinfo/XS/parsetexi/def.c
@@ -182,17 +182,17 @@ enum element_type defop_types[] = {ET_def_category,
ET_def_class , ET_def_name,
enum element_type deftp_types[] = {ET_def_category, ET_def_name,
ET_def_typearg, 0};
DEF_MAP def_maps[] = {
- CM_defline, defline_types,
- CM_deftypeline, deftypeline_types,
- CM_deffn, defline_types,
- CM_defvr, defvr_types,
- CM_deftypefn, deftypefn_types,
- CM_deftypeop, deftypeop_types,
- CM_deftypevr, deftypevr_types,
- CM_defcv, defcv_types,
- CM_deftypecv, deftypecv_types,
- CM_defop, defop_types,
- CM_deftp, deftp_types,
+ {CM_defline, defline_types},
+ {CM_deftypeline, deftypeline_types},
+ {CM_deffn, defline_types},
+ {CM_defvr, defvr_types},
+ {CM_deftypefn, deftypefn_types},
+ {CM_deftypeop, deftypeop_types},
+ {CM_deftypevr, deftypevr_types},
+ {CM_defcv, defcv_types},
+ {CM_deftypecv, deftypecv_types},
+ {CM_defop, defop_types},
+ {CM_deftp, deftp_types},
};
/* Split non-space text elements into strings without [ ] ( ) , and single
diff --git a/tp/Texinfo/XS/parsetexi/end_line.c
b/tp/Texinfo/XS/parsetexi/end_line.c
index c78f25ddc9..7135981ef7 100644
--- a/tp/Texinfo/XS/parsetexi/end_line.c
+++ b/tp/Texinfo/XS/parsetexi/end_line.c
@@ -1440,17 +1440,17 @@ end_line_misc_line (ELEMENT *current)
about more encodings than what we know about here.
*/
static const struct encoding_map map[] = {
- "utf-8", "utf-8",
- "utf8", "utf-8",
- "ascii", "us-ascii",
- "shiftjis", "shift_jis",
- "latin1", "iso-8859-1",
- "latin-1", "iso-8859-1",
- "iso-8859-1", "iso-8859-1",
- "iso-8859-2", "iso-8859-2",
- "iso-8859-15", "iso-8859-15",
- "koi8-r", "koi8-r",
- "koi8-u", "koi8-u",
+ {"utf-8", "utf-8"},
+ {"utf8", "utf-8"},
+ {"ascii", "us-ascii"},
+ {"shiftjis", "shift_jis"},
+ {"latin1", "iso-8859-1"},
+ {"latin-1", "iso-8859-1"},
+ {"iso-8859-1", "iso-8859-1"},
+ {"iso-8859-2", "iso-8859-2"},
+ {"iso-8859-15", "iso-8859-15"},
+ {"koi8-r", "koi8-r"},
+ {"koi8-u", "koi8-u"},
/* For some reason Encode mime_name() for GB2312, a simplified
chinese character set encoded as EUC-CN is EUC-CN, while in the
IANA character sets assignments, there is no EUC-CN and
@@ -1460,7 +1460,7 @@ end_line_misc_line (ELEMENT *current)
Set it the same as Perl here, even though it looks wrong,
just to have the same output.
*/
- "gb2312", "euc-cn",
+ {"gb2312", "euc-cn"},
};
for (i = 0; i < sizeof map / sizeof *map; i++)
{
diff --git a/tp/Texinfo/XS/parsetexi/indices.c
b/tp/Texinfo/XS/parsetexi/indices.c
index b3b60bf738..888359e505 100644
--- a/tp/Texinfo/XS/parsetexi/indices.c
+++ b/tp/Texinfo/XS/parsetexi/indices.c
@@ -153,13 +153,13 @@ init_index_commands (void)
struct def { char *name; int in_code;
enum command_id cmd2; enum command_id cmd1;}
*p, default_indices[] = {
- "cp", 0, CM_cpindex, CM_cindex, /* concepts */
- "fn", 1, CM_fnindex, CM_findex, /* functions */
- "vr", 1, CM_vrindex, CM_vindex, /* variables */
- "ky", 1, CM_kyindex, CM_kindex, /* keystrokes */
- "pg", 1, CM_pgindex, CM_pindex, /* programs */
- "tp", 1, CM_tpindex, CM_tindex, /* types */
- 0, 0, 0, 0
+ {"cp", 0, CM_cpindex, CM_cindex}, /* concepts */
+ {"fn", 1, CM_fnindex, CM_findex}, /* functions */
+ {"vr", 1, CM_vrindex, CM_vindex}, /* variables */
+ {"ky", 1, CM_kyindex, CM_kindex}, /* keystrokes */
+ {"pg", 1, CM_pgindex, CM_pindex}, /* programs */
+ {"tp", 1, CM_tpindex, CM_tindex}, /* types */
+ {0, 0, 0, 0}
};
size_t i, j;
@@ -168,7 +168,7 @@ init_index_commands (void)
#define X(command) CM_##command, CM_##command##x
struct def_cmds { char *name; enum command_id id[MAX]; }
def_command_indices[] = {
- "fn",
+ {"fn",
{X(deffn),
X(deftypefn),
@@ -180,9 +180,10 @@ init_index_commands (void)
X(deftypefun),
X(defmethod),
X(deftypemethod),
- },
+ }
+ },
- "vr",
+ {"vr",
{X(defvr),
X(deftypevr),
@@ -193,11 +194,13 @@ init_index_commands (void)
X(defopt),
X(deftypevar),
X(deftypeivar),
- },
+ }
+ },
- "tp",
+ {"tp",
{X(deftp),}
+ }
};
#undef X
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: * nfo/terminal.c (keys, keys2), info/variables.c (styles), tp/Texinfo/XS/main/utils.c (def_aliases, default_expanded_formats), tp/Texinfo/XS/parsetexi/end_line.c (end_line_misc_line), tp/Texinfo/XS/parsetexi/indices.c (default_indices) (def_command_indices), tp/Texinfo/XS/parsetexi/def.c (def_maps): add braces for each structure in arrays initialization.,
Patrice Dumas <=
- Prev by Date:
branch master updated: * tp/Texinfo/XS/main/command_data.awk, tp/Texinfo/XS/main/element_types.awk, tp/maintain/generate_code_convert_data.pl, tp/maintain/regenerate_C_options_info.pl, tp/maintain/setup_converters_code_tables.pl: add braces for each structure in arrays. Update scripts generating codes reading command_data.c to get the commands order.
- Next by Date:
branch master updated: * info/display.c (display_update_node_text), info/session.c (looking_at_newline, looking_at_alnum): check mbi_avail return value. The caller probably makes sure that there are bytes, but this should be more robust and could still be relevant for invalid multibytes sequences depending on mbi_avail implementation.
- Previous by thread:
branch master updated: * tp/Texinfo/XS/main/command_data.awk, tp/Texinfo/XS/main/element_types.awk, tp/maintain/generate_code_convert_data.pl, tp/maintain/regenerate_C_options_info.pl, tp/maintain/setup_converters_code_tables.pl: add braces for each structure in arrays. Update scripts generating codes reading command_data.c to get the commands order.
- Next by thread:
branch master updated: * info/display.c (display_update_node_text), info/session.c (looking_at_newline, looking_at_alnum): check mbi_avail return value. The caller probably makes sure that there are bytes, but this should be more robust and could still be relevant for invalid multibytes sequences depending on mbi_avail implementation.
- Index(es):