From 183eda122357490353972ea1bfe4c3f53c329a61 Mon Sep 17 00:00:00 2001
From: Bernhard R. Link <brlink@debian.org>
Date: Sat, 17 Sep 2011 21:55:29 +0200
Subject: fix NUL character to avoid many compiler warnings

---
 Xcurse.c    |   60 ++++++++++++++--------------
 aee.c       |   66 ++++++++++++++++----------------
 control.c   |   72 +++++++++++++++++-----------------
 delete.c    |   18 ++++----
 file.c      |   40 ++++++++++----------
 format.c    |   22 +++++-----
 help.c      |    6 +-
 journal.c   |   24 ++++++------
 mark.c      |   26 ++++++------
 new_curse.c |  122 +++++++++++++++++++++++++++++-----------------------------
 srch_rep.c  |   54 +++++++++++++-------------
 windows.c   |    6 +-
 xif.c       |    2 +-
 13 files changed, 259 insertions(+), 259 deletions(-)

diff --git a/Xcurse.c b/Xcurse.c
index 0121533..fa6b391 100644
--- a/Xcurse.c
+++ b/Xcurse.c
@@ -322,13 +322,13 @@ char *argv[];
 			temp_names->next_name = NULL;
 			extens = temp_names->name = xalloc(strlen(buff) + 1);
 
-			while (*buff != (char) NULL)
+			while (*buff != '\0')
 			{
 				*extens = *buff;
 				buff++;
 				extens++;
 			}
-			*extens = (char) NULL;
+			*extens = '\0';
 			input_file = TRUE;
 			recv_file = TRUE;
 		}
@@ -566,13 +566,13 @@ int columns;
 	for (i = 0; i < columns; i++)
 	{
 		tmp->row[i] = ' ';
-		tmp->attributes[i] = (char) NULL;
+		tmp->attributes[i] = '\0';
 	}
 	tmp->scroll = tmp->changed = FALSE;
-	tmp->row[0] = (char) NULL;
-	tmp->attributes[0] = (char) NULL;
-	tmp->row[columns] = (char) NULL;
-	tmp->attributes[columns] = (char) NULL;
+	tmp->row[0] = '\0';
+	tmp->attributes[0] = '\0';
+	tmp->row[columns] = '\0';
+	tmp->attributes[columns] = '\0';
 	tmp->last_char = 0;
 	return(tmp);
 }
@@ -640,12 +640,12 @@ int cols;
 		for (j = line->last_char; j < column; j++)
 		{
 			line->row[j] = ' ';
-			line->attributes[j] = (char) NULL;
+			line->attributes[j] = '\0';
 		}
 	}
 	line->last_char = column;
-	line->row[column] = (char) NULL;
-	line->attributes[column] = (char) NULL;
+	line->row[column] = '\0';
+	line->attributes[column] = '\0';
 	line->changed = TRUE;
 }
 
@@ -751,14 +751,14 @@ WINDOW *window;
 				  	virt_col++, user_col++)
 			{
 				virtual_line->row[virt_col] = ' ';
-				virtual_line->attributes[virt_col] = (char) NULL;
+				virtual_line->attributes[virt_col] = '\0';
 			}
 		}
 		if (virtual_scr->Num_cols != window->Num_cols)
 		{
 			if (virtual_line->last_char < (user_line->last_char + window->SC))
 			{
-				if (virtual_line->row[virtual_line->last_char] == (char) NULL)
+				if (virtual_line->row[virtual_line->last_char] == '\0')
 					virtual_line->row[virtual_line->last_char] = ' ';
 				virtual_line->last_char = 
 					min(virtual_scr->Num_cols, 
@@ -767,7 +767,7 @@ WINDOW *window;
 		}
 		else
 			virtual_line->last_char = user_line->last_char;
-		virtual_line->row[virtual_line->last_char] = (char) NULL;
+		virtual_line->row[virtual_line->last_char] = '\0';
 		virtual_line->changed = user_line->changed;
 		virtual_line = virtual_line->next_screen;
 		user_line = user_line->next_screen;
@@ -866,10 +866,10 @@ int c;
 					for (j = tmpline->last_char; j < column; j++)
 					{
 						tmpline->row[j] = ' ';
-						tmpline->attributes[j] = (char) NULL;
+						tmpline->attributes[j] = '\0';
 					}
-				tmpline->row[column + 1] = (char) NULL;
-				tmpline->attributes[column + 1] = (char) NULL;
+				tmpline->row[column + 1] = '\0';
+				tmpline->attributes[column + 1] = '\0';
 				tmpline->last_char = column + 1;
 			}
 		}
@@ -1043,7 +1043,7 @@ char *string;
 {
 	char *wstring;
 
-	for (wstring = string; *wstring != (char) NULL; wstring++)
+	for (wstring = string; *wstring != '\0'; wstring++)
 		waddch(window, *wstring);
 }
 
@@ -1197,7 +1197,7 @@ wprintw(WINDOW *window, const char *format, ...)
 #endif /* __STDC__ */
 
 	fpoint = (char *) format;
-	while (*fpoint != (char) NULL)
+	while (*fpoint != '\0')
 	{
 		if (*fpoint == '%')
 		{
@@ -1275,12 +1275,12 @@ struct _line *line2;
 	att1 = line1->attributes;
 	att2 = line2->attributes;
 	i = 0;
-	while ((c1[i] != (char) NULL) && (c2[i] != (char) NULL) && (c1[i] == c2[i]) && (att1[i] == att2[i]))
+	while ((c1[i] != '\0') && (c2[i] != '\0') && (c1[i] == c2[i]) && (att1[i] == att2[i]))
 		i++;
 	count1 = i + 1;
-	if ((count1 == 1) && (c1[i] == (char) NULL) && (c2[i] == (char) NULL))
+	if ((count1 == 1) && (c1[i] == '\0') && (c2[i] == '\0'))
 		count1 = 0;			/* both lines blank	*/
-	else if ((c1[i] == (char) NULL) && (c2[i] == (char) NULL))
+	else if ((c1[i] == '\0') && (c2[i] == '\0'))
 		count1 = -1;			/* equal		*/
 	else
 		count1 = 1;			/* lines unequal	*/
@@ -1407,9 +1407,9 @@ int row, column;
 	for (x = column; x<window->Num_cols; x++)
 	{
 		tmp1->row[x] = ' ';
-		tmp1->attributes[x] = (char) NULL;
+		tmp1->attributes[x] = '\0';
 	}
-	tmp1->row[column] = (char) NULL;
+	tmp1->row[column] = '\0';
 	tmp1->last_char = column;
 	if (column <= tmp1->last_char)
 	{
@@ -1457,7 +1457,7 @@ doupdate()
 		for (i = 0, curr = curscr->first_line; i < curscr->Num_lines; i++, curr = curr->next_screen)
 		{
 			Position(curscr, i, 0);
-			for (j = 0; (curr->row[j] != (char) NULL) && (j < curscr->Num_cols); j++)
+			for (j = 0; (curr->row[j] != '\0') && (j < curscr->Num_cols); j++)
 			{
 				Char_out(curr->row[j], curr->attributes[j], curr->row, curr->attributes, j);
 			}
@@ -1634,20 +1634,20 @@ doupdate()
 			cur_att = curr->attributes;
 			vrt_lin = virt->row;
 			vrt_att = virt->attributes;
-			while ((j < window->Num_cols) && (vrt_lin[j] != (char) NULL))
+			while ((j < window->Num_cols) && (vrt_lin[j] != '\0'))
 			{
-				while ((cur_lin[j] == vrt_lin[j]) && (cur_att[j] == vrt_att[j]) && (j < window->Num_cols) && (vrt_lin[j] != (char) NULL))
+				while ((cur_lin[j] == vrt_lin[j]) && (cur_att[j] == vrt_att[j]) && (j < window->Num_cols) && (vrt_lin[j] != '\0'))
 					j++;
 				begin_old = j;
 				begin_new = j;
-				if ((j < window->Num_cols) && (vrt_lin[j] != (char) NULL))
+				if ((j < window->Num_cols) && (vrt_lin[j] != '\0'))
 				{
 					Position(window, from_top, begin_old);
-					for (j = begin_old; (vrt_lin[j] != (char) NULL) && (j < window->Num_cols); j++)
+					for (j = begin_old; (vrt_lin[j] != '\0') && (j < window->Num_cols); j++)
 						Char_out(vrt_lin[j], vrt_att[j], cur_lin, cur_att, j);
 				}
 			}
-			if ((vrt_lin[j] == (char) NULL) && (cur_lin[j] != (char) NULL))
+			if ((vrt_lin[j] == '\0') && (cur_lin[j] != '\0'))
 /*			if (j < curr->last_char) */
 			{
 				Position(window, from_top, j);
@@ -1782,7 +1782,7 @@ int visible;
 	}
 	output_char = tmp1->row[Curr_x];
 	reverse = (tmp1->attributes[last_col] & A_STANDOUT);
-	if (tmp1->row[Curr_x] == (char) NULL)
+	if (tmp1->row[Curr_x] == '\0')
 	{
 		output_char = ' ';
 		reverse = 0;
diff --git a/aee.c b/aee.c
index 3b9fd9b..e1b3d7c 100644
--- a/aee.c
+++ b/aee.c
@@ -592,7 +592,7 @@ char *argv[];
 	d_word = NULL;
 	d_wrd_len = 0;
 	d_line = xalloc(1);
-	*d_line = (char) NULL;
+	*d_line = '\0';
 	tabs = (struct tab_stops *) xalloc(sizeof( struct tab_stops));
 	tabs->next_stop = NULL;
 	tabs->column = 0;
@@ -1098,9 +1098,9 @@ char *string;
 	struct tab_stops *stack_point;
 
 	pointer = string;
-	while (*pointer != (char) NULL)
+	while (*pointer != '\0')
 	{
-		while (((*pointer < '0') || (*pointer > '9')) && (*pointer != (char) NULL))
+		while (((*pointer < '0') || (*pointer > '9')) && (*pointer != '\0'))
 			pointer++;
 		column = atoi(pointer);
 		temp_stack_point = tabs;
@@ -1121,7 +1121,7 @@ char *string;
 				free(stack_point);
 			}
 		}
-		while (((*pointer >= '0') && (*pointer <= '9')) && (*pointer != (char) NULL))
+		while (((*pointer >= '0') && (*pointer <= '9')) && (*pointer != '\0'))
 			pointer++;
 	}
 }
@@ -1137,9 +1137,9 @@ char *string;
 	struct tab_stops *stack_point;
 
 	pointer = string;
-	while (*pointer != (char) NULL)
+	while (*pointer != '\0')
 	{
-		while (((*pointer < '0') || (*pointer > '9')) && (*pointer != (char) NULL))
+		while (((*pointer < '0') || (*pointer > '9')) && (*pointer != '\0'))
 			pointer++;
 		column = atoi(pointer);
 		temp_stack_point = tabs;
@@ -1161,7 +1161,7 @@ char *string;
 				temp_stack_point->next_stop = stack_point;
 			}
 		}
-		while (((*pointer >= '0') && (*pointer <= '9')) && (*pointer != (char) NULL))
+		while (((*pointer >= '0') && (*pointer <= '9')) && (*pointer != '\0'))
 			pointer++;
 	}
 }
