Alphabetized lv_api_do functions
This commit is contained in:
parent
fe078c2598
commit
3825d6594b
48
qq2clone
48
qq2clone
|
@ -130,25 +130,18 @@ return 0
|
||||||
#-------------------#
|
#-------------------#
|
||||||
|
|
||||||
#=========================================================================#
|
#=========================================================================#
|
||||||
lv_api_do_open ()
|
lv_api_do_close ()
|
||||||
# DESCRIPTION: Open lv_api_do in background
|
# DESCRIPTION: Tell lv_api_do to exit and close the extra pipe
|
||||||
# INPUT: None
|
# INPUT: None
|
||||||
# OUTPUT: Return 0 on success, exit on failure
|
# OUTPUT: None
|
||||||
# PARAMETERS: None
|
# PARAMETERS: None
|
||||||
#=========================================================================#
|
#=========================================================================#
|
||||||
{
|
{
|
||||||
declare -g lv_api_temp;
|
echo "exit" >&4
|
||||||
lv_api_temp="$(mktemp -d )" || temp_error
|
exec 4>&-
|
||||||
mkfifo "${lv_api_temp}/lv_api_do_fifo" || fifo_error
|
exec 4<&-
|
||||||
exec 4<>"${lv_api_temp}/lv_api_do_fifo"
|
rm -rf "${lv_api_temp:?}"
|
||||||
${QQ2_DIR}/lv_api_do <&4 >&3 2>/dev/null &
|
return 0
|
||||||
|
|
||||||
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
|
|
||||||
}
|
}
|
||||||
#=========================================================================#
|
#=========================================================================#
|
||||||
lv_api_do_comm ()
|
lv_api_do_comm ()
|
||||||
|
@ -181,18 +174,25 @@ done
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
#=========================================================================#
|
#=========================================================================#
|
||||||
lv_api_do_close ()
|
lv_api_do_open ()
|
||||||
# DESCRIPTION: Tell lv_api_do to exit and close the extra pipe
|
# DESCRIPTION: Open lv_api_do in background
|
||||||
# INPUT: None
|
# INPUT: None
|
||||||
# OUTPUT: None
|
# OUTPUT: Return 0 on success, exit on failure
|
||||||
# PARAMETERS: None
|
# PARAMETERS: None
|
||||||
#=========================================================================#
|
#=========================================================================#
|
||||||
{
|
{
|
||||||
echo "exit" >&4
|
declare -g lv_api_temp;
|
||||||
exec 4>&-
|
lv_api_temp="$(mktemp -d )" || temp_error
|
||||||
exec 4<&-
|
mkfifo "${lv_api_temp}/lv_api_do_fifo" || fifo_error
|
||||||
rm -rf "${lv_api_temp:?}"
|
exec 4<>"${lv_api_temp}/lv_api_do_fifo"
|
||||||
return 0
|
${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 ()
|
seq_intersection ()
|
||||||
# DESCRIPTION: Echo the intersection of two integer sets
|
# DESCRIPTION: Echo the intersection of two integer sets
|
||||||
# INPUT: Two space delimited 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
|
# ascending
|
||||||
# PARAMETERS: $1, $2: Integer sets
|
# PARAMETERS: $1, $2: Integer sets
|
||||||
#=========================================================================#
|
#=========================================================================#
|
||||||
|
|
Loading…
Reference in New Issue