<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>acinclude.m4</filename>
    </added>
    <added>
      <filename>command/eval.sh</filename>
    </added>
    <added>
      <filename>lib/set-d-vars.sh</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -42,6 +42,12 @@ else
   done
 fi
 
+# Get the fully expanded name of pkgdatadir. This is used in kshdb.in
+# and dbg-main.sh.in and for installing debugger files.
+
+pkgdatadir=$datadir/zshdb
+AC_SUBST_DIR(PKGDATADIR, $pkgdatadir)
+
 AM_MISSING_PROG(GIT2CL, git2cl, $missing_dir)
 AC_PROG_LN_S
 AC_PATH_PROG(RM, rm, true)</diff>
      <filename>configure.ac</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,39 @@ if [[ -z &quot;$.sh.level}&quot; ]] ; then
   exit 2
 fi
 
-_Dbg_libdir='.'
+# This routine gets called via the -c or --command option and its sole
+# purpose is to capture the command string such as via &quot;x $*&quot; or 
+# in a traceback (&quot;where&quot;).
+function bashdb_eval {
+  eval $*  # Type: &quot;x $*&quot; to see what's being run.
+}
+
+typeset -a _Dbg_script_args=(&quot;$@&quot;)
+
+# Equivalent to basename $0; the short program name
+typeset _Dbg_pname=${0##*/}  
+
+typeset prefix=@prefix@
+typeset _Dbg_libdir=@PKGDATADIR@
+
+# Parse just the libdir option
+typeset -i i
+for ((i=0; $i&lt;${#_Dbg_script_args[@]}-1; i++)) ; do 
+    typeset arg=${_Dbg_script_args[$i]}
+    if [[ $arg == '-L' || $arg == '--libdir' ]] ; then
+	((i++))
+	_Dbg_libdir=&quot;${_Dbg_script_args[$i]}&quot;
+	break
+    fi
+done
+if [[ ! -d $_Dbg_libdir ]] &amp;&amp; [[ ! -d $_Dbg_libdir ]] ; then 
+  echo &quot;${_Dbg_pname}: Can't read debugger library directory '${_Dbg_libdir}'.&quot;
+  echo &quot;${_Dbg_pname}: Perhaps kshdb is installed wrong (if its installed).&quot; &gt;&amp;2
+  echo &quot;${_Dbg_pname}: Try running kshdb using -L (with a different directory).&quot; &gt;&amp;2
+  echo &quot;${_Dbg_pname}: Run kshdb --help for a list and explanation of options.&quot; &gt;&amp;2
+  exit 1
+fi
+
 . ${_Dbg_libdir}/dbg-main.sh
 
 # Note that this is called via kshdb rather than &quot;ksh --debugger&quot; or kshdb-trace</diff>
      <filename>kshdb.in</filename>
    </modified>
    <modified>
      <diff>@@ -118,12 +118,12 @@ if [[ $0 == *columnize.sh ]] ; then
 	unset columnized
 	typeset columns
 	typeset columnized
-	if [[ -n $KSH_VERSION ]] ; then
-	    columnize columns &quot;$@&quot;
-	    columized=columns
-	else
+# 	if [[ -n $KSH_VERSION ]] ; then
+# 	    columnize columns &quot;$@&quot;
+# 	    columized=columns
+# 	else
 	    columnize &quot;$@&quot;
-	fi
+#	fi
 	typeset -i i
 	echo '==============='
 	for ((i=0; i&lt;${#columnized[@]}; i++)) ; do </diff>
      <filename>lib/columnize.sh</filename>
    </modified>
    <modified>
      <diff>@@ -136,11 +136,11 @@ _Dbg_onecmd() {
 	  _Dbg_last_cmd='down'
 	  ;;
 
-# 	# evaluate as bash command
-# 	e | ev | eva | eval )
-# 	  _Dbg_do_eval $@
-# 	  _Dbg_last_cmd='eval'
-# 	  ;;
+	# evaluate as bash command
+	e | ev | eva | eval )
+	  _Dbg_do_eval $@
+	  _Dbg_last_cmd='eval'
+	  ;;
 
 	#  Set stack frame
 	fr | fra | fra | frame )
@@ -152,11 +152,11 @@ _Dbg_onecmd() {
 	help )
 	  _Dbg_do_help $args ;;
 
-# 	# print globbed or substituted variables
-# 	p | pr | pri | prin | print )
-# 	  _Dbg_do_print &quot;$args&quot;
-# 	  _Dbg_last_cmd='print'
-# 	  ;;
+	# print globbed or substituted variables
+	p | pr | pri | prin | print )
+	  _Dbg_do_print &quot;$args&quot;
+	  _Dbg_last_cmd='print'
+	  ;;
 
 	# quit
 	quit )</diff>
      <filename>lib/processor.sh</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f4cf1c47d2a5bdb2510ad2829f680c8caed6ab77</id>
    </parent>
  </parents>
  <author>
    <name>R. Bernstein</name>
    <email>rocky@gnu.org</email>
  </author>
  <url>http://github.com/rocky/kshdb/commit/ed02a5f17b09aa1e603cd283b34b092b94ac6b71</url>
  <id>ed02a5f17b09aa1e603cd283b34b092b94ac6b71</id>
  <committed-date>2008-08-14T08:28:25-07:00</committed-date>
  <authored-date>2008-08-14T08:28:25-07:00</authored-date>
  <message>Add print and eval. Parse -L and --library in kshdb.</message>
  <tree>2c9df061fd5259aeb13c2239ca04e80128d3757f</tree>
  <committer>
    <name>R. Bernstein</name>
    <email>rocky@gnu.org</email>
  </committer>
</commit>
