summaryrefslogtreecommitdiff
path: root/editors/joe/patches/patch-ad
diff options
context:
space:
mode:
Diffstat (limited to 'editors/joe/patches/patch-ad')
-rw-r--r--editors/joe/patches/patch-ad68
1 files changed, 54 insertions, 14 deletions
diff --git a/editors/joe/patches/patch-ad b/editors/joe/patches/patch-ad
index 2f5b288d784..add41c5826d 100644
--- a/editors/joe/patches/patch-ad
+++ b/editors/joe/patches/patch-ad
@@ -1,17 +1,57 @@
-$NetBSD: patch-ad,v 1.2 2001/05/22 11:37:16 wiz Exp $
+$NetBSD: patch-ad,v 1.3 2003/04/27 17:45:31 cjep Exp $
---- scrn.h.orig Thu Oct 6 08:09:04 1994
-+++ scrn.h
-@@ -254,10 +254,10 @@
+--- main.c.orig 1995-01-22 00:21:08.000000000 +0000
++++ main.c
+@@ -18,6 +18,10 @@ JOE; see the file COPYING. If not, writ
- #define xlat(a,c) \
- ( \
-- (dspasis && ((unsigned)(c)>=128)) ? \
-+ (dspasis && ((unsigned char)(c)>=128)) ? \
- ((a)=0) \
- : \
-- (((a)=xlata[(unsigned)(c)]), ((c)=xlatc[(unsigned)(c)])) \
-+ (((a)=xlata[(unsigned char)(c)]), ((c)=xlatc[(unsigned char)(c)])) \
- )
+ #include <stdio.h>
+ #include <fcntl.h>
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++#include <locale.h>
++#include <ctype.h>
++#endif
+ #include "config.h"
+ #include "w.h"
+ #include "tty.h"
+@@ -187,6 +191,20 @@ char *envv[];
+ run=namprt(argv[0]);
+ #endif
- /* int eraeol(SCRN *t,int x,int y);
++#if defined(__FreeBSD__) || defined(__NetBSD__)
++ setlocale(LC_ALL, "");
++ for(c=0;c<256;c++)
++ { int a=0;
++ if(iscntrl(c))
++ a|=UNDERLINE;
++ if((c&0x80)&&!isprint(c))
++ a|=INVERSE;
++ xlata[c]=a;
++ if(isprint(c))
++ xlatc[c]=c;
++ }
++#endif
++
+ if(s=getenv("LINES")) sscanf(s,"%d",&lines);
+ if(s=getenv("COLUMNS")) sscanf(s,"%d",&columns);
+ if(s=getenv("BAUD")) sscanf(s,"%u",&Baud);
+@@ -234,20 +252,6 @@ char *envv[];
+
+ #else
+
+- s=vsncpy(NULL,0,sc("."));
+- s=vsncpy(sv(s),sv(run));
+- s=vsncpy(sv(s),sc("rc"));
+- c=procrc(cap,s);
+- if(c==0) goto donerc;
+- if(c==1)
+- {
+- char buf[8];
+- fprintf(stderr,"There were errors in '%s'. Use it anyway?",s);
+- fflush(stderr);
+- fgets(buf,8,stdin);
+- if(buf[0]=='y' || buf[0]=='Y') goto donerc;
+- }
+-
+ vsrm(s);
+ s=getenv("HOME");
+ if(s)