1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00

VNElvis is a clone of vi/ex (the standard UNIX editor) that allows the

displaying and editing of documents in the Vietnamese 8-bit VISCII (VIetnamese
Standard Code for Information Interchange) data format using the 7-bit VIQR
(VIetnamese Quoted Readable) input method.
This commit is contained in:
David E. O'Brien 1996-12-06 12:37:38 +00:00
parent 4cfbe3bd77
commit b93ba8e95c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=4836
16 changed files with 333 additions and 0 deletions

View File

@ -0,0 +1,26 @@
# ex:ts=8
# New ports collection makefile for: vnelvis
# Version required: 1.4
# Date created: Tue Dec 3, 1996
# Whom: David O'Brien (obrien@cs.ucdavis.edu)
#
# $Id: Makefile,v 1.1.1.1 1996/08/09 04:17:16 asami Exp $
#
DISTNAME= vnelvis
PKGNAME= vnelvis-1.4
CATEGORIES= vietnamese
MASTER_SITES= ftp://ftp.media.mit.edu/pub/Vietnet/Viscii/Unix/ \
ftp://ftp.monash.edu.au/pub/vietnam/unix/
EXTRACT_SUFX= .tar.Z
MAINTAINER= obrien@cs.ucdavis.edu
CFLAGS+= -I../../include
MAN1= vnelvis.1 vnvi.1
post-install:
${INSTALL_MAN} ${WRKSRC}/vnelvis.1V ${PREFIX}/man/man1/vnelvis.1
${INSTALL_MAN} ${WRKSRC}/vnelvis.1V ${PREFIX}/man/man1/vnvi.1
.include <bsd.port.mk>

View File

@ -0,0 +1 @@
MD5 (vnelvis.tar.Z) = 6c4e0e577d09b86d47319d13a10d27e8

View File

@ -0,0 +1,26 @@
--- Makefile.orig Tue May 19 11:57:57 1992
+++ Makefile Thu Dec 5 00:36:53 1996
@@ -115,7 +115,7 @@
EXTRA=
EXTRA2=
LIBS= $(VNLIBDIR)/libviqr.a $(VNLIBDIR)/libvntype.a -ltermcap
-BIN= /usr/local/bin
+BIN= ${PREFIX}
CFLAGS= -Dbsd -I$(VNINCDIR)
OF= -s -o
RF= -c
@@ -357,10 +357,10 @@
cp $(PROGS) $(BIN)
(cd $(BIN); chmod 755 $(PROGS))
(cd $(BIN); chown bin $(PROGS))
- -ln $(BIN)/vnelvis $(BIN)/vi
- -ln $(BIN)/vnelvis $(BIN)/ex
- -ln $(BIN)/vnelvis $(BIN)/view
- -ln $(BIN)/vnelvis $(BIN)/input
+ -ln $(BIN)/vnelvis $(BIN)/vnvi
+ -ln $(BIN)/vnelvis $(BIN)/vnex
+ -ln $(BIN)/vnelvis $(BIN)/vnview
+ -ln $(BIN)/vnelvis $(BIN)/vninput
inst.dos: $(DUMMY)
copy $(PROGS) $(BIN)

View File

@ -0,0 +1,11 @@
--- ../lib/vntype/Makefile.orig Tue Jan 5 22:18:07 1993
+++ ../lib/vntype/Makefile Wed Dec 4 04:07:32 1996
@@ -15,7 +15,7 @@
#FLAGS = -DNOANSI_C
CFLAGS = $(FLAGS) $(INC)
CC = cc
-CPP = /lib/cpp
+CPP = cpp
.c.o:
$(CC) $(CFLAGS) -c $*.c

View File

@ -0,0 +1,26 @@
--- config.h.orig Wed Dec 5 08:50:51 1990
+++ config.h Wed Dec 4 23:34:15 1996
@@ -18,7 +18,9 @@
/* BSD UNIX? */
#ifdef bsd
-# define BSD 1
+/* # define BSD 1 */
+/* BSD is defined in <sys/param.h> so just get it from there */
+# include <sys/param.h>
#endif
/* Microsoft C: sorry, Watcom does the same thing */
@@ -127,6 +129,12 @@
#if COHERENT
# define CREDIT "Ported to Coherent by Esa Ahola"
+#endif
+
+#if BSD
+# if (BSD >= 199306)
+# define CREDIT "Ported to 4.4BSD by David O'Brien"
+# endif
#endif
/*************************** functions depending on OS *********************/

