diff options
| author | Marco Hinz <mh.codebro@gmail.com> | 2014-04-29 21:56:49 +0200 |
|---|---|---|
| committer | Thiago de Arruda <tpadilha84@gmail.com> | 2014-04-29 17:51:09 -0300 |
| commit | 2e4613aecc712eb5e893d341da5f571f932376d5 (patch) | |
| tree | 41f6b1c751181319d88cc0fdb7aed61bf732701d /src | |
| parent | 046debb9359c85e2f2bc5c6d9481dac0025c6a80 (diff) | |
| download | rneovim-2e4613aecc712eb5e893d341da5f571f932376d5.tar.gz rneovim-2e4613aecc712eb5e893d341da5f571f932376d5.tar.bz2 rneovim-2e4613aecc712eb5e893d341da5f571f932376d5.zip | |
Remove NUL macro
Diffstat (limited to 'src')
| -rw-r--r-- | src/arabic.c | 4 | ||||
| -rw-r--r-- | src/ascii.h | 1 | ||||
| -rw-r--r-- | src/blowfish.c | 2 | ||||
| -rw-r--r-- | src/buffer.c | 62 | ||||
| -rw-r--r-- | src/charset.c | 72 | ||||
| -rw-r--r-- | src/crypt.c | 10 | ||||
| -rw-r--r-- | src/cursor_shape.c | 2 | ||||
| -rw-r--r-- | src/diff.c | 24 | ||||
| -rw-r--r-- | src/digraph.c | 20 | ||||
| -rw-r--r-- | src/edit.c | 254 | ||||
| -rw-r--r-- | src/eval.c | 382 | ||||
| -rw-r--r-- | src/ex_cmds.c | 208 | ||||
| -rw-r--r-- | src/ex_cmds2.c | 60 | ||||
| -rw-r--r-- | src/ex_docmd.c | 274 | ||||
| -rw-r--r-- | src/ex_eval.c | 32 | ||||
| -rw-r--r-- | src/ex_getln.c | 132 | ||||
| -rw-r--r-- | src/farsi.c | 4 | ||||
| -rw-r--r-- | src/file_search.c | 56 | ||||
| -rw-r--r-- | src/fileio.c | 166 | ||||
| -rw-r--r-- | src/fold.c | 18 | ||||
| -rw-r--r-- | src/garray.c | 2 | ||||
| -rw-r--r-- | src/getchar.c | 150 | ||||
| -rw-r--r-- | src/globals.h | 14 | ||||
| -rw-r--r-- | src/hardcopy.c | 36 | ||||
| -rw-r--r-- | src/hashtab.c | 2 | ||||
| -rw-r--r-- | src/if_cscope.c | 22 | ||||
| -rw-r--r-- | src/indent.c | 18 | ||||
| -rw-r--r-- | src/indent_c.c | 80 | ||||
| -rw-r--r-- | src/keymap.c | 20 | ||||
| -rw-r--r-- | src/keymap.h | 4 | ||||
| -rw-r--r-- | src/macros.h | 4 | ||||
| -rw-r--r-- | src/main.c | 22 | ||||
| -rw-r--r-- | src/mark.c | 30 | ||||
| -rw-r--r-- | src/mbyte.c | 100 | ||||
| -rw-r--r-- | src/memfile.c | 6 | ||||
| -rw-r--r-- | src/memline.c | 60 | ||||
| -rw-r--r-- | src/menu.c | 104 | ||||
| -rw-r--r-- | src/message.c | 100 | ||||
| -rw-r--r-- | src/misc1.c | 134 | ||||
| -rw-r--r-- | src/misc2.c | 72 | ||||
| -rw-r--r-- | src/move.c | 2 | ||||
| -rw-r--r-- | src/msgpack_rpc.c | 2 | ||||
| -rw-r--r-- | src/normal.c | 160 | ||||
| -rw-r--r-- | src/ops.c | 192 | ||||
| -rw-r--r-- | src/option.c | 250 | ||||
| -rw-r--r-- | src/os/env.c | 2 | ||||
| -rw-r--r-- | src/os/fs.c | 2 | ||||
| -rw-r--r-- | src/os/shell.c | 8 | ||||
| -rw-r--r-- | src/os/users.c | 2 | ||||
| -rw-r--r-- | src/os_unix.c | 56 | ||||
| -rw-r--r-- | src/path.c | 112 | ||||
| -rw-r--r-- | src/popupmnu.c | 8 | ||||
| -rw-r--r-- | src/quickfix.c | 98 | ||||
| -rw-r--r-- | src/regexp.c | 160 | ||||
| -rw-r--r-- | src/regexp_nfa.c | 62 | ||||
| -rw-r--r-- | src/screen.c | 192 | ||||
| -rw-r--r-- | src/search.c | 140 | ||||
| -rw-r--r-- | src/sha256.c | 2 | ||||
| -rw-r--r-- | src/spell.c | 520 | ||||
| -rw-r--r-- | src/syntax.c | 96 | ||||
| -rw-r--r-- | src/tag.c | 78 | ||||
| -rw-r--r-- | src/term.c | 128 | ||||
| -rw-r--r-- | src/ui.c | 2 | ||||
| -rw-r--r-- | src/undo.c | 18 | ||||
| -rw-r--r-- | src/version.c | 18 | ||||
| -rw-r--r-- | src/window.c | 14 |
66 files changed, 2543 insertions, 2544 deletions
diff --git a/src/arabic.c b/src/arabic.c index 54f88f8757..f62a1a9c05 100644 --- a/src/arabic.c +++ b/src/arabic.c @@ -1418,7 +1418,7 @@ int arabic_shape(int c, int *ccp, int *c1p, int prev_c, int prev_c1, /* Sanity check -- curr_c should, in the future, never be 0. * We should, in the future, insert a fatal error here. */ - if (curr_c == NUL) { + if (curr_c == '\0') { curr_c = c; } @@ -1467,7 +1467,7 @@ int arabic_maycombine(int two) */ static int A_firstc_laa(int c, int c1) { - if ((c1 != NUL) && (c == a_LAM) && !A_is_harakat(c1)) { + if ((c1 != '\0') && (c == a_LAM) && !A_is_harakat(c1)) { return c1; } return 0; diff --git a/src/ascii.h b/src/ascii.h index cf488c56a7..e63bdb2fde 100644 --- a/src/ascii.h +++ b/src/ascii.h @@ -22,7 +22,6 @@ #define CharOrdUp(x) ((x) - 'A') #define ROT13(c, a) (((((c) - (a)) + 13) % 26) + (a)) -#define NUL '\000' #define BELL '\007' #define BS '\010' #define TAB '\011' diff --git a/src/blowfish.c b/src/blowfish.c index 67712a2fbc..707d3e53ee 100644 --- a/src/blowfish.c +++ b/src/blowfish.c @@ -567,7 +567,7 @@ void bf_crypt_decode(char_u *ptr, long len) void bf_crypt_init_keys(char_u *passwd) { char_u *p; - for (p = passwd; *p != NUL; p++) { + for (p = passwd; *p != '\0'; p++) { BF_CFB_UPDATE(*p); } } diff --git a/src/buffer.c b/src/buffer.c index 8723e31be3..c4455bfe8e 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -747,7 +747,7 @@ do_bufdel ( break; } else { /* addr_count == 1 */ arg = skipwhite(arg); - if (*arg == NUL) + if (*arg == '\0') break; if (!VIM_ISDIGIT(*arg)) { p = skiptowhite_esc(arg); @@ -1232,7 +1232,7 @@ void enter_buffer(buf_T *buf) /* If there is no filetype, allow for detecting one. Esp. useful for * ":ball" used in a autocommand. If there already is a filetype we * might prefer to keep it. */ - if (*curbuf->b_p_ft == NUL) + if (*curbuf->b_p_ft == '\0') did_filetype = FALSE; open_buffer(FALSE, NULL, 0); @@ -1265,7 +1265,7 @@ void enter_buffer(buf_T *buf) (void)keymap_init(); /* May need to set the spell language. Can only do this after the buffer * has been properly setup. */ - if (!curbuf->b_help && curwin->w_p_spell && *curwin->w_s->b_p_spl != NUL) + if (!curbuf->b_help && curwin->w_p_spell && *curwin->w_s->b_p_spl != '\0') (void)did_set_spelllang(curwin); redraw_later(NOT_VALID); @@ -1768,7 +1768,7 @@ buflist_findpat ( for (attempt = 0; attempt <= 3; ++attempt) { /* may add '^' and '$' */ if (toggledollar) - *patend = (attempt < 2) ? NUL : '$'; /* add/remove '$' */ + *patend = (attempt < 2) ? '\0' : '$'; /* add/remove '$' */ p = pat; if (*p == '^' && !(attempt & 1)) /* add/remove '^' */ ++p; @@ -2227,7 +2227,7 @@ setfname ( struct stat st; #endif - if (ffname == NULL || *ffname == NUL) { + if (ffname == NULL || *ffname == '\0') { /* Removing the name. */ vim_free(buf->b_ffname); vim_free(buf->b_sfname); @@ -2443,7 +2443,7 @@ static int otherfile_buf(buf_T *buf, char_u *ffname ) { /* no name is different */ - if (ffname == NULL || *ffname == NUL || buf->b_ffname == NULL) + if (ffname == NULL || *ffname == '\0' || buf->b_ffname == NULL) return TRUE; if (fnamecmp(ffname, buf->b_ffname) == 0) return FALSE; @@ -2653,7 +2653,7 @@ void maketitle(void) } t_str = buf; - if (*p_titlestring != NUL) { + if (*p_titlestring != '\0') { if (stl_syntax & STL_IN_TITLE) { int use_sandbox = FALSE; int save_called_emsg = called_emsg; @@ -2714,7 +2714,7 @@ void maketitle(void) vim_strncpy(buf + off, (char_u *)_("help"), (size_t)(SPACE_FOR_DIR - off - 1)); else - *p = NUL; + *p = '\0'; /* Translate unprintable chars and concatenate. Keep some * room for the server name. When there is no room (very long @@ -2745,7 +2745,7 @@ void maketitle(void) if (p_icon) { i_str = buf; - if (*p_iconstring != NUL) { + if (*p_iconstring != '\0') { if (stl_syntax & STL_IN_ICON) { int use_sandbox = FALSE; int save_called_emsg = called_emsg; @@ -2766,7 +2766,7 @@ void maketitle(void) i_name = buf_spname(curbuf); else /* use file name only in icon */ i_name = path_tail(curbuf->b_ffname); - *i_str = NUL; + *i_str = '\0'; /* Truncate name at 100 bytes. */ len = (int)STRLEN(i_name); if (len > 100) { @@ -2914,7 +2914,7 @@ build_stl_str_hl ( /* Get line & check if empty (cursorpos will show "0-1"). Note that * p will become invalid when getting another buffer line. */ p = ml_get_buf(wp->w_buffer, wp->w_cursor.lnum, FALSE); - empty_line = (*p == NUL); + empty_line = (*p == '\0'); /* Get the byte value now, in case we need it below. This is more * efficient than making a copy of the line. */ @@ -2939,22 +2939,22 @@ build_stl_str_hl ( break; } - if (*s != NUL && *s != '%') + if (*s != '\0' && *s != '%') prevchar_isflag = prevchar_isitem = FALSE; /* * Handle up to the next '%' or the end. */ - while (*s != NUL && *s != '%' && p + 1 < out + outlen) + while (*s != '\0' && *s != '%' && p + 1 < out + outlen) *p++ = *s++; - if (*s == NUL || p + 1 >= out + outlen) + if (*s == '\0' || p + 1 >= out + outlen) break; /* * Handle one '%' item. */ s++; - if (*s == NUL) /* ignore trailing % */ + if (*s == '\0') /* ignore trailing % */ break; if (*s == '%') { if (p + 1 >= out + outlen) @@ -2984,7 +2984,7 @@ build_stl_str_hl ( groupdepth--; t = item[groupitem[groupdepth]].start; - *p = NUL; + *p = '\0'; l = vim_strsize(t); if (curitem > groupitem[groupdepth] + 1 && item[groupitem[groupdepth]].minwid == 0) { @@ -3144,7 +3144,7 @@ build_stl_str_hl ( case STL_VIM_EXPR: /* '{' */ itemisflag = TRUE; t = p; - while (*s != '}' && *s != NUL && p + 1 < out + outlen) + while (*s != '}' && *s != '\0' && p + 1 < out + outlen) *p++ = *s++; if (*s != '}') /* missing '}' or out of space */ break; @@ -3167,7 +3167,7 @@ build_stl_str_hl ( do_unlet((char_u *)"g:actual_curbuf", TRUE); if (str != NULL && *str != 0) { - if (*skipdigits(str) == NUL) { + if (*skipdigits(str) == '\0') { num = atoi((char *)str); vim_free(str); str = NULL; @@ -3194,7 +3194,7 @@ build_stl_str_hl ( case STL_VIRTCOL_ALT: /* In list mode virtcol needs to be recomputed */ virtcol = wp->w_virtcol; - if (wp->w_p_list && lcs_tab1 == NUL) { + if (wp->w_p_list && lcs_tab1 == '\0') { wp->w_p_list = FALSE; getvcol(wp, &wp->w_cursor, NULL, &virtcol, NULL); wp->w_p_list = TRUE; @@ -3273,7 +3273,7 @@ build_stl_str_hl ( break; case STL_FILETYPE: - if (*wp->w_buffer->b_p_ft != NUL + if (*wp->w_buffer->b_p_ft != '\0' && STRLEN(wp->w_buffer->b_p_ft) < TMPLEN - 3) { vim_snprintf((char *)tmp, sizeof(tmp), "[%s]", wp->w_buffer->b_p_ft); @@ -3283,7 +3283,7 @@ build_stl_str_hl ( case STL_FILETYPE_ALT: itemisflag = TRUE; - if (*wp->w_buffer->b_p_ft != NUL + if (*wp->w_buffer->b_p_ft != '\0' && STRLEN(wp->w_buffer->b_p_ft) < TMPLEN - 2) { vim_snprintf((char *)tmp, sizeof(tmp), ",%s", wp->w_buffer->b_p_ft); @@ -3325,7 +3325,7 @@ build_stl_str_hl ( case STL_HIGHLIGHT: t = s; - while (*s != '#' && *s != NUL) + while (*s != '#' && *s != '\0') ++s; if (*s == '#') { item[curitem].type = Highlight; @@ -3333,7 +3333,7 @@ build_stl_str_hl ( item[curitem].minwid = -syn_namen2id(t, (int)(s - t)); curitem++; } - if (*s != NUL) + if (*s != '\0') ++s; continue; } @@ -3432,7 +3432,7 @@ build_stl_str_hl ( prevchar_isflag = FALSE; /* Item not NULL, but not a flag */ curitem++; } - *p = NUL; + *p = '\0'; itemcnt = curitem; if (usefmt != fmt) @@ -3497,7 +3497,7 @@ build_stl_str_hl ( while (++width < maxwidth) { s = s + STRLEN(s); *s++ = fillchar; - *s = NUL; + *s = '\0'; } --n; /* count the '<' */ @@ -4131,7 +4131,7 @@ chk_modeline ( scid_T save_SID; prev = -1; - for (s = ml_get(lnum); *s != NUL; ++s) { + for (s = ml_get(lnum); *s != '\0'; ++s) { if (prev == -1 || vim_isspace(prev)) { if ((prev != -1 && STRNCMP(s, "ex:", (size_t)3) == 0) || STRNCMP(s, "vi:", (size_t)3) == 0) @@ -4174,17 +4174,17 @@ chk_modeline ( end = FALSE; while (end == FALSE) { s = skipwhite(s); - if (*s == NUL) + if (*s == '\0') break; /* * Find end of set command: ':' or end of line. * Skip over "\:", replacing it with ":". */ - for (e = s; *e != ':' && *e != NUL; ++e) + for (e = s; *e != ':' && *e != '\0'; ++e) if (e[0] == '\\' && e[1] == ':') STRMOVE(e, e + 1); - if (*e == NUL) + if (*e == '\0') end = TRUE; /* @@ -4201,9 +4201,9 @@ chk_modeline ( end = TRUE; s = vim_strchr(s, ' ') + 1; } - *e = NUL; /* truncate the set command */ + *e = '\0'; /* truncate the set command */ - if (*s != NUL) { /* skip over an empty "::" */ + if (*s != '\0') { /* skip over an empty "::" */ save_SID = current_SID; current_SID = SID_MODELINE; retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags); diff --git a/src/charset.c b/src/charset.c index 89ce5d38eb..a77a442499 100644 --- a/src/charset.c +++ b/src/charset.c @@ -169,7 +169,7 @@ int buf_init_chartab(buf_T *buf, int global) tilde = FALSE; do_isalpha = FALSE; - if ((*p == '^') && (p[1] != NUL)) { + if ((*p == '^') && (p[1] != '\0')) { tilde = TRUE; ++p; } @@ -183,7 +183,7 @@ int buf_init_chartab(buf_T *buf, int global) } c2 = -1; - if ((*p == '-') && (p[1] != NUL)) { + if ((*p == '-') && (p[1] != '\0')) { ++p; if (VIM_ISDIGIT(*p)) { @@ -199,7 +199,7 @@ int buf_init_chartab(buf_T *buf, int global) || (c >= 256) || ((c2 < c) && (c2 != -1)) || (c2 >= 256) - || !((*p == NUL) || (*p == ','))) { + || !((*p == '\0') || (*p == ','))) { return FAIL; } @@ -271,7 +271,7 @@ int buf_init_chartab(buf_T *buf, int global) c = *p; p = skip_to_option_part(p); - if ((c == ',') && (*p == NUL)) { + if ((c == ',') && (*p == '\0')) { // Trailing comma is not allowed. return FAIL; } @@ -344,7 +344,7 @@ char_u *transstr(char_u *s) len = 0; p = s; - while (*p != NUL) { + while (*p != '\0') { if ((l = (*mb_ptr2len)(p)) > 1) { c = (*mb_ptr2char)(p); p += l; @@ -371,10 +371,10 @@ char_u *transstr(char_u *s) res = alloc((unsigned)(vim_strsize(s) + 1)); } - *res = NUL; + *res = '\0'; p = s; - while (*p != NUL) { + while (*p != '\0') { if (has_mbyte && ((l = (*mb_ptr2len)(p)) > 1)) { c = (*mb_ptr2char)(p); @@ -435,14 +435,14 @@ char_u* str_foldcase(char_u *str, int orglen, char_u *buf, int buflen) } if (buf == NULL) { - GA_CHAR(len) = NUL; + GA_CHAR(len) = '\0'; } else { - buf[len] = NUL; + buf[len] = '\0'; } // Make each character lower case. i = 0; - while (STR_CHAR(i) != NUL) { + while (STR_CHAR(i) != '\0') { if (enc_utf8 || (has_mbyte && (MB_BYTE2LEN(STR_CHAR(i)) > 1))) { if (enc_utf8) { int c = utf_ptr2char(STR_PTR(i)); @@ -530,7 +530,7 @@ char_u* transchar(int c) || ((c < 256) && vim_isprintc_strict(c))) { // printable character transchar_buf[i] = c; - transchar_buf[i + 1] = NUL; + transchar_buf[i + 1] = '\0'; } else { transchar_nonprint(transchar_buf + i, c); } @@ -562,7 +562,7 @@ void transchar_nonprint(char_u *buf, int c) { if (c == NL) { // we use newline in place of a NUL - c = NUL; + c = '\0'; } else if ((c == CAR) && (get_fileformat(curbuf) == EOL_MAC)) { // we use CR in place of NL in this case c = NL; @@ -577,14 +577,14 @@ void transchar_nonprint(char_u *buf, int c) // DEL displayed as ^? buf[1] = c ^ 0x40; - buf[2] = NUL; + buf[2] = '\0'; } else if (enc_utf8 && (c >= 0x80)) { transchar_hex(buf, c); } else if ((c >= ' ' + 0x80) && (c <= '~' + 0x80)) { // 0xa0 - 0xfe buf[0] = '|'; buf[1] = c - 0x80; - buf[2] = NUL; + buf[2] = '\0'; } else { // 0x80 - 0x9f and 0xff // TODO: EBCDIC I don't know what to do with this chars, so I display @@ -592,7 +592,7 @@ void transchar_nonprint(char_u *buf, int c) buf[0] = '~'; buf[1] = (c - 0x80) ^ 0x40; // 0xff displayed as ~? - buf[2] = NUL; + buf[2] = '\0'; } } @@ -612,7 +612,7 @@ void transchar_hex(char_u *buf, int c) buf[++i] = nr2hex((unsigned)c >> 4); buf[++i] = nr2hex((unsigned)c); buf[++i] = '>'; - buf[++i] = NUL; + buf[++i] = '\0'; } /// Convert the lower 4 bits of byte "c" to its hex character. @@ -724,7 +724,7 @@ int vim_strnsize(char_u *s, int len) { assert(s != NULL); int size = 0; - while (*s != NUL && --len >= 0) { + while (*s != '\0' && --len >= 0) { if (has_mbyte) { int l = (*mb_ptr2len)(s); size += ptr2cells(s); @@ -794,7 +794,7 @@ int linetabsize_col(int startcol, char_u *s) { colnr_T col = startcol; - while (*s != NUL) { + while (*s != '\0') { col += lbr_chartabsize_adv(&s, col); } return (int)col; @@ -812,7 +812,7 @@ int win_linetabsize(win_T *wp, char_u *p, colnr_T len) colnr_T col = 0; char_u *s; - for (s = p; *s != NUL && (len == MAXCOL || s < p + len); mb_ptr_adv(s)) { + for (s = p; *s != '\0' && (len == MAXCOL || s < p + len); mb_ptr_adv(s)) { col += win_lbr_chartabsize(wp, s, col, NULL); } return (int)col; @@ -901,7 +901,7 @@ int vim_isfilec_or_wc(int c) { char_u buf[2]; buf[0] = (char_u)c; - buf[1] = NUL; + buf[1] = '\0'; return vim_isfilec(c) || c == ']' || mch_has_wildcard(buf); } @@ -946,7 +946,7 @@ int vim_isprintc_strict(int c) /// @return The number of characters taken up on the screen. int lbr_chartabsize(unsigned char *s, colnr_T col) { - if (!curwin->w_p_lbr && (*p_sbr == NUL)) { + if (!curwin->w_p_lbr && (*p_sbr == '\0')) { if (curwin->w_p_wrap) { return win_nolbr_chartabsize(curwin, s, col, NULL); } @@ -994,7 +994,7 @@ int win_lbr_chartabsize(win_T *wp, char_u *s, colnr_T col, int *headp) int n; // No 'linebreak' and 'showbreak': return quickly. - if (!wp->w_p_lbr && (*p_sbr == NUL)) { + if (!wp->w_p_lbr && (*p_sbr == '\0')) { if (wp->w_p_wrap) { return win_nolbr_chartabsize(wp, s, col, headp); } @@ -1032,7 +1032,7 @@ int win_lbr_chartabsize(win_T *wp, char_u *s, colnr_T col, int *headp) mb_ptr_adv(s); c = *s; - if (!((c != NUL) + if (!((c != '\0') && (vim_isbreak(c) || (!vim_isbreak(c) && ((col2 == col) || !vim_isbreak(*ps)))))) { @@ -1061,7 +1061,7 @@ int win_lbr_chartabsize(win_T *wp, char_u *s, colnr_T col, int *headp) // Set *headp to the size of what we add. added = 0; - if ((*p_sbr != NUL) && wp->w_p_wrap && (col != 0)) { + if ((*p_sbr != '\0') && wp->w_p_wrap && (col != 0)) { numberextra = win_col_off(wp); col += numberextra + mb_added; @@ -1193,15 +1193,15 @@ void getvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, // This function is used very often, do some speed optimizations. // When 'list', 'linebreak' and 'showbreak' are not set use a simple loop. // Also use this when 'list' is set but tabs take their normal size. - if ((!wp->w_p_list || (lcs_tab1 != NUL)) + if ((!wp->w_p_list || (lcs_tab1 != '\0')) && !wp->w_p_lbr - && (*p_sbr == NUL)) { + && (*p_sbr == '\0')) { for (;;) { head = 0; c = *ptr; // make sure we don't go past the end of the line - if (c == NUL) { + if (c == '\0') { // NUL at end of line only takes one column incr = 1; break; @@ -1250,7 +1250,7 @@ void getvcol(win_T *wp, pos_T *pos, colnr_T *start, colnr_T *cursor, incr = win_lbr_chartabsize(wp, ptr, vcol, &head); // make sure we don't go past the end of the line - if (*ptr == NUL) { + if (*ptr == '\0') { // NUL at end of line only takes one column incr = 1; break; @@ -1455,7 +1455,7 @@ char_u* skiphex(char_u *q) char_u* skiptodigit(char_u *q) { char_u *p = q; - while (*p != NUL && !VIM_ISDIGIT(*p)) { + while (*p != '\0' && !VIM_ISDIGIT(*p)) { // skip to next digit p++; } @@ -1470,7 +1470,7 @@ char_u* skiptodigit(char_u *q) char_u* skiptohex(char_u *q) { char_u *p = q; - while (*p != NUL && !vim_isxdigit(*p)) { + while (*p != '\0' && !vim_isxdigit(*p)) { // skip to next digit p++; } @@ -1654,7 +1654,7 @@ int vim_tolower(int c) /// @return Pointer to the next whitespace or NUL character. char_u* skiptowhite(char_u *p) { - while (*p != ' ' && *p != '\t' && *p != NUL) { + while (*p != ' ' && *p != '\t' && *p != '\0') { p++; } return p; @@ -1666,8 +1666,8 @@ char_u* skiptowhite(char_u *p) /// /// @return Pointer to the next whitespace character. char_u* skiptowhite_esc(char_u *p) { - while (*p != ' ' && *p != '\t' && *p != NUL) { - if (((*p == '\\') || (*p == Ctrl_V)) && (*(p + 1) != NUL)) { + while (*p != ' ' && *p != '\t' && *p != '\0') { + if (((*p == '\\') || (*p == Ctrl_V)) && (*(p + 1) != '\0')) { ++p; } ++p; @@ -1705,7 +1705,7 @@ long getdigits(char_u **pp) int vim_isblankline(c |