@@ -1242,7 +1242,7 @@ int offset;
 			tmp++;
 			*tmp = '>';
 			tmp++;
-			*tmp = (char) NULL;
+			*tmp = '\0';
 		}
 		else
 		{
@@ -1255,7 +1255,7 @@ int offset;
 		tmp++;
 	for (iter = column;
 	     (((iter <= curr_buff->last_col) && (row == curr_buff->last_line)) || 
-	     (row < curr_buff->last_line)) && (*tmp != (char) NULL); iter++, tmp++)
+	     (row < curr_buff->last_line)) && (*tmp != '\0'); iter++, tmp++)
 		waddch(window, *tmp);
 	iter -= column;
 	if (space)
@@ -1411,7 +1411,7 @@ int disp;
 			temp++;
 		}
 		temp = curr_buff->pointer;
-		*temp = (char) NULL;
+		*temp = '\0';
 		temp = resiz_line((1 - temp_nod->line_length), curr_buff->curr_line, curr_buff->position);
 		curr_buff->curr_line->line_length = curr_buff->position;
 		curr_buff->curr_line->vert_len = (scanline(curr_buff->curr_line, curr_buff->curr_line->line_length) / COLS) + 1;
@@ -1420,7 +1420,7 @@ int disp;
 	curr_buff->curr_line->line_length = curr_buff->position;
 	curr_buff->curr_line = temp_nod;
 	curr_buff->curr_line->vert_len = (scanline(curr_buff->curr_line, curr_buff->curr_line->line_length) / COLS) + 1;
-	*extra = (char) NULL;
+	*extra = '\0';
 	curr_buff->position = 1;
 	curr_buff->pointer = curr_buff->curr_line->line;
 	curr_buff->num_of_lines++;
@@ -1537,9 +1537,9 @@ struct bufr *buf_alloc()	/* allocate space for buffers		*/
 char *next_word(string)		/* move to next word in string		*/
 char *string;
 {
-	while ((*string != (char) NULL) && ((*string != 32) && (*string != 9)))
+	while ((*string != '\0') && ((*string != 32) && (*string != 9)))
 		string++;
-	while ((*string != (char) NULL) && ((*string == 32) || (*string == 9)))
+	while ((*string != '\0') && ((*string == 32) || (*string == 9)))
 		string++;
 	return(string);
 }
@@ -1629,9 +1629,9 @@ int advance;		/* if true, skip leading spaces and tabs	*/
 		}
 		wrefresh(com_win);
 		if (esc_flag)
-			in = (char) NULL;
+			in = '\0';
 	} while ((in != '\n') && (in != '\r'));
-	*nam_str = (char) NULL;
+	*nam_str = '\0';
 	nam_str = tmp_string;
 	if (((*nam_str == ' ') || (*nam_str == 9)) && (advance))
 		nam_str = next_word(nam_str);
@@ -1673,7 +1673,7 @@ ascii()		/* get ascii code from user and insert into file	*/
 
 	i = 0;
 	t = string = get_string(ascii_code_str, TRUE);
-	if (*t != (char) NULL)
+	if (*t != '\0')
 	{
 		while ((*string >= '0') && (*string <= '9'))
 		{
@@ -1714,7 +1714,7 @@ int sensitive;
 	strng1 = string1;
 	strng2 = string2;
 	tmp = 0;
-	if ((strng1 == NULL) || (strng2 == NULL) || (*strng1 == (char) NULL) || (*strng2 == (char) NULL))
+	if ((strng1 == NULL) || (strng2 == NULL) || (*strng1 == '\0') || (*strng2 == '\0'))
 		return(FALSE);
 	equal = TRUE;
 	while (equal)
@@ -1731,7 +1731,7 @@ int sensitive;
 		}
 		strng1++;
 		strng2++;
-		if ((*strng1 == (char) NULL) || (*strng2 == (char) NULL) || (*strng1 == ' ') || (*strng2 == ' '))
+		if ((*strng1 == '\0') || (*strng2 == '\0') || (*strng1 == ' ') || (*strng2 == ' '))
 			break;
 		tmp++;
 	}
