[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6277] remove "local" portability code
From: |
Gavin D. Smith |
Subject: |
[6277] remove "local" portability code |
Date: |
Sun, 17 May 2015 22:15:58 +0000 |
Revision: 6277
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6277
Author: gavin
Date: 2015-05-17 22:15:57 +0000 (Sun, 17 May 2015)
Log Message:
-----------
remove "local" portability code
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/t/Init-inter.inc
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-05-17 21:39:37 UTC (rev 6276)
+++ trunk/ChangeLog 2015-05-17 22:15:57 UTC (rev 6277)
@@ -8,6 +8,10 @@
Maybe word splitting isn't happening.)
* info/t/*.sh: Use GINFO alias instead of $GINFO.
+ * info/t/Init-test.inc: Remove portability code for "local"
+ builtin. It doesn't work.
+ (findprog): Don't use "local".
+
2015-05-17 Gavin Smith <address@hidden>
* info/t/index-apropos.sh: Don't run printf in background to
Modified: trunk/info/t/Init-inter.inc
===================================================================
--- trunk/info/t/Init-inter.inc 2015-05-17 21:39:37 UTC (rev 6276)
+++ trunk/info/t/Init-inter.inc 2015-05-17 22:15:57 UTC (rev 6277)
@@ -31,47 +31,10 @@
path_sep=":"
fi
-# Generic auxiliary functions.
-#
-# In case `local' is not supported by the shell, provide a function
-# that simulates it by simply performing the assignments. This means
-# that we must not expect `local' to work, i.e., we must not (i) rely
-# on it during recursion, and (ii) have two local declarations of the
-# same variable. (ii) is easy to check statically, and our test suite
-# does make sure there is never twice a static local declaration of a
-# variable. (i) cannot be checked easily, so just be careful.
-#
-# Note that since we might use a function simulating `local', we can
-# no longer rely on the fact that no IFS-splitting is performed. So,
-# while
-#
-# foo=$bar
-#
-# is fine (no IFS-splitting), never write
-#
-# local foo=$bar
-#
-# but rather
-#
-# local foo="$bar"
-(
- foo=bar
- test_local () {
- local foo=foo
- }
- test_local >/dev/null 2>&1
- test $foo = bar
-) || eval '
-local () {
- case $1 in
- *=*) eval "$1";;
- esac
-}
-'
# findprog PROG - Return true if PROG is somewhere in PATH, else false.
findprog ()
{
- local saveIFS="$IFS"
+ saveIFS=$IFS
IFS=$path_sep # break path components at the path separator
for dir in $PATH; do
IFS=$saveIFS
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6277] remove "local" portability code,
Gavin D. Smith <=