Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qq542vev committed Nov 27, 2022
1 parent 48cb423 commit 5441380
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 42 deletions.
14 changes: 6 additions & 8 deletions includefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,13 @@ eval "$(getoptions parser_definition parse "${0}")"
parse ${@+"${@}"}
eval "set -- ${REST}"

case "${#}" in
'0')
cat <<-__EOF__ >&2
${0##*/}: 引数が不足しています。
詳細については '${0##*/} --help' を実行してください。
__EOF__
case "${#}" in '0')
cat <<-__EOF__ >&2
${0##*/}: 引数が不足しています。
詳細については '${0##*/} --help' を実行してください。
__EOF__

end_call "${EX_USAGE}"
;;
end_call "${EX_USAGE}"
esac

output="${1}"
Expand Down
12 changes: 4 additions & 8 deletions source/.w3mplus/bin/htmlframe
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,9 @@ for uri in ${@+"${@}"}; do
eval "name=\${n${i}-}"
eval "ftitle=\${t${i}-}"

case "${name}" in
?*)
eval export '"FRAME${i}_NAME=${name}"'
nameAttr=" name=\"${name}\""
;;
case "${name}" in ?*)
eval export '"FRAME${i}_NAME=${name}"'
nameAttr=" name=\"${name}\""
esac

case "${ftitle}" in
Expand All @@ -195,8 +193,6 @@ export 'ATTRIBUTES' 'HEAD_CONTENT' 'TITLE' 'W3MPLUS_TEMPLATE_FRAMESET'
frameset="<frameset${ATTRIBUTES}>${frame-}<noframes><body><p>The frame cannot be displayed on your Web browser.</p><p>Please enable HTML Frame.</p><p>Frame page list</p><ul>${list-}</ul></body></noframes></frameset>"

case "${W3MPLUS_TEMPLATE_FRAMESET-}" in
'')
printf '<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>%s</title>%s</head>%s</html>' "${TITLE}" "${HEAD_CONTENT}" "${frameset}"
;;
'') printf '<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>%s</title>%s</head>%s</html>' "${TITLE}" "${HEAD_CONTENT}" "${frameset}";;
*) sh -c "${W3MPLUS_FRAMESET_PROGRAM} \${@+\"\${@}\"}" 'sh' ${@+"${@}"};;
esac
24 changes: 9 additions & 15 deletions source/.w3mplus/bin/popuri
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,13 @@ fi
tmpDir=$(mktemp -d)

# 引数の個数が過大である
case "${#}" in
[!0])
cat <<-__EOF__ >&2
${0##*/}: 引数が過大です。
詳細については '${0##*/} --help' を実行してください。
__EOF__

end_call "${EX_USAGE}"
;;
case "${#}" in [!0])
cat <<-__EOF__ >&2
${0##*/}: 引数が過大です。
詳細については '${0##*/} --help' を実行してください。
__EOF__

end_call "${EX_USAGE}"
esac

case "${timeout}" in
Expand Down Expand Up @@ -240,9 +238,7 @@ case "${number}" in
;;
esac
;;
'+'*)
number=$((number))
;;
'+'*) number=$((number));;
'-'*)
number=$((lineCount + number + 2))

Expand All @@ -261,9 +257,7 @@ case "${number}" in
esac

case "${count}" in
'+0')
count="${lineCount}"
;;
'+0') count="${lineCount}";;
'+'*)
if [ "${number}" -lt '1' ]; then
number='1'
Expand Down
8 changes: 3 additions & 5 deletions source/.w3mplus/bin/psrelative
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,9 @@ eval "$(getoptions parser_definition parse "${0}")"
parse ${@+"${@}"}
eval "set -- ${REST}"

case "${#}" in
'0')
ps -A -o "${output}"
exit
;;
case "${#}" in '0')
ps -A -o "${output}"
exit
esac

axes="${1}"
Expand Down
8 changes: 3 additions & 5 deletions source/.w3mplus/bin/setquickmark
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,9 @@ elif [ '!' -r "${config}" ]; then
end_call "${EX_NOINPUT}"
fi

case "${#}" in
'0')
sh -c "${VISUAL:-${EDITOR:-vi --}} \"\${1}\"" 'sh' "${config}"
exit
;;
case "${#}" in '0')
sh -c "${VISUAL:-${EDITOR:-vi --}} \"\${1}\"" 'sh' "${config}"
exit
esac

awkv_escape 'key' "${1}"
Expand Down
2 changes: 1 addition & 1 deletion source/.w3mplus/bin/w3maction
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ action="${1}"
variableName="${2}"
shift 2

if regex_match "${variableName}" '^[_A-Za-z][_0-9A-Za-z]*$'; then :; else
if ! regex_match "${variableName}" '^[_A-Za-z][_0-9A-Za-z]*$'; then
cat <<-__EOF__ >&2
${0##*/}: '${variableName}' -- VARIABLE_NAME の値が不正です。
詳細については '${0##*/} --help' を実行してください。
Expand Down

0 comments on commit 5441380

Please sign in to comment.