From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 23 07:45:58 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1044E10656D9 for ; Wed, 23 Mar 2011 07:45:58 +0000 (UTC) (envelope-from inyaoo@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 911B88FC12 for ; Wed, 23 Mar 2011 07:45:57 +0000 (UTC) Received: by ewy1 with SMTP id 1so2312264ewy.13 for ; Wed, 23 Mar 2011 00:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=mUU1HgZJzn5+Bt+E0yXW0VJqsHIZSJjYRATjwc9KZY4=; b=aFcsFnb5WMxtWNbWXSrnj25RtInHgy6K3mLz0+l9yWTItErWZvRnFRISPtgdJucdmy bX5XhVDOx88ntYF0qgHIiH/gQAoSvxmp9OvSlQ8s6HaTprJ/dcPzNEGVMW5SNNlR1WDv hq9JGji85Qoj8lTkrO7dWwyCCQZMBGkXhYC1o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=mwQiOyQbFj42LZYu1pfIdB31dax+1rt6+b2ZTOsO9W0dQ3MwbqcVzTNpsQ4TE1igp9 8Z2derR7HlmAz/h4nVy2Wb+fBOmtbZSape8cOh8H1QIVkGSg/N/kyyb6P7miaAl0+bRu qtnRZe1tMjcVRVilE21Fj/NezClyMeNL/Qwp4= Received: by 10.14.37.75 with SMTP id x51mr2282521eea.71.1300865034738; Wed, 23 Mar 2011 00:23:54 -0700 (PDT) Received: from localhost ([80.62.217.18]) by mx.google.com with ESMTPS id w59sm3386821eeh.3.2011.03.23.00.23.50 (version=SSLv3 cipher=OTHER); Wed, 23 Mar 2011 00:23:53 -0700 (PDT) From: Pan Tsu To: Zhihao Yuan References: Date: Wed, 23 Mar 2011 10:23:41 +0300 In-Reply-To: (Zhihao Yuan's message of "Wed, 23 Mar 2011 00:39:44 -0500") Message-ID: <86mxkm1erm.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Mailman-Approved-At: Wed, 23 Mar 2011 11:11:07 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: [GSoC] About the idea: Unicode support in vi X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Mar 2011 07:45:58 -0000 --=-=-= Content-Type: text/plain Zhihao Yuan 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) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=contrib_ex-vi.diff 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 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 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 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 --=-=-=--