Module Name: src
Committed By: lukem
Date: Fri Aug 7 16:19:54 UTC 2009
Modified Files:
src/dist/nvi/common: options.c
src/dist/nvi/ex: ex_shift.c ex_txt.c
src/dist/nvi/vi: v_txt.c
Log Message:
Rename "expandtabs" to "expandtab" to match documentation (and vim,
where I got the idea from).
Actually implement the "et" abbreviation for expandtab.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/dist/nvi/common/options.c
cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/ex/ex_shift.c
cvs rdiff -u -r1.3 -r1.4 src/dist/nvi/ex/ex_txt.c
cvs rdiff -u -r1.5 -r1.6 src/dist/nvi/vi/v_txt.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/dist/nvi/common/options.c
diff -u src/dist/nvi/common/options.c:1.5 src/dist/nvi/common/options.c:1.6
--- src/dist/nvi/common/options.c:1.5 Fri Dec 12 22:55:55 2008
+++ src/dist/nvi/common/options.c Fri Aug 7 16:19:53 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: options.c,v 1.5 2008/12/12 22:55:55 lukem Exp $ */
+/* $NetBSD: options.c,v 1.6 2009/08/07 16:19:53 lukem Exp $ */
/*-
* Copyright (c) 1991, 1993, 1994
@@ -84,8 +84,8 @@
{L("errorbells"), NULL, OPT_0BOOL, 0},
/* O_ESCAPETIME 4.4BSD */
{L("escapetime"), NULL, OPT_NUM, 0},
-/* O_EXPANDTABS NetBSD 5.0 */
- {L("expandtabs"), NULL, OPT_0BOOL, 0},
+/* O_EXPANDTAB NetBSD 5.0 */
+ {L("expandtab"), NULL, OPT_0BOOL, 0},
/* O_EXRC System V (undocumented) */
{L("exrc"), NULL, OPT_0BOOL, 0},
/* O_EXTENDED 4.4BSD */
@@ -267,6 +267,7 @@
{L("dir"), O_TMP_DIRECTORY}, /* 4BSD */
{L("eb"), O_ERRORBELLS}, /* 4BSD */
{L("ed"), O_EDCOMPATIBLE}, /* 4BSD */
+ {L("et"), O_EXPANDTAB}, /* NetBSD 5.0 */
{L("ex"), O_EXRC}, /* System V (undocumented) */
#ifdef GTAGS
{L("gt"), O_GTAGSMODE}, /* FreeBSD, NetBSD */
Index: src/dist/nvi/ex/ex_shift.c
diff -u src/dist/nvi/ex/ex_shift.c:1.2 src/dist/nvi/ex/ex_shift.c:1.3
--- src/dist/nvi/ex/ex_shift.c:1.2 Fri Dec 12 22:55:56 2008
+++ src/dist/nvi/ex/ex_shift.c Fri Aug 7 16:19:54 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ex_shift.c,v 1.2 2008/12/12 22:55:56 lukem Exp $ */
+/* $NetBSD: ex_shift.c,v 1.3 2009/08/07 16:19:54 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -135,7 +135,7 @@
*/
tbp = bp;
newidx = 0;
- if (!O_ISSET(sp, O_EXPANDTABS)) {
+ if (!O_ISSET(sp, O_EXPANDTAB)) {
for (; newcol >= O_VAL(sp, O_TABSTOP); ++newidx) {
*tbp++ = '\t';
newcol -= O_VAL(sp, O_TABSTOP);
Index: src/dist/nvi/ex/ex_txt.c
diff -u src/dist/nvi/ex/ex_txt.c:1.3 src/dist/nvi/ex/ex_txt.c:1.4
--- src/dist/nvi/ex/ex_txt.c:1.3 Fri Dec 12 22:55:56 2008
+++ src/dist/nvi/ex/ex_txt.c Fri Aug 7 16:19:54 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ex_txt.c,v 1.3 2008/12/12 22:55:56 lukem Exp $ */
+/* $NetBSD: ex_txt.c,v 1.4 2009/08/07 16:19:54 lukem Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -407,7 +407,7 @@
*/
cno = 0;
tabs = 0;
- if (!O_ISSET(sp, O_EXPANDTABS)) {
+ if (!O_ISSET(sp, O_EXPANDTAB)) {
for (; cno + COL_OFF(cno, ts) <= scno; ++tabs)
cno += COL_OFF(cno, ts);
}
Index: src/dist/nvi/vi/v_txt.c
diff -u src/dist/nvi/vi/v_txt.c:1.5 src/dist/nvi/vi/v_txt.c:1.6
--- src/dist/nvi/vi/v_txt.c:1.5 Sun Jan 18 03:45:50 2009
+++ src/dist/nvi/vi/v_txt.c Fri Aug 7 16:19:54 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: v_txt.c,v 1.5 2009/01/18 03:45:50 lukem Exp $ */
+/* $NetBSD: v_txt.c,v 1.6 2009/08/07 16:19:54 lukem Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -1725,16 +1725,16 @@
/*
* If there are no spaces, or no tabs after spaces and less than
* ts spaces, it's already minimal.
- * Keep analysing if expandtabs is set.
+ * Keep analysing if expandtab is set.
*/
if ((!spaces || (!tab_after_sp && spaces < ts)) &&
- !O_ISSET(sp, O_EXPANDTABS))
+ !O_ISSET(sp, O_EXPANDTAB))
return;
/* Count up spaces/tabs needed to get to the target. */
cno = 0;
tabs = 0;
- if (!O_ISSET(sp, O_EXPANDTABS)) {
+ if (!O_ISSET(sp, O_EXPANDTAB)) {
for (; cno + COL_OFF(cno, ts) <= scno; ++tabs)
cno += COL_OFF(cno, ts);
}
@@ -1962,7 +1962,7 @@
else {
cno = current;
tabs = 0;
- if (!O_ISSET(sp, O_EXPANDTABS)) {
+ if (!O_ISSET(sp, O_EXPANDTAB)) {
for (; cno + COL_OFF(cno, ts) <= target; ++tabs)
cno += COL_OFF(cno, ts);
}