From f0c414780cf4e3b81bf18b3adf5aecc9d43eb44a Mon Sep 17 00:00:00 2001 From: Albom Date: Sun, 15 Apr 2012 07:59:47 +0000 Subject: [PATCH] Shell: some small fixes git-svn-id: svn://kolibrios.org@2615 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/system/shell/History.txt | 5 +++++ programs/system/shell/cmd/cmd_more.c | 12 ++++++++++++ programs/system/shell/globals.h | 2 +- programs/system/shell/modules/module_executable.c | 5 ++++- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/programs/system/shell/History.txt b/programs/system/shell/History.txt index 85534ae20..2fa887857 100644 --- a/programs/system/shell/History.txt +++ b/programs/system/shell/History.txt @@ -1,3 +1,8 @@ +Shell 0.5.1 // 15.04.2012 // Albom +======================================= +* ═хъюЄюЁ√х эхчэрўшЄхы№э√х шёяЁртыхэш  + + Shell 0.5 // 23.03.2012 // Albom ======================================= * ─юсртыхэр яюффхЁцър ъюэёюы№э√ї яЁшыюцхэшщ, ъюЄюЁ√х юс∙р■Єё  ё °хыыюь ўхЁхч шьхэютрээє■ юсырёЄ№ diff --git a/programs/system/shell/cmd/cmd_more.c b/programs/system/shell/cmd/cmd_more.c index 2235b3e9d..7a23b5a48 100644 --- a/programs/system/shell/cmd/cmd_more.c +++ b/programs/system/shell/cmd/cmd_more.c @@ -25,16 +25,28 @@ if ( '/' == file[0]) if ( !file_check(temp) ) { + #if LANG_ENG + printf (" File not found!\n\r"); + #elif LANG_RUS + printf (" Файл не найден!\n\r"); + #endif return FALSE; } } else { strcpy(temp, cur_dir); + if (temp[strlen(temp)-1] != '/') + strcat(temp, "/"); // add slash strcat(temp, file); if ( !file_check(temp) ) { + #if LANG_ENG + printf (" File not found!\n\r"); + #elif LANG_RUS + printf (" Файл не найден!\n\r"); + #endif return FALSE; } } diff --git a/programs/system/shell/globals.h b/programs/system/shell/globals.h index c405d85f1..f20f67155 100644 --- a/programs/system/shell/globals.h +++ b/programs/system/shell/globals.h @@ -1,5 +1,5 @@ -#define SHELL_VERSION "0.5" +#define SHELL_VERSION "0.5.1" extern char PATH[256]; extern char PARAM[256]; diff --git a/programs/system/shell/modules/module_executable.c b/programs/system/shell/modules/module_executable.c index ed9286903..4cb6726a9 100644 --- a/programs/system/shell/modules/module_executable.c +++ b/programs/system/shell/modules/module_executable.c @@ -26,9 +26,12 @@ if ( '/' == cmd[0]) // else { strcpy(exec, cur_dir); // проверяем файл в текущем каталоге -// strcat(exec, "/"); // add slash + if (exec[strlen(exec)-1] != '/') + strcat(exec, "/"); // add slash strcat(exec, cmd); + printf("\n%s\n", exec); + if ( !file_check(exec) ) // проверяем существование файла { strcpy(exec, "/rd/1/"); // проверяем файл на виртуальном диске