Skip to content

Commit

Permalink
bug in setting line width: _Dbg_linewidth -> _Dbg_set_linewidth
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky committed May 13, 2011
1 parent 7c6d53c commit 6ba69e0
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion command/set.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# If yes, always show. If auto, show only if the same line is to be run
# but the command is different.

typeset -i _Dbg_linewidth; _Dbg_linewidth=${COLUMNS:-80}
typeset -i _Dbg_set_linewidth; _Dbg_set_linewidth=${COLUMNS:-80}
typeset -i _Dbg_linetrace_expand=0 # expand variables in linetrace output
typeset -f _Dbg_linetrace_delay=0 # sleep after linetrace

Expand Down
2 changes: 1 addition & 1 deletion command/set_sub/width.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ typeset -i _Dbg_set_linewidth; _Dbg_set_linewidth=${COLUMNS:-80}

_Dbg_do_set_width() {
if [[ $1 == [0-9]* ]] ; then
_Dbg_write_journal_eval "_Dbg_linewidth=$1"
_Dbg_write_journal_eval "_Dbg_set_linewidth=$1"
else
_Dbg_msg "Integer argument expected; got: $1"
return 1
Expand Down
1 change: 1 addition & 0 deletions lib/frame.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ _Dbg_frame_save_frames() {
# Frame_t -a ._Dbg_frame_stack gives SEGV
while((--.level>=0)); do
((.sh.level = .level))
.fn+=("${.sh.fun}")
.files+=("${.sh.file}")
.linenos+=(${.sh.lineno}) # optimization bug unless done this way
.fns+=($0)
Expand Down
2 changes: 1 addition & 1 deletion lib/list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ _Dbg_list_columns() {
msg=_Dbg_msg
fi
(($# != 0)) && return 1
typeset -a columnized=(); columnize $to_do $_Dbg_linewidth "$colsep"
typeset -a columnized=(); columnize $to_do $_Dbg_set_linewidth "$colsep"
typeset -i i
for ((i=0; i<${#columnized[@]}; i++)) ; do
$msg " ${columnized[i]}"
Expand Down
2 changes: 1 addition & 1 deletion test/data/setshow.cmd
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
set trace-commands on
# Test of miscellaneous commands:
# 'source', 'info args', 'show args', 'show warranty', 'show copying', etc.
set width 80
#### Invalid commands...
show badcommand
another-bad-command
#### *** GNU things...
# show warranty
show copying
set width 80
show
#### and show...
show args
Expand Down
2 changes: 1 addition & 1 deletion test/data/setshow.right
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
set -xv
+# Test of miscellaneous commands:
+# 'source', 'info args', 'show args', 'show warranty', 'show copying', etc.
+set width 80
+#### Invalid commands...
+show badcommand
** Unknown show subcommand: badcommand
Expand Down Expand Up @@ -272,7 +273,6 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

+set width 80
+show
annotate : Annotation_level is 0.
args : Argument list to give script when debugged program starts is:
Expand Down

0 comments on commit 6ba69e0

Please sign in to comment.