aboutsummaryrefslogtreecommitdiff
path: root/editors/vi.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-21 11:09:40 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-21 11:09:40 +0000
commit5e34ff29bcc870936ab18172f438a34d042d4e03 (patch)
treea5e7a528f2f916eb883f1161eadceacdf2dca4be /editors/vi.c
parent8b814b4a349e2262c0ad25793b05206a14651ebb (diff)
downloadbusybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.gz
busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.bz2
busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.zip
*: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
Diffstat (limited to 'editors/vi.c')
-rw-r--r--editors/vi.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/editors/vi.c b/editors/vi.c
index 0497bc251..ccc53fb58 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -271,7 +271,7 @@ struct globals {
271 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ 271 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
272 last_file_modified = -1; \ 272 last_file_modified = -1; \
273 /* "" but has space for 2 chars: */ \ 273 /* "" but has space for 2 chars: */ \
274 USE_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \ 274 IF_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \
275} while (0) 275} while (0)
276 276
277 277
@@ -426,7 +426,7 @@ int vi_main(int argc, char **argv)
426 initial_cmds[0] = xstrndup(p, MAX_INPUT_LEN); 426 initial_cmds[0] = xstrndup(p, MAX_INPUT_LEN);
427 } 427 }
428#endif 428#endif
429 while ((c = getopt(argc, argv, "hCRH" USE_FEATURE_VI_COLON("c:"))) != -1) { 429 while ((c = getopt(argc, argv, "hCRH" IF_FEATURE_VI_COLON("c:"))) != -1) {
430 switch (c) { 430 switch (c) {
431#if ENABLE_FEATURE_VI_CRASHME 431#if ENABLE_FEATURE_VI_CRASHME
432 case 'C': 432 case 'C':
@@ -643,8 +643,8 @@ static char *get_one_address(char *p, int *addr) // get colon addr, if present
643{ 643{
644 int st; 644 int st;
645 char *q; 645 char *q;
646 USE_FEATURE_VI_YANKMARK(char c;) 646 IF_FEATURE_VI_YANKMARK(char c;)
647 USE_FEATURE_VI_SEARCH(char *pat;) 647 IF_FEATURE_VI_SEARCH(char *pat;)
648 648
649 *addr = -1; // assume no addr 649 *addr = -1; // assume no addr
650 if (*p == '.') { // the current line 650 if (*p == '.') { // the current line
@@ -883,10 +883,10 @@ static void colon(char *buf)
883 // how many lines in text[]? 883 // how many lines in text[]?
884 li = count_lines(text, end - 1); 884 li = count_lines(text, end - 1);
885 status_line("\"%s\"%s" 885 status_line("\"%s\"%s"
886 USE_FEATURE_VI_READONLY("%s") 886 IF_FEATURE_VI_READONLY("%s")
887 " %dL, %dC", current_filename, 887 " %dL, %dC", current_filename,
888 (file_size(fn) < 0 ? " [New file]" : ""), 888 (file_size(fn) < 0 ? " [New file]" : ""),
889 USE_FEATURE_VI_READONLY( 889 IF_FEATURE_VI_READONLY(
890 ((readonly_mode) ? " [Readonly]" : ""), 890 ((readonly_mode) ? " [Readonly]" : ""),
891 ) 891 )
892 li, ch); 892 li, ch);
@@ -992,9 +992,9 @@ static void colon(char *buf)
992 // how many lines in text[]? 992 // how many lines in text[]?
993 li = count_lines(q, q + ch - 1); 993 li = count_lines(q, q + ch - 1);
994 status_line("\"%s\"" 994 status_line("\"%s\""
995 USE_FEATURE_VI_READONLY("%s") 995 IF_FEATURE_VI_READONLY("%s")
996 " %dL, %dC", fn, 996 " %dL, %dC", fn,
997 USE_FEATURE_VI_READONLY((readonly_mode ? " [Readonly]" : ""),) 997 IF_FEATURE_VI_READONLY((readonly_mode ? " [Readonly]" : ""),)
998 li, ch); 998 li, ch);
999 if (ch > 0) { 999 if (ch > 0) {
1000 // if the insert is before "dot" then we need to update 1000 // if the insert is before "dot" then we need to update