[PATCH 0/1] MR7289: scrrun: implement ITextStream::WriteBlankLines().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57810 Closes #57810 -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7289
From: Damjan Jovanovic <damjan.jov(a)gmail.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57810 --- dlls/scrrun/filesystem.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c index e53355267db..d6742bc08df 100644 --- a/dlls/scrrun/filesystem.c +++ b/dlls/scrrun/filesystem.c @@ -682,9 +682,15 @@ static HRESULT WINAPI textstream_WriteLine(ITextStream *iface, BSTR text) static HRESULT WINAPI textstream_WriteBlankLines(ITextStream *iface, LONG lines) { - FIXME("%p, %ld stub\n", iface, lines); + struct textstream *This = impl_from_ITextStream(iface); + HRESULT hr = S_OK; - return E_NOTIMPL; + TRACE("(%p)->(%ld)\n", This, lines); + + for (; lines > 0 && SUCCEEDED(hr); lines--) { + hr = textstream_writecrlf(This); + } + return hr; } static HRESULT WINAPI textstream_Skip(ITextStream *iface, LONG count) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7289
Nikolay Sivov (@nsivov) commented about dlls/scrrun/filesystem.c:
static HRESULT WINAPI textstream_WriteBlankLines(ITextStream *iface, LONG lines) { - FIXME("%p, %ld stub\n", iface, lines); + struct textstream *This = impl_from_ITextStream(iface); + HRESULT hr = S_OK;
- return E_NOTIMPL; + TRACE("(%p)->(%ld)\n", This, lines);
Please keep existing formatting for the trace message, using 'iface' pointer. And with 'stream' instead of 'This. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7289#note_94067
This will need some tests, for both ascii and unicode modes, and with a few interesting argument values, like -1,0,1,2. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7289#note_94068
participants (3)
-
Damjan Jovanovic -
Damjan Jovanovic (@dj) -
Nikolay Sivov (@nsivov)