From 2b4eae90f65032254718eb993612004aebcb6407 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Fri, 15 May 2020 08:09:03 +0000 Subject: [PATCH] cmm: various fixes git-svn-id: svn://kolibrios.org@7920 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/cmm/browser/WebView.c | 1 + programs/cmm/eolite/Eolite.c | 4 +++- programs/cmm/lib/ipc.h | 8 ++++---- programs/cmm/txtread/txtread.c | 25 +++++++------------------ 4 files changed, 15 insertions(+), 23 deletions(-) diff --git a/programs/cmm/browser/WebView.c b/programs/cmm/browser/WebView.c index f55614130a..6c871f0c61 100644 --- a/programs/cmm/browser/WebView.c +++ b/programs/cmm/browser/WebView.c @@ -144,6 +144,7 @@ void HandleParam() history.add(URL_SERVICE_HOMEPAGE); } shared_url = memopen(#webview_shared, URL_SIZE+1, SHM_CREATE + SHM_WRITE); + ESDWORD[shared_url] = '\0'; } void main() diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 11e43bd2c4..d9bc85062a 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -164,8 +164,10 @@ void handle_param() { case 'p': strcpy(#file_path, #param + 3); - strcpy(#file_name, #param + strrchr(#param, '/')); itdir = dir_exists(#file_path); + strcpy(#file_name, #param + strrchr(#param, '/')); + param[strrchr(#param, '/')-1] = '\0'; + strcpy(#path, #param + 3); properties_dialog(); return; case 'd': diff --git a/programs/cmm/lib/ipc.h b/programs/cmm/lib/ipc.h index 986866c8c8..3950a367fb 100644 --- a/programs/cmm/lib/ipc.h +++ b/programs/cmm/lib/ipc.h @@ -62,8 +62,8 @@ IPC применяется для посылок сообщений от одн inline fastcall void IpcSetArea(ECX, EDX) { - $eax, 60 - $ebx, 1 + $mov eax, 60 + $mov ebx, 1 // ecx = указатель на буфер // edx = размер буфера $int 64 @@ -72,8 +72,8 @@ inline fastcall void IpcSetArea(ECX, EDX) inline fastcall int SendIpcMessage(ECX, EDX, ESI) { - $eax, 60 - $ebx, 2 + $mov eax, 60 + $mov ebx, 2 // ecx = PID приёмника // edx = указатель на данные сообщения // esi = длина сообщения (в байтах) diff --git a/programs/cmm/txtread/txtread.c b/programs/cmm/txtread/txtread.c index ce7045803c..8ab889d518 100644 --- a/programs/cmm/txtread/txtread.c +++ b/programs/cmm/txtread/txtread.c @@ -358,26 +358,15 @@ void EventOpenFileInAnotherProgram(dword _id) dword app; byte open_param[4096]; switch(_id) { - case 0: - app = "/sys/tinypad"; - break; - case 1: - app = "/sys/develop/t_edit"; - break; - case 2: - app = "/sys/network/webview"; - break; - case 3: - app = "/sys/fb2read"; - break; - case 4: - app = "/sys/develop/heed"; - break; - case 5: - open_param[0]='~'; + case 0: app = "/sys/tinypad"; break; + case 1: app = "/sys/develop/t_edit"; break; + case 2: app = "/sys/network/webview"; break; + case 3: app = "/sys/fb2read"; break; + case 4: app = "/sys/develop/heed"; break; + case 5: open_param[0]='~'; strcpy(#open_param+1,#param); RunProgram("/sys/@open", #open_param); - break; + return; } RunProgram(app, #param); }