⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 esh.c

📁 VRTX 商用嵌入式实时操作系统
💻 C
字号:
/***************************************************************************
*
*               Copyright (c) 1992 READY SYSTEMS CORPORATION.
*
*       All rights reserved. READY SYSTEMS' source code is an unpublished
*       work and the use of a copyright notice does not imply otherwise.
*       This source code contains confidential, trade secret material of
*       READY SYSTEMS. Any attempt or participation in deciphering, decoding,
*       reverse engineering or in any way altering the source code is
*       strictly prohibited, unless the prior written consent of
*       READY SYSTEMS is obtained.
*
*
*       Module Name:            %M%
*
*       Identification:         %Z% %I% %M%
*
*       Date:                   %G%  %U%
*
****************************************************************************
*/

#include <syskind.h>
#include <esh.h>
#include <vrtxil.h>



 extern void esh_alias(); 
 extern void esh_exit(); 
 extern void esh_echo(); 
 extern void esh_help(); 
 extern void esh_sleep(); 
 extern void esh_unalias(); 
 extern void esh_setenv(); 
 extern void esh_unsetenv(); 
 extern void esh_printenv(); 
 extern void esh_clearenv(); 
 extern void esh_history(); 


const command esh_commands[] = {
	"alias",  esh_alias,  0,  "Define an abbreviation for a command",
	"exit",  esh_exit,  NO_FORK,  "Exit the shell",
	"echo",  esh_echo,  0,  "Echo arguments",
	"help",  esh_help,  0,  "Help for built-in-commands",
	"sleep",  esh_sleep,  0,  "Sleep for specified number of seconds",
	"unalias",  esh_unalias,  0,  "Remove an alias",
	"setenv",  esh_setenv,  0,  "Set/Display environment variables",
	"unsetenv",  esh_unsetenv,  0,  "Unset environment variable",
	"printenv",  esh_printenv,  0,  "Print environment variables",
	"clearenv",  esh_clearenv,  0,  "Unset all environment variables",
	"history",  esh_history,  0,  "Display the history list",
    	 0, 0, 0, 0
};

const int esh_num_history=25;
extern void esh_sc_tecreate();
void (* const ESH_sc_tecreate)() = (void (*)())sc_tecreate;

extern int dummy_open_console();
int (* const esh_open_console)()=(int (*)())dummy_open_console;
extern int dummy_init_console();
int (* const esh_init_console)()=(int (*)())dummy_init_console;
extern int dummy_close_console();
int (* const esh_close_console)()=(int (*)())dummy_close_console;
extern int dummy_remove_console();
int (* const esh_remove_console)()=(int (*)())dummy_remove_console;
extern int dummy_change_device();
int (* const esh_change_device)()=(int (*)())dummy_change_device;
extern int esh_tcreate();
int (* const esh_task_create)()=(int (*)())esh_tcreate;
extern int esh_tdelete();
int (* const esh_task_delete)()=(int (*)())esh_tdelete;

sys_initialize_esh()
{
int err;
extern void esh();
extern int opt_ind;
extern int opt_err;

   opt_ind = 1;
   opt_err = 1;

   sc_tcreate(esh, 0, 1, &err);
   if(err)
     (*sys_message_handler)(USECONSOLE | VSYSLIBID | FATALTYPE | SYS_EESH, err); 


   (*sys_message_handler)(USECONSOLE | VSYSLIBID | INFOTYPE | SYS_MESHINIT, NULL); 

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -