aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arabic.c4
-rw-r--r--src/ascii.h1
-rw-r--r--src/blowfish.c2
-rw-r--r--src/buffer.c62
-rw-r--r--src/charset.c72
-rw-r--r--src/crypt.c10
-rw-r--r--src/cursor_shape.c2
-rw-r--r--src/diff.c24
-rw-r--r--src/digraph.c20
-rw-r--r--src/edit.c254
-rw-r--r--src/eval.c382
-rw-r--r--src/ex_cmds.c208
-rw-r--r--src/ex_cmds2.c60
-rw-r--r--src/ex_docmd.c274
-rw-r--r--src/ex_eval.c32
-rw-r--r--src/ex_getln.c132
-rw-r--r--src/farsi.c4
-rw-r--r--src/file_search.c56
-rw-r--r--src/fileio.c166
-rw-r--r--src/fold.c18
-rw-r--r--src/garray.c2
-rw-r--r--src/getchar.c150
-rw-r--r--src/globals.h14
-rw-r--r--src/hardcopy.c36
-rw-r--r--src/hashtab.c2
-rw-r--r--src/if_cscope.c22
-rw-r--r--src/indent.c18
-rw-r--r--src/indent_c.c80
-rw-r--r--src/keymap.c20
-rw-r--r--src/keymap.h4
-rw-r--r--src/macros.h4
-rw-r--r--src/main.c22
-rw-r--r--src/mark.c30
-rw-r--r--src/mbyte.c100
-rw-r--r--src/memfile.c6
-rw-r--r--src/memline.c60
-rw-r--r--src/menu.c104
-rw-r--r--src/message.c100
-rw-r--r--src/misc1.c134
-rw-r--r--src/misc2.c72
-rw-r--r--src/move.c2
-rw-r--r--src/msgpack_rpc.c2
-rw-r--r--src/normal.c160
-rw-r--r--src/ops.c192
-rw-r--r--src/option.c250
-rw-r--r--src/os/env.c2
-rw-r--r--src/os/fs.c2
-rw-r--r--src/os/shell.c8
-rw-r--r--src/os/users.c2
-rw-r--r--src/os_unix.c56
-rw-r--r--src/path.c112
-rw-r--r--src/popupmnu.c8
-rw-r--r--src/quickfix.c98
-rw-r--r--src/regexp.c160
-rw-r--r--src/regexp_nfa.c62
-rw-r--r--src/screen.c192
-rw-r--r--src/search.c140
-rw-r--r--src/sha256.c2
-rw-r--r--src/spell.c520
-rw-r--r--src/syntax.c96
-rw-r--r--src/tag.c78
-rw-r--r--src/term.c128
-rw-r--r--src/ui.c2
-rw-r--r--src/undo.c18
-rw-r--r--src/version.c18
-rw-r--r--src/window.c14
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(char_u *lbuf)
{
char_u *p = skipwhite(lbuf);
- return *p == NUL || *p == '\r' || *p == '\n';
+ return *p == '\0' || *p == '\r' || *p == '\n';
}
/// Convert a string into a long and/or unsigned long, taking care of
@@ -1880,13 +1880,13 @@ int rem_backslash(char_u *str)
return str[0] == '\\'
&& str[1] < 0x80
&& (str[1] == ' '
- || (str[1] != NUL
+ || (str[1] != '\0'
&& str[1] != '*'
&& str[1] != '?'
&& !vim_isfilec(str[1])));
#else // ifdef BACKSLASH_IN_FILENAME
- return str[0] == '\\' && str[1] != NUL;
+ return str[0] == '\\' && str[1] != '\0';
#endif // ifdef BACKSLASH_IN_FILENAME
}
diff --git a/src/crypt.c b/src/crypt.c
index 72d4a89c63..09c67d527d 100644
--- a/src/crypt.c
+++ b/src/crypt.c
@@ -75,7 +75,7 @@ int crypt_method_from_string(char_u *s)
int get_crypt_method(buf_T *buf)
{
- return crypt_method_from_string(*buf->b_p_cm == NUL ? p_cm : buf->b_p_cm);
+ return crypt_method_from_string(*buf->b_p_cm == '\0' ? p_cm : buf->