Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 43091
Collapse All | Expand All

(-)astyle_main.cpp (-42 / +42 lines)
Lines 267-288 Link Here
267
    {
267
    {
268
        manuallySetJavaStyle(formatter);
268
        manuallySetJavaStyle(formatter);
269
    }
269
    }
270
    else if ( IS_OPTIONS(arg, "t", "indent=tab=") )
270
    else if ( IS_PARAM_OPTIONS(arg, "t", "indent=tab=") )
271
    {
271
    {
272
        int spaceNum = 4;
272
        int spaceNum = 4;
273
        string spaceNumParam = GET_PARAMS(arg, "t", "indent=tab=");
273
        string spaceNumParam = GET_PARAMS(arg, "t", "indent=tab=");
274
        if (spaceNumParam.length() > 0)
274
        if (spaceNumParam.length() > 0)
275
            spaceNum = atoi(spaceNumParam.c_str());
275
            spaceNum = atoi(spaceNumParam.c_str());
276
        formatter.setTabIndentation(spaceNum, false);
276
        formatter.setTabIndentation(spaceNum, false);
277
    }
277
    }
278
    else if ( IS_OPTIONS(arg, "T", "force-indent=tab=") )
278
    else if ( IS_PARAM_OPTIONS(arg, "T", "force-indent=tab=") )
279
    {
279
    {
280
        int spaceNum = 4;
280
        int spaceNum = 4;
281
        string spaceNumParam = GET_PARAMS(arg, "T", "force-indent=tab=");
281
        string spaceNumParam = GET_PARAMS(arg, "T", "force-indent=tab=");
282
        if (spaceNumParam.length() > 0)
282
        if (spaceNumParam.length() > 0)
283
            spaceNum = atoi(spaceNumParam.c_str());
283
            spaceNum = atoi(spaceNumParam.c_str());
284
        formatter.setTabIndentation(spaceNum, true);
284
        formatter.setTabIndentation(spaceNum, true);
285
    }
285
    }
286
    else if ( IS_PARAM_OPTION(arg, "indent=tab") )
286
    else if ( IS_PARAM_OPTION(arg, "indent=tab") )
