summaryrefslogtreecommitdiffstats
path: root/contrib/tcsh/sh.dir.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2000-11-30 21:05:33 +0000
committerache <ache@FreeBSD.org>2000-11-30 21:05:33 +0000
commit5e7fc01bd9bf3444f2d8b21ab1c56c1f2d599068 (patch)
treea212ee10b5214f5c4302ff44d44c2542d83cf7b6 /contrib/tcsh/sh.dir.c
parentd7d472004aa5fe13bc67f9aa639952d978d342e9 (diff)
downloadFreeBSD-src-5e7fc01bd9bf3444f2d8b21ab1c56c1f2d599068.zip
FreeBSD-src-5e7fc01bd9bf3444f2d8b21ab1c56c1f2d599068.tar.gz
Initial import of slightly trimmed tcsh 6.10
Diffstat (limited to 'contrib/tcsh/sh.dir.c')
-rw-r--r--contrib/tcsh/sh.dir.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/contrib/tcsh/sh.dir.c b/contrib/tcsh/sh.dir.c
index d6e90ed..2b6fe04 100644
--- a/contrib/tcsh/sh.dir.c
+++ b/contrib/tcsh/sh.dir.c
@@ -1,4 +1,4 @@
-/* $Header: /src/pub/tcsh/sh.dir.c,v 3.52 1998/10/25 15:10:03 christos Exp $ */
+/* $Header: /src/pub/tcsh/sh.dir.c,v 3.54 2000/11/11 23:03:36 christos Exp $ */
/*
* sh.dir.c: Directory manipulation functions
*/
@@ -36,7 +36,7 @@
*/
#include "sh.h"
-RCSID("$Id: sh.dir.c,v 3.52 1998/10/25 15:10:03 christos Exp $")
+RCSID("$Id: sh.dir.c,v 3.54 2000/11/11 23:03:36 christos Exp $")
/*
* C Shell - directory management
@@ -513,11 +513,11 @@ dgoto(cp)
else
dp = cp;
-#ifdef WINNT
+#ifdef WINNT_NATIVE
cp = SAVE(getcwd(NULL, 0));
-#else /* !WINNT */
+#else /* !WINNT_NATIVE */
cp = dcanon(cp, dp);
-#endif /* WINNT */
+#endif /* WINNT_NATIVE */
return cp;
}
@@ -1268,7 +1268,8 @@ getstakd(s, cnt)
return (0);
}
}
- (void) Strcpy(s, dp->di_name);
+ (void) Strncpy(s, dp->di_name, BUFSIZE);
+ s[BUFSIZE - 1] = '\0';
return (1);
}
OpenPOWER on IntegriCloud