[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7669] declare tilde_additional_prefixes as static
From: |
gavinsmith0123 |
Subject: |
[7669] declare tilde_additional_prefixes as static |
Date: |
Sun, 5 Feb 2017 05:15:19 -0500 (EST) |
Revision: 7669
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7669
Author: gavin
Date: 2017-02-05 05:15:19 -0500 (Sun, 05 Feb 2017)
Log Message:
-----------
declare tilde_additional_prefixes as static
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/tilde.c
trunk/info/tilde.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2017-02-05 09:29:50 UTC (rev 7668)
+++ trunk/ChangeLog 2017-02-05 10:15:19 UTC (rev 7669)
@@ -1,5 +1,10 @@
2017-02-05 Gavin Smith <address@hidden>
+ * info/tilde.c (tilde_additional_prefixes, tilde_additional_suffixes):
+ Declare as static arrays, as they are not set anywhere else.
+
+2017-02-05 Gavin Smith <address@hidden>
+
* info/tilde.c (tilde_expansion_failure_hook): Remove unused
variable.
(tilde_expand_word): Do not look at tilde_expansion_failure_hook.
Modified: trunk/info/tilde.c
===================================================================
--- trunk/info/tilde.c 2017-02-05 09:29:50 UTC (rev 7668)
+++ trunk/info/tilde.c 2017-02-05 10:15:19 UTC (rev 7669)
@@ -23,28 +23,18 @@
#include "info.h"
#include "tilde.h"
-/* The default value of tilde_additional_prefixes. This is set to
- whitespace preceding a tilde so that simple programs which do not
- perform any word separation get desired behaviour. */
-static char *default_prefixes[] =
- { " ~", "\t~", NULL };
+/* This is a NULL terminated array of strings which
+ are duplicates for a tilde prefix. This is set to
+ whitespace preceding a tilde so that simple programs
+ which do not perform any word separation get desired behaviour. */
+static char *tilde_additional_prefixes[] = { " ~", "\t~", NULL };
-/* The default value of tilde_additional_suffixes. This is set to
+/* This is a NULL terminated array of strings which match
+ the end of a username, instead of just "/". This is set to
whitespace or newline so that simple programs which do not
perform any word separation get desired behaviour. */
-static char *default_suffixes[] =
- { " ", "\n", NULL };
+static char *tilde_additional_suffixes[] = { " ", "\n", NULL };
-/* When non-null, this is a NULL terminated array of strings which
- are duplicates for a tilde prefix. Bash uses this to expand
- `=~' and `:~'. */
-char **tilde_additional_prefixes = default_prefixes;
-
-/* When non-null, this is a NULL terminated array of strings which match
- the end of a username, instead of just "/". Bash sets this to
- `:' and `=~'. */
-char **tilde_additional_suffixes = default_suffixes;
-
/* Find the start of a tilde expansion in STRING, and return the index of
the tilde which starts the expansion. Place the length of the text
which identified this tilde starter in LEN, excluding the tilde itself. */
Modified: trunk/info/tilde.h
===================================================================
--- trunk/info/tilde.h 2017-02-05 09:29:50 UTC (rev 7668)
+++ trunk/info/tilde.h 2017-02-05 10:15:19 UTC (rev 7669)
@@ -24,16 +24,6 @@
#include "info.h"
-/* When non-null, this is a NULL terminated array of strings which
- are duplicates for a tilde prefix. Bash uses this to expand
- `=~' and `:~'. */
-extern char **tilde_additional_prefixes;
-
-/* When non-null, this is a NULL terminated array of strings which match
- the end of a username, instead of just "/". Bash sets this to
- `:' and `=~'. */
-extern char **tilde_additional_suffixes;
-
/* Return a new string which is the result of tilde expanding STRING. */
extern char *tilde_expand (char *string);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7669] declare tilde_additional_prefixes as static,
gavinsmith0123 <=