diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-21 11:09:40 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-21 11:09:40 +0000 |
commit | 5e34ff29bcc870936ab18172f438a34d042d4e03 (patch) | |
tree | a5e7a528f2f916eb883f1161eadceacdf2dca4be /editors | |
parent | 8b814b4a349e2262c0ad25793b05206a14651ebb (diff) | |
download | busybox-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')
-rw-r--r-- | editors/cmp.c | 6 | ||||
-rw-r--r-- | editors/diff.c | 4 | ||||
-rw-r--r-- | editors/vi.c | 16 |
3 files changed, 13 insertions, 13 deletions
diff --git a/editors/cmp.c b/editors/cmp.c index 2e98e6e24..a20bb8836 100644 --- a/editors/cmp.c +++ b/editors/cmp.c | |||
@@ -37,7 +37,7 @@ int cmp_main(int argc UNUSED_PARAM, char **argv) | |||
37 | { | 37 | { |
38 | FILE *fp1, *fp2, *outfile = stdout; | 38 | FILE *fp1, *fp2, *outfile = stdout; |
39 | const char *filename1, *filename2 = "-"; | 39 | const char *filename1, *filename2 = "-"; |
40 | USE_DESKTOP(off_t skip1 = 0, skip2 = 0;) | 40 | IF_DESKTOP(off_t skip1 = 0, skip2 = 0;) |
41 | off_t char_pos = 0; | 41 | off_t char_pos = 0; |
42 | int line_pos = 1; /* Hopefully won't overflow... */ | 42 | int line_pos = 1; /* Hopefully won't overflow... */ |
43 | const char *fmt; | 43 | const char *fmt; |
@@ -48,8 +48,8 @@ int cmp_main(int argc UNUSED_PARAM, char **argv) | |||
48 | xfunc_error_retval = 2; /* 1 is returned if files are different. */ | 48 | xfunc_error_retval = 2; /* 1 is returned if files are different. */ |
49 | 49 | ||
50 | opt_complementary = "-1" | 50 | opt_complementary = "-1" |
51 | USE_DESKTOP(":?4") | 51 | IF_DESKTOP(":?4") |
52 | SKIP_DESKTOP(":?2") | 52 | IF_NOT_DESKTOP(":?2") |
53 | ":l--s:s--l"; | 53 | ":l--s:s--l"; |
54 | opt = getopt32(argv, opt_chars); | 54 | opt = getopt32(argv, opt_chars); |
55 | argv += optind; | 55 | argv += optind; |
diff --git a/editors/diff.c b/editors/diff.c index 7fce70d08..00ecdd8c6 100644 --- a/editors/diff.c +++ b/editors/diff.c | |||
@@ -103,8 +103,8 @@ struct globals { | |||
103 | smallint exit_status; | 103 | smallint exit_status; |
104 | int opt_U_context; | 104 | int opt_U_context; |
105 | size_t max_context; /* size of context_vec_start */ | 105 | size_t max_context; /* size of context_vec_start */ |
106 | USE_FEATURE_DIFF_DIR(int dl_count;) | 106 | IF_FEATURE_DIFF_DIR(int dl_count;) |
107 | USE_FEATURE_DIFF_DIR(char **dl;) | 107 | IF_FEATURE_DIFF_DIR(char **dl;) |
108 | char *opt_S_start; | 108 | char *opt_S_start; |
109 | const char *label1; | 109 | const char *label1; |
110 | const char *label2; | 110 | const char *label2; |
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 |