| 2729 | |
| 2730 | template<class SI_CHAR, class SI_STRLESS, class SI_CONVERTER> |
| 2731 | bool |
| 2732 | CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::OutputMultiLineText( |
| 2733 | OutputWriter & a_oOutput, |
| 2734 | Converter & a_oConverter, |
| 2735 | const SI_CHAR * a_pText |
| 2736 | ) const |
| 2737 | { |
| 2738 | const SI_CHAR * pEndOfLine; |
| 2739 | SI_CHAR cEndOfLineChar = *a_pText; |
| 2740 | while (cEndOfLineChar) { |
| 2741 | // find the end of this line |
| 2742 | pEndOfLine = a_pText; |
| 2743 | for (; *pEndOfLine && *pEndOfLine != '\n'; ++pEndOfLine) /*loop*/ ; |
| 2744 | cEndOfLineChar = *pEndOfLine; |
| 2745 | |
| 2746 | // temporarily null terminate, convert and output the line |
| 2747 | *const_cast<SI_CHAR*>(pEndOfLine) = 0; |
| 2748 | if (!a_oConverter.ConvertToStore(a_pText)) { |
| 2749 | return false; |
| 2750 | } |
| 2751 | *const_cast<SI_CHAR*>(pEndOfLine) = cEndOfLineChar; |
| 2752 | a_pText += (pEndOfLine - a_pText) + 1; |
| 2753 | a_oOutput.Write(a_oConverter.Data()); |
| 2754 | a_oOutput.Write(SI_NEWLINE_A); |
| 2755 | } |
| 2756 | return true; |
| 2757 | } |
| 2758 | |
| 2759 | template<class SI_CHAR, class SI_STRLESS, class SI_CONVERTER> |
| 2760 | bool |
nothing calls this directly
no test coverage detected