summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/keys.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/keys.cc b/src/keys.cc
index 279a0431..c57e3566 100644
--- a/src/keys.cc
+++ b/src/keys.cc
@@ -292,7 +292,7 @@ void Keys::parseKey(char *key, char *commandName)
void Keys::parse(FILE *fp)
{
char *line, *keycomb, *command;
- int st;
+ int st, lineno = 1;
// scan the file line by line
while ((line = dGetline(fp)) != NULL) {
@@ -302,11 +302,12 @@ void Keys::parse(FILE *fp)
_MSG("Keys::parse: keycomb=%s, command=%s\n", keycomb, command);
parseKey(keycomb, command);
} else if (st < 0) {
- MSG("Keys::parse: Syntax error in keysrc: "
- "keycomb=\"%s\" command=\"%s\"\n", keycomb, command);
+ MSG("Keys::parse: Syntax error in keysrc line %d: "
+ "keycomb=\"%s\" command=\"%s\"\n", lineno, keycomb, command);
}
dFree(line);
+ ++lineno;
}
fclose(fp);
}