📄 cmd.h
字号:
/****************************************************************************** SCT, Serial Communication Tracer ** CopyRight (C) Bruce (ZhaoFei), zhaofei@zflogic.com* http://www.zflogic.com** All sources in the package are copyrighted under the the terms of GNU GPL****************************************************************************** * This program is free software; you can redistribute it and/or modify* it under the terms of the GNU General Public License as published by* the Free Software Foundation; either version 2 of the License, or* (at your option) any later version.** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the* GNU General Public License for more details.** You should have received a copy of the GNU General Public License* along with this program; if not, write to the Free Software* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA** If you intend to use this pragram commercially on a regular basis you* must contact the author for an appropriate donation.* ***************************************************************************/#ifndef CMD_H#define CMD_H #ifndef CMD_L#define CMD_L extern#endif#define MAXCMD 256 typedef void ( * CMD_ROUTINE)(int parc, char *parv[]);struct cmd_t { char *cmd; //cmd==NULL to end of cmd table char *alias; //alias for cmd CMD_ROUTINE func; //pointer to command routine char *usage; //usage for the command};CMD_L void parse(int *parc, char *parv[], char *src,int npar);CMD_L void parseex(int *parc,char *parv[],char *src,int maxpar,char separator);CMD_L bool docmd(char *prompt,struct cmd_t *cmdtbl);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -