From a2ace444f5cf77a9546e916c4db9e7df023dc29b Mon Sep 17 00:00:00 2001
From: Koichi Murase <myoga.murase@gmail.com>
Date: Wed, 10 Feb 2021 03:28:11 +0900
Subject: [PATCH] global: work around bash-4.2 bug of "declare -gA"

---
 ble-decode.sh      | 4 ++--
 ble-syntax-lazy.sh | 4 ++--
 lib/core-syntax.sh | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ble-decode.sh b/ble-decode.sh
index 5ed4ecbb..3a8834d7 100644
--- a/ble-decode.sh
+++ b/ble-decode.sh
@@ -49,10 +49,10 @@ ble_decode_MaskFlag=0x7FC00000
 
 ble_decode_IsolatedESC=$((0x07FF))
 
-if ((_ble_bash>=40200||_ble_bash>=40000&&!_ble_bash_loaded_in_function)); then
+if ((_ble_bash>=40300||_ble_bash>=40000&&!_ble_bash_loaded_in_function)); then
   _ble_decode_kbd_ver=4
   _ble_decode_kbd__n=0
-  if ((_ble_bash>=40200)); then
+  if ((_ble_bash>=40300)); then
     declare -gA _ble_decode_kbd__k2c
   else
     declare -A _ble_decode_kbd__k2c
diff --git a/ble-syntax-lazy.sh b/ble-syntax-lazy.sh
index 946e41e2..f148c0d7 100644
--- a/ble-syntax-lazy.sh
+++ b/ble-syntax-lazy.sh
@@ -69,8 +69,8 @@ fi
 #------------------------------------------------------------------------------
 # グローバル変数の定義 (関数内からではできないのでここで先に定義)
 
-if ((_ble_bash>=40200||_ble_bash>=40000&&!_ble_bash_loaded_in_function)); then
-  if ((_ble_bash>=40200)); then
+if ((_ble_bash>=40300||_ble_bash>=40000&&!_ble_bash_loaded_in_function)); then
+  if ((_ble_bash>=40300)); then
     declare -gA _ble_syntax_highlight_filetype=()
   else
     declare -A _ble_syntax_highlight_filetype=()
diff --git a/lib/core-syntax.sh b/lib/core-syntax.sh
index 1ed45503..6d12b74b 100644
--- a/lib/core-syntax.sh
+++ b/lib/core-syntax.sh
@@ -4534,7 +4534,7 @@ function ble-syntax/highlight/cmdtype2 {
 ##   @param[in] word
 ##     シェル展開・クォート除去を実行する前の文字列を指定します。
 ##   @var[out] type
-if ((_ble_bash>=40200||_ble_bash>=40000&&!_ble_bash_loaded_in_function)); then
+if ((_ble_bash>=40300||_ble_bash>=40000&&!_ble_bash_loaded_in_function)); then
   # Note: 連想配列 _ble_syntax_highlight_filetype は ble-syntax-lazy.sh で先に定義される。
 
   _ble_syntax_highlight_filetype_version=-1