pkgsrc/editors/mg2a/patches/patch-ag
tron 4d21cec081 Update "mg2a" package to version to version 1.11:
Don't attempt to edit non regular files.

Patches supplied by John Refling in PR pkg/10536.
2000-07-10 18:26:52 +00:00

32 lines
832 B
Text

$NetBSD: patch-ag,v 1.2 2000/07/10 18:26:54 tron Exp $
--- dir.c.orig Sun Jul 3 10:50:52 1988
+++ dir.c Wed May 31 16:36:32 2000
@@ -11,6 +11,7 @@
#ifndef getwd /* may be a #define */
char *getwd();
#endif
+char *getcwd(); /* refling added this */
char *wdir;
static char cwd[NFILEN];
@@ -19,7 +20,8 @@
*/
dirinit()
{
- if (!(wdir = getwd(cwd)))
+/* if (!(wdir = getwd(cwd))) refling was here */
+ if (!(wdir = getcwd(cwd, NFILEN)))
panic("Can't get current directory!");
}
@@ -40,7 +42,8 @@
ewprintf("Can't change dir to %s", bufc);
return(FALSE);
} else {
- if (!(wdir = getwd(cwd)))
+/* if (!(wdir = getwd(cwd))) refling was here */
+ if (!(wdir = getcwd(cwd, NFILEN)))
panic("Can't get current directory!");
ewprintf("Current directory is now %s", wdir);
return(TRUE);