Zhihao Yuan <[email protected]> writes:
> Hi,
>
> I'm a Computer Science student at Northern Illinois University, and I
> used FreeBSD for a long time. I'm interested in the idea that to
> improve the nvi in the base system. My proposal is slightly different:
> I want to fork nvi and make it iconv-awared (or mbyte-mode tunable,
> like tcsh), so that it can deal with more encodings. Can that be a
> GSoC project proposal?
Why not just use "traditional vi"?
http://ex-vi.sourceforge.net/ (lives under editors/2bsd-vi)
don't forget to extract sources into contrib/ex-vi
diff --git a/rescue/rescue/Makefile b/rescue/rescue/Makefile
index d62b6f4..e6d8686 100644
--- a/rescue/rescue/Makefile
+++ b/rescue/rescue/Makefile
@@ -218,7 +218,8 @@ CRUNCH_LIBS+= -larchive -lmd
CRUNCH_LIBS+= -lcrypto
.endif
-CRUNCH_PROGS_usr.bin+= vi
+CRUNCH_SRCDIRS+= usr.bin/ex-vi
+CRUNCH_PROGS_usr.bin/ex-vi+= vi
CRUNCH_ALIAS_vi= ex
CRUNCH_PROGS_usr.bin+= id
diff --git a/usr.bin/Makefile b/usr.bin/Makefile
index f7965f1..ffde23d 100644
--- a/usr.bin/Makefile
+++ b/usr.bin/Makefile
@@ -169,7 +174,7 @@ SUBDIR= alias \
users \
uudecode \
uuencode \
- vi \
+ ex-vi \
vis \
vmstat \
w \
diff --git a/usr.bin/ex-vi/Makefile b/usr.bin/ex-vi/Makefile
new file mode 100644
index 0000000..d4db4a5
--- /dev/null
+++ b/usr.bin/ex-vi/Makefile
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+SUBDIR= expreserve exrecover vi
+
+.include <bsd.subdir.mk>
diff --git a/usr.bin/ex-vi/Makefile.inc b/usr.bin/ex-vi/Makefile.inc
new file mode 100644
index 0000000..4b1eb39
--- /dev/null
+++ b/usr.bin/ex-vi/Makefile.inc
@@ -0,0 +1,11 @@
+# $FreeBSD$
+
+SRCDIR= ${.CURDIR}/../../../contrib/ex-vi
+.PATH: ${SRCDIR}
+
+LIBEXECDIR?=/usr/libexec
+CFLAGS+=-DVMUNIX
+
+WARNS?= 1
+
+.include "${.CURDIR}/../../Makefile.inc"
diff --git a/usr.bin/ex-vi/expreserve/Makefile b/usr.bin/ex-vi/expreserve/Makefile
new file mode 100644
index 0000000..ad1d953
--- /dev/null
+++ b/usr.bin/ex-vi/expreserve/Makefile
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+PROG= expreserve
+BINDIR= ${LIBEXECDIR}
+NO_MAN=
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/ex-vi/exrecover/Makefile b/usr.bin/ex-vi/exrecover/Makefile
new file mode 100644
index 0000000..e808926
--- /dev/null
+++ b/usr.bin/ex-vi/exrecover/Makefile
@@ -0,0 +1,9 @@
+# $FreeBSD$
+
+PROG= exrecover
+BINDIR= ${LIBEXECDIR}
+NO_MAN=
+
+SRCS= exrecover.c mapmalloc.c
+
+.include <bsd.prog.mk>
diff --git a/usr.bin/ex-vi/vi/Makefile b/usr.bin/ex-vi/vi/Makefile
new file mode 100644
index 0000000..d974280
--- /dev/null
+++ b/usr.bin/ex-vi/vi/Makefile
@@ -0,0 +1,26 @@
+# $FreeBSD$
+
+PROG= vi
+MAN= ex.1 vi.1
+SRCS= ex.c ex_addr.c ex_cmds.c ex_cmds2.c ex_cmdsub.c \
+ ex_data.c ex_extern.c ex_get.c ex_io.c ex_put.c ex_re.c \
+ ex_set.c ex_subr.c ex_tagio.c ex_temp.c ex_tty.c ex_unix.c \
+ ex_v.c ex_vadj.c ex_vget.c ex_vmain.c ex_voper.c \
+ ex_vops.c ex_vops2.c ex_vops3.c ex_vput.c ex_vwind.c \
+ printf.c ex_version.c mapmalloc.c
+
+.for l in ex edit vedit view
+LINKS+= ${BINDIR}/vi ${BINDIR}/${l}
+.endfor
+MLINKS+=ex.1 edit.1 vi.1 vedit.1 vi.1 view.1
+
+CFLAGS+=-DUXRE -DREG_ANGLES=0 -DNO_BE_BACKSLASH
+CFLAGS+=-DEXPRESERVE=\"${LIBEXECDIR}/expreserve\" \
+ -DEXRECOVER=\"${LIBEXECDIR}/exrecover\"
+CFLAGS+=-DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8
+#CFLAGS+=-DLARGEF
+
+LDADD+= -lncurses
+DPADD+= ${LIBNCURSES}
+
+.include <bsd.prog.mk>
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"