summaryrefslogtreecommitdiff
path: root/usr.bin/mg/dir.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-02-26 22:53:17 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-02-26 22:53:17 +0000
commitac2dd1683fd459fc832d940eea325eb1725424bb (patch)
tree1a5cdc9d6300b1a29ff65c02960159db2bdfb9ad /usr.bin/mg/dir.c
parentc198e5bf8d551492a685ce1c4ab327ceac70a790 (diff)
change WINDOW -> MGWIN to avoid curses type conflict
convert to terminfo in tty*.c add support for some keypad function keys (arrows, pgup, pgdown)
Diffstat (limited to 'usr.bin/mg/dir.c')
-rw-r--r--usr.bin/mg/dir.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/mg/dir.c b/usr.bin/mg/dir.c
index b8f40f973ee..d96e6552473 100644
--- a/usr.bin/mg/dir.c
+++ b/usr.bin/mg/dir.c
@@ -8,9 +8,6 @@
#include "def.h"
#ifndef NO_DIR
-#ifndef getwd /* may be a #define */
-char *getwd();
-#endif
char *wdir;
static char cwd[NFILEN];
@@ -19,7 +16,7 @@ static char cwd[NFILEN];
*/
dirinit()
{
- if (!(wdir = getwd(cwd)))
+ if (!(wdir = getcwd(cwd, sizeof(cwd))))
panic("Can't get current directory!");
}
@@ -40,7 +37,7 @@ changedir(f, n)
ewprintf("Can't change dir to %s", bufc);
return(FALSE);
} else {
- if (!(wdir = getwd(cwd)))
+ if (!(wdir = getcwd(cwd, sizeof(cwd))))
panic("Can't get current directory!");
ewprintf("Current directory is now %s", wdir);
return(TRUE);