patch 8.1.0743: giving error messages is not flexible

Problem:    Giving error messages is not flexible.
Solution:   Add semsg().  Change argument from "char_u *" to "char *", also
            for msg() and get rid of most MSG macros. (Ozaki Kiichi, closes
            #3302)  Also make emsg() accept a "char *" argument.  Get rid of
            an enormous number of type casts.
diff --git a/src/textprop.c b/src/textprop.c
index 389bd41..637ee7f 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -19,7 +19,7 @@
  * TODO:
  * - Adjust text property column and length when text is inserted/deleted.
  *   -> a :substitute with a multi-line match
- *   -> search for changed_bytes() from ex_cmds.c
+ *   -> search for changed_bytes() from misc1.c
  * - Perhaps we only need TP_FLAG_CONT_NEXT and can drop TP_FLAG_CONT_PREV?
  * - Add an arrray for global_proptypes, to quickly lookup a prop type by ID
  * - Add an arrray for b_proptypes, to quickly lookup a prop type by ID
@@ -106,7 +106,7 @@
     if (type == NULL)
 	type = find_prop(name, NULL);
     if (type == NULL)
-	EMSG2(_(e_type_not_exist), name);
+	semsg(_(e_type_not_exist), name);
     return type;
 }
 
@@ -124,7 +124,7 @@
 
     if (arg->v_type != VAR_DICT)
     {
-	EMSG(_(e_dictreq));
+	emsg(_(e_dictreq));
 	return FAIL;
     }
     if (arg->vval.v_dict == NULL)
@@ -167,19 +167,19 @@
     start_col = tv_get_number(&argvars[1]);
     if (start_col < 1)
     {
-	EMSGN(_(e_invalid_col), (long)start_col);
+	semsg(_(e_invalid_col), (long)start_col);
 	return;
     }
     if (argvars[2].v_type != VAR_DICT)
     {
-	EMSG(_(e_dictreq));
+	emsg(_(e_dictreq));
 	return;
     }
     dict = argvars[2].vval.v_dict;
 
     if (dict == NULL || dict_find(dict, (char_u *)"type", -1) == NULL)
     {
-	EMSG(_("E965: missing property type name"));
+	emsg(_("E965: missing property type name"));
 	return;
     }
     type_name = dict_get_string(dict, (char_u *)"type", FALSE);
@@ -189,7 +189,7 @@
 	end_lnum = dict_get_number(dict, (char_u *)"end_lnum");
 	if (end_lnum < start_lnum)
 	{
-	    EMSG2(_(e_invargval), "end_lnum");
+	    semsg(_(e_invargval), "end_lnum");
 	    return;
 	}
     }
@@ -202,7 +202,7 @@
 
 	if (length < 0 || end_lnum > start_lnum)
 	{
-	    EMSG2(_(e_invargval), "length");
+	    semsg(_(e_invargval), "length");
 	    return;
 	}
 	end_col = start_col + length;
@@ -212,7 +212,7 @@
 	end_col = dict_get_number(dict, (char_u *)"end_col");
 	if (end_col <= 0)
 	{
-	    EMSG2(_(e_invargval), "end_col");
+	    semsg(_(e_invargval), "end_col");
 	    return;
 	}
     }
@@ -233,12 +233,12 @@
 
     if (start_lnum < 1 || start_lnum > buf->b_ml.ml_line_count)
     {
-	EMSGN(_(e_invalid_lnum), (long)start_lnum);
+	semsg(_(e_invalid_lnum), (long)start_lnum);
 	return;
     }
     if (end_lnum < start_lnum || end_lnum > buf->b_ml.ml_line_count)
     {
-	EMSGN(_(e_invalid_lnum), (long)end_lnum);
+	semsg(_(e_invalid_lnum), (long)end_lnum);
 	return;
     }
 
@@ -257,7 +257,7 @@
 	    col = 1;
 	if (col - 1 > (colnr_T)textlen)
 	{
-	    EMSGN(_(e_invalid_col), (long)start_col);
+	    semsg(_(e_invalid_col), (long)start_col);
 	    return;
 	}
 
@@ -340,7 +340,7 @@
     proplen = buf->b_ml.ml_line_len - textlen;
     if (proplen % sizeof(textprop_T) != 0)
     {
-	IEMSG(_("E967: text property info corrupted"));
+	iemsg(_("E967: text property info corrupted"));
 	return 0;
     }
     if (proplen > 0)
@@ -440,7 +440,7 @@
     }
     if (start < 1 || end < 1)
     {
-	EMSG(_(e_invrange));
+	emsg(_(e_invrange));
 	return;
     }
 
@@ -487,7 +487,7 @@
     }
     if (lnum < 1 || lnum > buf->b_ml.ml_line_count)
     {
-	EMSG(_(e_invrange));
+	emsg(_(e_invrange));
 	return;
     }
 
@@ -542,7 +542,7 @@
     rettv->vval.v_number = 0;
     if (argvars[0].v_type != VAR_DICT || argvars[0].vval.v_dict == NULL)
     {
-	EMSG(_(e_invarg));
+	emsg(_(e_invarg));
 	return;
     }
 
@@ -554,7 +554,7 @@
 	    end = tv_get_number(&argvars[2]);
 	if (start < 1 || end < 1)
 	{
-	    EMSG(_(e_invrange));
+	    emsg(_(e_invrange));
 	    return;
 	}
     }
@@ -585,7 +585,7 @@
     }
     if (id == -1 && type_id == -1)
     {
-	EMSG(_("E968: Need at least one of 'id' or 'type'"));
+	emsg(_("E968: Need at least one of 'id' or 'type'"));
 	return;
     }
 
@@ -661,7 +661,7 @@
     name = tv_get_string(&argvars[0]);
     if (*name == NUL)
     {
-	EMSG(_(e_invarg));
+	emsg(_(e_invarg));
 	return;
     }
 
@@ -676,7 +676,7 @@
 
 	if (prop != NULL)
 	{
-	    EMSG2(_("E969: Property type %s already defined"), name);
+	    semsg(_("E969: Property type %s already defined"), name);
 	    return;
 	}
 	prop = (proptype_T *)alloc_clear((int)(sizeof(proptype_T) + STRLEN(name)));
@@ -701,7 +701,7 @@
     {
 	if (prop == NULL)
 	{
-	    EMSG2(_(e_type_not_exist), name);
+	    semsg(_(e_type_not_exist), name);
 	    return;
 	}
     }
@@ -719,7 +719,7 @@
 		hl_id = syn_name2id(highlight);
 	    if (hl_id <= 0)
 	    {
-		EMSG2(_("E970: Unknown highlight group name: '%s'"),
+		semsg(_("E970: Unknown highlight group name: '%s'"),
 			highlight == NULL ? (char_u *)"" : highlight);
 		return;
 	    }
@@ -781,7 +781,7 @@
     name = tv_get_string(&argvars[0]);
     if (*name == NUL)
     {
-	EMSG(_(e_invarg));
+	emsg(_(e_invarg));
 	return;
     }
 
@@ -816,7 +816,7 @@
 
     if (*name == NUL)
     {
-	EMSG(_(e_invarg));
+	emsg(_(e_invarg));
 	return;
     }
     if (rettv_dict_alloc(rettv) == OK)