commit bash-20120210 snapshot

This commit is contained in:
Chet Ramey
2012-03-05 21:15:51 -05:00
parent abe2eb5be8
commit 7f947b6872
15 changed files with 19234 additions and 37141 deletions
+23
View File
@@ -13310,3 +13310,26 @@ builtins/mkbuiltins.c
for function implementing a particular builtin to struct builtin
and to write document file name to `handle' member of struct builtin
- no longer writes separate helpfiles; that is left to gen-helpfiles
2/8
---
subst.c
- make sure last_command_exit_value is set to a non-zero value before
any calls to report_error, since `-e' set will short-circuit
report_error. Fixes bug reported by Ewan Mellor
<Ewan.Mellor@eu.citrix.com>
variables.c
- make_local_array_variable: added second argument; if non-zero,
function will return an existing local associative array variable
instead of insisting on an indexed array
variable.h,subst.c
- make_local_array_variable: changed prototype and caller
builtins/declare.def
- declare_internal: add second arg to call to make_local_array_variable;
making_array_special, which indicates we're processing an
assignment like declare a[b]=c. Fixes seg fault resulting from
a being an already-declared local associative array variable in a
function. Ubuntu bash bug 928900.
View File
+1
View File
@@ -687,6 +687,7 @@ examples/functions/login f
examples/functions/lowercase f
examples/functions/manpage f
examples/functions/mhfold f
examples/functions/newdirstack.bsh f
examples/functions/notify.bash f
examples/functions/pathfuncs f
examples/functions/recurse f
+5 -2
View File
@@ -1,5 +1,5 @@
@%:@! /bin/sh
@%:@ From configure.in for Bash 4.2, version 4.045.
@%:@ From configure.in for Bash 4.2, version 4.046.
@%:@ Guess values for system-dependent variables and create Makefiles.
@%:@ Generated by GNU Autoconf 2.68 for bash 4.2-maint.
@%:@
@@ -694,6 +694,7 @@ LDFLAGS
CFLAGS
CC
HELPSTRINGS
HELPFILES_TARGET
HELPINSTALL
HELPDIRDEFINE
HELPDIR
@@ -3291,7 +3292,7 @@ else
TESTSCRIPT=run-all
fi
HELPDIR= HELPDIRDEFINE= HELPINSTALL=
HELPDIR= HELPDIRDEFINE= HELPINSTALL= HELPFILES_TARGET=
if test "$opt_separate_help" != no; then
if test "$opt_separate_help" = "yes" ; then
HELPDIR='${datadir}/bash'
@@ -3300,6 +3301,7 @@ if test "$opt_separate_help" != no; then
fi
HELPDIRDEFINE='-H ${HELPDIR}'
HELPINSTALL='install-help'
HELPFILES_TARGET='helpdoc'
fi
HELPSTRINGS=
if test "$opt_single_longdoc_strings" != "yes"; then
@@ -3323,6 +3325,7 @@ fi
echo ""
echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}"
echo ""
+11864 -13905
View File
File diff suppressed because it is too large Load Diff
-60
View File
@@ -71,66 +71,6 @@
'_AM_COND_ELSE' => 1,
'AC_SUBST_TRACE' => 1
}
], 'Autom4te::Request' ),
bless( [
'1',
1,
[
'/sw/share/autoconf'
],
[
'/sw/share/autoconf/autoconf/autoconf.m4f',
'aclocal.m4',
'configure.in'
],
{
'_LT_AC_TAGCONFIG' => 1,
'AM_PROG_F77_C_O' => 1,
'AC_INIT' => 1,
'm4_pattern_forbid' => 1,
'_AM_COND_IF' => 1,
'AC_CANONICAL_TARGET' => 1,
'AC_SUBST' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'AC_FC_SRCEXT' => 1,
'AC_CANONICAL_HOST' => 1,
'AC_PROG_LIBTOOL' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'AC_CONFIG_LINKS' => 1,
'm4_sinclude' => 1,
'LT_SUPPORTED_TAG' => 1,
'AM_MAINTAINER_MODE' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'_m4_warn' => 1,
'AM_PROG_CXX_C_O' => 1,
'_AM_COND_ENDIF' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AC_CONFIG_FILES' => 1,
'include' => 1,
'LT_INIT' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_LIBSOURCE' => 1,
'AM_PROG_FC_C_O' => 1,
'AC_CANONICAL_BUILD' => 1,
'AC_FC_FREEFORM' => 1,
'AH_OUTPUT' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'sinclude' => 1,
'm4_pattern_allow' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_CANONICAL_SYSTEM' => 1,
'AM_CONDITIONAL' => 1,
'AC_CONFIG_HEADERS' => 1,
'AC_DEFINE_TRACE_LITERAL' => 1,
'm4_include' => 1,
'_AM_COND_ELSE' => 1,
'AC_SUBST_TRACE' => 1
}
], 'Autom4te::Request' )
);
+1544 -1541
View File
File diff suppressed because it is too large Load Diff
+1426 -2069
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -340,7 +340,7 @@ declare_internal (list, local_var)
if (flags_on & att_assoc)
var = make_local_assoc_variable (name);
else if ((flags_on & att_array) || making_array_special)
var = make_local_array_variable (name);
var = make_local_array_variable (name, making_array_special);
else
#endif
var = make_local_variable (name);
Vendored
+3772 -19557
View File
File diff suppressed because it is too large Load Diff
+421
View File
@@ -0,0 +1,421 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>help.case.edu</title>
<link rel="stylesheet" href="https://www.case.edu/its/stylesheet/cwru_header.css" type="text/css" media="screen" />
<link rel="stylesheet" href="https://www.case.edu/its/stylesheet/main_style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="http://www.case.edu/its/help/help_case.css" type="text/css" media="screen" />
<link rel="stylesheet" href="https://www.case.edu/launchpad/lib/gadgets.css" type="text/css" />
<link rel="stylesheet" href="http://www.case.edu/its/ourservices/ourservices.css" type="text/css" />
<!--<link rel="stylesheet" href="/its/training/training.css" type="text/css" />-->
<link rel="stylesheet" href="http://www.case.edu/its/training/css/service.css" type="text/css" />
<!-- Include Print CSS -->
<link rel="stylesheet" href="http://www.case.edu/its/help/print.css" type="text/css" media="print" />
<script type="text/javascript" src="http://www.case.edu/lib/jquery-prod.js"></script>
<script type="text/javascript" src="http://www.case.edu/lib/mdetect.js"></script>
<script type="text/javascript" src="http://www.case.edu/its/help/help.js"></script>
<script type="text/javascript" src="https://www.case.edu/google/igoogle/case/js/gadget_utils.js"></script>
<script type="text/javascript" src="http://www.case.edu/its/training/script/training.js"></script>
<script type="text/javascript" src="http://www.case.edu/its/ourservices/ourservices4.js"></script>
<script type="text/javascript" src="http://www.case.edu/its/js/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" href="http://www.case.edu/its/js/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
<script type="text/javascript" src="https://www.case.edu/google/igoogle/case/js/gcal.js"></script> <!-- for maintnance calendar -->
</head>
<body onload="init_help_home();">
<div id="cwruHeader">
<div id="cwruHeaderContent">
<div class="logo">
<a href="http://www.case.edu/"><img src="https://www.case.edu/its/images/cwru-logo.png" alt="cwru logo" name="logoImg" width="235" height="50" border="0" id="logoImg" /></a>
</div><!--end of logo-->
<div id="cwruMainNav">
<ul>
<li><a href="http://www.case.edu/">Home</a></li>
<li><a href="http://www.case.edu/apply.html">Apply</a></li>
<li><a href="http://giving.case.edu/">Give</a></li>
<li><a href="http://www.case.edu/visit/">Visit</a></li>
<li><a href="http://www.case.edu/dir/">Find</a></li>
</ul>
</div><!--end of cwruMainNav-->
<div class="cwruSearch">
<form action="http://www.google.com/cse" id="cse-search-box" target="_parent" name="searchForm" class="searchForm">
<input type="hidden" name="cx" value="013802920388319893419:7wtcwv_ppd8" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="30" value="search cwru..." onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;" />
<!--<input type="submit" name="sa" value="Search" />-->
<input type="image" name="sa" class="btn" src="https://www.case.edu/webdev/umc_test/images/searchIcon.jpg" />
</form>
</div><!--end of cwruSearch-->
<!--
<div class="cwruSearch">
<form action="http://www.google.com/u/cw" method="get" name="searchForm">
<input name="q" type="text" value="search cwru..." onfocus="if(!this._haschanged){this.value=''};this._haschanged=true;" />
<input name="sa" class="btn" src="https://www.case.edu/webdev/umc_test/images/searchIcon.jpg" type="image" />
</form>
</div>
-->
</div><!--end of cwruHeaderContent-->
</div><!--end of cwruHeader-->
<!--ITS header begins here-->
<div id="ITSSubheader">
<div id="ITSSubheaderHolder">
<div id="ITSSubheaderHolder2">
<div id="ITSSubheader_Pic1">
<a href="http://www.case.edu/its/newtocwru.html"><span class="ITSSubheader_PicLink">new to cwru</span></a>
</div>
<div id="ITSSubheader_Pic2">
<a href="http://www.case.edu/its/ourservices/"><span class="ITSSubheader_PicLink">our services</span></a>
</div>
<div id="ITSSubheader_Pic3">
<a href="http://help.case.edu/"><span class="ITSSubheader_PicLink">i need help</span></a>
</div>
<div id="ITSSubheader_Pic4">
<a href="http://www.case.edu/its/dashboard/servicestatus.html"><span class="ITSSubheader_PicLink">service status</span></a>
</div>
</div> <!--end of ITSSubheaderHolder2-->
</div><!--end of ITSSubheaderHolder-->
</div><!--end of ITSSubheader-->
<!--end of ITS header-->
<div id="ITSSubPrimaryTitle">
<div id="ITSSubHeaderHolder">
<div id="ITSSubPrimaryHeader_title">
<span>help.case.edu</span>
</div>
</div>
</div>
<div id="contentWrapper">
<div id="contentContainer">
<div class="contentMain">
<div class="contentAreaLeft">
<div id="helpcontact"><img src="http://www.case.edu/its/help/images/assistance.jpg" alt="help_by_phone" border="0"/></div>
<div id="helpdetails"><div id="hours"><a href="javascript:toggle_hours();">> See Hours / Locations </a></div><!--<div id="locations">MAP</div>-->
</div>
<div id="fullhours">
<div class="clearit"></div>
<h2>In-Person Assistance</h2>
<h3><a class="mappop" href="http://www.case.edu/google/gmaps/casegmap.html?bnum=3D57">Bellflower Care Center<img src="http://www.case.edu/its/help/images/mapicon.png" alt="" /></a></h3>
<p>11424 Bellflower Rd.<br/>Monday-Friday: 9am-10pm<br/>Saturday: 10am-4pm (August 15-May 15 only)</p>
<h3><a class="mappop" href="http://www.case.edu/google/gmaps/casegmap.html?bnum=4B01">Sears Care Center<img src="http://www.case.edu/its/help/images/mapicon.png" alt="" /></a></h3>
<p>Sears (Quad)<br/>Room 340 (Hallway between Sears & Nord)<br/>Monday-Friday: 9am - 5pm</p>
</div>
<div class="clearit"></div>
<div class="columnHeader">NAVIGATE</div>
<div class="navFeature"><a href="http://www.case.edu/its/help/service_request.html" target="_blank">Request Service</a></div>
<div class="navFeature"><a class="mappop" href="http://cdi-sd.com/">Live Chat</a></div>
<!--<div class="navFeature"><a class="mappop" href="feedback.html">Provide Feedback</a></div>-->
<div class="navFeature"><a href="index.html">help.case.edu Home</a></div>
<div class="navFeature"><a href="http://www.case.edu/its/">ITS Home</a></div>
<div class="navSearch">
<!-- <div id="cse-search-form" style="width: 100%;"></div>-->
<div id="cse-search-form" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'en'});
google.setOnLoadCallback(function() {
var customSearchControl = new google.search.CustomSearchControl(
'007766661394035836293:pyl3v0ba-am');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
var options = new google.search.DrawOptions();
options.enableSearchboxOnly("http://www.case.edu/its/help/search.html");
customSearchControl.draw('cse-search-form', options);
}, true);
</script>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
<style type="text/css">
input.gsc-input {
border-color: #BCCDF0;
background-color: #CECECE;
/*width:160px;*/
color:#000;
}
gsc-search-button{
font-size: 16px;
}
input.gsc-search-button {
text-indent: -9999px;
border: none;
/*background-color: #CECECE;*/
width:31px;
/*height:22px;*/
background-image: url('https://www.case.edu/webdev/umc_test/images/searchIcon.jpg');
background-repeat:no-repeat;
cursor: pointer;
}
.cse .gsc-branding,
.gsc-branding {
display: none;
}
div.gsc-clear-button{
width:0px;
height:0px;
display: none;
}
.navSearch input {
position:relative;
font-size:1em;
}
.cse input.gsc-search-button, input.gsc-search-button {
min-width: 30px;
}
.navSearch {
width:210px;
}
</style>
<!-- <input type="hidden" name="cx" value="007766661394035836293:pyl3v0ba-am" />-->
</div>
<div class="clearit"></div>
<div class="columnHeader">TRAINING</div>
<div id="trainingmenu">
<ul>
<li>
<a href="http://www.case.edu/its/training/adobeconnectmain.html">
<span>Adobe Connect</span>
</a>
</li>
<li>
<a href="http://www.case.edu/its/training/adobepresentermain.html">
<span>Adobe Presenter</span>
</a>
</li>
<li>
<a href="http://www.case.edu/its/training/blackboardmain.html">
<span>Blackboard</span>
</a>
</li>
<li>
<a href="http://www.case.edu/its/training/coursesmartmain.html">
<span>CourseSmart</span>
</a>
</li>
<li>
<a href="http://www.case.edu/its/training/cwruemailmain.html">
<span>CWRU Email</span>
</a>
</li>
<li>
<a href="http://www.case.edu/its/training/cwrunetworkidmain.html">
<span>CWRU Network ID and Password</span>
</a>
</li>
<li>
<a href="http://www.case.edu/its/training/datawarehousemain.html">
<span>Data Warehouse/Business Objects</span>
</a>
</li>
<li>
<a href="http://www.case.edu/its/training/googleappsmain.html">
<span>Google Apps</span>
</a>
</li>
<li>
<a href="http://www.case.edu/its/training/hcmmain.html">
<span>HCM</span>
</a>
</li>
<li>
<a href="http://www.case.edu/its/training/newemployeemain.html">
<span>ITS New Employee Orientation</span>
</a>
</li>
<li>
<a href="http://www.case.edu/its/training/lyndamain.html">
<span>Lynda.com</span>
</a>
</li>
<li>
<a href="http://www.case.edu/its/training/mediavisioncoursewaremain.html">
<span>Media Vision Courseware</span>
</a>
</li>
<li>
<a href="http://www.case.edu/its/training/peoplesoftmain.html">
<span>PeopleSoft Financials</span>
</a>
</li>
<li>
<a href="http://www.case.edu/its/training/sismain.html">
<span>SIS</span>
</a>
</li>
</ul>
</li>
</ul>
</div>
<div class="columnHeader">OTHER RESOURCES</div>
<div id="lynda" class="other_res"><a href="https://shib.lynda.com/Shibboleth.sso/InCommon?providerId=urn:mace:incommon:case.edu&target=https://shib.lynda.com/InCommon"><img src="http://www.case.edu/its/help/images/lyndaLogoSquare.gif" alt="Lynda.com" width="70" height="70" border="0"/></a></div>
<div id="Blackboard" class="other_res"><a href="https://blackboard.case.edu/webapps/portal/frameset.jsp"><img src="http://www.case.edu/its/help/images/blackboard.png" alt="Blackboard" width="75" height="75" border="0"/></a></div>
<div id="coursesmart" class="other_res"><a href="http://www.case.edu/coursesmart/"><img src="http://www.case.edu/its/help/images/coursesmart.png" alt="coursesmart.com" width="75" height="75" border="0"/></a></div>
<div id="mdotcase" class="other_res"><a href="http://m.case.edu/"><img src="http://www.case.edu/its/help/images/mdotcase.jpg" width="75" height="75" alt="mdotcase" /></a></div>
<div><a href="http://www.case.edu/its/help/kba/"><img src="http://www.case.edu/its/images/1x1blank.gif" style="width: 1px; height: 1px; border: 0;"></a></div> <!--this is an invisible link so Google picks up the knowledgebase articles-->
</div><!--end of contentAreaLeft-->
<!--START HEAD BANNER-->
<div id="help_banner">
<!--<img src="images/headPlaceholder.jpg" alt="header" border="0"/>-->
<!--<span style="font-size: 200%; font-weight: bold; background: #FF0000; color: #FFFFFF;">This is a test. This is only a test. This is a test. This is only a test. This is a test. This is only a test.</span>-->
</div>
<div class="SubpageContentContainer">
<div id="homeMainContainer">
<div class="mode_switch" id="mode_switch_div"></div>
<div id="coreservices_catalog"></div>
<div id="coreservices_catalog_az"></div>
</div><!--end of homeMainContainer-->
<div id="rightSidebar">
<div class="columnHeaderAlt"><a class="mappop" href="http://www.case.edu/its/help/feedback.html"><img src="http://www.case.edu/its/help/images/brightfeedback2.jpg" alt="help_by_phone" border="0"/></a></div>
<div class="columnHeader">HOT TOPICS</div>
<div id="training_documents"><center><img src="https://www.case.edu/google/igoogle/case/img/loading.gif" alt="loading..." /></center></div>
<div class="columnHeader">CURRENT ISSUES</div>
<div id="tickets" class="PortletText2"><center><img src="https://www.case.edu/google/igoogle/case/img/loading.gif" alt="" /></center></div>
<div class="quickLinksMore"><a href="javascript:toggle_its_maint_gcal();" alt="Scheduled Maintenance">> See Scheduled Maintenance</a></div>
<div id="its_maint_gcal" class="PortletText2"><center><img src="https://www.case.edu/google/igoogle/case/img/loading.gif" alt="loading..." /></center></div><div class="clearit"></div>
<div class="columnHeader">QUICK LINKS</div>
<div class="quickLinks">
<div class="quickLinksItem"><a href="http://its-services.case.edu/my-case-identity/activate/">Activate CWRU Network ID</a></div>
<div class="quickLinksItem"><a href="https://its-services.case.edu/my-case-identity/password/reset/">Reset Password</a></div>
<div class="quickLinksItem"><a href="https://its-services.case.edu/my-case-identity/google-apps/pwdReset/">Google Apps Password Reset</a></div>
<div class="quickLinksItem"><a href="https://www.case.edu/its/devreg/">Student Device Self-Registration</a></div>
<div class="quickLinksItem"><a href="https://softwarecenter.case.edu/">Software Center</a></div>
<div class="quickLinksItem"><a href="https://its-services.case.edu/my-case-identity/affiliates/request/">Obtain Affiliate ID</a></div>
<!--<div class="quickLinksItem"><a href="http://www.google.com/safebrowsing/report_phish/">Report Phishing</a></div>-->
<div class="quickLinksItem"><a href="https://www.case.edu/its/infosecurity.html">Information Security</a></div>
<div class="quickLinksItem"><a href="https://www.case.edu/its/researchcomputing/">Research Computing</a></div>
<div class="quickLinksItem"><a href="https://www.case.edu/its/e-store.html">eStore</a></div>
<div class="quickLinksItem"><a href="http://www.case.edu/collabtech/">CollabTech 2011</a></div>
<div class="quickLinksMore"><a href="https://its-services.case.edu/tools/">More links</a></div>
</div>
<!--<div id="training_hot_topics">
</div>-->
</div>
</div><!--end of SubpageContentContainer-->
</div><!--end of contentMain-->
</div><!--end of contentContainer-->
</div><!--end of contentWrapper-->
<style type="text/css">
.goog-te-gadget {
font-family: arial;
font-size: 11px;
color: #ffffff;
white-space: nowrap;
}
.goog-logo-link, .goog-logo-link:link, .goog-logo-link:visited, .goog-logo-link:hover, .goog-logo-link:active {
font-size: 12px;
font-weight: bold;
color: #ffffff;
text-decoration: none;
}
</style>
<div class="footerArea">
<div class="footercontentMain">
<div class="footerColumn">
<div>&copy; 2011 Case Western Reserve University</div>
<div>Cleveland, OH 44106</div>
<div>216.368.2000</div>
<div>&nbsp;</div>
<div>Information Technology Services<br />(<a href="http://www.case.edu/legal.html">legal notice</a>)</div>
<div>&nbsp;</div>
<div><a href="mailto:its-web@case.edu">Contact website owner</a></div>
<div>&nbsp;</div>
<div><a href="mailto:help@case.edu">Contact our service desk</a></div>
</div>
<div class="footerColumn">
<div class="footerTitle">ITS Information</div>
<div><a href="http://www.case.edu/its/newtocwru.html">New to CWRU</a></div>
<div><a href="http://www.case.edu/its/ourservices/">Our Services</a></div>
<div><a href="http://help.case.edu/">I Need Help</a></div>
<div><a href="http://www.case.edu/its/dashboard/servicestatus.html">Service Status</a></div>
<div>&nbsp;</div>
<div class="footerTitle">ITS Resources</div>
<div><a href="http://www.case.edu/its/infosecurity.html">Information Security</a></div>
<div><a href="http://softwarecenter.case.edu/">Software Center</a></div>
<div><a href="http://www.case.edu/its/e-store.html">eStore</a></div>
</div>
<div class="footerColumn">
<div class="footerTitle">CWRU ITS Social Networks</div>
<div class="footerSocialItem"><img src="https://www.case.edu/its/images/icon-facebook.png" alt="" /><a href="http://www.facebook.com/pages/CWRU-Information-Technology-Services/236396152713">Facebook</a></div>
<div class="footerSocialItem"><img src="https://www.case.edu/its/images/icon-twitter.png" alt="" /><a href="http://twitter.com/CWRUITS/">Twitter</a></div>
<div class="footerSocialItem"><img src="https://www.case.edu/its/images/icon-googleplus.png" alt="" /><a href="https://plus.google.com/109086288918995584091?prsrc=3">Google+</a></div>
<div class="footerSocialItem"><img src="https://www.case.edu/its/images/icon-youtube.png" alt="" /><a href="http://www.youtube.com/user/case/">YouTube</a></div>
<div class="footerSocialItem"><img src="https://www.case.edu/its/images/icon-itunes.png" alt="" /><a href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewiTunesUInstitution?id=386064736">iTunes</a></div>
<div class="footerSocialItem"><img src="https://www.case.edu/its/images/icon-rss.png" alt="" /><a href="https://sites.google.com/a/case.edu/its/news">RSS Feed</a></div>
</div>
<div class="footerColumn">
<!--google translate starts here-->
<div id="google_translate_element">
<div class="footerTitle">Translate this page</div>
</div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en'
}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<!--end google translate-->
<hr style="width: 50%; color: #333333; margin: 10px 0 10px 0;" />
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style">
<a href="http://www.addthis.com/bookmark.php?v=250&amp;username=xa-4ca605923fb86469" class="addthis_button_compact" style="color: #ffffff;">Share</a>
<span class="addthis_separator" style="color: #ffffff;">|</span>
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<!--<a class="addthis_button_preferred_4"></a>-->
<a class="addthis_button_preferred_5"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4ca605923fb86469"></script>
<!-- AddThis Button END -->
<hr style="width: 50%; color: #333333; margin: 10px 0 10px 0;" />
<!-- Like Button BEGIN -->
<!-- <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http://www.facebook.com/pages/CWRU-Information-Technology-Services/236396152713" layout="button_count" width="100"></fb:like> -->
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FCWRU-Information-Technology-Services%2F236396152713&amp;layout=button_count&amp;show_faces=true&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;"></iframe>
<!-- Like Button END -->
</div>
</div>
</div>
<!-- Google Analytics tracking code inserted automatically by the server -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-620392-2");
pageTracker._initData();
pageTracker._trackPageview("/its/help/index.html")
</script>
<!-- End Google Analytics Code -->
</body>
+165
View File
@@ -0,0 +1,165 @@
#!/bin/bash
# @(#) newdirstack.bsh
# Date: Tue, 31 Jan 2012 16:28:52 +0100
# Subject: A Bash source code example
# From: Eric Sanchis <eric.sanchis@iut-rodez.fr>
# To: chet.ramey@case.edu
#
# Using Bash everyday, I developped an enhanced implementation of the
# cd/dir functions described in the Bolsky & Korn book, which
# illustrates several specific Bash syntax elements.
#
# It works fine with a non empty CDPATH and cdable variables. In
# addition, a directory name is indexed only once into the stack.
#
# If you find this code snippet useful, would it be possible to include
# it into the bash-doc section of future bash packages ?
#
# Sincerely yours,
#
# Eric
# IUT Rodez
# University of Toulouse (France)
###
# Another implementation of the directory manipulation functions
# published in the Bolsky & Korn book : "The new Korn shell" :
# cd, to change current directory
# d, to display the stack content
# Eric Sanchis (eric.sanchis@iut-rodez.fr), 2012
###
shopt -s expand_aliases
shopt -s extglob
shopt -s cdable_vars
alias integer='declare -i'
integer MAX=32
integer INDMAX=MAX-1
integer INDTOP=0
unalias cd 2>/dev/null
alias cd=cdir
unset tab
tab[INDTOP]="$(pwd)"
function cdir
{
local -i ind
dir="${1:-$HOME}"
case "$dir" in
- ) # cd - => equivalent to : cd -1
ind=INDTOP-1
cd_by_number $ind
;;
-+([[:digit:]]) ) # cd -n
ind=$INDTOP-${dir#-}
cd_by_number $ind
;;
*) # cd ~ or cd dir_name
cd_by_name "$dir"
esac
}
function cd_by_number
{
local -i k=$1
local -i j
local dirtmp
if (( k < 0 ))
then
echo Impossible to change directory >&2
return 1
else
dirtmp="${tab[k]}"
j=k+1
while (( j <= INDTOP ))
do
tab[j-1]="${tab[j]}"
j=j+1
done
tab[INDTOP]="$dirtmp"
\cd "${tab[INDTOP]}"
fi
}
function cd_by_name
{
local -i i
local rep
rep=$( \cd "$1" &>/dev/null && pwd)
if [[ -z "$rep" ]]
then
echo cd : "$1" unknown >&2
return 1
fi
i=$INDTOP
while (( i >= 0 ))
do
if [[ "${tab[i]}" == "$rep" ]]
then break
fi
i=i-1
done
if (( i == INDTOP ))
then # cd -0 => we do nothing !
return 0
elif (( i == -1 ))
then # the directory isn't in the stack
if (( INDTOP == INDMAX ))
then # the stack is FULL
# the oldest directory is removed
local -i m
m=1
while (( m <= INDMAX ))
do
tab[m-1]="${tab[m]}"
m=m+1
done
else # the new directory is added to the top of the stack
INDTOP=INDTOP+1
fi
tab[INDTOP]="$rep"
\cd "${tab[INDTOP]}"
return 0
else # the directory is already in the stack
# $i gives its index
cd_by_number $i
fi
}
function d # display the directory stack
{
local -i i
local rep
i=0
while (( $i <= $INDTOP ))
do
rep="${tab[INDTOP-i]#$HOME/}"
case "$rep" in
$HOME) rep="~" ;;
/* ) : ;;
* ) rep="~/$rep"
esac
echo "$i ) $rep"
i=i+1
done
}
+8 -3
View File
@@ -1331,8 +1331,8 @@ extract_delimited_string (string, sindex, opener, alt_opener, closer, flags)
{
if (no_longjmp_on_fatal_error == 0)
{
report_error (_("bad substitution: no closing `%s' in %s"), closer, string);
last_command_exit_value = EXECUTION_FAILURE;
report_error (_("bad substitution: no closing `%s' in %s"), closer, string);
exp_jump_to_top_level (DISCARD);
}
else
@@ -1502,8 +1502,8 @@ extract_dollar_brace_string (string, sindex, quoted, flags)
{
if (no_longjmp_on_fatal_error == 0)
{ /* { */
report_error (_("bad substitution: no closing `%s' in %s"), "}", string);
last_command_exit_value = EXECUTION_FAILURE;
report_error (_("bad substitution: no closing `%s' in %s"), "}", string);
exp_jump_to_top_level (DISCARD);
}
else
@@ -2710,7 +2710,7 @@ do_compound_assignment (name, value, flags)
if (mkassoc)
v = make_local_assoc_variable (name);
else if (v == 0 || (array_p (v) == 0 && assoc_p (v) == 0) || v->context != variable_context)
v = make_local_array_variable (name);
v = make_local_array_variable (name, 0);
assign_compound_array_list (v, list, flags);
}
else
@@ -5862,6 +5862,7 @@ parameter_brace_expand_error (name, value)
WORD_LIST *l;
char *temp;
last_command_exit_value = EXECUTION_FAILURE; /* ensure it's non-zero */
if (value && *value)
{
l = expand_string (value, 0);
@@ -7280,6 +7281,7 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
default:
case '\0':
bad_substitution:
last_command_exit_value = EXECUTION_FAILURE;
report_error (_("%s: bad substitution"), string ? string : "??");
FREE (value);
FREE (temp);
@@ -7356,6 +7358,7 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
temp = (char *)NULL;
if (c == '=' && var_is_special)
{
last_command_exit_value = EXECUTION_FAILURE;
report_error (_("$%s: cannot assign in this way"), name);
free (name);
free (value);
@@ -8159,6 +8162,7 @@ add_string:
sindex = t_index;
goto add_character;
}
last_command_exit_value = EXECUTION_FAILURE;
report_error (_("bad substitution: no closing \"`\" in %s") , string+t_index);
free (string);
free (istring);
@@ -9049,6 +9053,7 @@ glob_expand_word_list (tlist, eflags)
}
else if (fail_glob_expansion != 0)
{
last_command_exit_value = EXECUTION_FAILURE;
report_error (_("no match: %s"), tlist->word->word);
exp_jump_to_top_level (DISCARD);
}
+3 -2
View File
@@ -2046,14 +2046,15 @@ make_new_array_variable (name)
}
SHELL_VAR *
make_local_array_variable (name)
make_local_array_variable (name, assoc_ok)
char *name;
int assoc_ok;
{
SHELL_VAR *var;
ARRAY *array;
var = make_local_variable (name);
if (var == 0 || array_p (var))
if (var == 0 || array_p (var) || (assoc_ok && assoc_p (var)))
return var;
array = array_create ();
+1 -1
View File
@@ -327,7 +327,7 @@ extern void print_var_function __P((SHELL_VAR *));
#if defined (ARRAY_VARS)
extern SHELL_VAR *make_new_array_variable __P((char *));
extern SHELL_VAR *make_local_array_variable __P((char *));
extern SHELL_VAR *make_local_array_variable __P((char *, int));
extern SHELL_VAR *make_new_assoc_variable __P((char *));
extern SHELL_VAR *make_local_assoc_variable __P((char *));