📄 parse_com_line.cc
字号:
/* parse_com_line.cc */#ifdef sgi #include <stdio.h> #include <string.h> #include <ctype.h> #include "parse_com_line.h" #include "cmdtokens.h"#else extern "C" { #include <stdio.h> #include <string.h> #include <ctype.h> #include "parse_com_line.h" #include "cmdtokens.h" }#endifint parse_com_line( char line[LINE_LEN] )/******************************************************************************//* Name: parse_com_line *//* Function: Parse the command line *//* Copyright: (C) 1994, TSRI *//*----------------------------------------------------------------------------*//* Author: Garrett Morris, The Scripps Research Institute *//* Date: 16/01/93 *//*----------------------------------------------------------------------------*//* Inputs: line *//* Returns: integer token describing the command found. *//* Globals: none. *//*----------------------------------------------------------------------------*//* Modification Record *//* Date Inits Comments *//* 06/09/95 RSH Fixed bug *//* 16/01/93 GMM Entered code. *//******************************************************************************/{ int i, token = COM_NULL ; char c[4]; for (i=0; i<4; i++) c[i] = (char)tolower( (int)line[i] ); if ((c[0]=='\n')||(c[0]=='\0')) { token = COM_NULL; } else if ( (strncmp(c,"stop",4)==0) || (strncmp(c,"exit",4)==0) || (strncmp(c,"quit",4)==0) ) { token = COM_STOP; } else if (strncmp(c,"eval",4)==0) { token = COM_EVAL; } else if (strncmp(c,"outc",4)==0) { token = COM_OUTC; } else if (strncmp(c,"oute",4)==0) { token = COM_OUTE; } else if (strncmp(c,"traj",4)==0) { token = COM_TRJ; } else if ( (strncmp(c,"epdb",4)==0) || (strncmp(c,"ener",4)==0) ) { token = COM_EPDB; } return(token);}/* EOF */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -