From 759d281dbf1543df2eed989029459cb11162b6ad Mon Sep 17 00:00:00 2001 From: "K.Takata" Date: Sat, 27 May 2017 10:42:17 +0900 Subject: [PATCH 1/4] Fix typos Fix typos in comments and messages. --- main/entry.c | 4 +- main/fmt.c | 2 +- main/kind.h | 2 +- main/lregex.c | 4 +- main/lxcmd.c | 2 +- main/mio.c | 6 +- main/options.c | 8 +-- main/parse.c | 6 +- main/parse.h | 2 +- main/read.c | 4 +- main/read.h | 2 +- main/trashbox.h | 2 +- main/writer-json.c | 2 +- main/xtag.h | 2 +- parsers/ada.c | 2 +- parsers/cpreprocessor.c | 2 +- parsers/cpreprocessor.h | 2 +- parsers/cxx/cxx_parser.c | 14 ++--- parsers/cxx/cxx_parser_block.c | 2 +- parsers/cxx/cxx_parser_function.c | 18 +++--- parsers/cxx/cxx_parser_internal.h | 4 +- parsers/cxx/cxx_parser_template.c | 2 +- parsers/cxx/cxx_parser_tokenizer.c | 4 +- parsers/cxx/cxx_parser_typedef.c | 14 ++--- parsers/cxx/cxx_parser_variable.c | 18 +++--- parsers/cxx/cxx_scope.c | 2 +- parsers/cxx/cxx_scope.h | 4 +- parsers/cxx/cxx_tag.h | 4 +- parsers/cxx/cxx_token.h | 2 +- parsers/cxx/cxx_token_chain.h | 2 +- parsers/flex.c | 4 +- parsers/fortran.c | 20 +++---- parsers/glade.c | 4 +- parsers/ldscript.c | 2 +- parsers/ocaml.c | 94 +++++++++++++++--------------- parsers/php.c | 2 +- parsers/vim.c | 2 +- parsers/xslt.c | 4 +- 38 files changed, 138 insertions(+), 138 deletions(-) diff --git a/main/entry.c b/main/entry.c index ce3e98d655..7f6f859277 100644 --- a/main/entry.c +++ b/main/entry.c @@ -1245,7 +1245,7 @@ extern int makeQualifiedTagEntry (const tagEntryInfo *const e) if (sep == NULL) { /* No root separator. The name of the - oritinal tag and that of full qualified tag + optional tag and that of full qualified tag are the same; recording the full qualified tag is meaningless. */ return r; @@ -1257,7 +1257,7 @@ extern int makeQualifiedTagEntry (const tagEntryInfo *const e) x.name = vStringValue (fqn); /* makeExtraTagEntry of c.c doesn't clear scope - releated fields. */ + related fields. */ #if 0 x.extensionFields.scopeKind = NULL; x.extensionFields.scopeName = NULL; diff --git a/main/fmt.c b/main/fmt.c index 261cc36843..9ffccdad71 100644 --- a/main/fmt.c +++ b/main/fmt.c @@ -278,7 +278,7 @@ extern fmtElement *fmtNew (const char* fmtString) if (width) { if(!strToLong (vStringValue (width), 0, &column_width)) - error (FATAL | PERROR, "coverting failed: %s", vStringValue (width)); + error (FATAL | PERROR, "converting failed: %s", vStringValue (width)); vStringDelete (width); width = NULL; column_width *= justification_right; diff --git a/main/kind.h b/main/kind.h index 06e7efa483..c4712d1f62 100644 --- a/main/kind.h +++ b/main/kind.h @@ -66,7 +66,7 @@ struct sKindDefinition { /* Usage of `syncWith' field is a bit tricky. If `LANG_AUTO' is specified to `syncWith' field of a kind - (target kind), the main part of ctags updtes the field with + (target kind), the main part of ctags updates the field with the id of a parser (master parser) when initializing parsers. It also updates `slave' and `master' fields. diff --git a/main/lregex.c b/main/lregex.c index 70e7e55c11..f0d1fae33e 100644 --- a/main/lregex.c +++ b/main/lregex.c @@ -349,12 +349,12 @@ static void pre_ptrn_flag_multiline_long (const char* const s CTAGS_ATTR_UNUSED, } if (!strToInt (v, 10, data)) { - error (WARNING, "wrong multiline specificaiton: %s", v); + error (WARNING, "wrong multiline specification: %s", v); *((int *)data) = -1; } else if (*((int *)data) < 0 || *((int *)data) >= BACK_REFERENCE_COUNT) { - error (WARNING, "out of range(0 ~ %d) multiline specificaiton: %s", + error (WARNING, "out of range(0 ~ %d) multiline specification: %s", (BACK_REFERENCE_COUNT - 1), v); *((int *)data) = -1; } diff --git a/main/lxcmd.c b/main/lxcmd.c index c07d434f8b..9131933fda 100644 --- a/main/lxcmd.c +++ b/main/lxcmd.c @@ -460,7 +460,7 @@ static bool enable_kind_cb (kindDefinition *kind, void *data) kind->enabled = kmr->mode; kmr->result = true; } - /* conitnue: + /* continue: There can be more than one paths which deals this kind. Consider /bin/X and /bin/Y are both parser for a language L. ctags --langdef=L --xcmd-L=/bin/X --xcmd-L=/bin/Y ... */ diff --git a/main/mio.c b/main/mio.c index 53581dfe72..56c83d1701 100644 --- a/main/mio.c +++ b/main/mio.c @@ -732,7 +732,7 @@ size_t mio_write (MIO *mio, * Writes a character to a #MIO stream. This function behaves the same as * fputc(). * - * Returns: The written wharacter, or %EOF on error. + * Returns: The written character, or %EOF on error. */ int mio_putc (MIO *mio, int c) { @@ -796,7 +796,7 @@ int mio_puts (MIO *mio, const char *s) /** * mio_vprintf: * @mio: A #MIO object - * @format: A printf fomrat string + * @format: A printf format string * @ap: The variadic argument list for the format * * Writes a formatted string into a #MIO stream. This function behaves the same @@ -1100,7 +1100,7 @@ int mio_error (MIO *mio) * SEEK_CUR from the current position and SEEK_SET from the end of the * stream. * - * Sets the curosr position on a #MIO stream. This functions behaves the same as + * Sets the cursor position on a #MIO stream. This functions behaves the same as * fseek(). See also mio_tell() and mio_setpos(). * * Returns: 0 on success, -1 otherwise, in which case errno should be set to diff --git a/main/options.c b/main/options.c index e4049fdc99..499928d435 100644 --- a/main/options.c +++ b/main/options.c @@ -410,7 +410,7 @@ static optionDescription LongOptionDescription [] = { {1," --version"}, {1," Print version identifier to standard output."}, {1," --with-list-header=[yes|no]"}, - {1," Preprend the column descriptions in --list- output. [yes]"}, + {1," Prepend the column descriptions in --list- output. [yes]"}, {1," --list-extras, --list-fields, --list-kinds-full, and --list-params support this option."}, {1," Specify before --list-* option."}, #ifdef HAVE_COPROC @@ -1981,7 +1981,7 @@ static void processListRolesOptions (const char *const option CTAGS_ATTR_UNUSED, vString* vstr = vStringNewInit (parameter); vStringCatS (vstr, (sep? "*": ".*")); processListRolesOptions (option, vStringValue (vstr)); - /* The control should never reache here. */ + /* The control should never reached here. */ } kindletters = sep + 1; @@ -2766,7 +2766,7 @@ static bool processLangSpecificFieldsOption (const char *const option, if (language == LANG_IGNORE) { error (WARNING, "Unknown language: %s (ignoring \"--%s\")", lang, option); - /* The option is consumed in tihs function. */ + /* The option is consumed in this function. */ return true; } @@ -2867,7 +2867,7 @@ static bool processLangSpecificExtraOption (const char *const option, if (language == LANG_IGNORE) { error (WARNING, "Unknown language: %s (ignoring \"--%s\")", lang, option); - /* The option is consumed in tihs function. */ + /* The option is consumed in this function. */ return true; } diff --git a/main/parse.c b/main/parse.c index 2e8f89d018..0431d8ba0f 100644 --- a/main/parse.c +++ b/main/parse.c @@ -1117,7 +1117,7 @@ getFileLanguageForRequestInternal (struct GetLanguageRequest *req) candidates. If a hint chooses multiple candidates, and selection failure is - occured, the hint records one of the candidates as FALLBACK for + occurred, the hint records one of the candidates as FALLBACK for the hint. (The candidates are stored in an array. The first element of the array is recorded. However, there is no specification about the order of elements in the array.) @@ -1707,7 +1707,7 @@ static void pre_lang_def_flag_base_long (const char* const optflag, const char* base = getNamedLanguage (param, 0); if (base == LANG_IGNORE) { - error (WARNING, "Unknown laguage(%s) is specified for \"%s\" flag of --langdef option", + error (WARNING, "Unknown language(%s) is specified for \"%s\" flag of --langdef option", param, optflag); return; @@ -3518,7 +3518,7 @@ static void createCTSTTags (void) case K_NOTHING_SPECIAL: if (!lb) { - initTagEntry (&e, "NOTHING_SPEICAL", &CTST_Kinds[i]); + initTagEntry (&e, "NOTHING_SPECIAL", &CTST_Kinds[i]); makeTagEntry (&e); } break; diff --git a/main/parse.h b/main/parse.h index 091721641e..ea64547f85 100644 --- a/main/parse.h +++ b/main/parse.h @@ -51,7 +51,7 @@ typedef void (*parserInitialize) (langType language); The finalizer is called even when the initializer of the same parser is called or not. However, the finalizer can know - whether the assoiciated initializer is invoked or not with the + whether the associated initializer is invoked or not with the second parameter: INITIALIZED. If it is true, the initializer is called. */ typedef void (*parserFinalize) (langType language, bool initialized); diff --git a/main/read.c b/main/read.c index 259f077f26..415308af0e 100644 --- a/main/read.c +++ b/main/read.c @@ -109,7 +109,7 @@ typedef struct sInputFile { be referred from tagsEntryInfo instances. sourceTagPathHolder is used keeping the buffer till all processing about the current input file is done. After all processing is done, the buffers - in sourceTagPathHolder are destroied. */ + in sourceTagPathHolder are destroyed. */ stringList * sourceTagPathHolder; inputLineFposMap lineFposMap; vString *allLines; @@ -763,7 +763,7 @@ static void readLine (vString *const vLine, MIO *const mio) /* Turn line breaks into a canonical form. The three commonly * used forms of line breaks are: LF (UNIX/Mac OS X), CR-LF (MS-DOS) and - * CR (Mac OS 9). As CR-only EOL isn't haneled by gets() and Mac OS 9 + * CR (Mac OS 9). As CR-only EOL isn't handled by gets() and Mac OS 9 * is dead, we only handle CR-LF EOLs and convert them into LF. */ if (newLine && vStringLength (vLine) > 1 && vStringItem (vLine, vStringLength (vLine) - 2) == '\r') diff --git a/main/read.h b/main/read.h index e5718ff555..f1cd2a528d 100644 --- a/main/read.h +++ b/main/read.h @@ -75,7 +75,7 @@ extern bool isParserMarkedNoEmission (void); extern void freeInputFileResources (void); extern const unsigned char *getInputFileData (size_t *size); -/* Stream opend by getMio can be passed to openInputFile as the 3rd +/* Stream opened by getMio can be passed to openInputFile as the 3rd argument. If the 3rd argument is NULL, openInputFile calls getMio internally. The 3rd argument is introduced for reusing mio object created in parser guessing stage. */ diff --git a/main/trashbox.h b/main/trashbox.h index cda7f14a31..fef93e5bec 100644 --- a/main/trashbox.h +++ b/main/trashbox.h @@ -6,7 +6,7 @@ * This source code is released for free distribution under the terms of the * GNU General Public License version 2 or (at your option) any later version. * -* Facility for delayed memory releasing, insptired from AutoreleasePool +* Facility for delayed memory releasing, inspired from AutoreleasePool * of OpenStep. */ diff --git a/main/writer-json.c b/main/writer-json.c index a3fca0f0ef..e54e17b79b 100644 --- a/main/writer-json.c +++ b/main/writer-json.c @@ -23,7 +23,7 @@ #ifdef HAVE_JANSSON #include -#ifndef json_boolean /* compat with jannson < 2.4 */ +#ifndef json_boolean /* compat with jansson < 2.4 */ #define json_boolean(val) ((val) ? json_true() : json_false()) #endif diff --git a/main/xtag.h b/main/xtag.h index 7d4d8de81e..d79383b88f 100644 --- a/main/xtag.h +++ b/main/xtag.h @@ -42,7 +42,7 @@ typedef struct sXtagDefinition { "enabled" field of Pseudo extra tag depends on where the output stream is connected to. If it is connected - to standared output, the tag is disabled by default. + to standard output, the tag is disabled by default. If it is connected to a regular file, the tag is enabled by default. */ bool (* isEnabled) (struct sXtagDefinition *def); diff --git a/parsers/ada.c b/parsers/ada.c index 9d2fb17a7b..af098e580f 100644 --- a/parsers/ada.c +++ b/parsers/ada.c @@ -905,7 +905,7 @@ static adaTokenInfo *adaParseBlock(adaTokenInfo *parent, adaKind kind) } /* we must parse until we hit the "is" string to reach the end of - * this package declaration, or a "reanames" keyword */ + * this package declaration, or a "renames" keyword */ while(token != NULL) { skipWhiteSpace(); diff --git a/parsers/cpreprocessor.c b/parsers/cpreprocessor.c index 0778b2b3e2..64736eb3d7 100644 --- a/parsers/cpreprocessor.c +++ b/parsers/cpreprocessor.c @@ -1639,7 +1639,7 @@ static void saveMacro(const char * macro) while(*c == '#') c++; - // we just skip this part and the followin spaces + // we just skip this part and the following spaces while(*c && isspacetab(*c)) c++; diff --git a/parsers/cpreprocessor.h b/parsers/cpreprocessor.h index 97ab6feb77..b650316b98 100644 --- a/parsers/cpreprocessor.h +++ b/parsers/cpreprocessor.h @@ -78,7 +78,7 @@ extern int cppGetc (void); extern int cppSkipOverCComment (void); /* notify the external parser state for the purpose of conditional - branche choice. The CXX parser stores the block level here. */ + branch choice. The CXX parser stores the block level here. */ extern void cppPushExternalParserBlock(); extern void cppPopExternalParserBlock(); diff --git a/parsers/cxx/cxx_parser.c b/parsers/cxx/cxx_parser.c index a429217447..d3b16abe57 100644 --- a/parsers/cxx/cxx_parser.c +++ b/parsers/cxx/cxx_parser.c @@ -105,11 +105,11 @@ bool cxxParserParseAndCondenseCurrentSubchain( // // This function parses input until one of the specified tokens appears. -// The current token is NOT checked agains the specified tokens. +// The current token is NOT checked against the specified tokens. // // The algorithm will also build subchains of matching // pairs ([...],(...),<...>,{...}): within the subchain analysis -// of uTokenTypes is completly disabled. Subchains do nest. +// of uTokenTypes is completely disabled. Subchains do nest. // // Returns true if it stops before EOF or it stops at EOF and CXXTokenTypeEOF // is present in uTokenTypes. Returns false in all the other stop conditions @@ -221,7 +221,7 @@ bool cxxParserParseAndCondenseSubchainsUpToOneOf( continue; // jump up to avoid checking for mismatched pairs below } - // Check for mismatched brackets/parenthis + // Check for mismatched brackets/parentheses // Note that if we were looking for one of [({ then we would have matched // it at the top of the for if(cxxTokenTypeIsOneOf(g_cxx.pToken,uFinalSubchainMarkerTypes)) @@ -247,10 +247,10 @@ bool cxxParserParseAndCondenseSubchainsUpToOneOf( // // This function parses input until one of the specified tokens appears. -// The current token is NOT checked agains the specified tokens. +// The current token is NOT checked against the specified tokens. // // The algorithm will also build subchains of matching pairs ([...],(...),{...}). -// Within the subchain analysis of uTokenTypes is completly disabled. +// Within the subchain analysis of uTokenTypes is completely disabled. // Subchains do nest. // // Please note that this function will skip entire scopes (matching {} pairs) @@ -921,7 +921,7 @@ static bool cxxParserParseClassStructOrUnionInternal( // } // FIXME: Should we add the specialisation arguments somewhere? - // Maye as a separate field? + // Maybe as a separate field? bRet = cxxParserParseAndCondenseCurrentSubchain( CXXTokenTypeOpeningParenthesis | CXXTokenTypeOpeningBracket | @@ -973,7 +973,7 @@ static bool cxxParserParseClassStructOrUnionInternal( (!(uInitialKeywordState & CXXParserKeywordStateSeenTypedef)) ) { - CXX_DEBUG_PRINT("Maybe KnR funciton definition?"); + CXX_DEBUG_PRINT("Maybe KnR function definition?"); switch(cxxParserMaybeParseKnRStyleFunctionDefinition()) { diff --git a/parsers/cxx/cxx_parser_block.c b/parsers/cxx/cxx_parser_block.c index 384ebe9e5b..2c2e64a3b3 100644 --- a/parsers/cxx/cxx_parser_block.c +++ b/parsers/cxx/cxx_parser_block.c @@ -71,7 +71,7 @@ bool cxxParserParseBlockHandleOpeningBracket(void) (strcmp(vStringValue(g_cxx.pToken->pPrev->pszWord),"override") != 0) ) || ( // type var[][][]..[] { ... } - // (but not '[] { ... }' which is a parameterelss lambda) + // (but not '[] { ... }' which is a parameterless lambda) cxxTokenTypeIs(g_cxx.pToken->pPrev,CXXTokenTypeSquareParenthesisChain) && ( pAux = cxxTokenChainPreviousTokenNotOfType( diff --git a/parsers/cxx/cxx_parser_function.c b/parsers/cxx/cxx_parser_function.c index 0900ea2738..c9a4b5fc77 100644 --- a/parsers/cxx/cxx_parser_function.c +++ b/parsers/cxx/cxx_parser_function.c @@ -32,7 +32,7 @@ // // The possible return values are: // 1: The parser has moved forward, the statement has been parsed and cleared. -// A K&R function declaration has possibly been extracted (but not necessairly). +// A K&R function declaration has possibly been extracted (but not necessarily). // Anyway, a new statement has been started. // 0: The parser has NOT moved forward and the current statement hasn't been cleared: // other options may be evaluated. @@ -178,7 +178,7 @@ int cxxParserMaybeParseKnRStyleFunctionDefinition() bGotMultipleDots = true; else { // not valid (note that (void) is not allowed here since we - // wouln't have a following variable declaration) + // wouldn't have a following variable declaration) return 0; } @@ -196,7 +196,7 @@ int cxxParserMaybeParseKnRStyleFunctionDefinition() if(iParameterCount < 1) { - // we should have found at least one paremeter + // we should have found at least one parameter // (the one that we found before the ;) return 0; } @@ -359,7 +359,7 @@ int cxxParserMaybeParseKnRStyleFunctionDefinition() // 100% accurate, but it tries to exclude the obvious cases. If it says // "no" then the specified chain CAN'T be a set of parameters to // a function call. If it says "yes" then the result has to be considered -// a guess: the chain *might* be a set of parameters to a functino call. +// a guess: the chain *might* be a set of parameters to a function call. // // This function is used to check both () and {} parenthesis chains. // function(...) @@ -567,7 +567,7 @@ static bool cxxParserLookForFunctionSignatureCheckParenthesisAndIdentifier( ) { CXX_DEBUG_ENTER(); - + CXX_DEBUG_ASSERT( pParenthesis && pIdentifierChain && pIdentifierStart && pIdentifierEnd && pInfo, "All parameters other than `pParamInfo' must be non null here" @@ -772,7 +772,7 @@ bool cxxParserLookForFunctionSignature( pToken = cxxTokenChainSkipToEndOfTemplateAngleBracket(pToken); if(!pToken) { - CXX_DEBUG_LEAVE_TEXT("Couln't skip past angle bracket chain"); + CXX_DEBUG_LEAVE_TEXT("Couldn't skip past angle bracket chain"); return false; } CXX_DEBUG_PRINT("Skipped angle bracket chain"); @@ -1066,7 +1066,7 @@ bool cxxParserLookForFunctionSignature( // parenthesis + identifier has been found, this is a function signature. - // Figure out the remainig parameters. + // Figure out the remaining parameters. CXX_DEBUG_ASSERT(pTopLevelParenthesis,"This should have been set"); @@ -1263,7 +1263,7 @@ bool cxxParserLookForFunctionSignature( ) pInfo->pTypeEnd = pInfo->pTypeEnd->pNext; } else { - // probaby normal return type + // probably normal return type pInfo->pTypeEnd = pToken->pPrev; pInfo->pTypeStart = cxxTokenChainFirst(pChain); @@ -1463,7 +1463,7 @@ int cxxParserEmitFunctionTags( // (generally things like int (*foo(void))[2] or similar). // Scope and identifier have already been removed. - // Remove the parenthesis, temporairly. + // Remove the parenthesis, temporarily. if(pInfo->pTypeStart == pInfo->pParenthesis) pInfo->pTypeStart = pInfo->pParenthesis->pNext; if(pInfo->pTypeEnd == pInfo->pParenthesis) diff --git a/parsers/cxx/cxx_parser_internal.h b/parsers/cxx/cxx_parser_internal.h index 29cc25a498..daee87ec95 100644 --- a/parsers/cxx/cxx_parser_internal.h +++ b/parsers/cxx/cxx_parser_internal.h @@ -157,7 +157,7 @@ typedef struct _CXXFunctionParameterInfo CXXToken * aDeclarationStarts[CXX_MAX_EXTRACTED_PARAMETERS]; // The final tokens of the declaration CXXToken * aDeclarationEnds[CXX_MAX_EXTRACTED_PARAMETERS]; - // The identifier tokens (betweeh initial and final) + // The identifier tokens (between initial and final) CXXToken * aIdentifiers[CXX_MAX_EXTRACTED_PARAMETERS]; } CXXFunctionParameterInfo; @@ -234,7 +234,7 @@ typedef enum _CXXParserKeywordState // an inline keyword CXXParserKeywordStateSeenInline = (1 << 1), // We are parsing a statement that comes right after - // a extern keyword + // an extern keyword CXXParserKeywordStateSeenExtern = (1 << 2), // We are parsing a statement that comes right after // a static keyword diff --git a/parsers/cxx/cxx_parser_template.c b/parsers/cxx/cxx_parser_template.c index 55ad4e8232..79420bbe60 100644 --- a/parsers/cxx/cxx_parser_template.c +++ b/parsers/cxx/cxx_parser_template.c @@ -34,7 +34,7 @@ static bool cxxParserParseTemplatePrefixAngleBrackets(void) { CXX_DEBUG_ENTER(); - // Here we have the big prolem of <> characters which may be + // Here we have the big problem of <> characters which may be // template argument delimiters, less than/greater than operators, // shift left/right operators. // diff --git a/parsers/cxx/cxx_parser_tokenizer.c b/parsers/cxx/cxx_parser_tokenizer.c index f894d70a9f..8ee341963a 100644 --- a/parsers/cxx/cxx_parser_tokenizer.c +++ b/parsers/cxx/cxx_parser_tokenizer.c @@ -1079,10 +1079,10 @@ bool cxxParserParseNextToken(void) { CXXToken * t = cxxTokenCreate(); - // The token chain should not be allowed to grow arbitrairly large. + // The token chain should not be allowed to grow arbitrarily large. // The token structures are quite big and it's easy to grow up to // 5-6GB or memory usage. However this limit should be large enough - // to accomodate all the reasonable statements that could have some + // to accommodate all the reasonable statements that could have some // information in them. This includes multiple function prototypes // in a single statement (ImageMagick has some examples) but probably // does NOT include large data tables. diff --git a/parsers/cxx/cxx_parser_typedef.c b/parsers/cxx/cxx_parser_typedef.c index 6e45760c38..a30f0b71ea 100644 --- a/parsers/cxx/cxx_parser_typedef.c +++ b/parsers/cxx/cxx_parser_typedef.c @@ -130,8 +130,8 @@ bool cxxParserParseGenericTypedef(void) // // Note that not all syntaxes involving parentheses are valid. // Examples of what is NOT valid: -// -// [typedef] unsigned (int)(*x)() +// +// [typedef] unsigned (int)(*x)() // [typedef] int[] x; // // So: @@ -161,7 +161,7 @@ void cxxParserExtractTypedef( vStringDelete(pX); #endif - // Atleast something like + // At least something like // a b; if(pChain->iCount < (bExpectTerminatorAtEnd ? 3 : 2)) @@ -188,7 +188,7 @@ void cxxParserExtractTypedef( // -> y is x // -> z is x * - // The angle brackets are not necessairly condensed in chains here + // The angle brackets are not necessarily condensed in chains here // since we were parsing a generic statement which expected less-than // and greater-than operators to be present. We need to take care of that. @@ -227,7 +227,7 @@ void cxxParserExtractTypedef( // and go ahead goto skip_to_comma_or_end; } - + if(cxxTokenTypeIs(pComma,CXXTokenTypeParenthesisChain)) { // We keep track only of the first one @@ -270,7 +270,7 @@ void cxxParserExtractTypedef( if(cxxTokenTypeIs(t,CXXTokenTypeIdentifier)) { - // Use the identifer at end, whatever comes before + // Use the identifier at end, whatever comes before CXX_DEBUG_PRINT("Identifier seems to be at end: %s",vStringValue(t->pszWord)); pTParentChain = pChain; } else if(pFirstParenthesis) @@ -278,7 +278,7 @@ void cxxParserExtractTypedef( // look for the last nested identifier in here // e.g. // typedef void (WINAPI *func_t) (void); - // We exepect func_t we want to capture is at the end of parenthesis chain. + // We expect func_t we want to capture is at the end of parenthesis chain. CXX_DEBUG_PRINT("Identifier not at end, but got parenthesis chain"); t = cxxTokenChainLastPossiblyNestedTokenOfType( pFirstParenthesis->pChain, diff --git a/parsers/cxx/cxx_parser_variable.c b/parsers/cxx/cxx_parser_variable.c index 784b2c0b6b..76b3affe1d 100644 --- a/parsers/cxx/cxx_parser_variable.c +++ b/parsers/cxx/cxx_parser_variable.c @@ -380,10 +380,10 @@ bool cxxParserExtractVariableDeclarations(CXXTokenChain * pChain,unsigned int uF if(!pTokenBefore) { - CXX_DEBUG_LEAVE_TEXT("Identifier not preceeded by a type"); - + CXX_DEBUG_LEAVE_TEXT("Identifier not preceded by a type"); + // Here we can handle yet another one of the gazillion of special cases. - // + // // MACRO(whatever) variable; // if( @@ -419,8 +419,8 @@ bool cxxParserExtractVariableDeclarations(CXXTokenChain * pChain,unsigned int uF if(!pTokenBefore) { CXX_DEBUG_LEAVE_TEXT( - "Identifier preceeded by multiple colons " \ - "but not preceeded by a type" + "Identifier preceded by multiple colons " \ + "but not preceded by a type" ); return bGotVariable; } @@ -431,7 +431,7 @@ bool cxxParserExtractVariableDeclarations(CXXTokenChain * pChain,unsigned int uF if((!pAux) || (!pAux->pPrev)) { CXX_DEBUG_LEAVE_TEXT( - "Identifier preceeded by multiple colons " \ + "Identifier preceded by multiple colons " \ "and by a >, but failed to skip back to starting <" ); return bGotVariable; @@ -443,7 +443,7 @@ bool cxxParserExtractVariableDeclarations(CXXTokenChain * pChain,unsigned int uF if(!cxxTokenTypeIs(pTokenBefore,CXXTokenTypeIdentifier)) { CXX_DEBUG_LEAVE_TEXT( - "Identifier preceeded by multiple colons " \ + "Identifier preceded by multiple colons " \ "with probable syntax error" ); return bGotVariable; @@ -455,8 +455,8 @@ bool cxxParserExtractVariableDeclarations(CXXTokenChain * pChain,unsigned int uF if(!pTokenBefore) { CXX_DEBUG_LEAVE_TEXT( - "Identifier preceeded by multiple colons " \ - "but not preceeded by a type" + "Identifier preceded by multiple colons " \ + "but not preceded by a type" ); return bGotVariable; } diff --git a/parsers/cxx/cxx_scope.c b/parsers/cxx/cxx_scope.c index d63d8902e0..f13d8a1749 100644 --- a/parsers/cxx/cxx_scope.c +++ b/parsers/cxx/cxx_scope.c @@ -221,7 +221,7 @@ void cxxScopePush( { CXX_DEBUG_ASSERT( t->eType == CXXTokenTypeIdentifier, - "The scope name must be an identifer" + "The scope name must be an identifier" ); CXX_DEBUG_ASSERT( t->pszWord, diff --git a/parsers/cxx/cxx_scope.h b/parsers/cxx/cxx_scope.h index 3f8b69aded..ac76f43a5b 100644 --- a/parsers/cxx/cxx_scope.h +++ b/parsers/cxx/cxx_scope.h @@ -40,7 +40,7 @@ void cxxScopeClear(void); const char * cxxScopeGetFullName(void); // Returns the current scope name of NULL if there is no -// scope currnetly. This name does not include namespaces so +// scope currently. This name does not include namespaces so // it is always a single identifier. const char * cxxScopeGetName(void); @@ -75,4 +75,4 @@ void cxxScopePop(void); -#endif //!ctags_cxx_scope_h_ \ No newline at end of file +#endif //!ctags_cxx_scope_h_ diff --git a/parsers/cxx/cxx_tag.h b/parsers/cxx/cxx_tag.h index ddb30f658c..cb2e250a2e 100644 --- a/parsers/cxx/cxx_tag.h +++ b/parsers/cxx/cxx_tag.h @@ -125,7 +125,7 @@ typedef enum _CXXTagProperty CXXTagPropertyPure = (1 << 6), // Function is marked as override CXXTagPropertyOverride = (1 << 7), - // Functoin is marked as default + // Function is marked as default CXXTagPropertyDefault = (1 << 8), // Function is marked as final CXXTagPropertyFinal = (1 << 9), @@ -166,7 +166,7 @@ void cxxTagSetCorkQueueField( const char * szValue ); -// Commit the composed tag. Must follow a succesfull cxxTagBegin() call. +// Commit the composed tag. Must follow a successful cxxTagBegin() call. // Returns the index of the tag in the cork queue. int cxxTagCommit(void); diff --git a/parsers/cxx/cxx_token.h b/parsers/cxx/cxx_token.h index 943074f026..96e8ea633c 100644 --- a/parsers/cxx/cxx_token.h +++ b/parsers/cxx/cxx_token.h @@ -43,7 +43,7 @@ enum CXXTokenType // These must come in pairs. Note that the opening // tokens can be shifted by 4 to get the matching closing - // tokens can be shiftet by 8 to get the matching subchain marker below + // tokens can be shifted by 8 to get the matching subchain marker below CXXTokenTypeOpeningBracket = (1 << 19), // { CXXTokenTypeOpeningParenthesis = (1 << 20), // ( CXXTokenTypeOpeningSquareParenthesis = (1 << 21), // [ diff --git a/parsers/cxx/cxx_token_chain.h b/parsers/cxx/cxx_token_chain.h index 15344c2240..74fb0e7932 100644 --- a/parsers/cxx/cxx_token_chain.h +++ b/parsers/cxx/cxx_token_chain.h @@ -190,7 +190,7 @@ vString * cxxTokenChainJoinRange( unsigned int uFlags ); -// Treat the tochek chain tc as a comma separated sequence +// Treat the token chain tc as a comma separated sequence // of items (something, blah foo, 1 2 3 4 5, ...) // Create a token chain that contains tokens corresponding // to each item (i.e, "something", "blah foo", "1 2 3 4 5"). diff --git a/parsers/flex.c b/parsers/flex.c index 249c13e730..e6ee46de8b 100644 --- a/parsers/flex.c +++ b/parsers/flex.c @@ -735,7 +735,7 @@ static void skipArgumentList (tokenInfo *const token) * Other databases can have arguments with fully declared * datatypes: * ( name varchar(30), text binary(10) ) - * So we must check for nested open and closing parantheses + * So we must check for nested open and closing parentheses */ if (isType (token, TOKEN_OPEN_PAREN)) /* arguments? */ @@ -1796,7 +1796,7 @@ static bool parseStatement (tokenInfo *const token) if (isType (token, TOKEN_CLOSE_CURLY)) { /* - * Assume the closing parantheses terminates + * Assume the closing parenthesis terminates * this statements. */ is_terminated = true; diff --git a/parsers/fortran.c b/parsers/fortran.c index 9a8d23326e..1778b2638f 100644 --- a/parsers/fortran.c +++ b/parsers/fortran.c @@ -240,7 +240,7 @@ static kindDefinition FortranKinds [] = { { true, 'v', "variable", "program (global) and module variables"} }; -/* For efinitions of Fortran 77 with extensions: +/* For definitions of Fortran 77 with extensions: * http://www.fortran.com/fortran/F77_std/rjcnf0001.html * http://scienide.uwaterloo.ca/MIPSpro7/007-2362-004/sgi_html/index.html * @@ -1396,7 +1396,7 @@ static void parseNonOverridableQualifier (tokenInfo *const token, * or DEFERRED * or NON_OVERRIDABLE * or ABSTRACT - * + * * component-attr-spec * is POINTER * or DIMENSION ( component-array-spec ) @@ -1659,16 +1659,16 @@ static void parseMap (tokenInfo *const token) /* UNION * MAP - * [field-definition] [field-definition] ... + * [field-definition] [field-definition] ... * END MAP * MAP - * [field-definition] [field-definition] ... + * [field-definition] [field-definition] ... * END MAP * [MAP * [field-definition] - * [field-definition] ... + * [field-definition] ... * END MAP] ... - * END UNION + * END UNION * * * * Typed data declarations (variables or arrays) in structure declarations @@ -1683,7 +1683,7 @@ static void parseMap (tokenInfo *const token) * share a common location within the containing structure. When initializing * the fields within a UNION, the final initialization value assigned * overlays any value previously assigned to a field definition that shares - * that field. + * that field. */ static void parseUnionStmt (tokenInfo *const token) { @@ -1705,11 +1705,11 @@ static void parseUnionStmt (tokenInfo *const token) * structure-name * identifies the structure in a subsequent RECORD statement. * Substructures can be established within a structure by means of either - * a nested STRUCTURE declaration or a RECORD statement. + * a nested STRUCTURE declaration or a RECORD statement. * * field-names * (for substructure declarations only) one or more names having the - * structure of the substructure being defined. + * structure of the substructure being defined. * * field-definition * can be one or more of the following: @@ -1724,7 +1724,7 @@ static void parseUnionStmt (tokenInfo *const token) * statements. The syntax of a UNION declaration is described below. * * PARAMETER statements, which do not affect the form of the - * structure. + * structure. */ static void parseStructureStmt (tokenInfo *const token) { diff --git a/parsers/glade.c b/parsers/glade.c index 83ded12845..d52a8e0de3 100644 --- a/parsers/glade.c +++ b/parsers/glade.c @@ -26,11 +26,11 @@ typedef enum { } gladeHandleRoler; static roleDesc GladeClassRoles [] = { - { true, "widget", "specifed as a widget constructor" }, + { true, "widget", "specified as a widget constructor" }, }; static roleDesc GladeHandlerRoles [] = { - { true, "handler", "specifed as a callback for signal emission" }, + { true, "handler", "specified as a callback for signal emission" }, }; typedef enum { diff --git a/parsers/ldscript.c b/parsers/ldscript.c index 8089cce505..bf7cc076cc 100644 --- a/parsers/ldscript.c +++ b/parsers/ldscript.c @@ -720,7 +720,7 @@ extern parserDefinition* LdScriptParser (void) /* File name patters are picked from Linux kernel. */ static const char *const extensions [] = { "lds", "scr", "ld", NULL }; - /* lds.S msut be here because Asm parser registers .S as an extension. */ + /* lds.S must be here because Asm parser registers .S as an extension. */ static const char *const patterns [] = { "*.lds.S", "ld.*", NULL }; /* Emacs's mode */ diff --git a/parsers/ocaml.c b/parsers/ocaml.c index 6491f2a9eb..04098aeb2f 100644 --- a/parsers/ocaml.c +++ b/parsers/ocaml.c @@ -24,9 +24,9 @@ #define OCAML_MAX_STACK_SIZE 256 typedef enum { - K_CLASS, /* Ocaml class, relatively rare */ + K_CLASS, /* OCaml class, relatively rare */ K_METHOD, /* class method */ - K_MODULE, /* Ocaml module OR functor */ + K_MODULE, /* OCaml module OR functor */ K_VAR, K_TYPE, /* name of an OCaml type */ K_FUNCTION, @@ -113,48 +113,48 @@ typedef struct sOcaKeywordDesc { typedef ocamlKeyword ocaToken; static const keywordTable OcamlKeywordTable[] = { - { "and" , OcaKEYWORD_and }, - { "begin" , OcaKEYWORD_begin }, - { "class" , OcaKEYWORD_class }, - { "do" , OcaKEYWORD_do }, - { "done" , OcaKEYWORD_done }, - { "else" , OcaKEYWORD_else }, - { "end" , OcaKEYWORD_end }, - { "exception" , OcaKEYWORD_exception }, - { "for" , OcaKEYWORD_for }, - { "fun" , OcaKEYWORD_fun }, - { "function" , OcaKEYWORD_fun }, - { "functor" , OcaKEYWORD_functor }, - { "in" , OcaKEYWORD_in }, - { "let" , OcaKEYWORD_let }, - { "match" , OcaKEYWORD_match }, - { "method" , OcaKEYWORD_method }, - { "module" , OcaKEYWORD_module }, - { "mutable" , OcaKEYWORD_mutable }, - { "object" , OcaKEYWORD_object }, - { "of" , OcaKEYWORD_of }, - { "rec" , OcaKEYWORD_rec }, - { "sig" , OcaKEYWORD_sig }, - { "struct" , OcaKEYWORD_struct }, - { "then" , OcaKEYWORD_then }, - { "try" , OcaKEYWORD_try }, - { "type" , OcaKEYWORD_type }, - { "val" , OcaKEYWORD_val }, + { "and" , OcaKEYWORD_and }, + { "begin" , OcaKEYWORD_begin }, + { "class" , OcaKEYWORD_class }, + { "do" , OcaKEYWORD_do }, + { "done" , OcaKEYWORD_done }, + { "else" , OcaKEYWORD_else }, + { "end" , OcaKEYWORD_end }, + { "exception" , OcaKEYWORD_exception }, + { "for" , OcaKEYWORD_for }, + { "fun" , OcaKEYWORD_fun }, + { "function" , OcaKEYWORD_fun }, + { "functor" , OcaKEYWORD_functor }, + { "in" , OcaKEYWORD_in }, + { "let" , OcaKEYWORD_let }, + { "match" , OcaKEYWORD_match }, + { "method" , OcaKEYWORD_method }, + { "module" , OcaKEYWORD_module }, + { "mutable" , OcaKEYWORD_mutable }, + { "object" , OcaKEYWORD_object }, + { "of" , OcaKEYWORD_of }, + { "rec" , OcaKEYWORD_rec }, + { "sig" , OcaKEYWORD_sig }, + { "struct" , OcaKEYWORD_struct }, + { "then" , OcaKEYWORD_then }, + { "try" , OcaKEYWORD_try }, + { "type" , OcaKEYWORD_type }, + { "val" , OcaKEYWORD_val }, { "value" , OcaKEYWORD_value }, /* just to handle revised syntax */ - { "virtual" , OcaKEYWORD_virtual }, - { "while" , OcaKEYWORD_while }, - { "with" , OcaKEYWORD_with }, - - { "or" , Tok_Op }, - { "mod " , Tok_Op }, - { "land " , Tok_Op }, - { "lor " , Tok_Op }, - { "lxor " , Tok_Op }, - { "lsl " , Tok_Op }, - { "lsr " , Tok_Op }, - { "asr" , Tok_Op }, - { "->" , Tok_To }, - { "true" , Tok_Val }, + { "virtual" , OcaKEYWORD_virtual }, + { "while" , OcaKEYWORD_while }, + { "with" , OcaKEYWORD_with }, + + { "or" , Tok_Op }, + { "mod " , Tok_Op }, + { "land " , Tok_Op }, + { "lor " , Tok_Op }, + { "lxor " , Tok_Op }, + { "lsl " , Tok_Op }, + { "lsr " , Tok_Op }, + { "asr" , Tok_Op }, + { "->" , Tok_To }, + { "true" , Tok_Val }, { "false" , Tok_Val } }; @@ -677,7 +677,7 @@ static void popLastNamed ( void ) } else { - /* ok, no named context found... + /* ok, no named context found... * (should not happen). */ stackIndex = 0; toDoNext = &globalScope; @@ -953,7 +953,7 @@ static void exceptionDecl (vString * const ident, ocaToken what) addTag (ident, K_EXCEPTION); } else /* probably ill-formed, give back to global scope */ - { + { globalScope (ident, what); } toDoNext = &globalScope; @@ -1372,7 +1372,7 @@ static void letParam (vString * const ident, ocaToken what) break; /* parse something like - * ~varname:type + * ~varname:type * or * ~varname * or @@ -1383,7 +1383,7 @@ static void letParam (vString * const ident, ocaToken what) break; /* Optional argument with syntax like this : - * ?(bla = value) + * ?(bla = value) * or * ?bla */ case '?': diff --git a/parsers/php.c b/parsers/php.c index 634d81eacf..ff2581c42a 100644 --- a/parsers/php.c +++ b/parsers/php.c @@ -1501,7 +1501,7 @@ static bool parseVariable (tokenInfo *const token) * namespace Foo; * namespace Foo\Bar; * namespace; - * napespace {} */ + * namespace {} */ static bool parseNamespace (tokenInfo *const token) { tokenInfo *nsToken = newToken (); diff --git a/parsers/vim.c b/parsers/vim.c index fb2858aef4..46470ff97f 100644 --- a/parsers/vim.c +++ b/parsers/vim.c @@ -338,7 +338,7 @@ static bool parseCommand (const unsigned char *line) * * If the following lines do not have a line continuation * the command must not be spanning multiple lines and should - * be synatically incorrect. + * be syntactically incorrect. */ if (*cp == '\\') ++cp; diff --git a/parsers/xslt.c b/parsers/xslt.c index fd68206637..b68f6c50a4 100644 --- a/parsers/xslt.c +++ b/parsers/xslt.c @@ -228,11 +228,11 @@ static void verifyVersion (xmlNode *node, { if (strcmp (version, "1.0") == 0) { - verbose ("xslt: accept versoin: %s\n", version); + verbose ("xslt: accept version: %s\n", version); *acceptable = true; } else - verbose ("xslt: unsupported versoin: %s\n", version); + verbose ("xslt: unsupported version: %s\n", version); eFree (version); } From e6d85adb12564c533f53651c76356fc1ab89b89c Mon Sep 17 00:00:00 2001 From: "K.Takata" Date: Sat, 27 May 2017 10:58:20 +0900 Subject: [PATCH 2/4] tmain: fix typo in a test --- Tmain/nested-mio.d/stdout-expected.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tmain/nested-mio.d/stdout-expected.txt b/Tmain/nested-mio.d/stdout-expected.txt index e11fbc0f46..10193d2c71 100644 --- a/Tmain/nested-mio.d/stdout-expected.txt +++ b/Tmain/nested-mio.d/stdout-expected.txt @@ -1 +1 @@ -NOTHING_SPEICAL input.cst /^N$/;" N +NOTHING_SPECIAL input.cst /^N$/;" N From 8e3923d2762c9eb2fcb98b5563afb811094ffa8c Mon Sep 17 00:00:00 2001 From: "K.Takata" Date: Sun, 28 May 2017 10:44:35 +0900 Subject: [PATCH 3/4] Fix typo --- parsers/ocaml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsers/ocaml.c b/parsers/ocaml.c index 04098aeb2f..deb5efaa9d 100644 --- a/parsers/ocaml.c +++ b/parsers/ocaml.c @@ -415,7 +415,7 @@ static ocamlKeyword lex (lexingState * st) return lex (st); } /* OCaml permit the definition of our own operators - * so here we check all the consecuting chars which + * so here we check all the consecutive chars which * are operators to discard them. */ else if (isOperator[*st->cp]) return eatOperator (st); From 543253049cac736e90f8ff469c97da5f12f92fd8 Mon Sep 17 00:00:00 2001 From: "K.Takata" Date: Mon, 29 May 2017 23:15:08 +0900 Subject: [PATCH 4/4] man: Fix typos --- man/ctags.1.rst.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/man/ctags.1.rst.in b/man/ctags.1.rst.in index 1a9901f4d4..63175fe84e 100644 --- a/man/ctags.1.rst.in +++ b/man/ctags.1.rst.in @@ -612,12 +612,12 @@ built-in language names. suffixed with .ctags or .conf under the directory are read. (On MSDOS or MSWindows this directory traverse feature is temporary disable because the contributor of this feature has no access to the platforms. - Volunters are welcome). As a special case, if --options=NONE is + Volunteers are welcome). As a special case, if --options=NONE 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 FILES). - --quiet[=yes|no] +--quiet[=yes|no] Write fewer messages(default is no). --recurse[=yes|no] @@ -1005,7 +1005,7 @@ TMPDIR files only if either (1) an emacs-style tag file is being generated, (2) the tag file is being sent to standard output, or (3) the program was compiled to use an internal sort algorithm to sort - the tag files instead of the the sort utility of the operating system. + the tag files instead of the sort utility of the operating system. If the sort utility of the operating system is being used, it will generally observe this variable also. Note that if @CTAGS_NAME_EXECUTABLE@ is setuid, the value of TMPDIR will be ignored.