aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tag.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2023-04-26 23:23:44 +0200
committerGitHub <noreply@github.com>2023-04-26 23:23:44 +0200
commit3b0df1780e2c8526bda5dead18ee7cc45925caba (patch)
treec8415dc986f1cd3ddf6044b4ec0318a089db3ed7 /src/nvim/tag.c
parent7d0479c55810af9bf9f115ba69d1419ea81ec41e (diff)
downloadrneovim-3b0df1780e2c8526bda5dead18ee7cc45925caba.tar.gz
rneovim-3b0df1780e2c8526bda5dead18ee7cc45925caba.tar.bz2
rneovim-3b0df1780e2c8526bda5dead18ee7cc45925caba.zip
refactor: uncrustify
Notable changes: replace all infinite loops to `while(true)` and remove `int` from `unsigned int`.
Diffstat (limited to 'src/nvim/tag.c')
-rw-r--r--src/nvim/tag.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/tag.c b/src/nvim/tag.c
index cebc7d5d89..19c62e2b0e 100644
--- a/src/nvim/tag.c
+++ b/src/nvim/tag.c
@@ -538,7 +538,7 @@ void do_tag(char *tag, int type, int count, int forceit, int verbose)
}
// Repeat searching for tags, when a file has not been found.
- for (;;) {
+ while (true) {
int other_name;
char *name;
@@ -1260,9 +1260,9 @@ static int find_tagfunc_tags(char *pat, garray_T *ga, int *match_count, int flag
vim_snprintf(flagString, sizeof(flagString),
"%s%s%s",
- g_tag_at_cursor ? "c": "",
- flags & TAG_INS_COMP ? "i": "",
- flags & TAG_REGEXP ? "r": "");
+ g_tag_at_cursor ? "c" : "",
+ flags & TAG_INS_COMP ? "i" : "",
+ flags & TAG_REGEXP ? "r" : "");
save_pos = curwin->w_cursor;
result = callback_call(&curbuf->b_tfu_cb, 3, args, &rettv);
@@ -2094,7 +2094,7 @@ static void findtags_get_all_tags(findtags_state_T *st, findtags_match_args_T *m
CLEAR_FIELD(search_info);
// Read and parse the lines in the file one by one
- for (;;) {
+ while (true) {
// check for CTRL-C typed, more often when jumping around
if (st->state == TS_BINARY || st->state == TS_SKIP_BACK) {
line_breakcheck();
@@ -2558,7 +2558,7 @@ int get_tagfname(tagname_T *tnp, int first, char *buf)
// There are two states:
// tnp->tn_did_filefind_init == false: setup for next part in 'tags'.
// tnp->tn_did_filefind_init == true: find next file in this part.
- for (;;) {
+ while (true) {
if (tnp->tn_did_filefind_init) {
fname = vim_findfile(tnp->tn_search_ctx);
if (fname != NULL) {
@@ -3168,7 +3168,7 @@ static int find_extra(char **pp)
char first_char = **pp;
// Repeat for addresses separated with ';'
- for (;;) {
+ while (true) {
if (ascii_isdigit(*str)) {
str = skipdigits(str + 1);
} else if (*str == '/' || *str == '?') {