VirtualBox

Changeset 98393 in vbox


Ignore:
Timestamp:
Feb 1, 2023 2:35:20 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
155637
Message:

scm: More on the kmk makefile cleanup. bugref:10348

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bldprogs/scmrw-kmk.cpp

    r98390 r98393  
    14531453            else
    14541454            {
     1455                unsigned iEol = 0;
    14551456                cPendingEols = RT_MIN(2, cPendingEols); /* reduce to two, i.e. only one empty separator line */
    14561457                do
    14571458                {
    1458                     *pszDst++ = ' ';
     1459                    if (iEol++ == 0)  /* skip this for the 2nd empty line. */
     1460                        *pszDst++ = ' ';
    14591461                    *pszDst++ = '\\';
    14601462                    *pszDst = '\0';
     
    17311733
    17321734        /* Skip whitespace (if any). */
    1733         size_t cchSpaces = 0;
    17341735        while (offLine < cchLine && RT_C_IS_SPACE(pchLine[offLine]))
    1735         {
    1736             cchSpaces++;
    17371736            offLine++;
    1738         }
    17391737
    17401738        /* Deal with new line and emit indentation. */
     
    19031901                    enmType = kKmkAssignType_Prepending;
    19041902                else
     1903                {
    19051904                    Assert(ch != ':');
    1906                 return scmKmkHandleAssignment2(pParser, offWord, offLine - 1, enmType, offLine - 1, 0);
     1905                    return scmKmkHandleAssignment2(pParser, offWord, offLine - 1, enmType, offLine - 1, 0);
     1906                }
     1907                return scmKmkHandleAssignment2(pParser, offWord, offLine - 2, enmType, offLine - 2, 0);
    19071908            }
    19081909        }
     
    21232124
    21242125                    case kKmkToken_Comment:
     2126                        AssertFailed(); /* not possible */
    21252127                        break;
    21262128
     
    21542156                    continue;
    21552157                }
    2156                 /** @todo process comments. */
     2158
     2159                /*
     2160                 * Indent comment lines, unless the comment is too far into the line and such.
     2161                 */
     2162                size_t const offEffLine = ScmCalcSpacesForSrcSpan(pchLine, 0, offLine, pSettings);
     2163                if (offEffLine <= Parser.iActualDepth + 7)
     2164                {
     2165                    ScmStreamWrite(pOut, g_szSpaces, Parser.iActualDepth);
     2166                    ScmStreamWrite(pOut, &pchLine[offLine], cchLine - offLine);
     2167                    ScmStreamPutEol(pOut, Parser.enmEol);
     2168                    continue;
     2169                }
    21572170            }
    21582171        }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette