diff options
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) { FILE *fp1, *fp2, *outfile = stdout; const char *filename1, *filename2 = "-"; - USE_DESKTOP(off_t skip1 = 0, skip2 = 0;) + IF_DESKTOP(off_t skip1 = 0, skip2 = 0;) off_t char_pos = 0; int line_pos = 1; /* Hopefully won't overflow... */ const char *fmt; @@ -48,8 +48,8 @@ int cmp_main(int argc UNUSED_PARAM, char **argv) xfunc_error_retval = 2; /* 1 is returned if files are different. */ opt_complementary = "-1" - USE_DESKTOP(":?4") - SKIP_DESKTOP(":?2") + IF_DESKTOP(":?4") + IF_NOT_DESKTOP(":?2") ":l--s:s--l"; opt = getopt32(argv, opt_chars); 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 { smallint exit_status; int opt_U_context; size_t max_context; /* size of context_vec_start */ - USE_FEATURE_DIFF_DIR(int dl_count;) - USE_FEATURE_DIFF_DIR(char **dl;) + IF_FEATURE_DIFF_DIR(int dl_count;) + IF_FEATURE_DIFF_DIR(char **dl;) char *opt_S_start; const char *label1; 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 { SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ last_file_modified = -1; \ /* "" but has space for 2 chars: */ \ - USE_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \ + IF_FEATURE_VI_SEARCH(last_search_pattern = xzalloc(2);) \ } while (0) @@ -426,7 +426,7 @@ int vi_main(int argc, char **argv) initial_cmds[0] = xstrndup(p, MAX_INPUT_LEN); } #endif - while ((c = getopt(argc, argv, "hCRH" USE_FEATURE_VI_COLON("c:"))) != -1) { + while ((c = getopt(argc, argv, "hCRH" IF_FEATURE_VI_COLON("c:"))) != -1) { switch (c) { #if ENABLE_FEATURE_VI_CRASHME case 'C': @@ -643,8 +643,8 @@ static char *get_one_address(char *p, int *addr) // get colon addr, if present { int st; char *q; - USE_FEATURE_VI_YANKMARK(char c;) - USE_FEATURE_VI_SEARCH(char *pat;) + IF_FEATURE_VI_YANKMARK(char c;) + IF_FEATURE_VI_SEARCH(char *pat;) *addr = -1; // assume no addr if (*p == '.') { // the current line @@ -883,10 +883,10 @@ static void colon(char *buf) // how many lines in text[]? li = count_lines(text, end - 1); status_line("\"%s\"%s" - USE_FEATURE_VI_READONLY("%s") + IF_FEATURE_VI_READONLY("%s") " %dL, %dC", current_filename, (file_size(fn) < 0 ? " [New file]" : ""), - USE_FEATURE_VI_READONLY( + IF_FEATURE_VI_READONLY( ((readonly_mode) ? " [Readonly]" : ""), ) li, ch); @@ -992,9 +992,9 @@ static void colon(char *buf) // how many lines in text[]? li = count_lines(q, q + ch - 1); status_line("\"%s\"" - USE_FEATURE_VI_READONLY("%s") + IF_FEATURE_VI_READONLY("%s") " %dL, %dC", fn, - USE_FEATURE_VI_READONLY((readonly_mode ? " [Readonly]" : ""),) + IF_FEATURE_VI_READONLY((readonly_mode ? " [Readonly]" : ""),) li, ch); if (ch > 0) { // if the insert is before "dot" then we need to update |