287
    {
287
    {
288
        formatter.setTabIndentation(4);
288
        formatter.setTabIndentation(4);
Lines 343-352 Link Here
343
    {
343
    {
344
        formatter.setLabelIndent(true);
344
        formatter.setLabelIndent(true);
345
    }
345
    }
346
    else if ( IS_OPTION(arg, "brackets=break-closing-headers") )
346
    else if ( IS_OPTION(arg, "brackets=break-closing-headers") )
347
    {
347
    {
348
        formatter.setBreakClosingHeaderBracketsMode(true);
348
        formatter.setBreakClosingHeaderBracketsMode(true);
349
    }
349
    }
350
    else if ( IS_OPTIONS(arg, "b", "brackets=break") )
350
    else if ( IS_OPTIONS(arg, "b", "brackets=break") )
351
    {
351
    {
352
        formatter.setBracketFormatMode(BREAK_MODE);
352
        formatter.setBracketFormatMode(BREAK_MODE);
Lines 400-409 Link Here
400
    else if (IS_OPTION(arg, "break-blocks"))
400
    else if (IS_OPTION(arg, "break-blocks"))
401
    {
401
    {
402
        formatter.setBreakBlocksMode(true);
402
        formatter.setBreakBlocksMode(true);
403
    }
403
    }
404
    else if (IS_OPTION(arg, "break-elseifs"))
404
    else if (IS_OPTION(arg, "break-elseifs"))
405
    {
405
    {
406
        formatter.setBreakElseIfsMode(true);
406
        formatter.setBreakElseIfsMode(true);
407
    }
407
    }
408
    else if ( IS_OPTIONS(arg, "X", "errors-to-standard-output") )
408
    else if ( IS_OPTIONS(arg, "X", "errors-to-standard-output") )
409
    {
409
    {
Lines 528-547 Link Here
528
    (*_err) << "    -j   OR   --mode=java\n";
528
    (*_err) << "    -j   OR   --mode=java\n";
529
    (*_err) << "    Indent a Java(TM) source file\n";
529
    (*_err) << "    Indent a Java(TM) source file\n";
530
    (*_err) << endl;
530
    (*_err) << endl;
531
    (*_err) << "    -s   OR   -s#   OR   --indent=spaces=#\n";
531
    (*_err) << "    -s   OR   -s#   OR   --indent=spaces=#\n";
532
    (*_err) << "    Indent using # spaces per indent. Not specifying #\n" ;
532
    (*_err) << "    Indent using # spaces per indent. Not specifying #\n" ;
533
    (*_err) << "    will result in a default of 4 spacec per indent.\n" ;
533
    (*_err) << "    will result in a default of 4 spacec per indent.\n" ;
534
    (*_err) << endl;
534
    (*_err) << endl;
535
    (*_err) << "    -t   OR   -t#   OR   --indent=tab=#\n";
535
    (*_err) << "    -t   OR   -t#   OR   --indent=tab=#\n";
536
    (*_err) << "    Indent using tab characters, assuming that each\n";
536
    (*_err) << "    Indent using tab characters, assuming that each\n";
537
    (*_err) << "    tab is # spaces long. Not specifying # will result\n";
537
    (*_err) << "    tab is # spaces long. Not specifying # will result\n";
538
    (*_err) << "    in a default assumption of 4 spaces per tab.\n" ;
538
    (*_err) << "    in a default assumption of 4 spaces per tab.\n" ;
539
    (*_err) << endl;
539
    (*_err) << endl;
540
    (*_err) << "    -T#   OR   --force-indent=tab=#";
540
    (*_err) << "    -T#   OR   --force-indent=tab=#";
541
    (*_err) << "    Indent using tab characters, assuming that each\n";
541
    (*_err) << "    Indent using tab characters, assuming that each\n";
542
    (*_err) << "    tab is # spaces long. Force tabs to be used in areas\n";
542
    (*_err) << "    tab is # spaces long. Force tabs to be used in areas\n";
543
    (*_err) << "    Astyle would prefer to use spaces.\n" ;
543
    (*_err) << "    Astyle would prefer to use spaces.\n" ;
544
    (*_err) << endl;
544
    (*_err) << endl;
545
    (*_err) << "    -C   OR   --indent-classes\n";
545
    (*_err) << "    -C   OR   --indent-classes\n";
546
    (*_err) << "    Indent 'class' blocks, so that the inner 'public:',\n";
546
    (*_err) << "    Indent 'class' blocks, so that the inner 'public:',\n";
547
    (*_err) << "    'protected:' and 'private: headers are indented in\n";
547
    (*_err) << "    'protected:' and 'private: headers are indented in\n";
Lines 596-605 Link Here
596
    (*_err) << "    Break definition-block brackets and attach command-block\n";
596
    (*_err) << "    Break definition-block brackets and attach command-block\n";
597
    (*_err) << "    brackets.\n";
597
    (*_err) << "    brackets.\n";
598
    (*_err) << endl;
598
    (*_err) << endl;
599
    (*_err) << "    --brackets=break-closing-headers\n";
599
    (*_err) << "    --brackets=break-closing-headers\n";
600
    (*_err) << "    Break brackets before closing headers (e.g. 'else', 'catch', ..).\n";
600
    (*_err) << "    Break brackets before closing headers (e.g. 'else', 'catch', ..).\n";
601
    (*_err) << "    Should be appended to --brackets=attach or --brackets=linux.\n";
601
    (*_err) << "    Should be appended to --brackets=attach or --brackets=linux.\n";
602
    (*_err) << endl;
602
    (*_err) << endl;
603
    (*_err) << "    -o   OR  --one-line=keep-statements\n";
603
    (*_err) << "    -o   OR  --one-line=keep-statements\n";
604
    (*_err) << "    Don't break lines containing multiple statements into\n";
604
    (*_err) << "    Don't break lines containing multiple statements into\n";
605
    (*_err) << "    multiple single-statement lines.\n";
605
    (*_err) << "    multiple single-statement lines.\n";
Lines 626-634 Link Here
626
    (*_err) << "    Like --break-blocks, except also insert empty lines \n";
626
    (*_err) << "    Like --break-blocks, except also insert empty lines \n";
627
    (*_err) << "    around closing headers (e.g. 'else', 'catch', ...).\n";
627
    (*_err) << "    around closing headers (e.g. 'else', 'catch', ...).\n";
628
    (*_err) << endl;
628
    (*_err) << endl;
629
    (*_err) << "    --break-elseifs\n";
629
    (*_err) << "    --break-elseifs\n";
630
    (*_err) << "    Break 'else if()' statements into two different lines.\n";
630
    (*_err) << "    Break 'else if()' statements into two different lines.\n";
631
    (*_err) << endl;
631
    (*_err) << endl;
632
    (*_err) << "Other options:\n";
632
    (*_err) << "Other options:\n";
633
    (*_err) << "-------------\n";
633
    (*_err) << "-------------\n";
634
    (*_err) << "    --suffix=####\n";
634
    (*_err) << "    --suffix=####\n";
Lines 762-768 Link Here
762
762
763
    if (shouldPrintHelp)
763
    if (shouldPrintHelp)
764
    {
764
    {
765
        printHelp();
765
        printHelp();
766
		exit(1);
766
		exit(1);
767
    }
767
    }
768
768

Return to bug 43091