Exemple #1
0
/* Moves cursor to the first character of next line. If there's no next line
 * moves cursor to '\0' character. */
__regargs void SkipLine(char **data) {
  char *str = *data;

  while (NextWord(&str))
    SkipWord(&str);

  if (*str == '\n')
    str++;

  *data = str;
}
FX_BOOL CPDF_SimpleParser::FindTagPair(const CFX_ByteStringC& start_token,
                                       const CFX_ByteStringC& end_token,
                                       FX_DWORD& start_pos,
                                       FX_DWORD& end_pos) {
  if (!start_token.IsEmpty()) {
    if (!SkipWord(start_token)) {
      return FALSE;
    }
    start_pos = m_dwCurPos;
  }
  while (1) {
    end_pos = m_dwCurPos;
    CFX_ByteStringC word = GetWord();
    if (word.IsEmpty()) {
      return FALSE;
    }
    if (word == end_token) {
      return TRUE;
    }
  }
  return FALSE;
}