Imported from ../bash-2.01.1.tar.gz.

This commit is contained in:
Jari Aalto
2009-09-12 16:46:51 +00:00
parent d166f04881
commit e8ce775db8
50 changed files with 2170 additions and 1502 deletions
+2 -1
View File
@@ -844,8 +844,9 @@ polite_directory_format (name)
l = home ? strlen (home) : 0;
if (l > 1 && strncmp (home, name, l) == 0 && (!name[l] || name[l] == '/'))
{
strcpy (tdir + 1, name + l);
strncpy (tdir + 1, name + l, sizeof(tdir) - 2);
tdir[0] = '~';
tdir[sizeof(tdir) - 1] = '\0';
return (tdir);
}
else