View File

@ -0,0 +1,36 @@
--- vi.h.orig Sat Jul 27 11:00:24 1991
+++ vi.h Thu Dec 5 00:37:44 1996
@@ -16,6 +16,7 @@
#define VERSION "ELVIS 1.4, by Steve Kirkendall"
#define COPYING "This version of ELVIS is freely redistributable."
+#define VNVERSION "Adapted for Vietnamese text by Nguye^~n T. Cu+o+`ng"
#include <errno.h>
extern int errno;
@@ -92,7 +93,9 @@
#define READONLY 0x0002 /* the file is read-only */
#define HADNUL 0x0004 /* the file contained NUL characters */
#define MODIFIED 0x0008 /* the file has been modified */
-#define NOFILE 0x0010 /* no name is known for the current text */
+/*#define NOFILE 0x0010 /* no name is known for the current text */
+/* NOFILE conflicts with 4.4BSD's <sys/param.h> */
+#define NONAME 0x0010 /* no name is known for the current text */
#define ADDEDNL 0x0020 /* newlines were added to the file */
/* macros used to set/clear/test flags */
@@ -235,7 +238,13 @@
#ifndef NO_RECYCLE
extern long allocate(); /* allocate a free block of the tmp file */
#endif
-extern int trapint(); /* trap handler for SIGINT */
+extern
+#if BSD && (BSD >= 199306)
+ void
+#else
+ int
+#endif
+trapint(); /* trap handler for SIGINT */
extern void blkdirty(); /* marks a block as being "dirty" */
extern void blkflush(); /* writes a single dirty block to the disk */
extern void blksync(); /* forces all "dirty" blocks to disk */

View File

@ -0,0 +1,12 @@
--- tmp.c.orig Wed Dec 5 08:51:19 1990
+++ tmp.c Wed Dec 4 23:31:22 1996
@@ -161,7 +161,8 @@
}
else
{
- setflag(file, NOFILE);
+ /* setflag(file, NOFILE); */ /* NOFILE conflicts w/4.4BSD's param.h */
+ setflag(file, NONAME);
origfd = -1;
origtime = 0L;
stat(".", &statb);

View File

@ -0,0 +1,14 @@
--- blk.c.orig Wed Dec 5 08:50:47 1990
+++ blk.c Wed Dec 4 23:35:36 1996
@@ -19,7 +19,11 @@
# define NBUFS 5 /* must be at least 3 -- more is better */
#endif
+#if BSD && (BSD >= 199306)
+# include <unistd.h>
+#else
extern long lseek();
+#endif
/*------------------------------------------------------------------------*/

View File

@ -0,0 +1,51 @@
--- curses.c.orig Thu May 14 22:55:48 1992
+++ curses.c Wed Dec 4 23:55:33 1996
@@ -40,6 +40,13 @@
#include <signal.h>
+#if TURBOC || (BSD >= 199306)
+void
+#else
+int
+#endif
+getsize();
+
extern char *getenv();
static void starttcap();
@@ -338,7 +345,7 @@
}
exwrote = FALSE;
-#if TURBOC
+#if TURBOC || (BSD >= 199306)
signal(SIGINT, (void(*)()) trapint);
#else
signal(SIGINT, trapint);
@@ -482,7 +489,12 @@
* This function is called once during initialization, and thereafter it is
* called whenever the SIGWINCH signal is sent to this process.
*/
-int getsize(signo)
+#if TURBOC || (BSD >= 199306)
+void
+#else
+int
+#endif
+getsize(signo)
int signo;
{
int lines;
@@ -535,7 +547,11 @@
*o_lines = LINES;
}
+#if TURBOC || (BSD >= 199306)
+ return;
+#else
return 0;
+#endif
}

View File

