Imported from ../bash-2.04.tar.gz.
This commit is contained in:
parent
b72432fdcc
commit
bb70624e96
387 changed files with 28522 additions and 9334 deletions
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with the GNU C Library; see the file COPYING.LIB. If
|
||||
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
|
||||
Cambridge, MA 02139, USA. */
|
||||
not, write to the Free Software Foundation, Inc.,
|
||||
59 Temple Place, Suite 330, Boston, MA 02111 USA. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -64,6 +64,10 @@ extern int errno;
|
|||
# define lstat stat
|
||||
#endif
|
||||
|
||||
#if !defined (NULL)
|
||||
# define NULL 0
|
||||
#endif
|
||||
|
||||
/* Get the pathname of the current working directory,
|
||||
and put it in SIZE bytes of BUF. Returns NULL if the
|
||||
directory couldn't be determined or SIZE was too small.
|
||||
|
|
@ -138,14 +142,14 @@ getcwd (buf, size)
|
|||
char *new;
|
||||
if (dotlist == dots)
|
||||
{
|
||||
new = malloc (dotsize * 2 + 1);
|
||||
new = (char *)malloc (dotsize * 2 + 1);
|
||||
if (new == NULL)
|
||||
goto lose;
|
||||
memcpy (new, dots, dotsize);
|
||||
}
|
||||
else
|
||||
{
|
||||
new = realloc ((PTR) dotlist, dotsize * 2 + 1);
|
||||
new = (char *)realloc ((PTR) dotlist, dotsize * 2 + 1);
|
||||
if (new == NULL)
|
||||
goto lose;
|
||||
}
|
||||
|
|
@ -222,13 +226,13 @@ getcwd (buf, size)
|
|||
|
||||
if (pathbuf == path)
|
||||
{
|
||||
new = malloc (pathsize * 2);
|
||||
new = (char *)malloc (pathsize * 2);
|
||||
if (!new)
|
||||
goto lose;
|
||||
}
|
||||
else
|
||||
{
|
||||
new = realloc ((PTR) pathbuf, (pathsize * 2));
|
||||
new = (char *)realloc ((PTR) pathbuf, (pathsize * 2));
|
||||
if (!new)
|
||||
goto lose;
|
||||
pathp = new + space;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue