Changeset 98393 in vbox
- Timestamp:
- Feb 1, 2023 2:35:20 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155637
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bldprogs/scmrw-kmk.cpp
r98390 r98393 1453 1453 else 1454 1454 { 1455 unsigned iEol = 0; 1455 1456 cPendingEols = RT_MIN(2, cPendingEols); /* reduce to two, i.e. only one empty separator line */ 1456 1457 do 1457 1458 { 1458 *pszDst++ = ' '; 1459 if (iEol++ == 0) /* skip this for the 2nd empty line. */ 1460 *pszDst++ = ' '; 1459 1461 *pszDst++ = '\\'; 1460 1462 *pszDst = '\0'; … … 1731 1733 1732 1734 /* Skip whitespace (if any). */ 1733 size_t cchSpaces = 0;1734 1735 while (offLine < cchLine && RT_C_IS_SPACE(pchLine[offLine])) 1735 {1736 cchSpaces++;1737 1736 offLine++; 1738 }1739 1737 1740 1738 /* Deal with new line and emit indentation. */ … … 1903 1901 enmType = kKmkAssignType_Prepending; 1904 1902 else 1903 { 1905 1904 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); 1907 1908 } 1908 1909 } … … 2123 2124 2124 2125 case kKmkToken_Comment: 2126 AssertFailed(); /* not possible */ 2125 2127 break; 2126 2128 … … 2154 2156 continue; 2155 2157 } 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 } 2157 2170 } 2158 2171 }
Note:
See TracChangeset
for help on using the changeset viewer.