Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 26467 Details for
Bug 43091
astyle command line error
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for command line parsing error.
fix.diff (text/plain), 5.69 KB, created by
Luca Santarelli
on 2004-02-27 05:37:00 UTC
(
hide
)
Description:
Patch for command line parsing error.
Filename:
MIME Type:
Creator:
Luca Santarelli
Created:
2004-02-27 05:37:00 UTC
Size:
5.69 KB
patch
obsolete
>--- astyle_main.cpp 2002-03-07 08:22:30.000000000 +0100 >+++ /root/astyle_main.cpp.fixed 2004-02-25 22:05:13.841700600 +0100 >@@ -267,22 +267,22 @@ > { > manuallySetJavaStyle(formatter); > } >- else if ( IS_OPTIONS(arg, "t", "indent=tab=") ) >- { >- int spaceNum = 4; >- string spaceNumParam = GET_PARAMS(arg, "t", "indent=tab="); >- if (spaceNumParam.length() > 0) >- spaceNum = atoi(spaceNumParam.c_str()); >- formatter.setTabIndentation(spaceNum, false); >- } >- else if ( IS_OPTIONS(arg, "T", "force-indent=tab=") ) >- { >- int spaceNum = 4; >- string spaceNumParam = GET_PARAMS(arg, "T", "force-indent=tab="); >- if (spaceNumParam.length() > 0) >- spaceNum = atoi(spaceNumParam.c_str()); >- formatter.setTabIndentation(spaceNum, true); >- } >+ else if ( IS_PARAM_OPTIONS(arg, "t", "indent=tab=") ) >+ { >+ int spaceNum = 4; >+ string spaceNumParam = GET_PARAMS(arg, "t", "indent=tab="); >+ if (spaceNumParam.length() > 0) >+ spaceNum = atoi(spaceNumParam.c_str()); >+ formatter.setTabIndentation(spaceNum, false); >+ } >+ else if ( IS_PARAM_OPTIONS(arg, "T", "force-indent=tab=") ) >+ { >+ int spaceNum = 4; >+ string spaceNumParam = GET_PARAMS(arg, "T", "force-indent=tab="); >+ if (spaceNumParam.length() > 0) >+ spaceNum = atoi(spaceNumParam.c_str()); >+ formatter.setTabIndentation(spaceNum, true); >+ } > else if ( IS_PARAM_OPTION(arg, "indent=tab") ) > { > formatter.setTabIndentation(4); >@@ -343,10 +343,10 @@ > { > formatter.setLabelIndent(true); > } >- else if ( IS_OPTION(arg, "brackets=break-closing-headers") ) >- { >- formatter.setBreakClosingHeaderBracketsMode(true); >- } >+ else if ( IS_OPTION(arg, "brackets=break-closing-headers") ) >+ { >+ formatter.setBreakClosingHeaderBracketsMode(true); >+ } > else if ( IS_OPTIONS(arg, "b", "brackets=break") ) > { > formatter.setBracketFormatMode(BREAK_MODE); >@@ -400,10 +400,10 @@ > else if (IS_OPTION(arg, "break-blocks")) > { > formatter.setBreakBlocksMode(true); >- } >- else if (IS_OPTION(arg, "break-elseifs")) >- { >- formatter.setBreakElseIfsMode(true); >+ } >+ else if (IS_OPTION(arg, "break-elseifs")) >+ { >+ formatter.setBreakElseIfsMode(true); > } > else if ( IS_OPTIONS(arg, "X", "errors-to-standard-output") ) > { >@@ -528,20 +528,20 @@ > (*_err) << " -j OR --mode=java\n"; > (*_err) << " Indent a Java(TM) source file\n"; > (*_err) << endl; >- (*_err) << " -s OR -s# OR --indent=spaces=#\n"; >- (*_err) << " Indent using # spaces per indent. Not specifying #\n" ; >- (*_err) << " will result in a default of 4 spacec per indent.\n" ; >- (*_err) << endl; >+ (*_err) << " -s OR -s# OR --indent=spaces=#\n"; >+ (*_err) << " Indent using # spaces per indent. Not specifying #\n" ; >+ (*_err) << " will result in a default of 4 spacec per indent.\n" ; >+ (*_err) << endl; > (*_err) << " -t OR -t# OR --indent=tab=#\n"; > (*_err) << " Indent using tab characters, assuming that each\n"; > (*_err) << " tab is # spaces long. Not specifying # will result\n"; > (*_err) << " in a default assumption of 4 spaces per tab.\n" ; >- (*_err) << endl; >- (*_err) << " -T# OR --force-indent=tab=#"; >- (*_err) << " Indent using tab characters, assuming that each\n"; >- (*_err) << " tab is # spaces long. Force tabs to be used in areas\n"; >- (*_err) << " Astyle would prefer to use spaces.\n" ; >- (*_err) << endl; >+ (*_err) << endl; >+ (*_err) << " -T# OR --force-indent=tab=#"; >+ (*_err) << " Indent using tab characters, assuming that each\n"; >+ (*_err) << " tab is # spaces long. Force tabs to be used in areas\n"; >+ (*_err) << " Astyle would prefer to use spaces.\n" ; >+ (*_err) << endl; > (*_err) << " -C OR --indent-classes\n"; > (*_err) << " Indent 'class' blocks, so that the inner 'public:',\n"; > (*_err) << " 'protected:' and 'private: headers are indented in\n"; >@@ -596,10 +596,10 @@ > (*_err) << " Break definition-block brackets and attach command-block\n"; > (*_err) << " brackets.\n"; > (*_err) << endl; >- (*_err) << " --brackets=break-closing-headers\n"; >- (*_err) << " Break brackets before closing headers (e.g. 'else', 'catch', ..).\n"; >- (*_err) << " Should be appended to --brackets=attach or --brackets=linux.\n"; >- (*_err) << endl; >+ (*_err) << " --brackets=break-closing-headers\n"; >+ (*_err) << " Break brackets before closing headers (e.g. 'else', 'catch', ..).\n"; >+ (*_err) << " Should be appended to --brackets=attach or --brackets=linux.\n"; >+ (*_err) << endl; > (*_err) << " -o OR --one-line=keep-statements\n"; > (*_err) << " Don't break lines containing multiple statements into\n"; > (*_err) << " multiple single-statement lines.\n"; >@@ -626,9 +626,9 @@ > (*_err) << " Like --break-blocks, except also insert empty lines \n"; > (*_err) << " around closing headers (e.g. 'else', 'catch', ...).\n"; > (*_err) << endl; >- (*_err) << " --break-elseifs\n"; >- (*_err) << " Break 'else if()' statements into two different lines.\n"; >- (*_err) << endl; >+ (*_err) << " --break-elseifs\n"; >+ (*_err) << " Break 'else if()' statements into two different lines.\n"; >+ (*_err) << endl; > (*_err) << "Other options:\n"; > (*_err) << "-------------\n"; > (*_err) << " --suffix=####\n"; >@@ -762,7 +762,7 @@ > > if (shouldPrintHelp) > { >- printHelp(); >+ printHelp(); > exit(1); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 43091
: 26467