Permalink
Browse files

trunk/ctags.1: (Bug #1745301) clarify the "--options" option.

trunk/lregex.c: 
trunk/options.c: 
trunk/parse.c: improve the "unknown language" error messages.
  • Loading branch information...
1 parent 82bdb57 commit 63874aff79624ebdd301ffeaf34c5ab43ce274b8 Elliott Hughes committed Jun 30, 2007
Showing with 9 additions and 8 deletions.
  1. +2 −1 ctags.1
  2. +1 −1 lregex.c
  3. +5 −5 options.c
  4. +1 −1 parse.c
View
@@ -674,7 +674,8 @@ These language names are case insensitive and may be used in the
.TP 5
\fB\-\-options\fP=\fIfile\fP
-Read additional options from \fIfile\fP. As a special case, if
+Read additional options from \fIfile\fP. The file should contain one option
+per line. As a special case, if
\fB\-\-options\fP=\fINONE\fP is specified as the first option on the command
line, it will disable the automatic reading of any configuration options from
either a file or the environment (see \fBFILES\fP).
View
@@ -612,7 +612,7 @@ extern boolean processRegexOption (const char *const option,
langType language;
language = getNamedLanguage (dash + 1);
if (language == LANG_IGNORE)
- error (WARNING, "unknown language in --%s option", option);
+ error (WARNING, "unknown language \"%s\" in --%s option", (dash + 1), option);
else
processLanguageRegex (language, parameter);
#else
View
@@ -955,7 +955,7 @@ static void processLanguageForceOption (
"\"--%s\" option is obsolete; use \"--language-force\" instead",
option);
if (language == LANG_IGNORE)
- error (FATAL, "Unknown language specified in \"%s\" option", option);
+ error (FATAL, "Unknown language \"%s\" in \"%s\" option", parameter, option);
else
Option.language = language;
}
@@ -1080,7 +1080,7 @@ static void processLanguageMapOption (
{
char* const next = processLanguageMap (map);
if (next == NULL)
- error (WARNING, "Unknown language specified in \"%s\" option", option);
+ error (WARNING, "Unknown language \"%s\" in \"%s\" option", parameter, option);
map = next;
}
eFree (maps);
@@ -1122,7 +1122,7 @@ static void processLanguagesOption (
{
const langType language = getNamedLanguage (lang);
if (language == LANG_IGNORE)
- error (WARNING, "Unknown language specified in \"%s\" option", option);
+ error (WARNING, "Unknown language \"%s\" in \"%s\" option", lang, option);
else
enableLanguage (language, (boolean) (mode != Remove));
}
@@ -1158,7 +1158,7 @@ static void processListKindsOption (
{
langType language = getNamedLanguage (parameter);
if (language == LANG_IGNORE)
- error (FATAL, "Unknown language specified in \"%s\" option",option);
+ error (FATAL, "Unknown language \"%s\" in \"%s\" option", parameter, option);
else
printLanguageKinds (language);
}
@@ -1175,7 +1175,7 @@ static void processListMapsOption (
{
langType language = getNamedLanguage (parameter);
if (language == LANG_IGNORE)
- error (FATAL, "Unknown language specified in \"%s\" option",option);
+ error (FATAL, "Unknown language \"%s\" in \"%s\" option", parameter, option);
else
printLanguageMaps (language);
}
View
@@ -482,7 +482,7 @@ extern boolean processKindOption (
vStringNCopyS (langName, option, dash - option);
language = getNamedLanguage (vStringValue (langName));
if (language == LANG_IGNORE)
- error (WARNING, "Unknown language specified in \"%s\" option", option);
+ error (WARNING, "Unknown language \"%s\" in \"%s\" option", vStringValue (langName), option);
else
processLangKindOption (language, option, parameter);
vStringDelete (langName);

0 comments on commit 63874af

Please sign in to comment.