pkgsrc/editors/mg2a/patches/patch-ad
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

28 lines
791 B
Text

$NetBSD: patch-ad,v 1.2 2000/07/10 18:26:54 tron Exp $
--- sys/bsd/fullpath.c.orig Wed May 31 16:36:31 2000
+++ sys/bsd/fullpath.c Wed May 31 16:36:31 2000
@@ -0,0 +1,23 @@
+/* test program by John P. Refling *
+#include <stdlib.h>
+#include <sys/param.h>
+#define begin {
+#define end }
+int main(argc, argv)
+int argc;
+char **argv;
+{char resolved_path[MAXPATHLEN];
+char trial_path[MAXPATHLEN];
+char path[MAXPATHLEN];
+char *envpath;
+if (realpath(argv[0], resolved_path) != NULL ) begin
+ printf("%s\n", resolved_path);
+end
+else if ( (envpath = getenv("PATH")) != NULL ) begin
+ printf("%s\n", envpath);
+ while (strchr(envpath, ':') != NULL) begin
+ printf("%d\n", envpath-strchr(envpath,':'));
+ envpath = strchr(envpath,':');
+ end
+end
+else printf("bad\n");}