bsdconfig: Comments
My current style is to copy C for "/* NOTREACHED */" instead of spelling out "Not reached". Make this one nominal change in this one file and the others later. While here, word-smith "Preload" into "Pre-load" as I believe that to be more grammatically correct in this instance. Also while here, fix a comment capitalization error. Lastly, bump copyright for above changes.
This commit is contained in:
parent
15575aca87
commit
1c64959bff
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2012 Ron McDowell
|
# Copyright (c) 2012 Ron McDowell
|
||||||
# Copyright (c) 2012-2014 Devin Teske
|
# Copyright (c) 2012-2021 Devin Teske
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@ -132,7 +132,7 @@ usage()
|
|||||||
#
|
#
|
||||||
local x=$longest_cmd ncols=1
|
local x=$longest_cmd ncols=1
|
||||||
x=$(( $x + 8 )) # Accommodate leading tab character
|
x=$(( $x + 8 )) # Accommodate leading tab character
|
||||||
x=$(( $x + 3 + $longest_cmd )) # Preload end of next column
|
x=$(( $x + 3 + $longest_cmd )) # Pre-load end of next column
|
||||||
while [ $x -lt $max_width ]; do
|
while [ $x -lt $max_width ]; do
|
||||||
ncols=$(( $ncols + 1 ))
|
ncols=$(( $ncols + 1 ))
|
||||||
x=$(( $x + 3 + $longest_cmd ))
|
x=$(( $x + 3 + $longest_cmd ))
|
||||||
@ -176,7 +176,7 @@ usage()
|
|||||||
"PROGRAM_NAME" "$pgm" \
|
"PROGRAM_NAME" "$pgm" \
|
||||||
"COMMAND_LIST" "$cmd_list"
|
"COMMAND_LIST" "$cmd_list"
|
||||||
|
|
||||||
# Never reached
|
# NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
# dialog_menu_main
|
# dialog_menu_main
|
||||||
@ -365,7 +365,7 @@ if [ "$1" ]; then
|
|||||||
#
|
#
|
||||||
case "$1" in -help|--help|-\?)
|
case "$1" in -help|--help|-\?)
|
||||||
usage
|
usage
|
||||||
# Not reached
|
# NOTREACHED
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -375,16 +375,16 @@ if [ "$1" ]; then
|
|||||||
if ! { indexfile=$( f_index_file "$1" ) &&
|
if ! { indexfile=$( f_index_file "$1" ) &&
|
||||||
cmd=$( f_index_menusel_command "$indexfile" "$1" )
|
cmd=$( f_index_menusel_command "$indexfile" "$1" )
|
||||||
}; then
|
}; then
|
||||||
# no matches, display usage (which shows valid keywords)
|
# No matches, display usage (which shows valid keywords)
|
||||||
f_err "%s: %s: $msg_not_found\n" "$pgm" "$1"
|
f_err "%s: %s: $msg_not_found\n" "$pgm" "$1"
|
||||||
usage
|
usage
|
||||||
# Not reached
|
# NOTREACHED
|
||||||
fi
|
fi
|
||||||
|
|
||||||
f_dprintf "cmd=[%s] *=[%s]" "$cmd" "$*"
|
f_dprintf "cmd=[%s] *=[%s]" "$cmd" "$*"
|
||||||
shift
|
shift
|
||||||
exec $cmd ${USE_XDIALOG:+-X} "$@" || exit 1
|
exec $cmd ${USE_XDIALOG:+-X} "$@" || exit 1
|
||||||
# Not reached
|
# NOTREACHED
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user