[Github-comments] [geany/geany] ctags: boolean to C99 bool conversion and vStringTerminate() removal (#1251)

Colomban Wendling notifications at xxxxx
Tue Oct 4 14:24:15 UTC 2016


b4n commented on this pull request.

If we care about alignment, there are a few more to fix.
Apart that, LGTM.

>  	}
 }
 
-static boolean enableLanguageKind (const langType language,
-								   const int kind, const boolean mode)
+static bool enableLanguageKind (const langType language,
+								   const int kind, const bool mode)

alignment

> @@ -526,10 +525,10 @@ static void processLangKindOption (const langType language,
 	}
 }
 
-extern boolean processKindOption (const char *const option,
+extern bool processKindOption (const char *const option,
 								  const char *const parameter)

alignment

>  		tag.lineNumber      = 1;
 
 		makeTagEntry (&tag);
 	}
 }
 
-static boolean createTagsForFile (const char *const fileName,
+static bool createTagsForFile (const char *const fileName,
 								  const langType language,
 								  const unsigned int passCount)

ditto

> @@ -636,13 +635,13 @@ static boolean createTagsForFile (const char *const fileName,
 	return retried;
 }
 
-static boolean createTagsWithFallback (const char *const fileName,
+static bool createTagsWithFallback (const char *const fileName,
 									   const langType language)

more

> @@ -48,7 +48,7 @@ typedef struct {
 	const char* const name;
 	const char* const kinds;
 	const char *const flags;
-	boolean    *disabled;
+	bool    *disabled;

more or less the same, but meh

> @@ -66,7 +66,7 @@ typedef struct sInputFileInfo {
 					   when `resetInputFile' is called
 					   on the input stream.
 					   This is needed for nested stream. */
-	boolean  isHeader;       /* is input file a header file? */
+	bool  isHeader;       /* is input file a header file? */

more

> @@ -78,8 +78,8 @@ typedef struct sInputFile {
 	MIOPos  filePosition;   /* file position of current line */
 	unsigned int ungetchIdx;
 	int     ungetchBuf[3];  /* characters that were ungotten */
-	boolean eof;        /* have we reached the end of file? */
-	boolean newLine;    /* will the next character begin a new line? */
+	bool eof;        /* have we reached the end of file? */
+	bool newLine;    /* will the next character begin a new line? */

more or less

> @@ -1535,7 +1534,7 @@ static void qualifyCompoundTag (const statementInfo *const st,
 		const tagType type = declToTagType (st->declaration);
 
 		if (type != TAG_UNDEFINED)
-			makeTag (nameToken, st, (boolean) (! isInputLanguage (Lang_java) &&
+			makeTag (nameToken, st, (bool) (! isInputLanguage (Lang_java) &&
 											   ! isInputLanguage (Lang_csharp) &&
 											   ! isInputLanguage (Lang_vala)), type);

more

>  	else if (isType (token, TOKEN_BRACE_CLOSE))
 		/* Java, D, C#, Vala do not require semicolons to end a block. Neither do
 		 * C++ namespaces. All other blocks require a semicolon to terminate them.
 		 */
-		isEnd = (boolean) (isInputLanguage (Lang_java) || isInputLanguage (Lang_d) ||
-						   isInputLanguage (Lang_csharp) || isInputLanguage (Lang_vala) ||
-						   ! isContextualStatement (st));
+		isEnd = (bool) (isInputLanguage (Lang_java) || isInputLanguage (Lang_d) ||
+						isInputLanguage (Lang_csharp) || isInputLanguage (Lang_vala) ||
+						! isContextualStatement (st));

:+1: 

>  {
 	const char *const scriptName = baseFilename (getInputFileName ());
-	boolean result = (boolean) (strcmp (scriptName, "configure") == 0  &&
+	bool result = (bool) (strcmp (scriptName, "configure") == 0  &&
 							   strcmp (vStringValue (tagName), "main") == 0);

more

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1251#pullrequestreview-2714979
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20161004/463a21a9/attachment.html>


More information about the Github-comments mailing list