1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-01 22:05:08 +00:00
freebsd-ports/editors/joe-devel/files/patch-ab
Steve Price ac538b4f47 Use file locking similar to vi.
PR:		15330
Submitted by:	Oliver Breuninger <ob@seicom.net>
1999-12-25 02:22:53 +00:00

38 lines
914 B
Plaintext

--- 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);