18e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/* 28e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 38e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 48e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project This library is free software; you can redistribute it and/or 58e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project modify it under the terms of the GNU Library General Public 68e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project License as published by the Free Software Foundation; either 78e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project version 2 of the License, or (at your option) any later version. 88e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 98e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project This library is distributed in the hope that it will be useful, 108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project but WITHOUT ANY WARRANTY; without even the implied warranty of 118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Library General Public License for more details. 138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project You should have received a copy of the GNU Library General Public License 158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project along with this library; see the file COPYING.LIB. If not, write to 168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Boston, MA 02110-1301, USA. 188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project*/ 198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "config.h" 218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project#include "SegmentedString.h" 228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectnamespace WebCore { 248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source ProjectSegmentedString::SegmentedString(const SegmentedString &other) : 268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_pushedChar1(other.m_pushedChar1), m_pushedChar2(other.m_pushedChar2), m_currentString(other.m_currentString), 278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_substrings(other.m_substrings), m_composite(other.m_composite) 288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (other.m_currentChar == &other.m_pushedChar1) 308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentChar = &m_pushedChar1; 318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project else if (other.m_currentChar == &other.m_pushedChar2) 328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentChar = &m_pushedChar2; 338e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project else 348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentChar = other.m_currentChar; 358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 368e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 378e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectconst SegmentedString& SegmentedString::operator=(const SegmentedString &other) 388e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 398e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_pushedChar1 = other.m_pushedChar1; 408e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_pushedChar2 = other.m_pushedChar2; 418e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentString = other.m_currentString; 428e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_substrings = other.m_substrings; 438e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_composite = other.m_composite; 448e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (other.m_currentChar == &other.m_pushedChar1) 458e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentChar = &m_pushedChar1; 468e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project else if (other.m_currentChar == &other.m_pushedChar2) 478e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentChar = &m_pushedChar2; 488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project else 498e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentChar = other.m_currentChar; 508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project return *this; 518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 528e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectunsigned SegmentedString::length() const 548e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 558e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project unsigned length = m_currentString.m_length; 568e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (m_pushedChar1) { 578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ++length; 588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (m_pushedChar2) 598e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ++length; 608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } 618e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (m_composite) { 628e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Deque<SegmentedSubstring>::const_iterator it = m_substrings.begin(); 638e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Deque<SegmentedSubstring>::const_iterator e = m_substrings.end(); 648e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project for (; it != e; ++it) 658e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project length += it->m_length; 668e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } 678e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project return length; 688e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 698e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 708e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectvoid SegmentedString::setExcludeLineNumbers() 718e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 728e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (m_composite) { 738e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Deque<SegmentedSubstring>::iterator it = m_substrings.begin(); 748e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Deque<SegmentedSubstring>::iterator e = m_substrings.end(); 758e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project for (; it != e; ++it) 768e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project it->setExcludeLineNumbers(); 778e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } else 788e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentString.setExcludeLineNumbers(); 798e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 808e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 818e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectvoid SegmentedString::clear() 828e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 838e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_pushedChar1 = 0; 848e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_pushedChar2 = 0; 858e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentChar = 0; 868e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentString.clear(); 878e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_substrings.clear(); 888e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_composite = false; 898e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 908e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 918e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectvoid SegmentedString::append(const SegmentedSubstring &s) 928e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 938e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (s.m_length) { 948e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (!m_currentString.m_length) { 958e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentString = s; 968e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } else { 978e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_substrings.append(s); 988e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_composite = true; 998e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } 1008e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } 1018e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 1028e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1038e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectvoid SegmentedString::prepend(const SegmentedSubstring &s) 1048e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 1058e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ASSERT(!escaped()); 1068e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (s.m_length) { 1078e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (!m_currentString.m_length) 1088e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentString = s; 1098e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project else { 1108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project // Shift our m_currentString into our list. 1118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_substrings.prepend(m_currentString); 1128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentString = s; 1138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_composite = true; 1148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } 1158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } 1168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 1178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectvoid SegmentedString::append(const SegmentedString &s) 1198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 1208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ASSERT(!s.escaped()); 1218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project append(s.m_currentString); 1228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (s.m_composite) { 1238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Deque<SegmentedSubstring>::const_iterator it = s.m_substrings.begin(); 1248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Deque<SegmentedSubstring>::const_iterator e = s.m_substrings.end(); 1258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project for (; it != e; ++it) 1268e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project append(*it); 1278e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } 1288e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentChar = m_pushedChar1 ? &m_pushedChar1 : m_currentString.m_current; 1298e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 1308e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1318e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectvoid SegmentedString::prepend(const SegmentedString &s) 1328e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 1338e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ASSERT(!escaped()); 1348e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ASSERT(!s.escaped()); 1358e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (s.m_composite) { 1368e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Deque<SegmentedSubstring>::const_reverse_iterator it = s.m_substrings.rbegin(); 1378e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Deque<SegmentedSubstring>::const_reverse_iterator e = s.m_substrings.rend(); 1388e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project for (; it != e; ++it) 1398e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project prepend(*it); 1408e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } 1418e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project prepend(s.m_currentString); 1428e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentChar = m_pushedChar1 ? &m_pushedChar1 : m_currentString.m_current; 1438e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 1448e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1458e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectvoid SegmentedString::advanceSubstring() 1468e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 1478e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (m_composite) { 1488e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentString = m_substrings.first(); 1498e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_substrings.removeFirst(); 1508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (m_substrings.isEmpty()) 1518e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_composite = false; 1528e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } else { 1538e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentString.clear(); 1548e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } 1558e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 1568e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1578e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source ProjectString SegmentedString::toString() const 1588e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 1598e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project String result; 1608e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (m_pushedChar1) { 1618e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project result.append(m_pushedChar1); 1628e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (m_pushedChar2) 1638e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project result.append(m_pushedChar2); 1648e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } 1658e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentString.appendTo(result); 1668e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (m_composite) { 1678e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Deque<SegmentedSubstring>::const_iterator it = m_substrings.begin(); 1688e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project Deque<SegmentedSubstring>::const_iterator e = m_substrings.end(); 1698e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project for (; it != e; ++it) 1708e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project it->appendTo(result); 1718e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } 1728e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project return result; 1738e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 1748e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1758e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectvoid SegmentedString::advanceSlowCase() 1768e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 1778e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (m_pushedChar1) { 1788e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_pushedChar1 = m_pushedChar2; 1798e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_pushedChar2 = 0; 1808e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } else if (m_currentString.m_current) { 1818e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ++m_currentString.m_current; 1828e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (--m_currentString.m_length == 0) 1838e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project advanceSubstring(); 1848e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } 1858e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentChar = m_pushedChar1 ? &m_pushedChar1 : m_currentString.m_current; 1868e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 1878e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 1888e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Projectvoid SegmentedString::advanceSlowCase(int& lineNumber) 1898e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project{ 1908e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (m_pushedChar1) { 1918e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_pushedChar1 = m_pushedChar2; 1928e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_pushedChar2 = 0; 1938e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } else if (m_currentString.m_current) { 1948e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (*m_currentString.m_current++ == '\n' && m_currentString.doNotExcludeLineNumbers()) 1958e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project ++lineNumber; 1968e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project if (--m_currentString.m_length == 0) 1978e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project advanceSubstring(); 1988e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project } 1998e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project m_currentChar = m_pushedChar1 ? &m_pushedChar1 : m_currentString.m_current; 2008e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 2018e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project 2028e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project} 203