mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 09:49:18 -04:00
New port, celvis, a chinese language elvis (vi clone).
Submitted by: David O'Brien (obrien@cs.ucdavis.edu)
This commit is contained in:
parent
7e6d7b6d37
commit
ce12e97b71
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=3843
13 changed files with 275 additions and 0 deletions
30
chinese/celvis/Makefile
Normal file
30
chinese/celvis/Makefile
Normal file
|
@ -0,0 +1,30 @@
|
|||
# New ports collection makefile for: celvis
|
||||
# Version required: 1.3
|
||||
# Date created: Thur Aug 15, 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= celvis
|
||||
PKGNAME= celvis-1.3
|
||||
CATEGORIES+= chinese editors
|
||||
MASTER_SITES= ftp://ftp.cs.purdue.edu/pub/ygz/ \
|
||||
ftp://ftp.ifcss.org/pub/software/x-win/cxterm/
|
||||
|
||||
MAINTAINER= obrien@cs.ucdavis.edu
|
||||
|
||||
do-install:
|
||||
@# install target in celvis Makefile is not too good -- this is easier
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/celvis ${WRKSRC}/virec ${PREFIX}/bin
|
||||
ln -sf ${PREFIX}/bin/celvis ${PREFIX}/bin/cvi
|
||||
${INSTALL_MAN} ${FILESDIR}/celvis.1 ${PREFIX}/man/man1/celvis.1
|
||||
.if !defined{NOMANCOMPRESS}
|
||||
gzip -9nf ${PREFIX}/man/man1/celvis.1
|
||||
ln -sf ${PREFIX}/man/man1/celvis.1.gz ${PREFIX}/man/man1/cvi.1.gz
|
||||
.else
|
||||
ln -sf ${PREFIX}/man/man1/celvis.1 ${PREFIX}/man/man1/cvi.1
|
||||
.endif
|
||||
|
||||
|
||||
.include <bsd.port.mk>
|
1
chinese/celvis/distinfo
Normal file
1
chinese/celvis/distinfo
Normal file
|
@ -0,0 +1 @@
|
|||
MD5 (celvis.tar.gz) = 219f74d6b34b4812280fd3f96a1c4686
|
103
chinese/celvis/files/celvis.1
Normal file
103
chinese/celvis/files/celvis.1
Normal file
|
@ -0,0 +1,103 @@
|
|||
.TH ELVIS 1
|
||||
.SH NAME
|
||||
celvis, cex, cvi, cview, cinput - The Chinese editor
|
||||
.SH SYNOPSIS
|
||||
\fBcelvis\fP [\fIflags\fP] [\fB+\fP\fIcmd\fP] [\fIfiles\fP...]
|
||||
.SH DESCRIPTION
|
||||
\fIElvis\fP is a text editor which emulates \fIvi\fP/\fIex\fP.
|
||||
\fICelvis\fP is a Chinese version of \fIelvis\fP.
|
||||
It should run on top of some Chinese terminal or Chinese system,
|
||||
such as \fIcxterm\fP in X11 window system.
|
||||
This version supports both GB encoding and Big5 encoding
|
||||
Chinese text.
|
||||
.PP
|
||||
On systems which pass the program name as an argument, such as Unix and Minix,
|
||||
you may also install \fIcelvis\fP under the names
|
||||
"cex", "cvi", "cview", and "cinput".
|
||||
These extra names would normally be links to celvis;
|
||||
see the "ln" shell command.
|
||||
.PP
|
||||
When \fIcelvis\fP is invoked as "cvi",
|
||||
it behaves exactly as though it was invoked as "celvis".
|
||||
However, if you invoke \fIcelvis\fP as "cview",
|
||||
then the readonly option is set as though you had given it the "-R" flag.
|
||||
If you invoke \fIcelvis\fP as "cex",
|
||||
then \fIcelvis\fP will start up in the colon command mode
|
||||
instead of the visual command mode,
|
||||
as though you had given it the "-e" flag.
|
||||
If you invoke \fIcelvis\fP as "cinput" or "cedit",
|
||||
then \fIcelvis\fP will start up in input mode,
|
||||
as though the "-i" flag was given.
|
||||
.SH OPTIONS
|
||||
.IP \fB-r\fP
|
||||
To the real vi, this flag means that a previous edit should be recovered.
|
||||
\fICelvis\fP, though, has a separate program, called \fIvirec(1)\fP,
|
||||
for recovering files.
|
||||
When you invoke \fIcelvis\fP with -r,
|
||||
\fIcelvis\fP will tell you to run \fIvirec\fP.
|
||||
.IP \fB-R\fP
|
||||
This sets the "readonly" option,
|
||||
so you won't accidentally overwrite a file.
|
||||
.IP "\fB-t\fP \fItag\fP"
|
||||
This causes \fIcelvis\fP to start editing at the given tag.
|
||||
.IP \fB-e\fP
|
||||
\fICelvis\fP will start up in colon command mode.
|
||||
.IP \fB-v\fP
|
||||
\fICelvis\fP will start up in visual command mode.
|
||||
.IP \fB-i\fP
|
||||
\fICelvis\fP will start up in input mode.
|
||||
.IP "\fB+\fP\fIcommand\fP
|
||||
If you use the +\fIcommand\fP parameter,
|
||||
then after the first file is loaded
|
||||
\fIcommand\fP is executed as an EX command.
|
||||
A typical example would be "celvis +237 foo",
|
||||
which would cause \fIcelvis\fP to start editing foo and
|
||||
then move directly to line 237.
|
||||
.SH FILES
|
||||
.IP /tmp/elv*
|
||||
During editing,
|
||||
\fIcelvis\fP stores text in a temporary file.
|
||||
For UNIX, this file will usually be stored in the /tmp directory,
|
||||
and the first three characters will be "elv".
|
||||
For other systems, the temporary files may be stored someplace else;
|
||||
see the version-specific section of the documentation.
|
||||
.IP tags
|
||||
This is the database used by the \fI:tags\fP command and the \fB-t\fP option.
|
||||
It is usually created by the \fIctags(1)\fP program.
|
||||
.IP ".exrc or elvis.rc"
|
||||
On UNIX-like systems, a file called ".exrc" in your home directory
|
||||
is executed as a series of \fIex\fR commands.
|
||||
A file by the same name may be executed in the current directory, too.
|
||||
On non-UNIX systems, ".exrc" is usually an invalid file name;
|
||||
there, the initialization file is called "elvis.rc" instead.
|
||||
.SH "SEE ALSO"
|
||||
ctags(1), ref(1), virec(1), cxterm(1)
|
||||
.PP
|
||||
\fIElvis - A Clone of Vi/Ex\fP, the complete \fIelvis\fP documentation.
|
||||
.SH BUGS
|
||||
There is no LISP support.
|
||||
Certain other features are missing, too.
|
||||
.PP
|
||||
Auto-indent mode is not quite compatible with the real vi.
|
||||
Among other things, 0^D and ^^D don't do what you might expect.
|
||||
.PP
|
||||
Long lines are displayed differently.
|
||||
The real vi wraps long lines onto multiple rows of the screen,
|
||||
but \fIcelvis\fP scrolls sideways.
|
||||
.SH AUTHOR
|
||||
.nf
|
||||
Steve Kirkendall
|
||||
kirkenda@cs.pdx.edu
|
||||
\&...uunet!tektronix!psueea!eecs!kirkenda
|
||||
.fi
|
||||
.PP
|
||||
Many other people have worked to port \fIelvis\fP to various operating systems.
|
||||
To see who deserves credit, run the \fI:version\fP command
|
||||
from within \fIcelvis\fP,
|
||||
or look in the system-specific section of the complete documentation.
|
||||
.PP
|
||||
The Chinese version, \fIcelvis\fP, is developed by Man-Chi Pong
|
||||
(now with the Hong Kong University of Science and Technology, HK.
|
||||
E-mail: mcpong@uxmail.usthk.hk)
|
||||
and Yongguang Zhang
|
||||
(Purdue University, e-mail: ygz@cs.purdue.edu).
|
11
chinese/celvis/files/patch-aa
Normal file
11
chinese/celvis/files/patch-aa
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- Makefile.orig Wed May 15 12:09:50 1991
|
||||
+++ Makefile Thu Aug 15 04:47:32 1996
|
||||
@@ -22,7 +22,7 @@
|
||||
SRC5= regexp.c regexp.h regsub.c sysdos.c system.c tinytcap.c tio.c tmp.c
|
||||
SRC6= vars.c vcmd.c vi.c vi.h ctags.c ref.c virec.c wildcard.c shell.c
|
||||
EXTRA=
|
||||
-CFLAGS= -O
|
||||
+CFLAGS= -O -D_HAVE_PARAM_H
|
||||
LIBS= -ltermcap
|
||||
|
||||
all: $(PROGS)
|
30
chinese/celvis/files/patch-ab
Normal file
30
chinese/celvis/files/patch-ab
Normal file
|
@ -0,0 +1,30 @@
|
|||
--- config.h.orig Tue Nov 6 11:53:55 1990
|
||||
+++ config.h Thu Aug 15 05:42:16 1996
|
||||
@@ -5,6 +5,10 @@
|
||||
*/
|
||||
|
||||
/*************************** autoconf section ************************/
|
||||
+/* Can we tell a little more about this system? */
|
||||
+#ifdef _HAVE_PARAM_H
|
||||
+# include <sys/param.h>
|
||||
+#endif
|
||||
|
||||
/* standard unix V (?) */
|
||||
#ifdef M_SYSV
|
||||
@@ -175,9 +179,15 @@
|
||||
#endif
|
||||
|
||||
/******************* Names of files and environment vars **********************/
|
||||
+#if (defined(BSD) && (BSD >= 199103))
|
||||
+# define TMPDIR "/var/tmp" /* directory where temp files live */
|
||||
+# define COMPILED_BY "{Free,Net,Open,4.4,4.3/Reno}BSD (ported by David O'Brien)"
|
||||
+#endif
|
||||
|
||||
#if ANY_UNIX
|
||||
-# define TMPDIR "/usr/tmp" /* directory where temp files live */
|
||||
+# ifndef TMPDIR
|
||||
+# define TMPDIR "/usr/tmp" /* directory where temp files live */
|
||||
+# endif
|
||||
# define TMPNAME "%s/elvt%04x%03x" /* temp file */
|
||||
# define CUTNAME "%s/elvc%04x%03x" /* cut buffer's temp file */
|
||||
# define EXRC ".exrc" /* init file in current directory */
|
11
chinese/celvis/files/patch-ac
Normal file
11
chinese/celvis/files/patch-ac
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- vi.h.orig Sun Oct 20 19:08:33 1991
|
||||
+++ vi.h Thu Aug 15 04:45:45 1996
|
||||
@@ -101,7 +101,7 @@
|
||||
#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 NOFILENAME 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 */
|
12
chinese/celvis/files/patch-ad
Normal file
12
chinese/celvis/files/patch-ad
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- blk.c.orig Tue Nov 6 11:53:55 1990
|
||||
+++ blk.c Thu Aug 15 04:47:18 1996
|
||||
@@ -19,7 +19,9 @@
|
||||
# define NBUFS 5 /* must be at least 3 -- more is better */
|
||||
#endif
|
||||
|
||||
+#if !(defined(BSD) && (BSD >= 199103))
|
||||
extern long lseek();
|
||||
+#endif
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
12
chinese/celvis/files/patch-ae
Normal file
12
chinese/celvis/files/patch-ae
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- recycle.c.orig Tue Nov 6 11:53:56 1990
|
||||
+++ recycle.c Thu Aug 15 04:51:43 1996
|
||||
@@ -18,7 +18,9 @@
|
||||
#ifndef NO_RECYCLE
|
||||
/* this whole file would have be skipped if NO_RECYCLE is defined */
|
||||
|
||||
+#if !(defined(BSD) && (BSD >= 199103))
|
||||
extern long lseek();
|
||||
+#endif
|
||||
|
||||
#define BTST(bitno, byte) ((byte) & (1 << (bitno)))
|
||||
#define BSET(bitno, byte) ((byte) |= (1 << (bitno)))
|
28
chinese/celvis/files/patch-af
Normal file
28
chinese/celvis/files/patch-af
Normal file
|
@ -0,0 +1,28 @@
|
|||
--- tmp.c.orig Thu Aug 15 04:45:57 1996
|
||||
+++ tmp.c Thu Aug 15 05:14:50 1996
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
/* The FAIL() macro prints an error message and then exits. */
|
||||
#define FAIL(why,arg) mode = MODE_EX; msg(why, arg); endwin(); HZ_abort(9)
|
||||
+#define FAIL2(why,arg1,arg2) mode = MODE_EX; msg(why, arg1, arg2); endwin(); HZ_abort(9)
|
||||
|
||||
/* This is the name of the temp file */
|
||||
static char tmpname[80];
|
||||
@@ -91,7 +92,7 @@
|
||||
if (*o_readonly || (statb.st_mode & S_IJRON))
|
||||
#endif
|
||||
#if OS9
|
||||
- if we don't have write permission...
|
||||
+ /* if we don't have write permission... */
|
||||
#endif
|
||||
#if ANY_UNIX
|
||||
if (*o_readonly || !(statb.st_mode &
|
||||
@@ -149,7 +150,7 @@
|
||||
tmpfd = open(tmpname, O_RDWR | O_BINARY);
|
||||
if (tmpfd < 0)
|
||||
{
|
||||
- FAIL("Can't create temporary file, errno=%d", errno);
|
||||
+ FAIL2("Can't create temporary file (%s), errno=%d", tmpname, errno);
|
||||
return 1;
|
||||
}
|
||||
|
22
chinese/celvis/files/patch-ag
Normal file
22
chinese/celvis/files/patch-ag
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- cmd1.c.orig Tue Nov 6 11:53:55 1990
|
||||
+++ cmd1.c Sat Aug 17 15:18:01 1996
|
||||
@@ -882,9 +882,6 @@
|
||||
#else
|
||||
msg("%s (%s)", VERSION, DATE);
|
||||
#endif
|
||||
-#ifdef COMPILED_BY
|
||||
- msg("Compiled by %s", COMPILED_BY);
|
||||
-#endif
|
||||
#ifdef CREDIT
|
||||
msg("%s", CREDIT);
|
||||
#endif
|
||||
@@ -893,6 +890,9 @@
|
||||
#endif
|
||||
#ifdef CVERSION
|
||||
msg("%s", CVERSION);
|
||||
+#endif
|
||||
+#ifdef COMPILED_BY
|
||||
+ msg("Compiled by %s", COMPILED_BY);
|
||||
#endif
|
||||
#ifdef COPYING
|
||||
msg("%s", COPYING);
|
1
chinese/celvis/pkg-comment
Normal file
1
chinese/celvis/pkg-comment
Normal file
|
@ -0,0 +1 @@
|
|||
A vi/ex clone that speaks Chinese
|
9
chinese/celvis/pkg-descr
Normal file
9
chinese/celvis/pkg-descr
Normal file
|
@ -0,0 +1,9 @@
|
|||
CElvis is a clone of vi/ex, the standard UNIX editor. CElvis supports
|
||||
nearly all of the vi/ex commands, in both visual mode and colon mode.
|
||||
It also allows displaying and editing of documents using the
|
||||
Chinese GB (simple) and Big-5 (complex) encodings.
|
||||
|
||||
Celvis is based on Elvis version 1.3 by Steve Kirkendall.
|
||||
|
||||
David O'Brien
|
||||
obrien@cs.ucdavis.edu
|
5
chinese/celvis/pkg-plist
Normal file
5
chinese/celvis/pkg-plist
Normal file
|
@ -0,0 +1,5 @@
|
|||
bin/celvis
|
||||
bin/cvi
|
||||
bin/virec
|
||||
man/man1/celvis.1.gz
|
||||
man/man1/cvi.1.gz
|
Loading…
Add table
Reference in a new issue