[geany/geany] 14daf9: indent switch, add braces

Nick Treleaven git-noreply at xxxxx
Thu Jul 26 11:58:55 UTC 2012


Branch:      refs/heads/master
Author:      Nick Treleaven <nick.treleaven at btinternet.com>
Committer:   Nick Treleaven <nick.treleaven at btinternet.com>
Date:        Thu, 26 Jul 2012 11:58:55
Commit:      14daf925ac03b2889a18921f5698ef849a247255
             https://github.com/geany/geany/commit/14daf925ac03b2889a18921f5698ef849a247255

Log Message:
-----------
indent switch, add braces


Modified Paths:
--------------
    tagmanager/ctags/c.c

Modified: tagmanager/ctags/c.c
196 files changed, 99 insertions(+), 97 deletions(-)
===================================================================
@@ -2369,125 +2369,127 @@ static int parseParens (statementInfo *const st, parenInfo *const info)
 			info->isKnrParamList = FALSE;
 		}
 		else
-		switch (c)
 		{
-			case '&':
-			case '*':
-			{
-				/* DEBUG_PRINT("parseParens, po++\n"); */
-				info->isKnrParamList = FALSE;
-				if (identifierCount == 0)
-					info->isParamList = FALSE;
-				initToken (token);
-				break;
-			}
-			case ':':
-			{
-				info->isKnrParamList = FALSE;
-				break;
-			}
-			case '.':
-			{
-				info->isNameCandidate = FALSE;
-				info->isKnrParamList = FALSE;
-				break;
-			}
-			case ',':
+			switch (c)
 			{
-				info->isNameCandidate = FALSE;
-				if (info->isKnrParamList)
+				case '&':
+				case '*':
 				{
-					++info->parameterCount;
-					identifierCount = 0;
+					/* DEBUG_PRINT("parseParens, po++\n"); */
+					info->isKnrParamList = FALSE;
+					if (identifierCount == 0)
+						info->isParamList = FALSE;
+					initToken (token);
+					break;
 				}
-				break;
-			}
-			case '=':
-			{
-				info->isKnrParamList = FALSE;
-				info->isNameCandidate = FALSE;
-				if (firstChar)
+				case ':':
 				{
-					info->isParamList = FALSE;
-					skipMacro (st);
-					depth = 0;
+					info->isKnrParamList = FALSE;
+					break;
 				}
-				break;
-			}
-			case '[':
-			{
-				info->isKnrParamList = FALSE;
-				skipToMatch ("[]");
-				break;
-			}
-			case '<':
-			{
-				info->isKnrParamList = FALSE;
-				skipToMatch ("<>");
-				break;
-			}
-			case ')':
-			{
-				if (firstChar)
-					info->parameterCount = 0;
-				--depth;
-				break;
-			}
-			case '(':
-			{
-				info->isKnrParamList = FALSE;
-				if (firstChar)
+				case '.':
 				{
 					info->isNameCandidate = FALSE;
-					cppUngetc (c);
-					skipMacro (st);
-					depth = 0;
+					info->isKnrParamList = FALSE;
+					break;
 				}
-				else if (isType (token, TOKEN_PAREN_NAME))
+				case ',':
 				{
-					c = skipToNonWhite ();
-					if (c == '*')	/* check for function pointer */
+					info->isNameCandidate = FALSE;
+					if (info->isKnrParamList)
 					{
-						skipToMatch ("()");
-						c = skipToNonWhite ();
-						if (c == '(')
-							skipToMatch ("()");
+						++info->parameterCount;
+						identifierCount = 0;
 					}
-					else
+					break;
+				}
+				case '=':
+				{
+					info->isKnrParamList = FALSE;
+					info->isNameCandidate = FALSE;
+					if (firstChar)
 					{
-						cppUngetc (c);
-						cppUngetc ('(');
-						info->nestedArgs = TRUE;
+						info->isParamList = FALSE;
+						skipMacro (st);
+						depth = 0;
 					}
+					break;
 				}
-				else
-					++depth;
-				break;
-			}
-
-			default:
-			{
-				if (isident1 (c))
+				case '[':
 				{
-					if (++identifierCount > 1)
-						info->isKnrParamList = FALSE;
-					readIdentifier (token, c);
-					if (isType (token, TOKEN_NAME)  &&  info->isNameCandidate)
-						token->type = TOKEN_PAREN_NAME;
-					else if (isType (token, TOKEN_KEYWORD))
+					info->isKnrParamList = FALSE;
+					skipToMatch ("[]");
+					break;
+				}
+				case '<':
+				{
+					info->isKnrParamList = FALSE;
+					skipToMatch ("<>");
+					break;
+				}
+				case ')':
+				{
+					if (firstChar)
+						info->parameterCount = 0;
+					--depth;
+					break;
+				}
+				case '(':
+				{
+					info->isKnrParamList = FALSE;
+					if (firstChar)
 					{
-						info->isKnrParamList = FALSE;
 						info->isNameCandidate = FALSE;
+						cppUngetc (c);
+						skipMacro (st);
+						depth = 0;
 					}
+					else if (isType (token, TOKEN_PAREN_NAME))
+					{
+						c = skipToNonWhite ();
+						if (c == '*')	/* check for function pointer */
+						{
+							skipToMatch ("()");
+							c = skipToNonWhite ();
+							if (c == '(')
+								skipToMatch ("()");
+						}
+						else
+						{
+							cppUngetc (c);
+							cppUngetc ('(');
+							info->nestedArgs = TRUE;
+						}
+					}
+					else
+						++depth;
+					break;
 				}
-				else
+
+				default:
 				{
-					info->isParamList     = FALSE;
-					info->isKnrParamList  = FALSE;
-					info->isNameCandidate = FALSE;
-					info->invalidContents = TRUE;
+					if (isident1 (c))
+					{
+						if (++identifierCount > 1)
+							info->isKnrParamList = FALSE;
+						readIdentifier (token, c);
+						if (isType (token, TOKEN_NAME)  &&  info->isNameCandidate)
+							token->type = TOKEN_PAREN_NAME;
+						else if (isType (token, TOKEN_KEYWORD))
+						{
+							info->isKnrParamList = FALSE;
+							info->isNameCandidate = FALSE;
+						}
+					}
+					else
+					{
+						info->isParamList     = FALSE;
+						info->isKnrParamList  = FALSE;
+						info->isNameCandidate = FALSE;
+						info->invalidContents = TRUE;
+					}
+					break;
 				}
-				break;
 			}
 		}
 		firstChar = FALSE;


@@ Diff output truncated at 100000 characters. @@


--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).



More information about the Commits mailing list