Mercurial > vim
comparison src/search.c @ 18203:e0ec4cd7a865 v8.1.2096
patch 8.1.2096: too many #ifdefs
Commit: https://github.com/vim/vim/commit/8c96af9c05bfcac2d5ae081e098d4863db561511
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 28 19:05:57 2019 +0200
patch 8.1.2096: too many #ifdefs
Problem: Too many #ifdefs.
Solution: Graduate FEAT_COMMENTS.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 28 Sep 2019 19:15:03 +0200 |
parents | 1868ec23360e |
children | c8a53c0daeed |
comparison
equal
deleted
inserted
replaced
18202:13049de86673 | 18203:e0ec4cd7a865 |
---|---|
5391 * looking for a define). A line starting with "# define" | 5391 * looking for a define). A line starting with "# define" |
5392 * is not considered to be a comment line. | 5392 * is not considered to be a comment line. |
5393 */ | 5393 */ |
5394 if (!define_matched && skip_comments) | 5394 if (!define_matched && skip_comments) |
5395 { | 5395 { |
5396 #ifdef FEAT_COMMENTS | |
5397 if ((*line != '#' || | 5396 if ((*line != '#' || |
5398 STRNCMP(skipwhite(line + 1), "define", 6) != 0) | 5397 STRNCMP(skipwhite(line + 1), "define", 6) != 0) |
5399 && get_leader_len(line, NULL, FALSE, TRUE)) | 5398 && get_leader_len(line, NULL, FALSE, TRUE)) |
5400 matched = FALSE; | 5399 matched = FALSE; |
5401 | 5400 |
5406 * Note: Doesn't skip "/ *" in comments. | 5405 * Note: Doesn't skip "/ *" in comments. |
5407 */ | 5406 */ |
5408 p = skipwhite(line); | 5407 p = skipwhite(line); |
5409 if (matched | 5408 if (matched |
5410 || (p[0] == '/' && p[1] == '*') || p[0] == '*') | 5409 || (p[0] == '/' && p[1] == '*') || p[0] == '*') |
5411 #endif | |
5412 for (p = line; *p && p < startp; ++p) | 5410 for (p = line; *p && p < startp; ++p) |
5413 { | 5411 { |
5414 if (matched | 5412 if (matched |
5415 && p[0] == '/' | 5413 && p[0] == '/' |
5416 && (p[1] == '*' || p[1] == '/')) | 5414 && (p[1] == '*' || p[1] == '/')) |