diff options
| author | FreeArtMan <dos21h@gmail.com> | 2019-08-17 13:48:50 +0100 | 
|---|---|---|
| committer | FreeArtMan <dos21h@gmail.com> | 2019-08-17 13:48:50 +0100 | 
| commit | 333addeac3d296a6a24802c329ef75c96263d61e (patch) | |
| tree | d4714f964964d2c9fbb7e13cbae9f18737a99960 | |
| parent | 700b5bc2b24bf9fd8e69f0586739c692be0dc2cb (diff) | |
| download | ihe-333addeac3d296a6a24802c329ef75c96263d61e.tar.gz ihe-333addeac3d296a6a24802c329ef75c96263d61e.zip  | |
Disabled space token generation
| -rw-r--r-- | cmd/cmd_open.c | 8 | ||||
| -rw-r--r-- | ihe.c | 30 | ||||
| -rw-r--r-- | ihe.h | 1 | ||||
| -rw-r--r-- | libcmd/cmd_parse.c | 2 | ||||
| -rw-r--r-- | libcmd/cmd_parse.ragel | 2 | 
5 files changed, 34 insertions, 9 deletions
diff --git a/cmd/cmd_open.c b/cmd/cmd_open.c index bbdfc48..6ecfa8e 100644 --- a/cmd/cmd_open.c +++ b/cmd/cmd_open.c @@ -21,7 +21,7 @@ int c_open(  cmd_arg_t *arg  )  	if ( argc != 1 )  	{ -		printf("Neeed one argument\n"); +		printf("Neeed one argument %d\n",argc);  		return -1;  	} @@ -37,4 +37,10 @@ int c_open(  cmd_arg_t *arg  )  	return 0; +} + +int h_open( cmd_arg_t *arg ) +{ +	printf("[FILENAME] - open file"); +	return 0;  }
\ No newline at end of file @@ -282,13 +282,31 @@ int c_quit(  cmd_arg_t *arg  )  } -int c_help(  cmd_arg_t *arg  ) +int c_help(  cmd_arg_t *args  )  { -	int i = 0; -	printf("Command list\n"); -	while ( tab[i].cmd != NULL ) +	int i; +	cmd_table_t *iter = &tab[0]; +	//printf("0\n"); +	i = 0; +	while(iter[i].cmd != NULL)  	{ -		printf("%s - \n", tab[i].cmd); +		 +		printf("%s ", iter[i].cmd); +		if (iter[i].clb) +		{ +			//printf("CLB "); +		} +		if (iter[i].pre) +		{ +			//printf("PRE "); +		} +		if (iter[i].hlp) +		{ +			//printf("HLP "); +			iter[i].hlp(NULL); +		} + +		printf("\n");  		i++;  	}  	return 0; @@ -396,7 +414,7 @@ cmd_table_t tab[] = {  	//{"quit",      c_quit},  	{"help",      c_help,  NULL, NULL, NULL},  	{"?",         c_help,  NULL, NULL, NULL}, -	{"open",      c_open,  NULL, NULL, NULL}, +	{"open",      c_open,  h_open, NULL, NULL},  	{"close",     c_close,  NULL, NULL, NULL},  	{"info",      c_info,  NULL, NULL, NULL},  	{"seek",      c_seek,  NULL, NULL, NULL}, @@ -27,6 +27,7 @@ int c_flags( cmd_arg_t *arg );  int c_info( cmd_arg_t *arg );  int c_ls( cmd_arg_t *arg );  int c_open( cmd_arg_t *arg ); +int h_open( cmd_arg_t *arg );  int c_pos( cmd_arg_t *arg );  int c_pwd( cmd_arg_t *arg );  int c_read( cmd_arg_t *arg ); diff --git a/libcmd/cmd_parse.c b/libcmd/cmd_parse.c index 0377e1d..a45412c 100644 --- a/libcmd/cmd_parse.c +++ b/libcmd/cmd_parse.c @@ -244,7 +244,7 @@ _eof_trans:  	break;  	case 6:  #line 57 "cmd_parse.ragel" -	{te = p+1;{PR_TK_DBG("sp   = ");TADD(CMDT_SP,   ts,te,te-ts);}} +	{te = p+1;{PR_TK_DBG("sp   = ");/*TADD(CMDT_SP,   ts,te,te-ts);*/}}  	break;  	case 7:  #line 52 "cmd_parse.ragel" diff --git a/libcmd/cmd_parse.ragel b/libcmd/cmd_parse.ragel index 0775802..280d483 100644 --- a/libcmd/cmd_parse.ragel +++ b/libcmd/cmd_parse.ragel @@ -54,7 +54,7 @@ int print_token( char *s, char *e, int tok)  		binary  		{PR_TK_DBG("bin  = ");TADD(CMDT_BIN,  ts,te,te-ts);};  		quoted_string 	{PR_TK_DBG("qstr = ");TADD(CMDT_QSTR, ts,te,te-ts);};  		word    		{PR_TK_DBG("word = ");TADD(CMDT_WORD, ts,te,te-ts);}; -		sp      		{PR_TK_DBG("sp   = ");TADD(CMDT_SP,   ts,te,te-ts);}; +		sp      		{PR_TK_DBG("sp   = ");/*TADD(CMDT_SP,   ts,te,te-ts);*/};  		float  		    {PR_TK_DBG("float= ");TADD(CMDT_FLOAT, ts,te,te-ts);};  	*|;  | 
