svn commit: trunk/busybox/editors

vda at busybox.net vda at busybox.net
Wed Jul 18 22:03:42 UTC 2007


Author: vda
Date: 2007-07-18 15:03:40 -0700 (Wed, 18 Jul 2007)
New Revision: 19160

Log:
vi: comment out dead code



Modified:
   trunk/busybox/editors/vi.c


Changeset:
Modified: trunk/busybox/editors/vi.c
===================================================================
--- trunk/busybox/editors/vi.c	2007-07-18 21:57:24 UTC (rev 19159)
+++ trunk/busybox/editors/vi.c	2007-07-18 22:03:40 UTC (rev 19160)
@@ -330,16 +330,16 @@
 	last_status_cksum = 0;
 	text = NULL;
 
-	if (ENABLE_FEATURE_VI_READONLY && strncmp(applet_name, "view", 4) == 0) {
+#ifdef NO_SUCH_APPLET_YET
+	/* If we aren't "vi", we are "view" */
+	if (ENABLE_FEATURE_VI_READONLY && applet_name[2]) {
 		SET_READONLY_MODE(readonly_mode);
 	}
+#endif
 
 	vi_setops = VI_AUTOINDENT | VI_SHOWMATCH | VI_IGNORECASE | VI_ERR_METHOD;
 #if ENABLE_FEATURE_VI_YANKMARK
-	//for (i = 0; i < 28; i++) {
-	//	reg[i] = 0;
-	//}					// init the yank regs
-	memset(reg, 0, sizeof(reg));
+	memset(reg, 0, sizeof(reg)); // init the yank regs
 #endif
 #if ENABLE_FEATURE_VI_DOT_CMD || ENABLE_FEATURE_VI_YANKMARK
 	modifying_cmds = (char *) "aAcCdDiIJoOpPrRsxX<>~";	// cmds modifying text[]




More information about the busybox-cvs mailing list