@@ -2104,7 +2104,7 @@ char *arguments[];
 			else if (*buff == 'h')	/* get height of window	*/
 			{
 				buff++;
-				if (*buff == (char) NULL)
+				if (*buff == '\0')
 				{
 					count++;
 					buff = arguments[count];
@@ -2114,7 +2114,7 @@ char *arguments[];
 			else if (*buff == 'w')	/* get width of window	*/
 			{
 				buff++;
-				if (*buff == (char) NULL)
+				if (*buff == '\0')
 				{
 					count++;
 					buff = arguments[count];
@@ -2139,13 +2139,13 @@ char *arguments[];
 			}
 			temp_names->next_name = NULL;
 			extens = temp_names->name = xalloc(strlen(buff) + 1);
-			while (*buff != (char) NULL)
+			while (*buff != '\0')
 			{
 				*extens = *buff;
 				buff++;
 				extens++;
 			}
-			*extens = (char) NULL;
+			*extens = '\0';
 			input_file = TRUE;
 			recv_file = TRUE;
 		}
@@ -2262,7 +2262,7 @@ char *string;
 	{
 		remove_journal_file(curr_buff);
 	}
-	while ((string != NULL) && (*string != (char) NULL) && (*string != '!'))
+	while ((string != NULL) && (*string != '\0') && (*string != '!'))
 		string++;
 	if ((string != NULL) && (*string == '!'))
 		top_of_stack = NULL;
@@ -2353,7 +2353,7 @@ char *string;		/* string containing user command		*/
 	if (!(path = getenv("SHELL")))
 		path = "/bin/sh";
 	last_slash = temp_point = path;
-	while (*temp_point != (char) NULL)
+	while (*temp_point != '\0')
 	{
 		if (*temp_point == '/')
 			last_slash = ++temp_point;
@@ -2547,7 +2547,7 @@ char *str1, *str2;
 
 	t1 = str1;
 	t2 = str2;
-	while (*t1 != (char) NULL)
+	while (*t1 != '\0')
 	{
 		*t2 = *t1;
 		t2++;
@@ -2566,7 +2566,7 @@ char *string;
 	if (echo_flag)
 	{
 		temp = string;
-		while (*temp != (char) NULL)
+		while (*temp != '\0')
 		{
 			if (*temp == '\\')
 			{
@@ -2647,7 +2647,7 @@ ae_init()	/* check for init file and read it if it exists	*/
 				str1 = str2 = string;
 				while (*str2 != '\n')
 					str2++;
-				*str2 = (char) NULL;
+				*str2 = '\0';
 
 				if (unique_test(string, init_strings) != 1)
 					continue;
@@ -2674,7 +2674,7 @@ ae_init()	/* check for init file and read it if it exists	*/
 				else if (compare(str1, SPACING_str, FALSE))
 				{
 					str1 = next_word(str1);
-					if (*str1 != (char) NULL)
+					if (*str1 != '\0')
 						tab_spacing = atoi(str1);
 				}
 				else if (compare(str1, NOEXPAND_str,  FALSE))
@@ -2776,7 +2776,7 @@ ae_init()	/* check for init file and read it if it exists	*/
 				{
 #ifndef XAE
 					str1 = next_word(str1);
-					if (*str1 != (char) NULL)
+					if (*str1 != '\0')
 						echo_string(str1);
 #endif
 				}
@@ -2800,9 +2800,9 @@ ae_init()	/* check for init file and read it if it exists	*/
 					tmp = str1;
 					while ((*tmp != ' ') && 
 					       (*tmp != '\t') && 
-					       (*tmp != (char) NULL))
+					       (*tmp != '\0'))
 						tmp++;
-					*tmp = (char) NULL;
+					*tmp = '\0';
 					journal_dir = resolve_name(str1);
 					if (str1 == journal_dir)
 					{
@@ -2830,9 +2830,9 @@ ae_init()	/* check for init file and read it if it exists	*/
 					tmp = str1;
 					while ((*tmp != ' ') && 
 					       (*tmp != '\t') && 
-					       (*tmp != (char) NULL))
+					       (*tmp != '\0'))
 						tmp++;
-					*tmp = (char) NULL;
+					*tmp = '\0';
 					ae_help_file = resolve_name(str1);
 					if (str1 == ae_help_file)
 					{
diff --git a/control.c b/control.c
index df47633..69aae57 100644
--- a/control.c
+++ b/control.c
@@ -339,7 +339,7 @@ shell_op()
 	char *string;
 
 	if (((string = get_string(shell_cmd_prompt, TRUE)) != NULL) && 
-			(*string != (char) NULL))
+			(*string != '\0'))
 	{
 		sh_command(string);
 		free(string);
@@ -665,12 +665,12 @@ int arg;
 
 		string = curr_buff->full_name;
 
-		if ((string != NULL) && (*string != (char)NULL))
+		if ((string != NULL) && (*string != '\0'))
 			flag = TRUE;
 		else
 			flag = FALSE;
 
-		if ((string == NULL) || (*string == (char) NULL))
+		if ((string == NULL) || (*string == '\0'))
 		{
 			if (restrict_mode())
 			{
@@ -679,7 +679,7 @@ int arg;
 
 			string = get_string(save_file_name_prompt, TRUE);
 		}
-		if ((string == NULL) || (*string == (char) NULL))
+		if ((string == NULL) || (*string == '\0'))
 		{
 			wmove(com_win, 0, 0);
 			wprintw(com_win, file_not_saved_msg );
@@ -747,7 +747,7 @@ char *macro_string;
 		if (compare(temp, macro_string, FALSE))
 		{
 			temp = next_word(temp);
-			if (*temp == (char) NULL)
+			if (*temp == '\0')
 				return(counter);
 		}
 	}
@@ -792,7 +792,7 @@ paint_information()
 
 	for (counter = 0; counter < (info_win_height - 1); counter++)
 	{
-		info_data[counter][0] = (char) NULL;
+		info_data[counter][0] = '\0';
 	}
 
 	width = 0;
@@ -1031,7 +1031,7 @@ char *cmd_str;
 	else if (compare(cmd_str, TABS_str, FALSE))
 	{
 		cmd_str = next_word(cmd_str);
-		if (*cmd_str != (char) NULL)
+		if (*cmd_str != '\0')
 		{
 			tab_set(cmd_str);
 			tab_resize();
@@ -1059,7 +1059,7 @@ char *cmd_str;
 	else if (compare(cmd_str, SPACING_str, FALSE))
 	{
 		cmd_str2 = next_word(cmd_str);
-		if (*cmd_str2 != (char) NULL)
+		if (*cmd_str2 != '\0')
 		{
 			tab_spacing = atoi(cmd_str2);
 			tab_resize();
@@ -1079,15 +1079,15 @@ char *cmd_str;
 			return;
 		}
 		cmd_str2 = next_word(cmd_str);
-		if (*cmd_str2 == (char) NULL)
+		if (*cmd_str2 == '\0')
 		{
 			alloc_space = TRUE;
 			cmd_str2 = get_string(file_write_prompt_str, TRUE);
 		}
 		tmp = cmd_str2;
-		while ((*tmp != ' ') && (*tmp != '\t') && (*tmp != (char) NULL))
+		while ((*tmp != ' ') && (*tmp != '\t') && (*tmp != '\0'))
 			tmp++;
-		*tmp = (char) NULL;
+		*tmp = '\0';
 		tmp_file = resolve_name(cmd_str2);
 		write_file(tmp_file);
 		if (tmp_file != cmd_str2)
@@ -1102,15 +1102,15 @@ char *cmd_str;
 			return;
 		}
 		cmd_str2 = next_word(cmd_str);
-		if (*cmd_str2 == (char) NULL)
+		if (*cmd_str2 == '\0')
 		{
 			alloc_space = TRUE;
 			cmd_str2 = get_string(file_read_prompt_str, TRUE);
 		}
 		tmp = cmd_str2;
-		while ((*tmp != ' ') && (*tmp != '\t') && (*tmp != (char) NULL))
+		while ((*tmp != ' ') && (*tmp != '\t') && (*tmp != '\0'))
 			tmp++;
-		*tmp = (char) NULL;
+		*tmp = '\0';
 		tmp_file = resolve_name(cmd_str2);
 		recv_file = TRUE;
 		value = check_fp();
@@ -1129,7 +1129,7 @@ char *cmd_str;
 		cmd_str2 = next_word(cmd_str);
 		if (!curr_buff->edit_buffer)
 			file_op(SAVE_FILE);
-		else if ((*cmd_str2 != (char)NULL) && (curr_buff->file_name == NULL))
+		else if ((*cmd_str2 != '\0') && (curr_buff->file_name == NULL))
 		{
 			tmp_file = resolve_name(cmd_str2);
 			if (tmp_file != cmd_str2)
@@ -1485,8 +1485,8 @@ char *cmd_str;
 		if ((*cmd_str == ' ') || (*cmd_str == '\t'))
 			cmd_str = next_word(cmd_str);
 		c_int = 0;
-		in_buff_name[c_int] = (char) NULL;
-		while ((*cmd_str != '!') && (*cmd_str != '>') && (*cmd_str != '<') && (*cmd_str != ' ') && (*cmd_str != '\t') && (*cmd_str != (char) NULL))
+		in_buff_name[c_int] = '\0';
+		while ((*cmd_str != '!') && (*cmd_str != '>') && (*cmd_str != '<') && (*cmd_str != ' ') && (*cmd_str != '\t') && (*cmd_str != '\0'))
 		{
 			in_buff_name[c_int] = *cmd_str;
 			cmd_str++;
@@ -1497,7 +1497,7 @@ char *cmd_str;
 			copy_str(curr_buff->name, in_buff_name);
 		}
 		else
-			in_buff_name[c_int] = (char) NULL;
+			in_buff_name[c_int] = '\0';
 		if ((*cmd_str == ' ') || (*cmd_str == '\t'))
 			cmd_str = next_word(cmd_str);
 		command(cmd_str);
@@ -1511,8 +1511,8 @@ char *cmd_str;
 		if ((*cmd_str == ' ') || (*cmd_str == '\t'))
 			cmd_str = next_word(cmd_str);
 		c_int = 0;
-		out_buff_name[c_int] = (char) NULL;
-		while ((*cmd_str != '!') && (*cmd_str != '>') && (*cmd_str != '<') && (*cmd_str != ' ') && (*cmd_str != '\t') && (*cmd_str != (char) NULL))
+		out_buff_name[c_int] = '\0';
+		while ((*cmd_str != '!') && (*cmd_str != '>') && (*cmd_str != '<') && (*cmd_str != ' ') && (*cmd_str != '\t') && (*cmd_str != '\0'))
 		{
 			out_buff_name[c_int] = *cmd_str;
 			cmd_str++;
@@ -1523,7 +1523,7 @@ char *cmd_str;
 			copy_str(curr_buff->name, out_buff_name);
 		}
 		else
-			out_buff_name[c_int] = (char) NULL;
+			out_buff_name[c_int] = '\0';
 		if ((*cmd_str == ' ') || (*cmd_str == '\t'))
 			cmd_str = next_word(cmd_str);
 		command(cmd_str);
@@ -1539,7 +1539,7 @@ char *cmd_str;
 	else if (compare(cmd_str, BUFFER_str, FALSE))
 	{
 		cmd_str = next_word(cmd_str);
-		if (*cmd_str == (char) NULL)
+		if (*cmd_str == '\0')
 		{
 			wmove(com_win,0,0);
 			wclrtoeol(com_win);
@@ -1548,9 +1548,9 @@ char *cmd_str;
 		else
 		{
 			tmp = cmd_str;
-			while ((*tmp != ' ') && (*tmp != '\t') && (*tmp != (char) NULL))
+			while ((*tmp != ' ') && (*tmp != '\t') && (*tmp != '\0'))
 				tmp++;
-			*tmp = (char) NULL;
+			*tmp = '\0';
 			chng_buf(cmd_str);
 		}
 	}
@@ -1580,7 +1580,7 @@ char *cmd_str;
 			wclrtoeol(com_win);
 			wprintw(com_win, no_chng_dir_msg);
 		}
-		else if ((curr_buff->orig_dir == NULL) && (*cmd_str == (char) NULL))
+		else if ((curr_buff->orig_dir == NULL) && (*cmd_str == '\0'))
 		{
 			wmove(com_win,0,0);
 			wclrtoeol(com_win);
@@ -1588,14 +1588,14 @@ char *cmd_str;
 		}
 		else
 		{
-			if (*cmd_str != (char)NULL)
+			if (*cmd_str != '\0')
 				c_temp = cmd_str;
 			else
 				c_temp = curr_buff->orig_dir;
 			tmp = c_temp;
-			while ((*tmp != ' ') && (*tmp != '\t') && (*tmp != (char) NULL))
+			while ((*tmp != ' ') && (*tmp != '\t') && (*tmp != '\0'))
 				tmp++;
-			*tmp = (char) NULL;
+			*tmp = '\0';
 			name = resolve_name(c_temp);
 			retval = chdir(name);
 			if (name != c_temp)
@@ -1618,13 +1618,13 @@ char *cmd_str;
 		cmd_str2 = next_word(cmd_str);
 		if (cmd_str2 != NULL)
 		{
-			if (*cmd_str != (char)NULL)
+			if (*cmd_str != '\0')
 				c_temp = cmd_str2;
 			tmp = c_temp;
-			while ((*tmp != ' ') && (*tmp != '\t') && (*tmp != (char) NULL))
+			while ((*tmp != ' ') && (*tmp != '\t') && (*tmp != '\0'))
 				tmp++;
-			*tmp = (char) NULL;
-			if (*c_temp != (char) NULL)
+			*tmp = '\0';
+			if (*c_temp != '\0')
 				name = resolve_name(c_temp);
 			else
 				name = c_temp;
@@ -1787,7 +1787,7 @@ char *string;
 	if ((*temp == ' ') || (*temp == '\t'))
 		temp = next_word(temp);
 	valid_flag = FALSE;
-	while (*temp != (char) NULL)
+	while (*temp != '\0')
 	{
 		if ((!compare(temp, fn_GOLD_str, FALSE)) && (!valid_flag))
 			valid_flag = TRUE;
@@ -1840,7 +1840,7 @@ char *string;
 			bottom();
 		else if (compare(temp, fn_FORMAT_str,  FALSE))
 			Format();
-		else if ((compare(temp, fn_GOLD_str, FALSE)) && (!valid_flag) && (*(next_word(temp)) == (char) NULL))
+		else if ((compare(temp, fn_GOLD_str, FALSE)) && (!valid_flag) && (*(next_word(temp)) == '\0'))
 			gold_func();
 		else if (compare(temp, fn_MARGINS_str, FALSE))
 			observ_margins = TRUE;
@@ -2020,7 +2020,7 @@ char *string;
 		{
 			delim = *temp;
 			temp++;
-			while ((*temp != delim) && (*temp != (char) NULL))
+			while ((*temp != delim) && (*temp != '\0'))
 			{
 				insert(*temp);
 				temp++;
@@ -2121,7 +2121,7 @@ dump_aee_conf()
 		while ((string = fgets(buffer, 512, old_init_file)) != NULL)
 		{
 			length = strlen(string);
-			string[length - 1] = (char) NULL;
+			string[length - 1] = '\0';
 
 			if (unique_test(string, init_strings) == 1)
 			{
diff --git a/delete.c b/delete.c
index 31ae66f..9846eb6 100644
--- a/delete.c
+++ b/delete.c
@@ -69,7 +69,7 @@ int length;
 		d_word2++;
 		d_word3++;
 	}
-	*d_word2 = (char) NULL;
+	*d_word2 = '\0';
 	d_word2 = curr_buff->pointer;
 	if ((mark_text) && (pst_pos != cpste_line->line_length))
 	{
@@ -115,7 +115,7 @@ int length;
 			wmove(curr_buff->win, curr_buff->scr_vert, curr_buff->scr_horz);
 		}
 	}
-	*d_word2 = (char) NULL;
+	*d_word2 = '\0';
 	draw_line(curr_buff->scr_vert, curr_buff->scr_pos, curr_buff->pointer, curr_buff->position, curr_buff->curr_line);
 	return(temp_point);
 }
@@ -173,7 +173,7 @@ int length;
 	curr_buff->curr_line->changed = TRUE;
 	curr_buff->changed = TRUE;
 	d_word2 = curr_buff->pointer;
-	*d_word5 = (char) NULL;
+	*d_word5 = '\0';
 	d_word3 = d_word4;
 	tposit = 1;
 	while (tposit < temp)
@@ -183,7 +183,7 @@ int length;
 		d_word3++;
 		d_word2++;
 	}
-	*d_word2 = (char) NULL;
+	*d_word2 = '\0';
 	if ((mark_text) && (pst_pos == 1) && ((cpste_line->line_length > 1) || (cpste_line->next_line != NULL)))
 	{
 		temp_mark = mark_text;
@@ -269,7 +269,7 @@ int save_flag;
 	d_line = del_string(difference);
 	if ((dlt_line->line_length > 1) && (save_flag))
 		last_deleted(LINE_DELETED, dlt_line->line_length, d_line);
-	*curr_buff->pointer = (char) NULL;
+	*curr_buff->pointer = '\0';
 	curr_buff->curr_line->line_length = curr_buff->position;
 	formatted = FALSE;
 }
@@ -298,7 +298,7 @@ int save_flag;
 		{
 			pst_pos = cpste_line->line_length = 1;
 			pst_pnt = pst_line = cpste_line->line;
-			*pst_pnt = (char) NULL;
+			*pst_pnt = '\0';
 		}
 	}
 	if (curr_buff->curr_line->next_line != NULL)
@@ -341,7 +341,7 @@ undel_line()			/* undelete last deleted line		*/
 		ud1++;
 		ud2++;
 	}
-	*ud1 = (char) NULL;
+	*ud1 = '\0';
 	if ((mark_text) && (pst_pos != cpste_line->line_length))
 	{
 		temp_mark = mark_text;
@@ -477,7 +477,7 @@ delete_text()
 		free(curr_buff->curr_line->next_line);
 	}
 	curr_buff->curr_line->next_line = NULL;
-	*curr_buff->curr_line->line = (char) NULL;
+	*curr_buff->curr_line->line = '\0';
 	curr_buff->curr_line->line_length = 1;
 	curr_buff->curr_line->line_number = 1;
 	curr_buff->pointer = curr_buff->curr_line->line;
@@ -630,7 +630,7 @@ int disp;
 			tp++;
 			temp2++;
 		}
-		*tp = (char) NULL;
+		*tp = '\0';
 		curr_buff->curr_line->changed = TRUE;
 		curr_buff->changed = TRUE;
 		free(temp_buff->line);
diff --git a/file.c b/file.c
index 1ba63d7..9492009 100644
--- a/file.c
+++ b/file.c
@@ -137,7 +137,7 @@ char *name;
 
 	buff = base = name;
 
-	while (*buff != (char) NULL)
+	while (*buff != '\0')
 	{
 		if (*buff == '/')
 			base = ++buff;
@@ -158,7 +158,7 @@ char *path;
 	{
 		strcpy(buffer, path);
 		tmp = strrchr(buffer, '/');
-		*tmp = (char) NULL;
+		*tmp = '\0';
 		tmp = (char *) malloc(strlen(buffer) + 1);
 		strcpy(tmp, buffer);
 	}
@@ -229,7 +229,7 @@ char *string;
 		return(FALSE);
 	}
 
-	if ((string != NULL) && (*string != (char)NULL))
+	if ((string != NULL) && (*string != '\0'))
 	{
 		short_name = ae_basename(string);
 		do
@@ -272,7 +272,7 @@ char *string;
 
 	chng_buf(short_name);
 	curr_buff->edit_buffer = TRUE;
-	if (*string != (char)NULL)
+	if (*string != '\0')
 		tmp_file = strdup(string);
 	else
 		tmp_file = "";
@@ -436,7 +436,7 @@ recover_op()
 	if ((curr_buff->changed == FALSE) && 
 	    (curr_buff->first_line->next_line == NULL) &&
 	    (curr_buff->first_line->line_length == 1) &&
-	    (*curr_buff->full_name == (char)NULL))
+	    (*curr_buff->full_name == '\0'))
 	{
 		local_copy.journalling = curr_buff->journalling;
 		local_copy.journ_fd = curr_buff->journ_fd;
@@ -601,7 +601,7 @@ check_fp()	/* open or close files according to flags recv_file,
 				curr_buff->orig_dir = 
 						get_full_path(NULL, NULL);
 
-			if (*buff != (char)NULL)
+			if (*buff != '\0')
 			{
 				tmp_file = in_file_name = 
 				get_full_path(in_file_name, curr_buff->orig_dir);
@@ -680,7 +680,7 @@ check_fp()	/* open or close files according to flags recv_file,
 				(curr_buff->file_name != NULL))
 				set_window_name(curr_buff->file_name);
 #endif /* XAE */
-			if (*buff == (char)NULL)
+			if (*buff == '\0')
 			{
 				wmove(com_win,0,0);
 				wclrtoeol(com_win);
@@ -967,7 +967,7 @@ int *append;	/* TRUE if must append more text to end of current line	*/
 		if (((*str2 == '\n') || ((num == length) && (num < 512))) && 
 			(curr_buff->journalling))
 			write_journal(curr_buff, curr_buff->curr_line);
-		*curr_buff->pointer = (char) NULL;
+		*curr_buff->pointer = '\0';
 		*append = FALSE;
 		curr_buff->curr_line->vert_len = (scanline(curr_buff->curr_line, curr_buff->curr_line->line_length) / COLS) + 1;
 		if ((num == length) && (*str2 != '\n'))
@@ -982,9 +982,9 @@ char * string, *substring;
 {
 	char *full, *sub;
 
-	for (sub = substring; (sub != NULL) && (*sub != (char)NULL); sub++)
+	for (sub = substring; (sub != NULL) && (*sub != '\0'); sub++)
 	{
-		for (full = string; (full != NULL) && (*full != (char)NULL); 
+		for (full = string; (full != NULL) && (*full != '\0'); 
 				full++)
 		{
 			if (*sub == *full)
@@ -1031,7 +1031,7 @@ char *name;
 			slash = strchr(name_buffer, '/');
 			if (slash == NULL) 
 				return(name_buffer);
-			*slash = (char) NULL;
+			*slash = '\0';
 			user = (struct passwd *) getpwnam((name_buffer + 1));
 			*slash = '/';
 		}
@@ -1051,10 +1051,10 @@ char *name;
 		tmp = buffer;
 		index = 0;
 		
-		while ((*tmp != (char) NULL) && (index < 1024))
+		while ((*tmp != '\0') && (index < 1024))
 		{
 
-			while ((*tmp != (char) NULL) && (*tmp != '$') && 
+			while ((*tmp != '\0') && (*tmp != '$') && 
 				(index < 1024))
 			{
 				long_buffer[index] = *tmp;
@@ -1070,7 +1070,7 @@ char *name;
 				if (*tmp == '{') /* } */	/* bracketed variable name */
 				{
 					tmp++;				/* { */
-					while ((*tmp != (char) NULL) && 
+					while ((*tmp != '\0') && 
 						(*tmp != '}') && 
 						(counter < 128))
 					{
@@ -1083,7 +1083,7 @@ char *name;
 				}
 				else
 				{
-					while ((*tmp != (char) NULL) && 
+					while ((*tmp != '\0') && 
 					       (*tmp != '/') && 
 					       (*tmp != '$') && 
 					       (counter < 128))
@@ -1093,7 +1093,7 @@ char *name;
 						tmp++;
 					}
 				}
-				short_buffer[counter] = (char) NULL;
+				short_buffer[counter] = '\0';
 				if ((slash = getenv(short_buffer)) != NULL)
 				{
 					offset = strlen(slash);
@@ -1116,7 +1116,7 @@ char *name;
 		if (index == 1024)
 			return(buffer);
 		else
-			long_buffer[index] = (char) NULL;
+			long_buffer[index] = '\0';
 
 		if (name_buffer != buffer)
 			free(buffer);
@@ -1163,7 +1163,7 @@ char *file_name;
 			{
 				tmp_point = get_string(file_exists_prompt, TRUE);
 				if ((toupper(*tmp_point) == toupper(*no_char)) 
-					|| (*tmp_point == (char) NULL))
+					|| (*tmp_point == '\0'))
 					write_flag = FALSE;
 				else
 					write_flag = TRUE;
@@ -1176,7 +1176,7 @@ char *file_name;
 		{
 			tmp_point = get_string(file_exists_prompt, TRUE);
 			if ((toupper(*tmp_point) == toupper(*no_char)) 
-				|| (*tmp_point == (char) NULL))
+				|| (*tmp_point == '\0'))
 				write_flag = FALSE;
 			else
 				write_flag = TRUE;
@@ -1317,7 +1317,7 @@ diff_file()
 	 |  another way to deal with buffer names is to use the function
 	 |  buff_name_generator()
 	 */
-	if ((curr_buff->file_name != (char *)NULL) && (*curr_buff->file_name != (char)NULL))
+	if ((curr_buff->file_name != (char *)NULL) && (*curr_buff->file_name != '\0'))
 	{
 		curr_name = curr_buff->name;
 		sprintf(buff_name, "%s-diffs", curr_buff->file_name);
diff --git a/format.c b/format.c
index 997fedf..2610649 100644
--- a/format.c
+++ b/format.c
@@ -31,13 +31,13 @@ struct text *test_line;
 	if ((*line == '.') || (*line == '>'))
 		return(TRUE);
 
-	while ((*line != (char) NULL) && ((*line == ' ') || (*line == '\t')) && (length <= curr_buff->curr_line->line_length))
+	while ((*line != '\0') && ((*line == ' ') || (*line == '\t')) && (length <= curr_buff->curr_line->line_length))
 	{
 		length++;
 		line++;
 	}
 
-	if (*line != (char) NULL)
+	if (*line != '\0')
 		return(FALSE);
 	else
 		return(TRUE);
@@ -116,14 +116,14 @@ Format()	/* format the paragraph according to set margins	*/
 	offset -= curr_buff->position;
 	line = temp1 = curr_buff->pointer;
 	counter = curr_buff->position;
-	while ((*temp1 != (char) NULL) && (*temp1 != ' ') && (*temp1 != '\t') && (counter < curr_buff->curr_line->line_length))
+	while ((*temp1 != '\0') && (*temp1 != ' ') && (*temp1 != '\t') && (counter < curr_buff->curr_line->line_length))
 	{
 		*temp2 = *temp1;
 		temp2++;
 		temp1++;
 		counter++;
 	}
-	*temp2 = (char) NULL;
+	*temp2 = '\0';
 	if (curr_buff->position != 1)
 		bol();
 	while (!Blank_Line(curr_buff->curr_line->prev_line))
@@ -370,7 +370,7 @@ struct text *test_line;
 		return(0);
 
 	pnt = test_line->line;
-	if ((pnt == NULL) || (*pnt == (char) NULL) || (*pnt == '.') || 
+	if ((pnt == NULL) || (*pnt == '\0') || (*pnt == '.') || 
 	    (*pnt == '>'))
 		return(0);
 
@@ -379,16 +379,16 @@ struct text *test_line;
 		pnt = next_word(pnt);
 	}
 
-	if (*pnt == (char) NULL)
+	if (*pnt == '\0')
 		return(0);
 
 	counter = 0;
-	while ((*pnt != (char) NULL) && ((*pnt != ' ') && (*pnt != '\t')))
+	while ((*pnt != '\0') && ((*pnt != ' ') && (*pnt != '\t')))
 	{
 		pnt++;
 		counter++;
 	}
-	while ((*pnt != (char) NULL) && ((*pnt == ' ') || (*pnt == '\t')))
+	while ((*pnt != '\0') && ((*pnt == ' ') || (*pnt == '\t')))
 	{
 		pnt++;
 		counter++;
@@ -440,7 +440,7 @@ Auto_Format()	/* format the paragraph according to set margins	*/
 	temp_forward = forward;
 	forward = TRUE;
 	offset = curr_buff->position;
-	if ((curr_buff->position != 1) && ((*curr_buff->pointer == ' ') || (*curr_buff->pointer == '\t') || (curr_buff->position == curr_buff->curr_line->line_length) || (*curr_buff->pointer == (char) NULL)))
+	if ((curr_buff->position != 1) && ((*curr_buff->pointer == ' ') || (*curr_buff->pointer == '\t') || (curr_buff->position == curr_buff->curr_line->line_length) || (*curr_buff->pointer == '\0')))
 		prev_word();
 	temp_dword = d_word;
 	temp_dwl = d_wrd_len;
@@ -455,14 +455,14 @@ Auto_Format()	/* format the paragraph according to set margins	*/
 	offset -= curr_buff->position;
 	counter = curr_buff->position;
 	line = temp1 = curr_buff->pointer;
-	while ((*temp1 != (char) NULL) && (*temp1 != ' ') && (*temp1 != '\t') && (counter < curr_buff->curr_line->line_length))
+	while ((*temp1 != '\0') && (*temp1 != ' ') && (*temp1 != '\t') && (counter < curr_buff->curr_line->line_length))
 	{
 		*temp2 = *temp1;
 		temp2++;
 		temp1++;
 		counter++;
 	}
-	*temp2 = (char) NULL;
+	*temp2 = '\0';
 	if (curr_buff->position != 1)
 		bol();
 	while (!Blank_Line(curr_buff->curr_line->prev_line))
diff --git a/help.c b/help.c
index 673810f..3c60dd5 100644
--- a/help.c
+++ b/help.c
@@ -118,7 +118,7 @@ ask()	/* prompt user what help topic do they wish to learn about	*/
 	char *tline;
 
 	topic = get_string(topic_prompt, FALSE);
-	if (*topic == (char) NULL)
+	if (*topic == '\0')
 		go_on = FALSE;
 	else if (*topic != 9)
 	{
@@ -128,9 +128,9 @@ ask()	/* prompt user what help topic do they wish to learn about	*/
 			tline = sline = fgets(help_line, 512, fp);
 			if (tline != NULL)
 			{
-				while ((*tline != '\n') && (*tline != (char) NULL))
+				while ((*tline != '\n') && (*tline != '\0'))
 					tline++;
-				*tline = (char) NULL;
+				*tline = '\0';
 			}
 		}
 		while ((sline != NULL) && (strncmp(sline, topic, strlen(topic))));
diff --git a/journal.c b/journal.c
index 1427c03..ca322b8 100644
--- a/journal.c
+++ b/journal.c
@@ -375,10 +375,10 @@ char *file_name;
 	 |	the journal file.
 	 */
 
-	if ((buffer->full_name == NULL) || (*buffer->full_name == (char) NULL))
+	if ((buffer->full_name == NULL) || (*buffer->full_name == '\0'))
 	{
 		buffer->full_name = strdup(name);
-		if ((buffer->full_name != NULL) && (*buffer->full_name != (char) NULL))
+		if ((buffer->full_name != NULL) && (*buffer->full_name != '\0'))
 		{
 			buffer->file_name = ae_basename(buffer->full_name);
 			if (strcmp(main_buffer_name, buffer->name))
@@ -513,7 +513,7 @@ read_journal_db()
 			tmp = next_word(tmp);
 			list->file_name = (char *) malloc(file_name_len + 1);
 			strncpy(list->file_name, tmp, file_name_len);
-			list->file_name[file_name_len] = (char)NULL;
+			list->file_name[file_name_len] = '\0';
 		}
 		else
 			list->file_name = NULL;
@@ -521,7 +521,7 @@ read_journal_db()
 		tmp = next_word(tmp);
 		list->journal_name = (char *) malloc(journ_name_len + 1);
 		strncpy(list->journal_name, tmp, journ_name_len);
-		list->journal_name[journ_name_len] = (char)NULL;
+		list->journal_name[journ_name_len] = '\0';
 	}
 	fclose(db_fp);
 	return(top_of_list);
@@ -545,7 +545,7 @@ struct journal_db *list;
 
 	for (tmp = list; (db_fp != NULL) && (tmp != NULL); tmp = tmp->next)
 	{
-		if (tmp->file_name != (char)NULL)
+		if (tmp->file_name != '\0')
 		{
 			fprintf(db_fp, "%d %d %s %s\n", strlen(tmp->file_name), 
 				strlen(tmp->journal_name), tmp->file_name, 
@@ -599,7 +599,7 @@ struct bufr *buffer;
 	list->next = NULL;
 
 	list->journal_name = strdup(buffer->journal_file);
-	if (*buffer->full_name != (char)NULL)
+	if (*buffer->full_name != '\0')
 		list->file_name = strdup(buffer->full_name);
 	else
 		list->file_name = NULL;
@@ -692,7 +692,7 @@ char *name;
 	struct stat buf;
 	int ret_val;
 
-	if ((name == (char *)NULL) || (*name == (char) NULL))
+	if ((name == (char *)NULL) || (*name == '\0'))
 		return(-1);
 
 	ret_val = stat(name, &buf);
@@ -721,7 +721,7 @@ char *file_name;
 	char *temp, *buff, *name;
 	int count;
 
-	if (*file_name == (char)NULL)
+	if (*file_name == '\0')
 	{
 		struct tm *time_info;
 		time_t t;
@@ -739,7 +739,7 @@ char *file_name;
 		ret_val = strftime(file_name, 13, "%y%m%d%H%M%S", time_info);
 	}
 
-	if ((journal_dir != NULL) && (*journal_dir != (char) NULL))
+	if ((journal_dir != NULL) && (*journal_dir != '\0'))
 	{
 		name = ae_basename(file_name);
 		buffer->journal_file = temp = 
@@ -766,7 +766,7 @@ char *file_name;
 	}
 	else
 	{
-		while(*temp != (char) NULL)
+		while(*temp != '\0')
 			temp++;
 	}
 
@@ -829,7 +829,7 @@ struct bufr *buffer;
 				&& (errno == EEXIST) && (counter <= 'z'))
 		{
 			buffer->journal_file[length] = counter;
-			buffer->journal_file[length + 1] = (char) NULL;
+			buffer->journal_file[length + 1] = '\0';
 			counter++;
 		}
 	}
@@ -843,7 +843,7 @@ struct bufr *buffer;
 
 	add_to_journal_db(buffer);
 
-	if (*buffer->full_name != (char) NULL)
+	if (*buffer->full_name != '\0')
 	{
 		ret_val = write(buffer->journ_fd, buffer->full_name, 
 					strlen(buffer->full_name));
diff --git a/mark.c b/mark.c
index 1d1652e..462390d 100644
--- a/mark.c
+++ b/mark.c
@@ -104,7 +104,7 @@ paste()		/* insert text from paste buffer into current buffer	*/
 			}
 			curr_buff->curr_line->changed = TRUE;
 			curr_buff->changed = TRUE;
-			*curr_buff->pointer = (char) NULL;
+			*curr_buff->pointer = '\0';
 			curr_buff->curr_line->vert_len = (scanline(curr_buff->curr_line, curr_buff->curr_line->line_length) / COLS) + 1;
 			cpste_line = cpste_line->next_line;
 			right(FALSE);
@@ -200,7 +200,7 @@ cut()	/* cut selected (marked) text out of current buffer	*/
 				pst_pnt++;
 			}
 			if (*pst_pnt == -1 || *pst_pnt == 255)
-				*pst_pnt = (char) NULL;
+				*pst_pnt = '\0';
 			cpste_line = cpste_line->next_line;
 		}
 		curr_buff->scr_vert = vert;
@@ -231,7 +231,7 @@ cut_up()	/* cut text above current cursor position	*/
 	{
 		cpste_line = cpste_line->prev_line;
 		curr_buff->pointer = curr_buff->curr_line->line;
-		*curr_buff->pointer = (char) NULL;
+		*curr_buff->pointer = '\0';
 		curr_buff->position = curr_buff->curr_line->line_length = 1;
 		delete(FALSE);
 	}
@@ -263,7 +263,7 @@ cut_down()		/* cut text below current cursor position	*/
 	{
 		cpste_line = cpste_line->next_line;
 		curr_buff->pointer = curr_buff->curr_line->line;
-		*curr_buff->pointer = (char) NULL;
+		*curr_buff->pointer = '\0';
 		curr_buff->position = curr_buff->curr_line->line_length = 1;
 		delete(FALSE);
 		right(FALSE);
@@ -357,7 +357,7 @@ fast_right()	/* move right one character and select (mark) but do not display	*/
 {
 	if (curr_buff->position < curr_buff->curr_line->line_length)
 	{
-		if ((pst_pos == cpste_line->line_length) && (*pst_pnt == (char) NULL) && (curr_buff->position < curr_buff->curr_line->line_length))
+		if ((pst_pos == cpste_line->line_length) && (*pst_pnt == '\0') && (curr_buff->position < curr_buff->curr_line->line_length))
 		{
 			if ((cpste_line->max_length - cpste_line->line_length) < 5)
 				pst_pnt = resiz_line(10, cpste_line, pst_pos);
@@ -365,7 +365,7 @@ fast_right()	/* move right one character and select (mark) but do not display	*/
 			pst_pnt++;
 			pst_pos++;
 			cpste_line->line_length++;
-			*pst_pnt = (char) NULL;
+			*pst_pnt = '\0';
 		}
 		else if (curr_buff->position < curr_buff->curr_line->line_length)
 			slct_dlt();
@@ -404,7 +404,7 @@ char *direct;	/* direction of movement	*/
 			fpste_line = cpste_line = pste_tmp;
 			pste_tmp->line_length = 1;
 			pste_tmp->max_length = curr_buff->curr_line->max_length;
-			*pst_pnt = (char) NULL;
+			*pst_pnt = '\0';
 			pst_pos = 1;
 		}
 		else
@@ -432,7 +432,7 @@ char *direct;	/* direction of movement	*/
 		{
 			pste_tmp = txtalloc();
 			pst_pnt = pst_line = pste_tmp->line = xalloc(curr_buff->curr_line->max_length);
-			*pst_pnt = (char) NULL;
+			*pst_pnt = '\0';
 			pst_pos = 1;
 			pste_tmp->line_length = 1;
 			pste_tmp->max_length = curr_buff->curr_line->max_length;
@@ -464,7 +464,7 @@ int flag;
 		cpste_line = fpste_line = txtalloc();
 		cpste_line->line = pst_line = pst_pnt = xalloc(10);
 		pst_pos = cpste_line->line_length = 1;
-		*pst_pnt = (char) NULL;
+		*pst_pnt = '\0';
 		cpste_line->max_length = 10;
 		cpste_line->prev_line = NULL;
 		cpste_line->next_line = NULL;
@@ -490,7 +490,7 @@ slct_dlt()	/* delete character in buffer	*/
 		pst_pos--;
 		cpste_line->line_length--;
 		pst_pnt--;
-		*pst_pnt = (char) NULL;
+		*pst_pnt = '\0';
 	}
 	else if (pst_pos != cpste_line->line_length)
 	{
@@ -521,7 +521,7 @@ slct_right()	/* select text while moving right and display	*/
 			pst_pnt = resiz_line(10, cpste_line, pst_pos);
 		*pst_pnt = *curr_buff->pointer;
 		pst_pnt++;
-		*pst_pnt = (char) NULL;
+		*pst_pnt = '\0';
 		pst_pos++;
 		cpste_line->line_length++;
 		wmove(curr_buff->win, curr_buff->scr_vert, curr_buff->scr_horz);
@@ -606,7 +606,7 @@ char *direct;	/* direction	*/
 			pste_tmp->line_length = 1;
 			pste_tmp->max_length = curr_buff->curr_line->max_length;
 			fpste_line = cpste_line = pste_tmp;
-			*pst_pnt = (char) NULL;
+			*pst_pnt = '\0';
 			pst_pos = 1;
 			slct_left();
 		}
@@ -631,7 +631,7 @@ char *direct;	/* direction	*/
 		{
 			pste_tmp = txtalloc();
 			pst_pnt = pst_line = pste_tmp->line = xalloc(curr_buff->curr_line->max_length);
-			*pst_pnt = (char) NULL;
+			*pst_pnt = '\0';
 			pst_pos = 1;
 			pste_tmp->line_length = 1;
 			pste_tmp->max_length = curr_buff->curr_line->max_length;
diff --git a/new_curse.c b/new_curse.c
index cc01092..b1a0e7f 100644
--- a/new_curse.c
+++ b/new_curse.c
@@ -1476,13 +1476,13 @@ int columns;
 	for (i = 0; i < columns; i++)
 	{
 		tmp->row[i] = ' ';
-		tmp->attributes[i] = (char) NULL;
+		tmp->attributes[i] = '\0';
 	}
 	tmp->scroll = tmp->changed = FALSE;
-	tmp->row[0] = (char) NULL;
-	tmp->attributes[0] = (char) NULL;
-	tmp->row[columns] = (char) NULL;
-	tmp->attributes[columns] = (char) NULL;
+	tmp->row[0] = '\0';
+	tmp->attributes[0] = '\0';
+	tmp->row[columns] = '\0';
+	tmp->attributes[columns] = '\0';
 	tmp->last_char = 0;
 	return(tmp);
 }
@@ -1867,7 +1867,7 @@ int place;
 	}
 	delay = 0;
 	Otemp = string;
-	while (*Otemp != (char) NULL)
+	while (*Otemp != '\0')
 	{
 		if (*Otemp == '%')
 		{
@@ -1885,7 +1885,7 @@ int place;
 						 |  find the end of the 
 						 |  conditional statement
 						 */
-						while ((strncmp(Otemp, "%t", 2)) && (*Otemp != (char) NULL))
+						while ((strncmp(Otemp, "%t", 2)) && (*Otemp != '\0'))
 						{
 							/*
 							 |  move past '%'
@@ -1913,12 +1913,12 @@ int place;
 							 |  find 'else' or end 
 							 |  of if statement
 							 */
-							while ((strncmp(Otemp, "%e", 2)) && (strncmp(Otemp, "%;", 2)) && (*Otemp != (char) NULL))
+							while ((strncmp(Otemp, "%e", 2)) && (strncmp(Otemp, "%;", 2)) && (*Otemp != '\0'))
 								Otemp++;
 							/*
 							 |  if an 'else' found
 							 */
-							if ((*Otemp != (char) NULL) && (!strncmp(Otemp, "%e", 2)))
+							if ((*Otemp != '\0') && (!strncmp(Otemp, "%e", 2)))
 							{
 								Otemp++;
 								Otemp++;
@@ -1926,12 +1926,12 @@ int place;
 								/*
 								 |  check for 'then' part
 								 */
-								while ((*tchar != (char) NULL) && (strncmp(tchar, "%t", 2)) && (strncmp(tchar, "%;", 2)))
+								while ((*tchar != '\0') && (strncmp(tchar, "%t", 2)) && (strncmp(tchar, "%;", 2)))
 									tchar++;
 								/*
 								 |  if end of string
 								 */
-								if (*tchar == (char) NULL)
+								if (*tchar == '\0')
 								{
 									EVAL = FALSE;
 									Cond_FLAG = FALSE;
@@ -1955,7 +1955,7 @@ int place;
 							 |  get out of if 
 							 |  statement
 							 */
-							else if ((*Otemp != (char) NULL) && (!strncmp(Otemp, "%;", 2)))
+							else if ((*Otemp != '\0') && (!strncmp(Otemp, "%;", 2)))
 							{
 								EVAL = FALSE;
 								Otemp++;
@@ -1975,9 +1975,9 @@ int place;
 					Cond_FLAG = FALSE;
 					if (*Otemp != ';')
 					{
-						while ((*Otemp != (char) NULL) && (strncmp(Otemp, "%;", 2)))
+						while ((*Otemp != '\0') && (strncmp(Otemp, "%;", 2)))
 							Otemp++;
-						if (*Otemp != (char) NULL)
+						if (*Otemp != '\0')
 						{
 							Otemp++;
 							Otemp++;
@@ -2046,12 +2046,12 @@ int cols;
 		for (j = line->last_char; j < column; j++)
 		{
 			line->row[j] = ' ';
-			line->attributes[j] = (char) NULL;
+			line->attributes[j] = '\0';
 		}
 	}
 	line->last_char = column;
-	line->row[column] = (char) NULL;
-	line->attributes[column] = (char) NULL;
+	line->row[column] = '\0';
+	line->attributes[column] = '\0';
 	line->changed = TRUE;
 }
 
@@ -2183,14 +2183,14 @@ WINDOW *window;
 				  	virt_col++, user_col++)
 			{
 				virtual_line->row[virt_col] = ' ';
-				virtual_line->attributes[virt_col] = (char) NULL;
+				virtual_line->attributes[virt_col] = '\0';
 			}
 		}
 		if (virtual_scr->Num_cols != window->Num_cols)
 		{
 			if (virtual_line->last_char < (user_line->last_char + window->SC))
 			{
-				if (virtual_line->row[virtual_line->last_char] == (char) NULL)
+				if (virtual_line->row[virtual_line->last_char] == '\0')
 					virtual_line->row[virtual_line->last_char] = ' ';
 				virtual_line->last_char = 
 					min(virtual_scr->Num_cols, 
@@ -2199,7 +2199,7 @@ WINDOW *window;
 		}
 		else
 			virtual_line->last_char = user_line->last_char;
-		virtual_line->row[virtual_line->last_char] = (char) NULL;
+		virtual_line->row[virtual_line->last_char] = '\0';
 		virtual_line->changed = user_line->changed;
 		virtual_line = virtual_line->next_screen;
 		user_line = user_line->next_screen;
@@ -2344,7 +2344,7 @@ int first_char;				/* first character of sequence	*/
 	Count = 0;
 	Gtemp = string;
 	string[Count++] = first_char;
-	string[Count] = (char) NULL;
+	string[Count] = '\0';
 	Time_Out = FALSE;
 #ifndef BSD_SELECT
 	signal(SIGALRM, Clear);
@@ -2368,7 +2368,7 @@ fflush(stderr);
 		if (in_char != -1)
 		{
 			string[Count++] = in_char;
-			string[Count] = (char) NULL;
+			string[Count] = '\0';
 			St_point = KEY_TOS;
 			while ((St_point != NULL) && (!Found))
 			{
@@ -2454,10 +2454,10 @@ int c;
 					for (j = tmpline->last_char; j < column; j++)
 					{
 						tmpline->row[j] = ' ';
-						tmpline->attributes[j] = (char) NULL;
+						tmpline->attributes[j] = '\0';
 					}
-				tmpline->row[column + 1] = (char) NULL;
-				tmpline->attributes[column + 1] = (char) NULL;
+				tmpline->row[column + 1] = '\0';
+				tmpline->attributes[column + 1] = '\0';
 				tmpline->last_char = column + 1;
 			}
 		}
@@ -2635,7 +2635,7 @@ char *string;
 {
 	char *wstring;
 
-	for (wstring = string; *wstring != (char) NULL; wstring++)
+	for (wstring = string; *wstring != '\0'; wstring++)
 		waddch(window, *wstring);
 }
 
@@ -2713,7 +2713,7 @@ noraw()			/* set to normal character read mode		*/
 	Terminal.c_lflag |= ICANON;	/* enable canonical operation	*/
 	Terminal.c_lflag |= ISIG;	/* enable signal checking	*/
 	Terminal.c_cc[VEOF] = 4;		/* EOF character = 4	*/
-	Terminal.c_cc[VEOL] = (char) NULL;	/* EOL = 0		*/
+	Terminal.c_cc[VEOL] = '\0';	/* EOL = 0		*/
 	Terminal.c_cc[VINTR] = Intr;		/* reset interrupt char	*/
 	value = ioctl(0, TCSETA, &Terminal);	/* set characteristics	*/
 #else
@@ -2881,7 +2881,7 @@ wprintw(WINDOW *window, const char *format, ...)
 #endif /* __STDC__ */
 
 	fpoint = (char *) format;
-	while (*fpoint != (char) NULL)
+	while (*fpoint != '\0')
 	{
 		if (*fpoint == '%')
 		{
@@ -2958,12 +2958,12 @@ struct _line *line2;
 	att1 = line1->attributes;
 	att2 = line2->attributes;
 	i = 0;
-	while ((c1[i] != (char) NULL) && (c2[i] != (char) NULL) && (c1[i] == c2[i]) && (att1[i] == att2[i]))
+	while ((c1[i] != '\0') && (c2[i] != '\0') && (c1[i] == c2[i]) && (att1[i] == att2[i]))
 		i++;
 	count1 = i + 1;
-	if ((count1 == 1) && (c1[i] == (char) NULL) && (c2[i] == (char) NULL))
+	if ((count1 == 1) && (c1[i] == '\0') && (c2[i] == '\0'))
 		count1 = 0;			/* both lines blank	*/
-	else if ((c1[i] == (char) NULL) && (c2[i] == (char) NULL))
+	else if ((c1[i] == '\0') && (c2[i] == '\0'))
 		count1 = -1;			/* equal		*/
 	else
 		count1 = 1;			/* lines unequal	*/
@@ -3116,9 +3116,9 @@ int row, column;
 	for (x = column; x<window->Num_cols; x++)
 	{
 		tmp1->row[x] = ' ';
-		tmp1->attributes[x] = (char) NULL;
+		tmp1->attributes[x] = '\0';
 	}
-	tmp1->row[column] = (char) NULL;
+	tmp1->row[column] = '\0';
 	tmp1->last_char = column;
 	if (column < COLS)
 	{
@@ -3160,16 +3160,16 @@ struct _line *pointer_new, *pointer_old;
 	old_lin = pointer_old->row;
 	old_att = pointer_old->attributes;
 	end_old = end_new = offset;
-	while (((new_lin[end_new] != old_lin[end_old]) || (new_att[end_new] != old_att[end_old])) && (old_lin[end_old] != (char) NULL) && (new_lin[end_old] != (char) NULL))
+	while (((new_lin[end_new] != old_lin[end_old]) || (new_att[end_new] != old_att[end_old])) && (old_lin[end_old] != '\0') && (new_lin[end_old] != '\0'))
 		end_old++;
-	if (old_lin[end_old] != (char) NULL)
+	if (old_lin[end_old] != '\0')
 	{
 		k = 0;
-		while ((old_lin[end_old+k] == new_lin[end_new+k]) && (new_att[end_new+k] == old_att[end_old+k]) && (new_lin[end_new+k] != (char) NULL) && (old_lin[end_old+k] != (char) NULL) && (k < 10))
+		while ((old_lin[end_old+k] == new_lin[end_new+k]) && (new_att[end_new+k] == old_att[end_old+k]) && (new_lin[end_new+k] != '\0') && (old_lin[end_old+k] != '\0') && (k < 10))
 			k++;
-		if ((k > 8) || ((new_lin[end_new+k] == (char) NULL) && (k != 0)))
+		if ((k > 8) || ((new_lin[end_new+k] == '\0') && (k != 0)))
 		{
-			if (new_lin[end_new+k] == (char) NULL)
+			if (new_lin[end_new+k] == '\0')
 			{
 				Position(window, line, (end_new+k));
 				CLEAR_TO_EOL(window, line, (end_new+k));
@@ -3177,7 +3177,7 @@ struct _line *pointer_new, *pointer_old;
 			Position(window, line, offset);
 			for (k = offset; k < end_old; k++)
 				Char_del(old_lin, old_att, offset, window->Num_cols);
-			while ((old_lin[offset] != (char) NULL) && (offset < COLS))
+			while ((old_lin[offset] != '\0') && (offset < COLS))
 				offset++;
 			pointer_old->last_char = offset;
 			changed = TRUE;
@@ -3214,12 +3214,12 @@ struct _line *pointer_new, *pointer_old;
 	old_lin = pointer_old->row;
 	old_att = pointer_old->attributes;
 	end_old = end_new = offset;
-	while (((new_lin[end_new] != old_lin[end_old]) || (new_att[end_new] != old_att[end_old])) && (new_lin[end_new] != (char) NULL) && (old_lin[end_new] != (char) NULL))
+	while (((new_lin[end_new] != old_lin[end_old]) || (new_att[end_new] != old_att[end_old])) && (new_lin[end_new] != '\0') && (old_lin[end_new] != '\0'))
 		end_new++;
-	if (new_lin[end_new] != (char) NULL)
+	if (new_lin[end_new] != '\0')
 	{
 		k = 0;
-		while ((old_lin[end_old+k] == new_lin[end_new+k]) && (old_att[end_old+k] == new_att[end_new+k]) && (new_lin[end_new+k] != (char) NULL) && (old_lin[end_old+k] != (char) NULL) && (k < 10))
+		while ((old_lin[end_old+k] == new_lin[end_new+k]) && (old_att[end_old+k] == new_att[end_new+k]) && (new_lin[end_new+k] != '\0') && (old_lin[end_old+k] != '\0') && (k < 10))
 			k++;
 		/*
 		 |  check for commonality between rest of lines (are the old 
@@ -3227,11 +3227,11 @@ struct _line *pointer_new, *pointer_old;
 		 |  if the rest of the lines are common, do not insert text
 		 */
 		old_off = end_new;
-		while ((old_lin[old_off] != (char) NULL) && (new_lin[old_off] != (char) NULL) && (old_lin[old_off] == new_lin[old_off]) && (old_att[old_off] == new_att[old_off]))
+		while ((old_lin[old_off] != '\0') && (new_lin[old_off] != '\0') && (old_lin[old_off] == new_lin[old_off]) && (old_att[old_off] == new_att[old_off]))
 			old_off++;
 		if ((old_lin[old_off] == new_lin[old_off]) && (old_att[old_off] == new_att[old_off]))
 			same = TRUE;
-		if ((!same) && ((k > 8) || ((new_lin[end_new+k] == (char) NULL) && (k != 0))))
+		if ((!same) && ((k > 8) || ((new_lin[end_new+k] == '\0') && (k != 0))))
 		{
 			Position(window, line, offset);
 			insert = FALSE;
@@ -3248,7 +3248,7 @@ struct _line *pointer_new, *pointer_old;
 			}
 			if (insert)
 				String_Out(String_table[ei__], NULL, 0);
-			while ((old_lin[offset] != (char) NULL) && (offset < COLS))
+			while ((old_lin[offset] != '\0') && (offset < COLS))
 				offset++;
 			pointer_old->last_char = offset;
 			changed = TRUE;
@@ -3319,7 +3319,7 @@ doupdate()
 		for (from_top = 0, curr = curscr->first_line; from_top < curscr->Num_lines; from_top++, curr = curr->next_screen)
 		{
 			Position(curscr, from_top, 0);
-			for (j = 0; (curr->row[j] != (char) NULL) && (j < curscr->Num_cols); j++)
+			for (j = 0; (curr->row[j] != '\0') && (j < curscr->Num_cols); j++)
 			{
 				Char_out(curr->row[j], curr->attributes[j], curr->row, curr->attributes, j);
 			}
@@ -3541,7 +3541,7 @@ doupdate()
 		 */
 
 		if (((String_table[ic__]) || (String_table[im__])) && 
-		    (String_table[dc__]) && (curr->row[0] != (char) NULL) &&
+		    (String_table[dc__]) && (curr->row[0] != '\0') &&
 		    (!NC_chinese))
 		{
 			j = 0;
@@ -3550,11 +3550,11 @@ doupdate()
 			vrt_att = virt->attributes;
 			cur_lin = curr->row;
 			cur_att = curr->attributes;
-			while ((vrt_lin[j] != (char) NULL) && (j < window->Num_cols))
+			while ((vrt_lin[j] != '\0') && (j < window->Num_cols))
 			{
 				if ((STAND) && (Booleans[xs__]))
 				{
-					while ((vrt_lin[j] == cur_lin[j]) && (vrt_att[j] == cur_att[j]) && (vrt_lin[j] != (char) NULL) && (vrt_att[j]))
+					while ((vrt_lin[j] == cur_lin[j]) && (vrt_att[j] == cur_att[j]) && (vrt_lin[j] != '\0') && (vrt_att[j]))
 						j++;
 					if ((STAND) && (!vrt_att[j]))
 					{
@@ -3566,7 +3566,7 @@ doupdate()
 				}
 				else
 				{
-					while ((vrt_lin[j] == cur_lin[j]) && (vrt_att[j] == cur_att[j]) && (vrt_lin[j] != (char) NULL))
+					while ((vrt_lin[j] == cur_lin[j]) && (vrt_att[j] == cur_att[j]) && (vrt_lin[j] != '\0'))
 						j++;
 				}
 				if ((vrt_att[j] != cur_att[j]) && (cur_att[j]) && (Booleans[xs__]))
@@ -3576,7 +3576,7 @@ doupdate()
 					attribute_off();
 					attribute_off();
 				}
-				if (vrt_lin[j] != (char) NULL)
+				if (vrt_lin[j] != '\0')
 				{
 					begin_new = j;
 					begin_old = j;
@@ -3594,7 +3594,7 @@ doupdate()
 						changed = check_insert(window, from_top, j, virt, curr);
 					if (((!changed) || (cur_lin[j] != vrt_lin[j]) || (cur_att[j] != vrt_att[j])) && (j < window->Num_cols))
 					{
-						if ((vrt_lin[j] == ' ') && (cur_lin[j] == (char) NULL) && (vrt_att[j] == cur_att[j]))
+						if ((vrt_lin[j] == ' ') && (cur_lin[j] == '\0') && (vrt_att[j] == cur_att[j]))
 							cur_lin[j] = ' ';
 						else
 						{
@@ -3602,7 +3602,7 @@ doupdate()
 							Char_out(vrt_lin[j], vrt_att[j], cur_lin, cur_att, j);
 						}
 					}
-					if ((vrt_lin[j] != (char) NULL))
+					if ((vrt_lin[j] != '\0'))
 						j++;
 				}
 				if ((STAND) && (!vrt_att[j]))
@@ -3612,7 +3612,7 @@ doupdate()
 					attribute_off();
 				}
 			}
-			if ((vrt_lin[j] == (char) NULL) && (cur_lin[j] != (char) NULL))
+			if ((vrt_lin[j] == '\0') && (cur_lin[j] != '\0'))
 			{
 				Position(window, from_top, j);
 				CLEAR_TO_EOL(window, from_top, j);
@@ -3625,9 +3625,9 @@ doupdate()
 			att1 = curr->attributes;
 			c2 = virt->row;
 			att2 = virt->attributes;
-			while ((j < window->Num_cols) && (c2[j] != (char) NULL))
+			while ((j < window->Num_cols) && (c2[j] != '\0'))
 			{
-				while ((c1[j] == c2[j]) && (att1[j] == att2[j]) && (j < window->Num_cols) && (c2[j] != (char) NULL))
+				while ((c1[j] == c2[j]) && (att1[j] == att2[j]) && (j < window->Num_cols) && (c2[j] != '\0'))
 					j++;
 
 				/*
@@ -3639,16 +3639,16 @@ doupdate()
 					j--;
 				begin_old = j;
 				begin_new = j;
-				if ((j < window->Num_cols) && (c2[j] != (char) NULL))
+				if ((j < window->Num_cols) && (c2[j] != '\0'))
 				{
 					Position(window, from_top, begin_old);
 					CLEAR_TO_EOL(window, from_top, j);
 					Position(window, from_top, begin_old);
-					for (j = begin_old; (c2[j] != (char) NULL) && (j < window->Num_cols); j++)
+					for (j = begin_old; (c2[j] != '\0') && (j < window->Num_cols); j++)
 						Char_out(c2[j], att2[j], c1, att1, j);
 				}
 			}
-			if ((c2[j] == (char) NULL) && (c1[j] != (char) NULL))
+			if ((c2[j] == '\0') && (c1[j] != '\0'))
 			{
 				Position(window, from_top, j);
 				CLEAR_TO_EOL(window, from_top, j);
@@ -3704,7 +3704,7 @@ int maxlen;
 {
 	int one, two;
 
-	for (one = offset, two = offset+1; (line[one] != (char) NULL) && (one < maxlen); one++, two++)
+	for (one = offset, two = offset+1; (line[one] != '\0') && (one < maxlen); one++, two++)
 	{
 		line[one] = line[two];
 		attrib[one] = attrib[two];
@@ -3724,7 +3724,7 @@ int maxlen;
 	int one, two;
 
 	one = 0;
-	while ((line[one] != (char) NULL) && (one < (maxlen - 2)))
+	while ((line[one] != '\0') && (one < (maxlen - 2)))
 		one++;
 	for (two = one + 1; (two > offset); one--, two--)
 	{
diff --git a/srch_rep.c b/srch_rep.c
index 84e152b..04c69b0 100644
--- a/srch_rep.c
+++ b/srch_rep.c
@@ -42,7 +42,7 @@ int disp;		/* boolean for whether or not to display message */
 	else
 		direction = "u";
 	end_of_line = FALSE;
-	if ((srch_str == NULL) || (*srch_str == (char) NULL))
+	if ((srch_str == NULL) || (*srch_str == '\0'))
 		return(FALSE);
 	if ((move_cursor) && (disp))
 	{
@@ -87,7 +87,7 @@ int disp;		/* boolean for whether or not to display message */
 				if (case_sen)	/* if case sensitive	*/
 				{
 					srch_3 = srch_str;
-					while ((*srch_2 == *srch_3) && (*srch_3 != (char) NULL) && (iter2 < srch_line->line_length))
+					while ((*srch_2 == *srch_3) && (*srch_3 != '\0') && (iter2 < srch_line->line_length))
 					{
 						found = TRUE;
 						srch_2++;
@@ -98,7 +98,7 @@ int disp;		/* boolean for whether or not to display message */
 				else		/* if not case sensitive */
 				{
 					srch_3 = u_srch_str;
-					while ((toupper(*srch_2) == *srch_3) && (*srch_3 != (char) NULL) && (iter2 < srch_line->line_length))
+					while ((toupper(*srch_2) == *srch_3) && (*srch_3 != '\0') && (iter2 < srch_line->line_length))
 					{
 						found = TRUE;
 						srch_2++;
@@ -144,7 +144,7 @@ int disp;		/* boolean for whether or not to display message */
 							{
 								if (search(FALSE, srch_line, iter2, srch_2, (s_str_off+increment), TRUE, disp))
 								{
-									while (srch_3[s_str_off] != (char) NULL)
+									while (srch_3[s_str_off] != '\0')
 										s_str_off++;
 									found2 = TRUE;
 								}
@@ -156,7 +156,7 @@ int disp;		/* boolean for whether or not to display message */
 							else	/* if at end of line, increment srch_3 to exit do...while loop	*/
 								s_str_off++;
 						}
-						else if ((iter2 == srch_line->line_length) && ((srch_3[s_str_off+1] == '$') || (srch_3[s_str_off+1] == (char) NULL)))
+						else if ((iter2 == srch_line->line_length) && ((srch_3[s_str_off+1] == '$') || (srch_3[s_str_off+1] == '\0')))
 						{
 							s_str_off++;
 							found2 = TRUE;
@@ -173,7 +173,7 @@ int disp;		/* boolean for whether or not to display message */
 					else if (srch_3[s_str_off] == '[')
 					{
 						s_str_off++;
-						x = (char) NULL;
+						x = '\0';
 						if (srch_3[s_str_off] == '^')
 						{
 							x = '^';
@@ -182,7 +182,7 @@ int disp;		/* boolean for whether or not to display message */
 						else if (srch_3[s_str_off] == '\\')
 							s_str_off++;
 						found2 = FALSE;
-						while ((srch_3[s_str_off] != (char) NULL) && (srch_3[s_str_off] != ']') && (!found2))
+						while ((srch_3[s_str_off] != '\0') && (srch_3[s_str_off] != ']') && (!found2))
 						{
 							if (srch_3[s_str_off] == '\\')
 								s_str_off++;
@@ -225,13 +225,13 @@ int disp;		/* boolean for whether or not to display message */
 							if (iter2 <= srch_line->line_length)
 								srch_2++;
 						}
-						while ((srch_3[s_str_off] != ']') && (srch_3[s_str_off] != (char) NULL))
+						while ((srch_3[s_str_off] != ']') && (srch_3[s_str_off] != '\0'))
 						{
 							if (srch_3[s_str_off] == '\\')
 								s_str_off++;
 							s_str_off++;
 						}
-						if (srch_3[s_str_off] != (char) NULL)
+						if (srch_3[s_str_off] != '\0')
 							s_str_off++;
 					}
 					else
@@ -253,7 +253,7 @@ int disp;		/* boolean for whether or not to display message */
 						if (iter2 <= srch_line->line_length)
 							srch_2++;
 					}
-				} while ((srch_3[s_str_off] != (char) NULL) && (found2));
+				} while ((srch_3[s_str_off] != '\0') && (found2));
 				found = found2;
 			}
 			if (srch_short)
@@ -262,7 +262,7 @@ int disp;		/* boolean for whether or not to display message */
 					repl_length = (iter2 - iter) - 1;
 				return(found);
 			}
-			if (!((srch_3[s_str_off] == (char) NULL) && (found)))
+			if (!((srch_3[s_str_off] == '\0') && (found)))
 			{
 				s_str_off = 0;
 				found = FALSE;
@@ -350,7 +350,7 @@ int disp;		/* boolean for whether or not to display message */
 			wclrtoeol(com_win);
 			wprintw(com_win, str_str);
 			iter2 = curr_buff->scr_horz;
-	 		for (srch_3 = srch_str; *srch_3 != (char) NULL; srch_3++)
+	 		for (srch_3 = srch_str; *srch_3 != '\0'; srch_3++)
 			{
 				if ((*srch_3 >= 32) && (*srch_3 < 127))
 				{
@@ -400,7 +400,7 @@ int flag;
 		copy_str(xsrch_string, tmp_srch);
 	}
 #endif	/* ifndef XAE	*/
-	if (*tmp_srch != (char) NULL)
+	if (*tmp_srch != '\0')
 	{
 		if (srch_str != NULL) 
 			free(srch_str);
@@ -408,13 +408,13 @@ int flag;
 		if (u_srch_str != NULL) 
 			free(u_srch_str);
 		srch_1 = u_srch_str = xalloc(strlen(srch_str) + 1);
-		while (*srch_3 != (char) NULL)		/* make upper case version of string */
+		while (*srch_3 != '\0')		/* make upper case version of string */
 		{
 			*srch_1 = toupper(*srch_3);
 			srch_1++;
 			srch_3++;
 		}
-		*srch_1 = (char) NULL;
+		*srch_1 = '\0';
 		if (strlen(srch_str) >= 1)
 			value = search(TRUE, curr_buff->curr_line, curr_buff->position, curr_buff->pointer, 0, FALSE, TRUE);
 	}
@@ -492,7 +492,7 @@ replace()		/* replace the given one string with another	*/
 			else
 				value = out_char(curr_buff->win, *curr_buff->pointer, curr_buff->scr_pos, curr_buff->scr_vert, 0);
 			if (((toupper(res) == toupper(*replace_r_char)) || 
-			      (go_on) || (res == (char) NULL)) && 
+			      (go_on) || (res == '\0')) && 
 			      (toupper(res) != toupper(*replace_skip_char)))
 			{
 				del_strg = del_string(repl_length - 1);
@@ -571,16 +571,16 @@ int flag;
 			*rp = '\33';
 			rp++;
 			copy_str(xold_string, rp);
-			while (*rp != (char) NULL)
+			while (*rp != '\0')
 				rp++;
 			*rp = '\33';
 			rp++;
 			copy_str(xnew_string, rp);
-			while (*rp != (char) NULL)
+			while (*rp != '\0')
 				rp++;
 			*rp = '\33';
 			rp++;
-			*rp = (char) NULL;
+			*rp = '\0';
 			rp = rparam;
 		}
 		else
@@ -588,22 +588,22 @@ int flag;
 	}
 #endif	/* ifndef XAE	*/
 	delimiter = *rp;
-	if (*rp != (char) NULL)
+	if (*rp != '\0')
 	{
 			++rp;
 		start = rp;
 		counter = 1;
-		while ((*rp != delimiter) && (*rp != (char) NULL))
+		while ((*rp != delimiter) && (*rp != '\0'))
 		{
 			counter++;
 			rp++;
 		}
-		if (*rp == (char) NULL)
+		if (*rp == '\0')
 			last_char = TRUE;
 		else
 		{
 			last_char = FALSE;
-			*rp = (char) NULL;
+			*rp = '\0';
 		}
 		if (old_string != NULL)
 		{
@@ -615,22 +615,22 @@ int flag;
 		u_old_string = xalloc(counter);
 		copy_str(start, old_string);
 		upt = u_old_string;
-		while (*start != (char) NULL)
+		while (*start != '\0')
 		{
 			*upt = toupper(*start);
 			upt++;
 			start++;
 		}
-		*upt = (char) NULL;
+		*upt = '\0';
 		if (!last_char)
 			start = ++rp;
 		counter = 1;
-		while ((*rp != delimiter) && (*rp != (char) NULL))
+		while ((*rp != delimiter) && (*rp != '\0'))
 		{
 			counter++;
 			rp++;
 		}
-		*rp = (char) NULL;
+		*rp = '\0';
 		new_string = xalloc(counter);
 		copy_str(start, new_string);
 		free(rparam);
diff --git a/windows.c b/windows.c
index f11fcbd..56e54b2 100644
--- a/windows.c
+++ b/windows.c
@@ -34,7 +34,7 @@ new_screen()		/* draw all of the new information on the screen */
 			wmove(t_buff->footer, 0,0);
 			wstandout(t_buff->footer);
 			waddstr(t_buff->footer, "  ");
-			for (i = 2, nchar = t_buff->name; (i < COLS) && (*nchar != (char) NULL); i+=len_char(*nchar, i), nchar++)
+			for (i = 2, nchar = t_buff->name; (i < COLS) && (*nchar != '\0'); i+=len_char(*nchar, i), nchar++)
 				waddch(t_buff->footer, *nchar);
 			for (; i < COLS; i++)
 				waddch(t_buff->footer, '-');
@@ -99,7 +99,7 @@ char *ident;
 	curr_buff->curr_line = curr_buff->first_line = txtalloc();
 	t->next_buff = NULL;
 	curr_buff->pointer = curr_buff->curr_line->line = curr_buff->first_line->line = xalloc(10);
-	*t->first_line->line = (char) NULL;
+	*t->first_line->line = '\0';
 	t->first_line->vert_len = t->first_line->line_number = t->first_line->line_length = 1;
 	t->first_line->max_length = 10;
 	t->first_line->prev_line = NULL;
@@ -132,7 +132,7 @@ char *name;
 
 	clr_cmd_line = TRUE;
 	test = next_word(name);
-	if ((*test == (char) NULL) && (!mark_text))
+	if ((*test == '\0') && (!mark_text))
 	{
 		wrefresh(curr_buff->win);
 
diff --git a/xif.c b/xif.c
index 9639417..ebe0372 100644
--- a/xif.c
+++ b/xif.c
@@ -673,7 +673,7 @@ cut_text()
 		else
 		{
 			counter -= 1;
-			*temp_point = (char) NULL;
+			*temp_point = '\0';
 			free(temp_text->line);
 			free(temp_text);
 			temp_text = NULL;
