Alphabetized lv_api_do functions

This commit is contained in:
Jesse Gardner 2021-03-22 19:29:18 -07:00
parent fe078c2598
commit 3825d6594b
1 changed files with 24 additions and 24 deletions

View File

@ -130,25 +130,18 @@ return 0
#-------------------#
#=========================================================================#
lv_api_do_open ()
# DESCRIPTION: Open lv_api_do in background
lv_api_do_close ()
# DESCRIPTION: Tell lv_api_do to exit and close the extra pipe
# INPUT: None
# OUTPUT: Return 0 on success, exit on failure
# OUTPUT: None
# PARAMETERS: None
#=========================================================================#
{
declare -g lv_api_temp;
lv_api_temp="$(mktemp -d )" || temp_error
mkfifo "${lv_api_temp}/lv_api_do_fifo" || fifo_error
exec 4<>"${lv_api_temp}/lv_api_do_fifo"
${QQ2_DIR}/lv_api_do <&4 >&3 2>/dev/null &
local check
read -r check <&3
[[ "$check" == "$CONN_BAD" ]] && lv_api_do_bad_conn
[[ "$check" == "$CONN_GOOD" ]] || unexpected_error lv_api_do_open
return 0
echo "exit" >&4
exec 4>&-
exec 4<&-
rm -rf "${lv_api_temp:?}"
return 0
}
#=========================================================================#
lv_api_do_comm ()
@ -181,18 +174,25 @@ done
return 0
}
#=========================================================================#
lv_api_do_close ()
# DESCRIPTION: Tell lv_api_do to exit and close the extra pipe
lv_api_do_open ()
# DESCRIPTION: Open lv_api_do in background
# INPUT: None
# OUTPUT: None
# OUTPUT: Return 0 on success, exit on failure
# PARAMETERS: None
#=========================================================================#
{
echo "exit" >&4
exec 4>&-
exec 4<&-
rm -rf "${lv_api_temp:?}"
return 0
declare -g lv_api_temp;
lv_api_temp="$(mktemp -d )" || temp_error
mkfifo "${lv_api_temp}/lv_api_do_fifo" || fifo_error
exec 4<>"${lv_api_temp}/lv_api_do_fifo"
${QQ2_DIR}/lv_api_do <&4 >&3 2>/dev/null &
local check
read -r check <&3
[[ "$check" == "$CONN_BAD" ]] && lv_api_do_bad_conn
[[ "$check" == "$CONN_GOOD" ]] || unexpected_error lv_api_do_open
return 0
}
#-------------------------------------------#
@ -2964,7 +2964,7 @@ return 0
seq_intersection ()
# DESCRIPTION: Echo the intersection of two integer sets
# INPUT: Two space delimited integer sets
# OUTPUT: The intersection of the two sets, space delimited, ordered
# OUTPUT: The intersection of the two sets, space delimited, ordered
# ascending
# PARAMETERS: $1, $2: Integer sets
#=========================================================================#