summaryrefslogtreecommitdiff
path: root/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2013-07-25 19:56:43 -0700
committerPaul Berry <stereotype441@gmail.com>2013-07-27 09:41:30 -0700
commit4d7899fe81b6ffc521c6f9688e25bcde4012e556 (patch)
treec230c0fce51c7b67a19223ca1f7601596cd76459 /src/glsl/glsl_parser_extras.cpp
parent8c3d3622d9ce2fd2a8f46084ab8153d708fa5b09 (diff)
glsl: Be consistent about '\n', '.', and capitalization in errors/warnings.
The majority of calls to _mesa_glsl_error(), _mesa_glsl_warning(), and _mesa_glsl_parse_state::check_version() use a message that begins with a lower case letter and ends without a period. This patch makes all messages follow that convention. Also, error/warning messages shouldn't end in '\n', since _mesa_glsl_msg() automatically adds '\n' at the end of the message. Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src/glsl/glsl_parser_extras.cpp')
-rw-r--r--src/glsl/glsl_parser_extras.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index ec4e3196ba7..e36ba584a67 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -204,7 +204,7 @@ _mesa_glsl_parse_state::check_version(unsigned required_glsl_version,
requirement_string = ralloc_asprintf(this, " (%s required)",
glsl_es_version_string);
}
- _mesa_glsl_error(locp, this, "%s in %s%s.",
+ _mesa_glsl_error(locp, this, "%s in %s%s",
problem, this->get_version_string(),
requirement_string);
@@ -234,15 +234,15 @@ _mesa_glsl_parse_state::process_version_directive(YYLTYPE *locp, int version,
*/
} else if (strcmp(ident, "compatibility") == 0) {
_mesa_glsl_error(locp, this,
- "The compatibility profile is not supported.\n");
+ "the compatibility profile is not supported");
} else {
_mesa_glsl_error(locp, this,
"\"%s\" is not a valid shading language profile; "
- "if present, it must be \"core\".\n", ident);
+ "if present, it must be \"core\"", ident);
}
} else {
_mesa_glsl_error(locp, this,
- "Illegal text following version number\n");
+ "illegal text following version number");
}
}
@@ -251,7 +251,7 @@ _mesa_glsl_parse_state::process_version_directive(YYLTYPE *locp, int version,
if (es_token_present) {
_mesa_glsl_error(locp, this,
"GLSL 1.00 ES should be selected using "
- "`#version 100'\n");
+ "`#version 100'");
} else {
this->es_shader = true;
}
@@ -270,7 +270,7 @@ _mesa_glsl_parse_state::process_version_directive(YYLTYPE *locp, int version,
if (!supported) {
_mesa_glsl_error(locp, this, "%s is not supported. "
- "Supported versions are: %s\n",
+ "Supported versions are: %s",
this->get_version_string(),
this->supported_version_string);
@@ -621,14 +621,14 @@ _mesa_glsl_process_extension(const char *name, YYLTYPE *name_locp,
behavior = extension_disable;
} else {
_mesa_glsl_error(behavior_locp, state,
- "Unknown extension behavior `%s'",
+ "unknown extension behavior `%s'",
behavior_string);
return false;
}
if (strcmp(name, "all") == 0) {
if ((behavior == extension_enable) || (behavior == extension_require)) {
- _mesa_glsl_error(name_locp, state, "Cannot %s all extensions",
+ _mesa_glsl_error(name_locp, state, "cannot %s all extensions",
(behavior == extension_enable)
? "enable" : "require");
return false;