From 3b43ee8e60cec07ea47c7114c596657f759a359d Mon Sep 17 00:00:00 2001 From: Albom Date: Thu, 28 Nov 2013 19:08:52 +0000 Subject: [PATCH] Shell 0.7.3. Bug with '%' symbol in command history is fixed. git-svn-id: svn://kolibrios.org@4309 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/system/shell/History.txt | 4 ++++ programs/system/shell/globals.h | 2 +- programs/system/shell/modules/module_command.c | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/programs/system/shell/History.txt b/programs/system/shell/History.txt index 32dac4ae1..82997e995 100644 --- a/programs/system/shell/History.txt +++ b/programs/system/shell/History.txt @@ -1,3 +1,7 @@ +Shell 0.7.3 // 28.11.2013 // Albom +* Исправлена ошибка с символом % в истории команд + + Shell 0.7.2 // 26.10.2013 // Albom * Файл .shell перенесен в /sys/settings/ * Исправлена команда "cd .." diff --git a/programs/system/shell/globals.h b/programs/system/shell/globals.h index e2d17ccc4..4b2dd4368 100644 --- a/programs/system/shell/globals.h +++ b/programs/system/shell/globals.h @@ -1,5 +1,5 @@ -#define SHELL_VERSION "0.7.2" +#define SHELL_VERSION "0.7.3" extern char PATH[256]; extern char PARAM[256]; diff --git a/programs/system/shell/modules/module_command.c b/programs/system/shell/modules/module_command.c index 2b2ab6656..2be66ba77 100644 --- a/programs/system/shell/modules/module_command.c +++ b/programs/system/shell/modules/module_command.c @@ -64,7 +64,7 @@ for (;;) if (cmdPos > 0) { for (i = cmdPos-1; i < cmdLen; i++) - CMD[i] = CMD[i+1]; + CMD[i] = CMD[i+1]; for (i = 0; i < cmdLen-cmdPos; i++) printf (" "); @@ -178,7 +178,7 @@ for (;;) else CMD_NUM = 0; - printf( CMD_HISTORY[CMD_NUM] ); + printf( "%s", CMD_HISTORY[CMD_NUM] ); strcpy(CMD, CMD_HISTORY[CMD_NUM]); cmdLen = strlen(CMD); cmdPos = strlen(CMD); @@ -203,7 +203,7 @@ for (;;) else CMD_NUM = CMD_HISTORY_NUM_REAL-1; - printf( CMD_HISTORY[CMD_NUM] ); + printf( "%s", CMD_HISTORY[CMD_NUM] ); strcpy(CMD, CMD_HISTORY[CMD_NUM]); cmdLen = strlen(CMD); cmdPos = strlen(CMD);