@ -0,0 +1,15 @@
--- recycle.c.orig Wed Dec 5 08:51:08 1990
+++ recycle.c Wed Dec 4 23:42:53 1996
@@ -18,7 +18,11 @@
#ifndef NO_RECYCLE
/* this whole file would have be skipped if NO_RECYCLE is defined */
-extern long lseek();
+#if BSD && (BSD >= 199306)
+# include <unistd.h>
+#else
+ extern long lseek();
+#endif
#define BTST(bitno, byte) ((byte) & (1 << (bitno)))
#define BSET(bitno, byte) ((byte) |= (1 << (bitno)))

View File

@ -0,0 +1,24 @@
--- tio.c.orig Mon Apr 6 15:30:53 1992
+++ tio.c Wed Dec 4 23:59:12 1996
@@ -369,10 +369,20 @@
#if !MSDOS && !TOS
# if BSD || COHERENT
static jmp_buf env_timeout;
-static int dummy()
+static
+# if (BSD >= 199306)
+void
+# else
+int
+# endif
+dummy()
{
longjmp(env_timeout, 1);
+# if (BSD >= 199306)
+ return;
+# else
return 0;
+# endif
}
# else
static int dummy()

View File

@ -0,0 +1,54 @@
--- main.c.orig Mon Apr 6 15:30:43 1992
+++ main.c Wed Dec 4 23:58:14 1996
@@ -25,7 +25,7 @@
int Debug = 0;
#endif
-extern trapint(); /* defined below */
+/* extern trapint(); /* defined below */
extern char *getenv();
jmp_buf jmpenv;
@@ -307,7 +307,7 @@
/* Maybe we just aborted a change? */
abortdo();
}
-#if TURBOC
+#if TURBOC || (BSD >= 199306)
signal(SIGINT, (void(*)()) trapint);
#else
signal(SIGINT, trapint);
@@ -350,7 +350,12 @@
/*ARGSUSED*/
-int trapint(signo)
+#if TURBO_C || (BSD >= 199306)
+void
+#else
+int
+#endif
+trapint(signo)
int signo;
{
resume_curses(FALSE);
@@ -358,14 +363,18 @@
#if OSK
sigmask(-1);
#endif
-#if TURBO_C
+#if TURBO_C || (BSD >= 199306)
signal(signo, (void (*)())trapint);
#else
signal(signo, trapint);
#endif
longjmp(jmpenv, 1);
+#if TURBO_C || (BSD >= 199306)
+ return;
+#else
return 0;
+#endif
}

View File

@ -0,0 +1,12 @@
--- cmd1.c.orig Wed Dec 5 08:50:48 1990
+++ cmd1.c Thu Dec 5 00:21:11 1996
@@ -908,6 +908,9 @@
#else
msg("%s (%s)", VERSION, DATE);
#endif
+#ifdef VNVERSION
+ msg("%s", VNVERSION);
+#endif
#ifdef COMPILED_BY
msg("Compiled by %s", COMPILED_BY);
#endif

View File

@ -0,0 +1 @@
A vi clone that speaks Vietnamese

View File

@ -0,0 +1,16 @@
Tha^n cha`o ca'c ba.n,
VNElvis is a clone of vi/ex (the standard UNIX editor) that allows the
displaying and editing of documents in the Vietnamese 8-bit VISCII (VIetnamese
Standard Code for Information Interchange) data format using the 7-bit VIQR
(VIetnamese Quoted Readable) input method.
It is expected that you will run vnelvis w/in a vnterm. Because of the way
vi utilizes various key strokes, it may be better to turn off vnterm's VIQR
processing and allow vnelvis to handle the VIQR input itself. You do this
by "set vnkeys".
Because "dd" --> "-d" in VIQR, "qq" has been added as a means of
deleting a line. Otherwise vnelvis behaives as expected.
David O'Brien
obrien@cs.ucdavis.edu

View File

@ -0,0 +1,8 @@
bin/vnelvis
bin/vnvi
bin/vnex
bin/vnview
bin/vninput
bin/virec
man/man1/vnelvis.1.gz
man/man1/vnvi.1.gz