diff options
author | Jari Aalto <jari.aalto@cante.net> | 2005-12-07 14:08:12 +0000 |
---|---|---|
committer | Jari Aalto <jari.aalto@cante.net> | 2009-09-12 16:46:57 +0000 |
commit | 95732b497d12c98613bb3c5db16b61f377501a59 (patch) | |
tree | 5e1cdf79eb0407e09dca4c0ec29e11442c7d1d15 /examples | |
parent | eb87367179effbe5f430236db8259006d71438b7 (diff) | |
download | android_external_bash-95732b497d12c98613bb3c5db16b61f377501a59.tar.gz android_external_bash-95732b497d12c98613bb3c5db16b61f377501a59.tar.bz2 android_external_bash-95732b497d12c98613bb3c5db16b61f377501a59.zip |
Imported from ../bash-3.1.tar.gz.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/bashdb/README | 3 | ||||
-rwxr-xr-x | examples/bashdb/bashdb | 8 | ||||
-rw-r--r-- | examples/loadables/Makefile.in | 17 | ||||
-rw-r--r-- | examples/loadables/getconf.c | 2 | ||||
-rwxr-xr-x | examples/misc/aliasconv.bash | 2 |
5 files changed, 23 insertions, 9 deletions
diff --git a/examples/bashdb/README b/examples/bashdb/README new file mode 100644 index 0000000..2f643d1 --- /dev/null +++ b/examples/bashdb/README @@ -0,0 +1,3 @@ +This is a sample implementation of a bash debugger. It is not the same +as the project available from http://bashdb.sourceforge.net, and has been +deprecated in favor of that implementation. diff --git a/examples/bashdb/bashdb b/examples/bashdb/bashdb index 2bca9f9..560cb7c 100755 --- a/examples/bashdb/bashdb +++ b/examples/bashdb/bashdb @@ -509,11 +509,11 @@ function _showline fi if (( $line < 100 )); then - _msg "$_guineapig:$line $bp $cl${_lines[$line]}" + _msg "${_guineapig/*\//}:$line $bp $cl${_lines[$line]}" elif (( $line < 10 )); then - _msg "$_guineapig:$line $bp $cl${_lines[$line]}" + _msg "${_guineapig/*\//}:$line $bp $cl${_lines[$line]}" elif (( $line > 0 )); then - _msg "$_guineapig:$line $bp $cl${_lines[$line]}" + _msg "${_guineapig/*\//}:$line $bp $cl${_lines[$line]}" fi } @@ -564,7 +564,7 @@ let _trace=0 let _i=1 # Be careful about quoted newlines -_potbelliedpig=${TMPDIR-/tmp}/$_guineapig.$$ +_potbelliedpig=${TMPDIR-/tmp}/${_guineapig/*\//}.$$ sed 's,\\$,\\\\,' $_guineapig > $_potbelliedpig _msg "Reading source from file: $_guineapig" diff --git a/examples/loadables/Makefile.in b/examples/loadables/Makefile.in index 356baef..f6208f5 100644 --- a/examples/loadables/Makefile.in +++ b/examples/loadables/Makefile.in @@ -46,6 +46,17 @@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ DEFS = @DEFS@ LOCAL_DEFS = @LOCAL_DEFS@ +CPPFLAGS = @CPPFLAGS@ + +BASHINCDIR = ${topdir}/include + +LIBBUILD = ${BUILD_DIR}/lib + +INTL_LIBSRC = ${topdir}/lib/intl +INTL_BUILDDIR = ${LIBBUILD}/intl +INTL_INC = @INTL_INC@ +LIBINTL_H = @LIBINTL_H@ + CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CFLAGS) # @@ -63,8 +74,8 @@ SHOBJ_LIBS = @SHOBJ_LIBS@ SHOBJ_STATUS = @SHOBJ_STATUS@ INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \ - -I$(topdir)/include -I$(BUILD_DIR) -I$(BUILD_DIR)/lib \ - -I$(BUILD_DIR)/builtins + -I$(BASHINCDIR) -I$(BUILD_DIR) -I$(LIBBUILD) \ + -I$(BUILD_DIR)/builtins $(INTL_INC) .c.o: $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $< @@ -184,7 +195,7 @@ pushd.c: ${topdir}/builtins/pushd.def pushd.o: pushd.c $(RM) $@ - $(SHOBJ_CC) -DPUSHD_AND_POPD -DLOADABLE_BUILTIN $(SHOBJ_CFLAGS) $(CFLAGS) $(INC) -c -o $@ $< + $(SHOBJ_CC) -DHAVE_CONFIG_H -DPUSHD_AND_POPD -DLOADABLE_BUILTIN $(SHOBJ_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(INC) -c -o $@ $< pushd: pushd.o $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pushd.o $(SHOBJ_LIBS) diff --git a/examples/loadables/getconf.c b/examples/loadables/getconf.c index cc6d50b..0bf2079 100644 --- a/examples/loadables/getconf.c +++ b/examples/loadables/getconf.c @@ -1039,7 +1039,7 @@ static const struct conf_variable conf_table[] = #ifdef _PC_MAX_INPUT { "MAX_INPUT", PATHCONF, _PC_MAX_INPUT }, #endif -#ifdef _PC_NAMW_MAX +#ifdef _PC_NAME_MAX { "NAME_MAX", PATHCONF, _PC_NAME_MAX }, #endif #ifdef _PC_PATH_MAX diff --git a/examples/misc/aliasconv.bash b/examples/misc/aliasconv.bash index d3b5776..2245f06 100755 --- a/examples/misc/aliasconv.bash +++ b/examples/misc/aliasconv.bash @@ -22,7 +22,7 @@ mkalias () s/#/\#/g') echo $1 \(\) "{" command "$comm" "; }" ;; - *) echo alias ${1}=\'$(echo "${2}" | sed "s:':'\\\\'':")\' ;; + *) echo alias ${1}=\'$(echo "${2}" | sed "s:':'\\\\'':g")\' ;; esac } EOF |