From 724934ce40ba395acb774c9c67727dc056b9eac2 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 27 Oct 2009 00:02:12 +0000 Subject: Added StringResult method to return strings in the standard way. --- src/Editor.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index d8bfced13..ce3d467f4 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -6387,6 +6387,15 @@ sptr_t Editor::StyleGetMessage(unsigned int iMessage, uptr_t wParam, sptr_t lPar return 0; } +sptr_t Editor::StringResult(sptr_t lParam, const char *val) { + const int n = strlen(val); + if (lParam != 0) { + char *ptr = reinterpret_cast(lParam); + strcpy(ptr, val); + } + return n; // Not including NUL +} + sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { //Platform::DebugPrintf("S start wnd proc %d %d %d\n",iMessage, wParam, lParam); -- cgit v1.2.3