projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bf84f58
)
EXAMINE: Improve error messages.
author
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 18 Sep 2022 21:08:20 +0000
(14:08 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 18 Sep 2022 21:08:20 +0000
(14:08 -0700)
src/language/stats/examine.c
patch
|
blob
|
history
diff --git
a/src/language/stats/examine.c
b/src/language/stats/examine.c
index 446f9058e9e1c285289f57db7c3a7fef9940b8c2..6ad5e67e4ba83b75c143cca5b209fb20a9ae1eb5 100644
(file)
--- a/
src/language/stats/examine.c
+++ b/
src/language/stats/examine.c
@@
-1515,7
+1515,7
@@
cmd_examine (struct lexer *lexer, struct dataset *ds)
while (iact);
}
while (iact);
}
-
+ int nototals_ofs = 0;
while (lex_token (lexer) != T_ENDCMD)
{
lex_match (lexer, T_SLASH);
while (lex_token (lexer) != T_ENDCMD)
{
lex_match (lexer, T_SLASH);
@@
-1630,6
+1630,7
@@
cmd_examine (struct lexer *lexer, struct dataset *ds)
else if (lex_match_id (lexer, "NOTOTAL"))
{
nototals_seen = true;
else if (lex_match_id (lexer, "NOTOTAL"))
{
nototals_seen = true;
+ nototals_ofs = lex_ofs (lexer) - 1;
}
else if (lex_match_id (lexer, "MISSING"))
{
}
else if (lex_match_id (lexer, "MISSING"))
{
@@
-1758,7
+1759,9
@@
cmd_examine (struct lexer *lexer, struct dataset *ds)
if (totals_seen && nototals_seen)
{
if (totals_seen && nototals_seen)
{
- msg (SE, _("%s and %s are mutually exclusive."), "TOTAL", "NOTOTAL");
+ lex_ofs_error (lexer, nototals_ofs, nototals_ofs,
+ _("%s and %s are mutually exclusive."),
+ "TOTAL", "NOTOTAL");
goto error;
}
goto error;
}