2008-12-14 12:55:46 +01:00
|
|
|
|
|
|
|
/// ===========================================================
|
|
|
|
|
2011-01-25 13:53:48 +01:00
|
|
|
#ifndef AUTOBUILD
|
|
|
|
// autobuild does not create lang.h, but defines LANG_{RUS,ENG} directly
|
2010-10-21 01:58:36 +02:00
|
|
|
#include "lang.h"
|
2011-01-25 13:53:48 +01:00
|
|
|
#endif
|
2010-10-21 01:58:36 +02:00
|
|
|
|
2010-10-07 15:43:56 +02:00
|
|
|
#include "system/boolean.h"
|
|
|
|
#include "system/kolibri.h"
|
2021-06-12 23:34:41 +02:00
|
|
|
//#include "system/stdlib.h"
|
|
|
|
//#include "system/string.h"
|
|
|
|
//#include "system/ctype.h"
|
|
|
|
//#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <sys/ksys.h>
|
|
|
|
//--------
|
|
|
|
int strnicmp(const char* string1, const char* string2, unsigned count)
|
|
|
|
{
|
|
|
|
int pc = 0;
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
if (toupper(*string1)<toupper(*string2))
|
|
|
|
return -1;
|
|
|
|
if (toupper(*string1)>toupper(*string2))
|
|
|
|
return 1;
|
|
|
|
|
|
|
|
if (*string1=='\0' || pc == count)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
string1++;
|
|
|
|
string2++;
|
|
|
|
pc++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//--------
|
|
|
|
|
|
|
|
extern int _FUNC(sprintf)(char* buffer, const char* format, ...);
|
2008-12-14 12:55:46 +01:00
|
|
|
|
|
|
|
#include "globals.h"
|
|
|
|
#include "prototypes.h"
|
|
|
|
|
2020-04-16 23:50:49 +02:00
|
|
|
// from main file (shell.c). TODO - in future move to library
|
|
|
|
void get_file_dir_loc(char *filepath, char *dir_path);
|
|
|
|
|
2021-06-12 23:34:41 +02:00
|
|
|
//#include "system/console.c"
|
|
|
|
#include <conio.h>
|
|
|
|
#define con_exit (*con_exit)
|
|
|
|
#define con_set_title (*con_set_title)
|
|
|
|
#define con_write_asciiz (*con_write_asciiz)
|
|
|
|
#define con_write_string (*con_write_string)
|
|
|
|
#define con_printf (*con_printf)
|
|
|
|
#define con_get_flags (*con_get_flags)
|
|
|
|
#define con_set_flags (*con_set_flags)
|
|
|
|
#define con_get_font_height (*con_get_font_height)
|
|
|
|
#define con_get_cursor_height (*con_get_cursor_height)
|
|
|
|
#define con_set_cursor_height (*con_set_cursor_height)
|
|
|
|
#define con_getch (*con_getch)
|
|
|
|
#define con_getch2 (*con_getch2)
|
|
|
|
#define con_kbhit (*con_kbhit)
|
|
|
|
#define con_gets (*con_gets)
|
|
|
|
#define con_gets2_callback (* con_gets2_callback)
|
|
|
|
#define con_gets2 (*con_gets2)
|
|
|
|
#define con_cls (*con_cls)
|
|
|
|
#define con_get_cursor_pos (*con_get_cursor_pos)
|
|
|
|
#define con_set_cursor_pos (*con_set_cursor_pos)
|
|
|
|
|
|
|
|
#define printf con_printf
|
|
|
|
#define gets con_gets
|
|
|
|
#define getch con_getch2
|
2008-12-14 12:55:46 +01:00
|
|
|
|
2010-10-07 15:43:56 +02:00
|
|
|
#include "cmd/cmd_about.c"
|
|
|
|
#include "cmd/cmd_help.c"
|
|
|
|
#include "cmd/cmd_ver.c"
|
|
|
|
#include "cmd/cmd_pwd.c"
|
|
|
|
#include "cmd/cmd_ls.c"
|
2022-04-23 23:37:05 +02:00
|
|
|
#include "cmd/cmd_lsmod.c"
|
2010-10-07 15:43:56 +02:00
|
|
|
#include "cmd/cmd_ps.c"
|
|
|
|
#include "cmd/cmd_kill.c"
|
2021-04-02 00:06:12 +02:00
|
|
|
#include "cmd/cmd_pkill.c"
|
2010-10-07 15:43:56 +02:00
|
|
|
#include "cmd/cmd_echo.c"
|
|
|
|
#include "cmd/cmd_date.c"
|
|
|
|
#include "cmd/cmd_exit.c"
|
|
|
|
#include "cmd/cmd_cd.c"
|
2012-06-04 14:54:51 +02:00
|
|
|
#include "cmd/cmd_free.c"
|
2010-10-07 15:43:56 +02:00
|
|
|
#include "cmd/cmd_reboot.c"
|
|
|
|
#include "cmd/cmd_mkdir.c"
|
|
|
|
#include "cmd/cmd_rmdir.c"
|
|
|
|
#include "cmd/cmd_rm.c"
|
|
|
|
#include "cmd/cmd_touch.c"
|
|
|
|
#include "cmd/cmd_alias.c"
|
|
|
|
#include "cmd/cmd_more.c"
|
|
|
|
#include "cmd/cmd_clear.c"
|
|
|
|
#include "cmd/cmd_sleep.c"
|
2010-10-21 06:37:59 +02:00
|
|
|
#include "cmd/cmd_shutdown.c"
|
2010-10-21 01:58:36 +02:00
|
|
|
#include "cmd/cmd_uptime.c"
|
2012-06-04 14:54:51 +02:00
|
|
|
#include "cmd/cmd_history.c"
|
2021-06-12 23:34:41 +02:00
|
|
|
#include "cmd/cmd_kfetch.c"
|
2013-02-16 12:25:37 +01:00
|
|
|
#include "cmd/cmd_cp.c"
|
2020-04-16 23:50:49 +02:00
|
|
|
#include "cmd/cmd_mv.c"
|
|
|
|
#include "cmd/cmd_ren.c"
|
2017-01-06 17:12:57 +01:00
|
|
|
#include "cmd/cmd_waitfor.c"
|
2008-12-14 12:55:46 +01:00
|
|
|
|
2010-10-07 15:43:56 +02:00
|
|
|
#include "modules/module_command.c"
|
2012-03-23 19:53:16 +01:00
|
|
|
#include "modules/module_program_console.c"
|
2010-10-07 15:43:56 +02:00
|
|
|
#include "modules/module_program.c"
|
|
|
|
#include "modules/module_script.c"
|
|
|
|
#include "modules/module_executable.c"
|
|
|
|
#include "modules/module_alias.c"
|
2013-02-16 12:25:37 +01:00
|
|
|
#include "modules/module_parameters.c"
|
2008-12-14 12:55:46 +01:00
|
|
|
|
2021-06-12 23:34:41 +02:00
|
|
|
//typedef unsigned int size_t;
|
2020-04-16 23:50:49 +02:00
|
|
|
|