[PATCH] Add returns to error messages

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Tue Jan 22 22:08:58 CST 2008


---
 tools/wrc/parser.y |   40 ++++++++++++++++++++--------------------
 1 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/tools/wrc/parser.y b/tools/wrc/parser.y
index 0af5330..0379102 100644
--- a/tools/wrc/parser.y
+++ b/tools/wrc/parser.y
@@ -1921,7 +1921,7 @@ static dialog_t *dialog_menu(name_id_t *m, dialog_t *dlg)
 {
 	assert(dlg != NULL);
 	if(dlg->menu)
-		yyerror("Menu already defined");
+		yyerror("Menu already defined\n");
 	dlg->menu = m;
 	return dlg;
 }
@@ -1930,7 +1930,7 @@ static dialog_t *dialog_language(language_t *l, dialog_t *dlg)
 {
 	assert(dlg != NULL);
 	if(dlg->lvc.language)
-		yyerror("Language already defined");
+		yyerror("Language already defined\n");
 	dlg->lvc.language = l;
 	return dlg;
 }
@@ -1939,7 +1939,7 @@ static dialog_t *dialog_characteristics(characts_t *c, dialog_t *dlg)
 {
 	assert(dlg != NULL);
 	if(dlg->lvc.characts)
-		yyerror("Characteristics already defined");
+		yyerror("Characteristics already defined\n");
 	dlg->lvc.characts = c;
 	return dlg;
 }
@@ -1948,7 +1948,7 @@ static dialog_t *dialog_version(version_t *v, dialog_t *dlg)
 {
 	assert(dlg != NULL);
 	if(dlg->lvc.version)
-		yyerror("Version already defined");
+		yyerror("Version already defined\n");
 	dlg->lvc.version = v;
 	return dlg;
 }
@@ -2050,7 +2050,7 @@ static control_t *ins_ctrl(int type, int special_style, control_t *ctrl, control
 			goto byebye;
 
 		default:
-			yyerror("Internal error (report this): Got weird control type 0x%08x", type);
+			yyerror("Internal error (report this): Got weird control type 0x%08x\n", type);
 		}
 	}
 
@@ -2089,7 +2089,7 @@ static name_id_t *convert_ctlclass(name_id_t *cls)
 	assert(cls->type == name_str);
 	if(cls->type == str_unicode)
 	{
-		yyerror("Don't yet support unicode class comparison");
+		yyerror("Don't yet support unicode class comparison\n");
 	}
 	else
 		cc = cls->name.s_name->str.cstr;
@@ -2169,7 +2169,7 @@ static dialogex_t *dialogex_caption(string_t *s, dialogex_t *dlg)
 {
 	assert(dlg != NULL);
 	if(dlg->title)
-		yyerror("Caption already defined");
+		yyerror("Caption already defined\n");
 	dlg->title = s;
 	return dlg;
 }
@@ -2178,7 +2178,7 @@ static dialogex_t *dialogex_font(font_id_t *f, dialogex_t *dlg)
 {
 	assert(dlg != NULL);
 	if(dlg->font)
-		yyerror("Font already defined");
+		yyerror("Font already defined\n");
 	dlg->font = f;
 	return dlg;
 }
@@ -2187,7 +2187,7 @@ static dialogex_t *dialogex_class(name_id_t *n, dialogex_t *dlg)
 {
 	assert(dlg != NULL);
 	if(dlg->dlgclass)
-		yyerror("Class already defined");
+		yyerror("Class already defined\n");
 	dlg->dlgclass = n;
 	return dlg;
 }
@@ -2196,7 +2196,7 @@ static dialogex_t *dialogex_menu(name_id_t *m, dialogex_t *dlg)
 {
 	assert(dlg != NULL);
 	if(dlg->menu)
-		yyerror("Menu already defined");
+		yyerror("Menu already defined\n");
 	dlg->menu = m;
 	return dlg;
 }
@@ -2205,7 +2205,7 @@ static dialogex_t *dialogex_language(language_t *l, dialogex_t *dlg)
 {
 	assert(dlg != NULL);
 	if(dlg->lvc.language)
-		yyerror("Language already defined");
+		yyerror("Language already defined\n");
 	dlg->lvc.language = l;
 	return dlg;
 }
@@ -2214,7 +2214,7 @@ static dialogex_t *dialogex_characteristics(characts_t *c, dialogex_t *dlg)
 {
 	assert(dlg != NULL);
 	if(dlg->lvc.characts)
-		yyerror("Characteristics already defined");
+		yyerror("Characteristics already defined\n");
 	dlg->lvc.characts = c;
 	return dlg;
 }
@@ -2223,7 +2223,7 @@ static dialogex_t *dialogex_version(version_t *v, dialogex_t *dlg)
 {
 	assert(dlg != NULL);
 	if(dlg->lvc.version)
-		yyerror("Version already defined");
+		yyerror("Version already defined\n");
 	dlg->lvc.version = v;
 	return dlg;
 }
@@ -2234,7 +2234,7 @@ static event_t *add_event(int key, int id, int flags, event_t *prev)
 	event_t *ev = new_event();
 
 	if((flags & (WRC_AF_VIRTKEY | WRC_AF_ASCII)) == (WRC_AF_VIRTKEY | WRC_AF_ASCII))
-		yyerror("Cannot use both ASCII and VIRTKEY");
+		yyerror("Cannot use both ASCII and VIRTKEY\n");
 
 	ev->key = key;
 	ev->id = id;
@@ -2251,20 +2251,20 @@ static event_t *add_string_event(string_t *key, int id, int flags, event_t *prev
 	event_t *ev = new_event();
 
 	if(key->type != str_char)
-		yyerror("Key code must be an ascii string");
+		yyerror("Key code must be an ascii string\n");
 
 	if((flags & WRC_AF_VIRTKEY) && (!isupper(key->str.cstr[0] & 0xff) && !isdigit(key->str.cstr[0] & 0xff)))
 		yyerror("VIRTKEY code is not equal to ascii value");
 
 	if(key->str.cstr[0] == '^' && (flags & WRC_AF_CONTROL) != 0)
 	{
-		yyerror("Cannot use both '^' and CONTROL modifier");
+		yyerror("Cannot use both '^' and CONTROL modifier\n");
 	}
 	else if(key->str.cstr[0] == '^')
 	{
 		keycode = toupper(key->str.cstr[1]) - '@';
 		if(keycode >= ' ')
-			yyerror("Control-code out of range");
+			yyerror("Control-code out of range\n");
 	}
 	else
 		keycode = key->str.cstr[0];
@@ -2300,12 +2300,12 @@ static raw_data_t *load_file(string_t *filename, language_t *lang)
 
 	/* FIXME: we may want to use utf-8 here */
 	if (codepage <= 0 && filename->type != str_char)
-		yyerror("Cannot convert filename to ASCII string");
+		yyerror("Cannot convert filename to ASCII string\n");
 	name = convert_string( filename, str_char, codepage );
 	if (!(path = wpp_find_include(name->str.cstr, input_name)))
-		yyerror("Cannot open file %s", name->str.cstr);
+		yyerror("Cannot open file %s\n", name->str.cstr);
 	if (!(fp = fopen( path, "rb" )))
-		yyerror("Cannot open file %s", name->str.cstr);
+		yyerror("Cannot open file %s\n", name->str.cstr);
 	free( path );
 	rd = new_raw_data();
 	fseek(fp, 0, SEEK_END);
-- 
1.5.3.7


--------------010600040801070300020205--




More information about the wine-patches mailing list