aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2009-10-27 00:02:12 +0000
committernyamatongwe <unknown>2009-10-27 00:02:12 +0000
commit724934ce40ba395acb774c9c67727dc056b9eac2 (patch)
treedc8c45f5e8f7af866d4d0f628a9cd1cbb3b24446 /src/Editor.cxx
parent601fc21982319ebe4e1408291b86d1303e1060eb (diff)
downloadscintilla-mirror-724934ce40ba395acb774c9c67727dc056b9eac2.tar.gz
Added StringResult method to return strings in the standard way.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx9
1 files changed, 9 insertions, 0 deletions
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<char *>(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);