Skip to content

Commit b0b97d5

Browse files
committed
update release
1 parent 354327b commit b0b97d5

40 files changed

+559
-750
lines changed

includefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ eval "set -- ${REST}"
6767

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

75-
endCall "${EX_USAGE}"
75+
end_call "${EX_USAGE}"
7676
;;
7777
esac
7878

@@ -82,7 +82,7 @@ shift
8282
mkdir -p "${output}"
8383

8484
includeShellscript=$(
85-
cat <<-'EOF'
85+
cat <<-'__EOF__'
8686
BEGIN {
8787
for(i = 1; i < ARGC; i++) {
8888
read_file(ARGV[i])
@@ -129,11 +129,11 @@ includeShellscript=$(
129129
130130
close(file)
131131
}
132-
EOF
132+
__EOF__
133133
)
134134

135135
includeAwkscript=$(
136-
cat <<-'EOF'
136+
cat <<-'__EOF__'
137137
BEGIN {
138138
split("", include)
139139
@@ -189,20 +189,20 @@ includeAwkscript=$(
189189
190190
close(file)
191191
}
192-
EOF
192+
__EOF__
193193
)
194194

195195
for file in ${@+"${@}"}; do
196196
if [ '!' -f "${file}" ]; then
197-
cat <<-EOF >&2
197+
cat <<-__EOF__ >&2
198198
${0##*/}: '${file}' は通常ファイルではありません。
199-
EOF
199+
__EOF__
200200

201201
continue
202202
elif [ '!' -r "${file}" ]; then
203-
cat <<-EOF >&2
203+
cat <<-__EOF__ >&2
204204
${0##*/}: '${file}' の読み込み許可がありません。
205-
EOF
205+
__EOF__
206206

207207
continue
208208
fi

release/.w3mplus/bin/cgi-bin/protectionpage

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,14 @@ readonly 'EX_CONFIG=78' # configuration error
5555

5656
readonly 'EX__MAX=78' # maximum listed value
5757

58-
trap 'case "${?}" in 0) endCall;; *) endCall "${EX_SOFTWARE}";; esac' 0 # EXIT
59-
trap 'endCall 129' 1 # SIGHUP
60-
trap 'endCall 130' 2 # SIGINT
61-
trap 'endCall 131' 3 # SIGQUIT
62-
trap 'endCall 143' 15 # SIGTERM
58+
trap 'case "${?}" in 0) end_call;; *) end_call "${EX_SOFTWARE}";; esac' 0 # EXIT
59+
trap 'end_call 129' 1 # SIGHUP
60+
trap 'end_call 130' 2 # SIGINT
61+
trap 'end_call 131' 3 # SIGQUIT
62+
trap 'end_call 143' 15 # SIGTERM
6363

64-
endCall() {
64+
65+
end_call() {
6566
trap '' 0 # EXIT
6667
rm -fr -- ${tmpDir:+"${tmpDir}"}
6768
exit "${1:-0}"
@@ -306,12 +307,12 @@ case "${query_category-}" in
306307
;;
307308
esac
308309

309-
printhtml --title 'Forbidden Site' -- - <<-EOF | httpresponse -H 'Content-Type: text/html; charset=UTF-8' -- -
310+
printhtml --title 'Forbidden Site' -- - <<-__EOF__ | httpresponse -H 'Content-Type: text/html; charset=UTF-8' -- -
310311
<h1>${title}</h1>
311312
312313
<p>This Web page at <a href="${url}">${url}</a> has been blocked based on <a href="${source}">${name}</a></p>
313314
314315
${message}
315316
316317
<p>To access this web page, change <a href="about:permissions">about:permissions</a> settings.</p>
317-
EOF
318+
__EOF__

release/.w3mplus/bin/cgi-bin/viewsource

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,14 @@ readonly 'EX_CONFIG=78' # configuration error
5454

5555
readonly 'EX__MAX=78' # maximum listed value
5656

57-
trap 'case "${?}" in 0) endCall;; *) endCall "${EX_SOFTWARE}";; esac' 0 # EXIT
58-
trap 'endCall 129' 1 # SIGHUP
59-
trap 'endCall 130' 2 # SIGINT
60-
trap 'endCall 131' 3 # SIGQUIT
61-
trap 'endCall 143' 15 # SIGTERM
57+
trap 'case "${?}" in 0) end_call;; *) end_call "${EX_SOFTWARE}";; esac' 0 # EXIT
58+
trap 'end_call 129' 1 # SIGHUP
59+
trap 'end_call 130' 2 # SIGINT
60+
trap 'end_call 131' 3 # SIGQUIT
61+
trap 'end_call 143' 15 # SIGTERM
6262

63-
endCall() {
63+
64+
end_call() {
6465
trap '' 0 # EXIT
6566
rm -fr -- ${tmpDir:+"${tmpDir}"}
6667
exit "${1:-0}"
@@ -257,7 +258,7 @@ if uricheck --field '' -- "${url}"; then
257258
-H 'W3m-control: DEL_PREBUF' \
258259
-H 'W3m-control: VIEW'
259260
else
260-
httpresponse -H 'Content-type: text/palin; charset=UTF-8' - <<-EOF
261+
httpresponse -H 'Content-type: text/palin; charset=UTF-8' - <<-__EOF__
261262
'${url}' is not URL.
262-
EOF
263+
__EOF__
263264
fi

release/.w3mplus/bin/cgi-bin/w3mplus

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,14 @@ readonly 'EX_CONFIG=78' # configuration error
9292

9393
readonly 'EX__MAX=78' # maximum listed value
9494

95-
trap 'case "${?}" in 0) endCall;; *) endCall "${EX_SOFTWARE}";; esac' 0 # EXIT
96-
trap 'endCall 129' 1 # SIGHUP
97-
trap 'endCall 130' 2 # SIGINT
98-
trap 'endCall 131' 3 # SIGQUIT
99-
trap 'endCall 143' 15 # SIGTERM
95+
trap 'case "${?}" in 0) end_call;; *) end_call "${EX_SOFTWARE}";; esac' 0 # EXIT
96+
trap 'end_call 129' 1 # SIGHUP
97+
trap 'end_call 130' 2 # SIGINT
98+
trap 'end_call 131' 3 # SIGQUIT
99+
trap 'end_call 143' 15 # SIGTERM
100100

101-
endCall() {
101+
102+
end_call() {
102103
trap '' 0 # EXIT
103104
rm -fr -- ${tmpDir:+"${tmpDir}"}
104105
exit "${1:-0}"
@@ -128,7 +129,6 @@ singlequote_escape() {
128129

129130

130131

131-
132132
abspath() {
133133
case "${2}" in
134134
'/'*) set -- "${1}" "${2}/" '' ;;
@@ -146,6 +146,7 @@ abspath() {
146146
eval "${1}=\"/\${3#/}\""
147147
}
148148

149+
149150
path_to_fileurl() {
150151
abspath "${1}" "${2}"
151152

@@ -338,15 +339,15 @@ add_printtmp() {
338339
}
339340

340341
error_meesage() {
341-
httpresponse --status-line 'HTTP/1.1 500 Internal Server Error' -H 'Content-Type: text/plain; charset=UTF-8' -- - <<-EOF
342+
httpresponse --status-line 'HTTP/1.1 500 Internal Server Error' -H 'Content-Type: text/plain; charset=UTF-8' -- - <<-__EOF__
342343
An unexpected error occurred during request processing.
343344
344345
345346
$(cat -- ${@+"${@}"})
346347
347348
348349
$(env)
349-
EOF
350+
__EOF__
350351
}
351352

352353
expand() {
@@ -373,12 +374,12 @@ case "${W3MPLUS_DEBUGMODE}" in
373374
0)
374375
exec 1>&3 2>&4 3>&- 4>&-
375376
cat -- "${tmpDir}/stdout"
376-
endCall 0
377+
end_call 0
377378
;;
378379
*)
379380
exec 1>&3 2>&4 3>&- 4>&-
380381
error_meesage "${tmpDir}/stderr"
381-
endCall "${EX_SOFTWARE}"
382+
end_call "${EX_SOFTWARE}"
382383
;;
383384
esac
384385
' 0 # EXIT
@@ -398,9 +399,9 @@ if [ -f "${W3MPLUS_PASS_FILE}" ] && [ "${W3MPLUS_PASS_VALUE}" '!=' "$(cat -- "${
398399
httpresponse \
399400
--status-line 'HTTP/1.1 400 Bad Request' \
400401
-H 'Content-Type: text/plain; charset=UTF-8' \
401-
-- - <<-'EOF'
402+
-- - <<-'__EOF__'
402403
The value of 'pass' is invalid.
403-
EOF
404+
__EOF__
404405

405406
exit
406407
fi
@@ -496,9 +497,9 @@ case "${query_action-}" in
496497

497498
query_subaction='goto'
498499
commandArg="${commandArg}$(
499-
cat <<-'EOF'
500+
cat <<-'__EOF__'
500501
-- incrementuri ${query_number+--number "'${query_number}'"}
501-
EOF
502+
__EOF__
502503
)"
503504
;;
504505
'parent-uripath')
@@ -508,9 +509,9 @@ case "${query_action-}" in
508509

509510
query_subaction='goto'
510511
commandArg="${commandArg}$(
511-
cat <<-'EOF'
512+
cat <<-'__EOF__'
512513
-- parenturipath ${query_number+--number "'${query_number}'"}
513-
EOF
514+
__EOF__
514515
)"
515516
;;
516517
'redirect')
@@ -522,9 +523,9 @@ case "${query_action-}" in
522523
pass=$(printf '%s' "${W3MPLUS_PASS_VALUE}" | urlencode)
523524
path_to_fileurl 'filepath' "${SCRIPT_NAME}"
524525
commandArg="${commandArg}$(
525-
cat <<-'EOF'
526+
cat <<-'__EOF__'
526527
-- printf "'%s%s'" "'${query_redirect-${filepath}?pass=${pass}&action=search&tab=del-prebuf&query=}'" '"$(urlencode)"'
527-
EOF
528+
__EOF__
528529
)"
529530
;;
530531
esac
@@ -594,7 +595,7 @@ case "${query_action-}" in
594595
;;
595596
'get-url-mark' | 'get-url-mark-line-begin')
596597
awkScript=$(
597-
cat <<-'EOF'
598+
cat <<-'__EOF__'
598599
BEGIN {
599600
FS = "\t"
600601
}
@@ -605,7 +606,7 @@ case "${query_action-}" in
605606
606607
printf("%s\t%s\t\t\t%s\n", uri, line, (moveURL == "" ? "" : "GOTO " moveURL $3))
607608
}
608-
EOF
609+
__EOF__
609610
)
610611

611612
case "${query_action}" in
@@ -871,7 +872,7 @@ case "${query_action-}" in
871872
;;
872873
'show-search-history')
873874
awkScript=$(
874-
cat <<-'EOF'
875+
cat <<-'__EOF__'
875876
876877
877878
@@ -1060,7 +1061,7 @@ case "${query_action-}" in
10601061
END {
10611062
printf("</samp></pre>")
10621063
}
1063-
EOF
1064+
__EOF__
10641065
)
10651066
pass=$(printf '%s' "${W3MPLUS_PASS_VALUE}" | urlencode)
10661067
path_to_fileurl 'filepath' "${SCRIPT_NAME}"
@@ -1218,7 +1219,7 @@ case "${query_action-}" in
12181219

12191220
printhtml \
12201221
--title 'Bad Request' \
1221-
-- - <<-EOF |
1222+
-- - <<-__EOF__ |
12221223
<dl>
12231224
<dt>about-uri</dt>
12241225
<dd>${filepath}?pass={PASS_VALUE}&amp;action=about-uri&amp;about={ABOUT_URI}</dd>
@@ -1352,7 +1353,7 @@ case "${query_action-}" in
13521353
<dt>zoom</dt>
13531354
<dd>${filepath}?pass={PASS_VALUE}&amp;action=zoom&amp;zoom={([+*/-] '=')? UNSIGNED_INTEGER}</dd>
13541355
</dl>
1355-
EOF
1356+
__EOF__
13561357
httpresponse \
13571358
--status-line 'HTTP/1.1 400 Bad Request' \
13581359
-H 'Content-Type: text/html; charset=UTF-8' \

release/.w3mplus/bin/changeconfig

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,14 @@ readonly 'EX_CONFIG=78' # configuration error
4343

4444
readonly 'EX__MAX=78' # maximum listed value
4545

46-
trap 'case "${?}" in 0) endCall;; *) endCall "${EX_SOFTWARE}";; esac' 0 # EXIT
47-
trap 'endCall 129' 1 # SIGHUP
48-
trap 'endCall 130' 2 # SIGINT
49-
trap 'endCall 131' 3 # SIGQUIT
50-
trap 'endCall 143' 15 # SIGTERM
46+
trap 'case "${?}" in 0) end_call;; *) end_call "${EX_SOFTWARE}";; esac' 0 # EXIT
47+
trap 'end_call 129' 1 # SIGHUP
48+
trap 'end_call 130' 2 # SIGINT
49+
trap 'end_call 131' 3 # SIGQUIT
50+
trap 'end_call 143' 15 # SIGTERM
5151

52-
endCall() {
52+
53+
end_call() {
5354
trap '' 0 # EXIT
5455
rm -fr -- ${tmpDir:+"${tmpDir}"}
5556
exit "${1:-0}"
@@ -61,7 +62,7 @@ option_error() {
6162
printf '%s: %s\n' "${0##*/}" "${1}" >&2
6263
printf '%s\n' "詳細については '${0##*/} --help' を実行してください。" >&2
6364

64-
endCall "${EX_USAGE}"
65+
end_call "${EX_USAGE}"
6566
}
6667

6768

@@ -107,6 +108,7 @@ append_array_posix() {
107108
done
108109
}
109110

111+
110112
__append_array_posix() {
111113
set "${1}" "${2-}" ''
112114

@@ -392,7 +394,7 @@ eval "set -- ${REST}"
392394

393395
tmpDir=$(mktemp -d)
394396
awkScript=$(
395-
cat <<-'EOF'
397+
cat <<-'__EOF__'
396398
BEGIN {
397399
split("", not)
398400
split("", param)
@@ -464,7 +466,7 @@ awkScript=$(
464466
printf("%s\n", $0)
465467
}
466468
}
467-
EOF
469+
__EOF__
468470
)
469471

470472
command='awk -v "max=${max}" -v "min=${min}" -- "${awkScript}" '"${param} --"

release/.w3mplus/bin/contextmenu

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,14 @@ readonly 'EX_CONFIG=78' # configuration error
4343

4444
readonly 'EX__MAX=78' # maximum listed value
4545

46-
trap 'case "${?}" in 0) endCall;; *) endCall "${EX_SOFTWARE}";; esac' 0 # EXIT
47-
trap 'endCall 129' 1 # SIGHUP
48-
trap 'endCall 130' 2 # SIGINT
49-
trap 'endCall 131' 3 # SIGQUIT
50-
trap 'endCall 143' 15 # SIGTERM
46+
trap 'case "${?}" in 0) end_call;; *) end_call "${EX_SOFTWARE}";; esac' 0 # EXIT
47+
trap 'end_call 129' 1 # SIGHUP
48+
trap 'end_call 130' 2 # SIGINT
49+
trap 'end_call 131' 3 # SIGQUIT
50+
trap 'end_call 143' 15 # SIGTERM
5151

52-
endCall() {
52+
53+
end_call() {
5354
trap '' 0 # EXIT
5455
rm -fr -- ${tmpDir:+"${tmpDir}"}
5556
exit "${1:-0}"

0 commit comments

Comments
 (0)