Utilize new `-v var_to_set' of f_snprintf()

This commit is contained in:
Devin Teske 2016-02-01 00:54:26 +00:00
parent 0f9fec9d30
commit d356ca0c3f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295108
3 changed files with 9 additions and 9 deletions

View File

@ -212,7 +212,7 @@ dialog_menu_main()
*) menu_program="$menuitem/$menu_program"
esac
tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 )
f_substr -v tag "$DIALOG_MENU_TAGS" $index 1
setvar "menu_program$tag" "$menu_program"
f_shell_escape "$menu_title" menu_title
@ -256,7 +256,7 @@ dialog_menu_main()
*) menu_program="$BSDCFG_LOCAL_LIBE/$menuitem/$menu_program"
esac
tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 )
f_substr -v tag "$DIALOG_MENU_TAGS" $index 1
setvar "menu_program$tag" "$menu_program"
f_shell_escape "$menu_title" menu_title

View File

@ -180,18 +180,18 @@ f_dialog_menu_media_options()
f_ifconfig_media $interface | \
( index=1
echo "'$( f_substr "$DIALOG_MENU_TAGS" $index 1 )'"
echo "'$opt_none'"
f_substr -v tagn "$DIALOG_MENU_TAGS" $index 1
echo "'$tagn' '$opt_none'"
index=$(( $index + 1 ))
echo "'$( f_substr "$DIALOG_MENU_TAGS" $index 1 )'"
echo "'$opt_cust'"
f_substr -v tagn "$DIALOG_MENU_TAGS" $index 1
echo "'$tagn' '$opt_cust'"
index=$(( $index + 1 ))
while read media_options; do
[ $index -lt ${#DIALOG_MENU_TAGS} ] || break
echo "'$( f_substr "$DIALOG_MENU_TAGS" $index 1 )'"
echo "'$media_options'"
f_substr -v tagn "$DIALOG_MENU_TAGS" $index 1
echo "'$tagn' '$media_options'"
index=$(( $index + 1 ))
done
)

View File

@ -441,7 +441,7 @@ f_dialog_menu_nameservers()
for ns in $nameservers; do
[ $index -lt ${#DIALOG_MENU_TAGS} ] || break
tag=$( f_substr "$DIALOG_MENU_TAGS" $index 1 )
f_substr -v tag "$DIALOG_MENU_TAGS" $index 1
echo "'$tag nameserver' '$ns'"
index=$(( $index + 1 ))
done