socsvn commit: r225333 - in soc2011/zy/nvi-iconv/head:
contrib/nvi2/build contrib/nvi2/common contrib/nvi2/ex
contrib/nvi2/regex contrib/nvi2/vi usr.bin/vi
zy at FreeBSD.org
zy at FreeBSD.org
Sun Aug 21 18:06:26 UTC 2011
Author: zy
Date: Sun Aug 21 18:06:23 2011
New Revision: 225333
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=225333
Log:
Updates to git:ce353ad.
* Regenerate config.h, pathnames.h with cmake.
* port.h is provided by vendor as common/port.h; make depend is needed.
* Drops SYSV_CURSES macros, since we only have ncurses now.
* Supports SYS5_TTY since FreeBSD 8.
Added:
soc2011/zy/nvi-iconv/head/contrib/nvi2/build/CMakeLists.txt
soc2011/zy/nvi-iconv/head/contrib/nvi2/build/config.h.in
soc2011/zy/nvi-iconv/head/contrib/nvi2/build/pathnames.h.in
soc2011/zy/nvi-iconv/head/contrib/nvi2/build/recover.in
soc2011/zy/nvi-iconv/head/contrib/nvi2/common/port.h
Deleted:
soc2011/zy/nvi-iconv/head/usr.bin/vi/port.h
Modified:
soc2011/zy/nvi-iconv/head/contrib/nvi2/common/conv.c
soc2011/zy/nvi-iconv/head/contrib/nvi2/common/exf.c
soc2011/zy/nvi-iconv/head/contrib/nvi2/ex/ex_append.c
soc2011/zy/nvi-iconv/head/contrib/nvi2/ex/ex_script.c
soc2011/zy/nvi-iconv/head/contrib/nvi2/ex/ex_write.c
soc2011/zy/nvi-iconv/head/contrib/nvi2/regex/regex.h
soc2011/zy/nvi-iconv/head/contrib/nvi2/vi/v_txt.c
soc2011/zy/nvi-iconv/head/usr.bin/vi/Makefile
soc2011/zy/nvi-iconv/head/usr.bin/vi/config.h
soc2011/zy/nvi-iconv/head/usr.bin/vi/pathnames.h
Added: soc2011/zy/nvi-iconv/head/contrib/nvi2/build/CMakeLists.txt
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/zy/nvi-iconv/head/contrib/nvi2/build/CMakeLists.txt Sun Aug 21 18:06:23 2011 (r225333)
@@ -0,0 +1,123 @@
+cmake_minimum_required(VERSION 2.6)
+project(nvi2)
+
+include(CheckIncludeFiles)
+include(CheckFunctionExists)
+include(CheckSymbolExists)
+include(CheckLibraryExists)
+include(CheckCSourceCompiles)
+
+# unused, just hide them
+mark_as_advanced(FORCE CMAKE_BUILD_TYPE CMAKE_INSTALL_PREFIX)
+
+option(DEBUG "Build a debugging version" OFF)
+option(HAVE_BSD_CURSES "Old BSD Style curses library" OFF)
+option(USE_WIDECHAR "Enable wide character support" ON)
+option(USE_ICONV "Enable iconv support" ON)
+
+if(DEBUG)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g
+ -fstrict-aliasing -Wstrict-aliasing")
+else(DEBUG)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O2")
+endif(DEBUG)
+
+# generate the public headers
+execute_process(COMMAND ./distrib WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
+
+FILE(GLOB MAIN_SRCS ../cl/*.c ../common/*.c ../ex/*.c ../vi/*.c)
+FILE(GLOB REGEX_SRCS ../regex/reg*.c)
+
+check_function_exists(vfork HAVE_VFORK)
+check_function_exists(revoke HAVE_REVOKE)
+
+check_c_source_compiles("
+#include <sys/types.h>
+#include <sys/time.h>
+int main(void) { gettimeofday(0); }" HAVE_BROKEN_GETTIMEOFDAY)
+
+check_c_source_compiles("
+#include <fcntl.h>
+int main(void) { flock(0, 0); }" HAVE_LOCK_FLOCK)
+
+if(NOT HAVE_LOCK_FLOCK)
+ check_c_source_compiles("
+ #include <fcntl.h>
+ int main(void) { flock(0, F_SETLK, 0); }" HAVE_LOCK_FCNTL)
+endif(NOT HAVE_LOCK_FLOCK)
+
+include_directories(. .. ../include)
+check_include_files(ncursesw/ncurses.h HAVE_NCURSESW_NCURSES_H)
+check_include_files(ncurses.h HAVE_NCURSES_H)
+
+# XXX CMakeCache.txt needs to be removed by hand
+if(USE_WIDECHAR)
+ find_library(CURSES_LIBRARY NAMES ncursesw cursesw)
+
+ # link to the wchar_t awared BSD libregex.a
+ add_definitions(-D__REGEX_PRIVATE)
+ include_directories(../regex)
+ add_library(regex STATIC ${REGEX_SRCS})
+else(USE_WIDECHAR)
+ find_library(CURSES_LIBRARY NAMES ncurses curses)
+endif(USE_WIDECHAR)
+
+if(USE_ICONV)
+ find_path(ICONV_INCLUDE_DIR iconv.h)
+ check_function_exists(libiconv_open ICONV_IN_LIBC)
+ if(NOT ICONV_IN_LIBC)
+ find_library(ICONV_LIBRARY iconv)
+ endif(NOT ICONV_IN_LIBC)
+ include_directories(${ICONV_INCLUDE_DIR})
+endif(USE_ICONV)
+
+check_library_exists(${CURSES_LIBRARY} waddnstr "" HAVE_CURSES_WADDNSTR)
+check_library_exists(${CURSES_LIBRARY} beep "" HAVE_CURSES_BEEP)
+check_library_exists(${CURSES_LIBRARY} flash "" HAVE_CURSES_FLASH)
+check_library_exists(${CURSES_LIBRARY} idlok "" HAVE_CURSES_IDLOK)
+check_library_exists(${CURSES_LIBRARY} keypad "" HAVE_CURSES_KEYPAD)
+check_library_exists(${CURSES_LIBRARY} newterm "" HAVE_CURSES_NEWTERM)
+check_library_exists(${CURSES_LIBRARY} setupterm "" HAVE_CURSES_SETUPTERM)
+check_library_exists(${CURSES_LIBRARY} tigetstr "" HAVE_CURSES_TIGETSTR)
+
+check_include_files(sys/mman.h HAVE_SYS_MMAN_H)
+check_include_files(sys/select.h HAVE_SYS_SELECT_H)
+check_include_files(sys/stropts.h HAVE_SYS_STROPTS_H)
+check_include_files(term.h HAVE_TERM_H)
+
+check_function_exists(grantpt HAVE_SYS5_PTY)
+
+configure_file(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_SOURCE_DIR}/config.h)
+
+find_program(vi_cv_path_shell sh)
+find_program(vi_cv_path_sendmail sendmail)
+
+# test for existing vi.recover first, then try to mkdir if failed
+find_file(vi_cv_path_preserve vi.recover
+ PATHS /var/preserve /var/tmp /usr/tmp NO_DEFAULT_PATH)
+if(NOT vi_cv_path_preserve)
+ foreach(_path /var/preserve /var/tmp /usr/tmp)
+ execute_process(COMMAND /bin/mkdir -p ${_path}/vi.recover
+ RESULT_VARIABLE _path_st)
+ if(NOT _path_st)
+ set(vi_cv_path_preserve ${_path}/vi.recover)
+ break()
+ endif(NOT _path_st)
+ endforeach(_path /var/preserve /var/tmp /usr/tmp)
+endif(NOT vi_cv_path_preserve)
+
+mark_as_advanced(vi_cv_path_shell vi_cv_path_sendmail vi_cv_path_preserve)
+
+configure_file(${CMAKE_SOURCE_DIR}/pathnames.h.in
+ ${CMAKE_SOURCE_DIR}/pathnames.h)
+configure_file(${CMAKE_SOURCE_DIR}/recover.in
+ ${CMAKE_SOURCE_DIR}/recover @ONLY)
+
+add_executable(nvi ${MAIN_SRCS})
+target_link_libraries(nvi ${CURSES_LIBRARY})
+if(USE_WIDECHAR)
+ target_link_libraries(nvi regex)
+ if(USE_ICONV)
+ target_link_libraries(nvi ${ICONV_LIBRARY})
+ endif(USE_ICONV)
+endif(USE_WIDECHAR)
Added: soc2011/zy/nvi-iconv/head/contrib/nvi2/build/config.h.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/zy/nvi-iconv/head/contrib/nvi2/build/config.h.in Sun Aug 21 18:06:23 2011 (r225333)
@@ -0,0 +1,70 @@
+/* $Id: config.h.in,v 9.0 2011/08/21 01:44:35 zy Exp $ (Berkeley) $Date: 2011/08/21 01:44:35 $ */
+
+/* Define if you want a debugging version. */
+#cmakedefine DEBUG
+
+/* Define if you have a BSD version of curses. */
+#cmakedefine HAVE_BSD_CURSES
+
+/* Define when using wide characters */
+#cmakedefine USE_WIDECHAR
+
+/* Define when iconv can be used */
+#cmakedefine USE_ICONV
+
+/* Define if you have the `vfork' function. */
+#cmakedefine HAVE_VFORK
+
+/* Define if you have the Berkeley style revoke(2) system call. */
+#cmakedefine HAVE_REVOKE
+
+/* Define if you have a System V-style (broken) gettimeofday. */
+#cmakedefine HAVE_BROKEN_GETTIMEOFDAY
+
+/* Define if you have flock(2) style locking. */
+#cmakedefine HAVE_LOCK_FLOCK
+
+/* Define if you have fcntl(2) style locking. */
+#cmakedefine HAVE_LOCK_FCNTL
+
+/* Define if you have the <ncursesw/ncurses.h> header file. */
+#cmakedefine HAVE_NCURSESW_NCURSES_H
+
+/* Define if you have <ncurses.h> */
+#cmakedefine HAVE_NCURSES_H
+
+/* Define if you have the curses(3) waddnstr function. */
+#cmakedefine HAVE_CURSES_WADDNSTR
+
+/* Define if you have the curses(3) beep function. */
+#cmakedefine HAVE_CURSES_BEEP
+
+/* Define if you have the curses(3) flash function. */
+#cmakedefine HAVE_CURSES_FLASH
+
+/* Define if you have the curses(3) idlok function. */
+#cmakedefine HAVE_CURSES_IDLOK
+
+/* Define if you have the curses(3) keypad function. */
+#cmakedefine HAVE_CURSES_KEYPAD
+
+/* Define if you have the curses(3) newterm function. */
+#cmakedefine HAVE_CURSES_NEWTERM
+
+/* Define if you have the curses(3) setupterm function. */
+#cmakedefine HAVE_CURSES_SETUPTERM
+
+/* Define if you have the curses(3) tigetstr/tigetnum functions. */
+#cmakedefine HAVE_CURSES_TIGETSTR
+
+/* Define if you have <sys/mman.h> */
+#cmakedefine HAVE_SYS_MMAN_H
+
+/* Define if you have <sys/select.h> */
+#cmakedefine HAVE_SYS_SELECT_H
+
+/* Define if you have <sys/stropts.h> */
+#cmakedefine HAVE_SYS_STROPTS_H
+
+/* Define if you have <term.h> */
+#cmakedefine HAVE_TERM_H
Added: soc2011/zy/nvi-iconv/head/contrib/nvi2/build/pathnames.h.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/zy/nvi-iconv/head/contrib/nvi2/build/pathnames.h.in Sun Aug 21 18:06:23 2011 (r225333)
@@ -0,0 +1,45 @@
+/* @(#)pathnames.h.in 8.4 (Berkeley) 6/26/96 */
+
+#ifndef _PATH_BSHELL
+#define _PATH_BSHELL "@vi_cv_path_shell@"
+#endif
+
+#ifndef _PATH_EXRC
+#define _PATH_EXRC ".exrc"
+#endif
+
+#ifndef _PATH_MSGCAT
+#define _PATH_MSGCAT "/usr/share/vi/catalog/"
+#endif
+
+#ifndef _PATH_NEXRC
+#define _PATH_NEXRC ".nexrc"
+#endif
+
+#ifndef _PATH_PRESERVE
+#define _PATH_PRESERVE "@vi_cv_path_preserve@"
+#endif
+
+#ifndef _PATH_SYSV_PTY
+#define _PATH_SYSV_PTY "/dev/ptmx"
+#endif
+
+#ifndef _PATH_SENDMAIL
+#define _PATH_SENDMAIL "@vi_cv_path_sendmail@"
+#endif
+
+#ifndef _PATH_SYSEXRC
+#define _PATH_SYSEXRC "/etc/vi.exrc"
+#endif
+
+#ifndef _PATH_TAGS
+#define _PATH_TAGS "tags"
+#endif
+
+#ifndef _PATH_TMP
+#define _PATH_TMP "/tmp"
+#endif
+
+#ifndef _PATH_TTY
+#define _PATH_TTY "/dev/tty"
+#endif
Added: soc2011/zy/nvi-iconv/head/contrib/nvi2/build/recover.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/zy/nvi-iconv/head/contrib/nvi2/build/recover.in Sun Aug 21 18:06:23 2011 (r225333)
@@ -0,0 +1,49 @@
+#!/bin/sh -
+#
+# @(#)recover.in 8.8 (Berkeley) 10/10/96
+#
+# Script to recover nvi edit sessions.
+
+RECDIR="@vi_cv_path_preserve@"
+SENDMAIL="@vi_cv_path_sendmail@"
+
+echo 'Recovering nvi editor sessions.'
+
+# Check editor backup files.
+vibackup=`echo $RECDIR/vi.*`
+if [ "$vibackup" != "$RECDIR/vi.*" ]; then
+ for i in $vibackup; do
+ # Only test files that are readable.
+ if test ! -r $i; then
+ continue
+ fi
+
+ # Unmodified nvi editor backup files either have the
+ # execute bit set or are zero length. Delete them.
+ if test -x $i -o ! -s $i; then
+ rm $i
+ fi
+ done
+fi
+
+# It is possible to get incomplete recovery files, if the editor crashes
+# at the right time.
+virecovery=`echo $RECDIR/recover.*`
+if [ "$virecovery" != "$RECDIR/recover.*" ]; then
+ for i in $virecovery; do
+ # Only test files that are readable.
+ if test ! -r $i; then
+ continue
+ fi
+
+ # Delete any recovery files that are zero length, corrupted,
+ # or that have no corresponding backup file. Else send mail
+ # to the user.
+ recfile=`awk '/^X-vi-recover-path:/{print $2}' < $i`
+ if test -n "$recfile" -a -s "$recfile"; then
+ $SENDMAIL -t < $i
+ else
+ rm $i
+ fi
+ done
+fi
Modified: soc2011/zy/nvi-iconv/head/contrib/nvi2/common/conv.c
==============================================================================
--- soc2011/zy/nvi-iconv/head/contrib/nvi2/common/conv.c Sun Aug 21 16:38:16 2011 (r225332)
+++ soc2011/zy/nvi-iconv/head/contrib/nvi2/common/conv.c Sun Aug 21 18:06:23 2011 (r225333)
@@ -91,8 +91,11 @@
size_t *tolen, CHAR_T **dst, char *enc)
{
/* XXX UTF-16 linesep hack */
- if (!strncasecmp(enc, "utf-16", 6) && len % 2)
- str[--len] != '\0' && str++; /* shortern by 1, shift if LE */
+#ifdef USE_ICONV
+ if (!strncasecmp(enc, "utf-16", 6) && len % 2)
+ if (str[--len] != '\0') /* shortern by 1 */
+ str++; /* shift if LE */
+#endif
int i = 0, j;
CHAR_T **tostr = &cw->b_wc1;
Modified: soc2011/zy/nvi-iconv/head/contrib/nvi2/common/exf.c
==============================================================================
--- soc2011/zy/nvi-iconv/head/contrib/nvi2/common/exf.c Sun Aug 21 16:38:16 2011 (r225332)
+++ soc2011/zy/nvi-iconv/head/contrib/nvi2/common/exf.c Sun Aug 21 18:06:23 2011 (r225333)
@@ -78,7 +78,7 @@
gp = sp->gp;
if (name != NULL)
for (frp = gp->frefq.cqh_first;
- frp != (FREF *)&gp->frefq; frp = frp->q.cqe_next) {
+ frp != (void *)&gp->frefq; frp = frp->q.cqe_next) {
if (frp->name == NULL) {
tfrp = frp->q.cqe_next;
CIRCLEQ_REMOVE(&gp->frefq, frp, q);
@@ -1228,6 +1228,9 @@
size_t blen = 0;
char buf[4096]; /* not need to be '\0'-terminated */
recno_t ln = 1;
+ EXF *ep;
+
+ ep = sp->ep;
while (!db_rget(sp, ln++, &p, &len)) {
if (blen + len > sizeof(buf))
@@ -1248,7 +1251,7 @@
char *np;
db_rget(sp, 1, &p, &len);
if ((np = malloc(len-2))) {
- memcpy(sp->ep->_bom, p, 2);
+ memcpy(ep->_bom, p, 2);
memcpy(np, p+2, len-2);
db_rset(sp, 1, np, len-2); /* store w/o the BOM */
free(np);
@@ -1259,8 +1262,9 @@
recno_t lno;
key.data = &lno;
key.size = sizeof(lno);
- !sp->ep->db->seq(sp->ep->db, &key, &data, R_LAST) &&
- *(char*)data.data == '\0' && sp->ep->db->del(sp->ep->db, &key, 0);
+ if (!ep->db->seq(ep->db, &key, &data, R_LAST) &&
+ *(char*)data.data == '\0')
+ ep->db->del(ep->db, &key, 0);
o_set(sp, O_FILEENCODING, OS_STRDUP, "utf-16le", 0);
} else if (st == 2)
o_set(sp, O_FILEENCODING, OS_STRDUP, "utf-16be", 0);
Added: soc2011/zy/nvi-iconv/head/contrib/nvi2/common/port.h
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ soc2011/zy/nvi-iconv/head/contrib/nvi2/common/port.h Sun Aug 21 18:06:23 2011 (r225333)
@@ -0,0 +1,82 @@
+/*-
+ * Copyright (c) 1993, 1994
+ * The Regents of the University of California. All rights reserved.
+ * Copyright (c) 1993, 1994, 1995, 1996
+ * Keith Bostic. All rights reserved.
+ * Copyright (c) 2011
+ * Zhihao Yuan. All rights reserved.
+ *
+ * See the LICENSE file for redistribution information.
+ *
+ * $Id: port.h,v 9.1 2011/08/21 03:41:06 zy Exp $ (Berkeley) $Date: 2011/08/21 03:41:06 $
+ */
+
+/*
+ * XXX
+ * 2.9BSD extension to create a new process without copying the address space
+ */
+#ifndef HAVE_VFORK
+#define vfork fork
+#endif
+
+/*
+ * XXX
+ * Some versions of System V changed the number of arguments to gettimeofday
+ * without changing the name.
+ */
+#ifdef HAVE_BROKEN_GETTIMEOFDAY
+#define gettimeofday(tv, tz) gettimeofday(tv)
+#endif
+
+/*
+ * XXX
+ * If we don't have mmap, we fake it with read and write, but we'll
+ * still need the header information.
+ */
+#ifndef HAVE_SYS_MMAN_H
+#define MAP_SHARED 1 /* share changes */
+#define MAP_PRIVATE 2 /* changes are private */
+#define PROT_READ 0x1 /* pages can be read */
+#define PROT_WRITE 0x2 /* pages can be written */
+#define PROT_EXEC 0x4 /* pages can be executed */
+#endif
+
+/*
+ * XXX
+ * 4.4BSD extension to only set the software termios bits.
+ */
+#ifndef TCSASOFT /* 4.4BSD extension. */
+#define TCSASOFT 0
+#endif
+
+/*
+ * XXX
+ * MIN, MAX, historically in <sys/param.h>
+ */
+#ifndef MAX
+#define MAX(_a,_b) ((_a)<(_b)?(_b):(_a))
+#endif
+#ifndef MIN
+#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
+#endif
+
+/*
+ * XXX
+ * 4.4BSD extension to provide lock values in the open(2) call.
+ */
+#ifndef O_EXLOCK
+#define O_EXLOCK 0
+#endif
+
+#ifndef O_SHLOCK
+#define O_SHLOCK 0
+#endif
+
+/*
+ * XXX
+ * 4.4BSD extension to determine if a program dropped core from the exit
+ * status.
+ */
+#ifndef WCOREDUMP
+#define WCOREDUMP(a) 0
+#endif
Modified: soc2011/zy/nvi-iconv/head/contrib/nvi2/ex/ex_append.c
==============================================================================
--- soc2011/zy/nvi-iconv/head/contrib/nvi2/ex/ex_append.c Sun Aug 21 16:38:16 2011 (r225332)
+++ soc2011/zy/nvi-iconv/head/contrib/nvi2/ex/ex_append.c Sun Aug 21 18:06:23 2011 (r225333)
@@ -252,7 +252,7 @@
return (1);
for (cnt = 0, tp = tiq.cqh_first;
- tp != (TEXT *)&tiq; ++cnt, tp = tp->q.cqe_next)
+ tp != (void *)&tiq; ++cnt, tp = tp->q.cqe_next)
if (db_append(sp, 1, lno++, tp->lb, tp->len))
return (1);
Modified: soc2011/zy/nvi-iconv/head/contrib/nvi2/ex/ex_script.c
==============================================================================
--- soc2011/zy/nvi-iconv/head/contrib/nvi2/ex/ex_script.c Sun Aug 21 16:38:16 2011 (r225332)
+++ soc2011/zy/nvi-iconv/head/contrib/nvi2/ex/ex_script.c Sun Aug 21 18:06:23 2011 (r225333)
@@ -23,7 +23,7 @@
#include <sys/select.h>
#endif
#include <sys/stat.h>
-#ifdef HAVE_SYS5_PTY
+#ifdef HAVE_SYS_STROPTS_H
#include <sys/stropts.h>
#endif
#include <sys/time.h>
Modified: soc2011/zy/nvi-iconv/head/contrib/nvi2/ex/ex_write.c
==============================================================================
--- soc2011/zy/nvi-iconv/head/contrib/nvi2/ex/ex_write.c Sun Aug 21 16:38:16 2011 (r225332)
+++ soc2011/zy/nvi-iconv/head/contrib/nvi2/ex/ex_write.c Sun Aug 21 18:06:23 2011 (r225333)
@@ -318,7 +318,7 @@
lcnt = 0;
msg = "253|Writing...";
-#if defined(USE_WIDECHAR) && defined(USE_ICONV)
+#ifdef USE_ICONV
isutf16 = !strncasecmp(O_STR(sp, O_FILEENCODING), "utf-16", 6);
#else
isutf16 = 0;
Modified: soc2011/zy/nvi-iconv/head/contrib/nvi2/regex/regex.h
==============================================================================
--- soc2011/zy/nvi-iconv/head/contrib/nvi2/regex/regex.h Sun Aug 21 16:38:16 2011 (r225332)
+++ soc2011/zy/nvi-iconv/head/contrib/nvi2/regex/regex.h Sun Aug 21 18:06:23 2011 (r225333)
@@ -42,7 +42,7 @@
#ifdef __REGEX_PRIVATE
#include "config.h"
-#include "port.h"
+#include "../common/port.h"
#include "../common/multibyte.h"
#endif
Modified: soc2011/zy/nvi-iconv/head/contrib/nvi2/vi/v_txt.c
==============================================================================
--- soc2011/zy/nvi-iconv/head/contrib/nvi2/vi/v_txt.c Sun Aug 21 16:38:16 2011 (r225332)
+++ soc2011/zy/nvi-iconv/head/contrib/nvi2/vi/v_txt.c Sun Aug 21 18:06:23 2011 (r225333)
@@ -1914,8 +1914,10 @@
target = current;
if (isindent)
target += COL_OFF(target, sw);
- else
- target -= --target % sw;
+ else {
+ --target;
+ target -= target % sw;
+ }
/*
* The AI characters will be turned into overwrite characters if the
Modified: soc2011/zy/nvi-iconv/head/usr.bin/vi/Makefile
==============================================================================
--- soc2011/zy/nvi-iconv/head/usr.bin/vi/Makefile Sun Aug 21 16:38:16 2011 (r225332)
+++ soc2011/zy/nvi-iconv/head/usr.bin/vi/Makefile Sun Aug 21 18:06:23 2011 (r225333)
@@ -4,9 +4,6 @@
SRCDIR= ${.CURDIR}/../../contrib/nvi2
-#if using ncurses:
-CFLAGS+= -DSYSV_CURSES
-
WARNS?= 1
VI= nvi
Modified: soc2011/zy/nvi-iconv/head/usr.bin/vi/config.h
==============================================================================
--- soc2011/zy/nvi-iconv/head/usr.bin/vi/config.h Sun Aug 21 16:38:16 2011 (r225332)
+++ soc2011/zy/nvi-iconv/head/usr.bin/vi/config.h Sun Aug 21 18:06:23 2011 (r225333)
@@ -1,198 +1,70 @@
-/* config.h. Generated automatically by configure. */
-/* config.h.in. Generated automatically from configure.in by autoheader. */
-/* $FreeBSD$ */
+/* $Id: config.h.in,v 9.0 2011/08/21 01:44:35 zy Exp $ (Berkeley) $Date: 2011/08/21 01:44:35 $ */
-/* Define to empty if the keyword does not work. */
-/* #undef const */
-
-/* Define if you have a working `mmap' system call. */
-#define HAVE_MMAP 1
-
-/* Define if your struct stat has st_blksize. */
-#define HAVE_ST_BLKSIZE 1
-
-/* Define if you have <vfork.h>. */
-/* #undef HAVE_VFORK_H */
-
-/* Define to `int' if <sys/types.h> doesn't define. */
-/* #undef mode_t */
-
-/* Define to `long' if <sys/types.h> doesn't define. */
-/* #undef off_t */
+/* Define if you want a debugging version. */
+/* #undef DEBUG */
-/* Define to `int' if <sys/types.h> doesn't define. */
-/* #undef pid_t */
+/* Define if you have a BSD version of curses. */
+/* #undef HAVE_BSD_CURSES */
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-/* #undef size_t */
+/* Define when using wide characters */
+/* #define USE_WIDECHAR // defined in Makefile */
-/* Define if you have the ANSI C header files. */
-#define STDC_HEADERS 1
+/* Define when iconv can be used */
+/* #define USE_ICONV // defined in Makefile */
-/* Define if your <sys/time.h> declares struct tm. */
-/* #undef TM_IN_SYS_TIME */
+/* Define if you have the `vfork' function. */
+#define HAVE_VFORK
-/* Define vfork as fork if vfork does not work. */
-/* #undef vfork */
+/* Define if you have the Berkeley style revoke(2) system call. */
+#define HAVE_REVOKE
-/* Define if your processor stores words with the most significant
- byte first (like Motorola and SPARC, unlike Intel and VAX). */
-/* #undef WORDS_BIGENDIAN */
+/* Define if you have a System V-style (broken) gettimeofday. */
+/* #undef HAVE_BROKEN_GETTIMEOFDAY */
-/* Define to `int' if <sys/types.h> doesn't define. */
-/* #undef ssize_t */
+/* Define if you have flock(2) style locking. */
+#define HAVE_LOCK_FLOCK
-/* Define if you want a debugging version. */
-/* #undef DEBUG */
+/* Define if you have fcntl(2) style locking. */
+/* #undef HAVE_LOCK_FCNTL */
-/* Define if you have a System V-style (broken) gettimeofday. */
-/* #undef HAVE_BROKEN_GETTIMEOFDAY */
+/* Define if you have the <ncursesw/ncurses.h> header file. */
+/* #undef HAVE_NCURSESW_NCURSES_H */
-/* Define if you have a Ultrix-style (broken) vdisable. */
-/* #undef HAVE_BROKEN_VDISABLE */
+/* Define if you have <ncurses.h> */
+#define HAVE_NCURSES_H
-/* Define if you have a BSD version of curses. */
-#ifndef SYSV_CURSES
-#define HAVE_BSD_CURSES 1
-#endif
-
-/* Define if you have the curses(3) addnstr function. */
-#define HAVE_CURSES_ADDNSTR 1
-#define HAVE_CURSES_WADDNSTR 1
+/* Define if you have the curses(3) waddnstr function. */
+#define HAVE_CURSES_WADDNSTR
/* Define if you have the curses(3) beep function. */
-#ifdef SYSV_CURSES
-#define HAVE_CURSES_BEEP 1
-#endif
+#define HAVE_CURSES_BEEP
/* Define if you have the curses(3) flash function. */
-#ifdef SYSV_CURSES
-#define HAVE_CURSES_FLASH 1
-#endif
+#define HAVE_CURSES_FLASH
/* Define if you have the curses(3) idlok function. */
-#define HAVE_CURSES_IDLOK 1
+#define HAVE_CURSES_IDLOK
/* Define if you have the curses(3) keypad function. */
-#ifdef SYSV_CURSES
-#define HAVE_CURSES_KEYPAD 1
-#endif
+#define HAVE_CURSES_KEYPAD
/* Define if you have the curses(3) newterm function. */
-#ifdef SYSV_CURSES
-#define HAVE_CURSES_NEWTERM 1
-#endif
+#define HAVE_CURSES_NEWTERM
/* Define if you have the curses(3) setupterm function. */
-#ifdef SYSV_CURSES
-#define HAVE_CURSES_SETUPTERM 1
-#endif
+#define HAVE_CURSES_SETUPTERM
/* Define if you have the curses(3) tigetstr/tigetnum functions. */
-#ifdef SYSV_CURSES
-#define HAVE_CURSES_TIGETSTR 1
-#endif
-
-/* Define if you have the chsize(2) system call. */
-/* #undef HAVE_FTRUNCATE_CHSIZE */
-
-/* Define if you have the ftruncate(2) system call. */
-#define HAVE_FTRUNCATE_FTRUNCATE 1
-
-/* Define if you have fcntl(2) style locking. */
-/* #undef HAVE_LOCK_FCNTL */
-
-/* Define if you have flock(2) style locking. */
-#define HAVE_LOCK_FLOCK 1
-
-/* Define if you want to compile in the Perl interpreter. */
-/* #undef HAVE_PERL_INTERP */ /* XXX: SET IN Makefile CFLAGS */
-
-/* Define if your Perl is at least 5.003_01. */
-/* #undef HAVE_PERL_5_003_01 */ /* XXX: SET IN Makefile CFLAGS */
-
-/* Define if you have the Berkeley style revoke(2) system call. */
-#define HAVE_REVOKE 1
+#define HAVE_CURSES_TIGETSTR
/* Define if you have <sys/mman.h> */
-#define HAVE_SYS_MMAN_H 1
+#define HAVE_SYS_MMAN_H
/* Define if you have <sys/select.h> */
-/* #undef HAVE_SYS_SELECT_H 1 */
-
-/* Define if you have <term.h> */
-#ifdef SYSV_CURSES
-#define HAVE_TERM_H 1
-#endif
-
-/* Define if you have the System V style pty calls. */
-/* #undef HAVE_SYS5_PTY */
-
-/* Define if you want to compile in the Tcl interpreter. */
-/* #define HAVE_TCL_INTERP */ /* XXX: SET IN Makefile CFLAGS */
-
-/* Define if your sprintf returns a pointer, not a length. */
-/* #undef SPRINTF_RET_CHARPNT */
-
-/* Define if you have the bsearch function. */
-#define HAVE_BSEARCH 1
-
-/* Define if you have the gethostname function. */
-#define HAVE_GETHOSTNAME 1
-
-/* Define if you have the getopt function. */
-#define HAVE_GETOPT 1
-
-/* Define if you have the getpagesize function. */
-#define HAVE_GETPAGESIZE 1
-
-/* Define if you have the memchr function. */
-#define HAVE_MEMCHR 1
-
-/* Define if you have the memcpy function. */
-#define HAVE_MEMCPY 1
-
-/* Define if you have the memmove function. */
-#define HAVE_MEMMOVE 1
+#define HAVE_SYS_SELECT_H
-/* Define if you have the memset function. */
-#define HAVE_MEMSET 1
+/* Define if you have <sys/stropts.h> */
+/* #undef HAVE_SYS_STROPTS_H */
-/* Define if you have the mkstemp function. */
-#define HAVE_MKSTEMP 1
-
-/* Define if you have the mmap function. */
-#define HAVE_MMAP 1
-
-/* Define if you have the select function. */
-#define HAVE_SELECT 1
-
-/* Define if you have the setenv function. */
-#define HAVE_SETENV 1
-
-/* Define if you have the snprintf function. */
-#define HAVE_SNPRINTF 1
-
-/* Define if you have the strdup function. */
-#define HAVE_STRDUP 1
-
-/* Define if you have the strerror function. */
-#define HAVE_STRERROR 1
-
-/* Define if you have the strpbrk function. */
-#define HAVE_STRPBRK 1
-
-/* Define if you have the strsep function. */
-#define HAVE_STRSEP 1
-
-/* Define if you have the strtol function. */
-#define HAVE_STRTOL 1
-
-/* Define if you have the strtoul function. */
-#define HAVE_STRTOUL 1
-
-/* Define if you have the unsetenv function. */
-#define HAVE_UNSETENV 1
-
-/* Define if you have the vsnprintf function. */
-#define HAVE_VSNPRINTF 1
+/* Define if you have <term.h> */
+#define HAVE_TERM_H
Modified: soc2011/zy/nvi-iconv/head/usr.bin/vi/pathnames.h
==============================================================================
--- soc2011/zy/nvi-iconv/head/usr.bin/vi/pathnames.h Sun Aug 21 16:38:16 2011 (r225332)
+++ soc2011/zy/nvi-iconv/head/usr.bin/vi/pathnames.h Sun Aug 21 18:06:23 2011 (r225333)
@@ -13,7 +13,7 @@
#endif
#ifndef _PATH_MSGCAT
-#define _PATH_MSGCAT "/usr/share/vi/catalog/"
+#define _PATH_MSGCAT "/usr/share/vi/catalog/"
#endif
#ifndef _PATH_NEXRC
More information about the svn-soc-all
mailing list