Lines Matching defs:iLine

47     pStream->iLine              = 0;
223 pStream->iLine = 0;
236 pStream->iLine = 0;
272 for (size_t iLine = 0; iLine < pStream->cLines; iLine++)
274 size_t offEol = pStream->paLines[iLine].off + pStream->paLines[iLine].cch;
275 AssertReturn(offEol + pStream->paLines[iLine].enmEol <= cbFile, VERR_INTERNAL_ERROR_2);
276 switch (pStream->paLines[iLine].enmEol)
286 AssertReturn(iLine + 1 >= pStream->cLines, VERR_INTERNAL_ERROR_4);
289 AssertReturn(iLine + 1 >= pStream->cLines, VERR_INTERNAL_ERROR_5);
396 size_t iLine = pStream->iLine;
397 if (RT_UNLIKELY(iLine >= pStream->cLinesAllocated))
399 int rc = scmStreamGrowLines(pStream, iLine);
403 pStream->paLines[iLine].off = off;
414 pStream->paLines[iLine].enmEol = *penmEol = SCMEOL_LF;
417 pStream->paLines[iLine].enmEol = *penmEol = SCMEOL_CRLF;
424 pStream->paLines[iLine].enmEol = *penmEol = SCMEOL_NONE;
427 pStream->paLines[iLine].cch = cb;
428 pStream->cLines = pStream->iLine = ++iLine;
444 size_t const iLineSaved = pStream->iLine;
455 pStream->iLine = iLineSaved;
479 return pStream->iLine;
489 * @param iLine The line we're asking about.
491 size_t ScmStreamTellOffsetOfLine(PSCMSTREAM pStream, size_t iLine)
499 if (iLine >= pStream->cLines)
501 return pStream->paLines[iLine].off;
565 pStream->iLine = i;
576 pStream->iLine = pStream->cLines;
613 * @param iLine The line to seek to. If this is beyond the end
616 int ScmStreamSeekByLine(PSCMSTREAM pStream, size_t iLine)
631 if (iLine < pStream->cLines)
633 pStream->off = pStream->paLines[iLine].off;
634 pStream->iLine = iLine;
639 pStream->iLine = pStream->cLines;
659 return pStream->off == pStream->paLines[pStream->iLine].off;
674 * @param iLine The line to get (0-based).
678 const char *ScmStreamGetLineByNo(PSCMSTREAM pStream, size_t iLine, size_t *pcchLine, PSCMEOL penmEol)
693 if (RT_UNLIKELY(iLine >= pStream->cLines))
696 pStream->iLine = pStream->cLines;
701 const char *pchRet = &pStream->pch[pStream->paLines[iLine].off];
702 *pcchLine = pStream->paLines[iLine].cch;
703 *penmEol = pStream->paLines[iLine].enmEol;
706 pStream->off = pStream->paLines[iLine].off + pStream->paLines[iLine].cch + pStream->paLines[iLine].enmEol;
707 pStream->iLine = iLine + 1;
733 size_t iCurLine = pStream->iLine;
789 size_t iLine = pStream->iLine;
790 if (pStream->off >= pStream->paLines[iLine].off + pStream->paLines[iLine].cch + pStream->paLines[iLine].enmEol)
791 pStream->iLine++;
862 * @param iLine The line in question.
864 bool ScmStreamIsWhiteLine(PSCMSTREAM pStream, size_t iLine)
868 const char *pchLine = ScmStreamGetLineByNo(pStream, iLine, &cchLine, &enmEol);
913 * @param iLine The line (0-base).
915 SCMEOL ScmStreamGetEolByLine(PSCMSTREAM pStream, size_t iLine)
918 if (iLine < pStream->cLines)
919 enmEol = pStream->paLines[iLine].enmEol;
948 size_t iLine = pStream->iLine;
949 if (RT_UNLIKELY( iLine != 0
950 && pStream->paLines[iLine - 1].enmEol == SCMEOL_NONE))
952 AssertReturn(pStream->paLines[iLine].cch == 0, VERR_INTERNAL_ERROR_3);
967 pStream->paLines[iLine - 1].enmEol = enmEol2;
968 pStream->paLines[iLine].off = off;
986 if (RT_UNLIKELY(iLine + 1 >= pStream->cLinesAllocated))
988 int rc = scmStreamGrowLines(pStream, iLine);
993 pStream->paLines[iLine].cch = off - pStream->paLines[iLine].off + cchLine;
994 pStream->paLines[iLine].enmEol = enmEol;
996 iLine++;
997 pStream->cLines = iLine;
998 pStream->iLine = iLine;
1018 pStream->paLines[iLine].off = off;
1019 pStream->paLines[iLine].cch = 0;
1020 pStream->paLines[iLine].enmEol = SCMEOL_NONE;
1053 size_t iLine = pStream->iLine;
1054 if (RT_UNLIKELY( iLine > 0
1055 && pStream->paLines[iLine - 1].enmEol == SCMEOL_NONE))
1057 iLine--;
1058 pStream->cLines = iLine;
1059 pStream->iLine = iLine;
1067 pStream->paLines[iLine].cch += cchBuf;
1073 if (RT_UNLIKELY(iLine + 1 >= pStream->cLinesAllocated))
1075 int rc = scmStreamGrowLines(pStream, iLine);
1078 iLine = pStream->iLine;
1079 pStream->paLines[iLine].cch = off - pStream->paLines[iLine].off;
1080 pStream->paLines[iLine].enmEol = SCMEOL_NONE;
1088 : !pStream->paLines[iLine].cch
1089 || pStream->pch[pStream->paLines[iLine].off + pStream->paLines[iLine].cch - 1] != '\r')
1090 pStream->paLines[iLine].enmEol = SCMEOL_LF;
1093 pStream->paLines[iLine].enmEol = SCMEOL_CRLF;
1096 pStream->paLines[iLine].cch += cchLine;
1098 iLine++;
1100 pStream->paLines[iLine].off = off + offBuf;
1101 pStream->paLines[iLine].cch = 0;
1102 pStream->paLines[iLine].enmEol = SCMEOL_NONE;
1109 pStream->paLines[iLine].cch = cchLeft;
1114 pStream->iLine = iLine;
1115 pStream->cLines = iLine;
1157 pStream->paLines[pStream->iLine].cch++;
1260 size_t const iLine = pStream->iLine;
1261 AssertReturn(pStream->off > pStream->paLines[iLine].off, false);
1262 size_t const cchLeft = pStream->paLines[iLine].cch + pStream->paLines[iLine].off - (pStream->off - 1);
1301 size_t const iLine = pStream->iLine;
1302 size_t const cchLeft = pStream->paLines[iLine].cch + pStream->paLines[iLine].off - pStream->off;
1340 size_t const iLine = pStream->iLine;
1341 size_t const cchLeft = pStream->paLines[iLine].cch + pStream->paLines[iLine].off - (pStream->off - 1);