summaryrefslogtreecommitdiff
path: root/editors/joe-devel/files/patch-ab
blob: 7d9fed0e9226994a80b8a8adb8dff22851276850 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- main.c.orig	Sun Jan 22 01:21:08 1995
+++ main.c	Tue Dec  7 13:57:42 1999
@@ -19,4 +19,8 @@
 #include <stdio.h>
 #include <fcntl.h>
+#ifdef __FreeBSD__
+#include <locale.h>
+#include <ctype.h>
+#endif
 #include "config.h"
 #include "w.h"
@@ -188,4 +192,18 @@
 #endif 
 
+#ifdef __FreeBSD__
+ 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);
@@ -366,5 +384,5 @@
  if(help) helpon(maint);
  if(!nonotice)
-  msgnw(lastw(maint)->object,"\\i** Joe's Own Editor v2.8 ** Copyright (C) 1995 Joseph H. Allen **\\i");
+  msgnw(lastw(maint)->object,"\\i** Joe's Own Editor v2.8l ** Copyright (C) 1995 Joseph H. Allen **\\i");
  edloop(0);
  vclose(vmem);