Browse Source

Rename clish_pargv_status_t to clish_pargv_status_e

Serj Kalichev 8 years ago
parent
commit
3b893bbea6
5 changed files with 12 additions and 12 deletions
  1. 1 1
      clish/pargv.h
  2. 2 2
      clish/shell/private.h
  3. 1 1
      clish/shell/shell_help.c
  4. 4 4
      clish/shell/shell_parse.c
  5. 4 4
      clish/shell/shell_tinyrl.c

+ 1 - 1
clish/pargv.h

@@ -19,7 +19,7 @@ typedef enum {
 	CLISH_BAD_CMD,
 	CLISH_BAD_PARAM,
 	CLISH_BAD_HISTORY
-} clish_pargv_status_t;
+} clish_pargv_status_e;
 
 typedef struct clish_pargv_s clish_pargv_t;
 typedef struct clish_parg_s clish_parg_t;

+ 2 - 2
clish/shell/private.h

@@ -121,9 +121,9 @@ int clish_shell_pop_file(clish_shell_t * instance);
 
 clish_view_t *clish_shell_find_view(clish_shell_t * instance, const char *name);
 void clish_shell_insert_view(clish_shell_t * instance, clish_view_t * view);
-clish_pargv_status_t clish_shell_parse(clish_shell_t * instance,
+clish_pargv_status_e clish_shell_parse(clish_shell_t * instance,
 	const char *line, const clish_command_t ** cmd, clish_pargv_t ** pargv);
-clish_pargv_status_t clish_shell_parse_pargv(clish_pargv_t *pargv,
+clish_pargv_status_e clish_shell_parse_pargv(clish_pargv_t *pargv,
 	const clish_command_t *cmd,
 	void *context,
 	clish_paramv_t *paramv,

+ 1 - 1
clish/shell/shell_help.c

@@ -48,7 +48,7 @@ static int available_params(clish_shell_t *this,
 	clish_pargv_t *completion, *pargv;
 	unsigned i;
 	unsigned cnt = 0;
-	clish_pargv_status_t status = CLISH_LINE_OK;
+	clish_pargv_status_e status = CLISH_LINE_OK;
 	clish_context_t context;
 
 	/* Empty line */

+ 4 - 4
clish/shell/shell_parse.c

@@ -10,11 +10,11 @@
 #include "private.h"
 
 /*----------------------------------------------------------- */
-clish_pargv_status_t clish_shell_parse(
+clish_pargv_status_e clish_shell_parse(
 	clish_shell_t *this, const char *line,
 	const clish_command_t **ret_cmd, clish_pargv_t **pargv)
 {
-	clish_pargv_status_t result = CLISH_BAD_CMD;
+	clish_pargv_status_e result = CLISH_BAD_CMD;
 	clish_context_t context;
 	const clish_command_t *cmd;
 	lub_argv_t *argv = NULL;
@@ -67,7 +67,7 @@ static bool_t line_test(const clish_param_t *param, void *context)
 }
 
 /*--------------------------------------------------------- */
-clish_pargv_status_t clish_shell_parse_pargv(clish_pargv_t *pargv,
+clish_pargv_status_e clish_shell_parse_pargv(clish_pargv_t *pargv,
 	const clish_command_t *cmd,
 	void *context,
 	clish_paramv_t *paramv,
@@ -79,7 +79,7 @@ clish_pargv_status_t clish_shell_parse_pargv(clish_pargv_t *pargv,
 	unsigned nopt_index = 0;
 	clish_param_t *nopt_param = NULL;
 	unsigned i;
-	clish_pargv_status_t retval;
+	clish_pargv_status_e retval;
 	unsigned paramc = clish_paramv__get_count(paramv);
 	int up_level = 0; /* Is it a first level of param nesting? */
 

+ 4 - 4
clish/shell/shell_tinyrl.c

@@ -70,9 +70,9 @@ static bool_t clish_shell_tinyrl_key_help(tinyrl_t *this, int key)
 /*
  * Expand the current line with any history substitutions
  */
-static clish_pargv_status_t clish_shell_tinyrl_expand(tinyrl_t *this)
+static clish_pargv_status_e clish_shell_tinyrl_expand(tinyrl_t *this)
 {
-	clish_pargv_status_t status = CLISH_LINE_OK;
+	clish_pargv_status_e status = CLISH_LINE_OK;
 #if 0
 	int rtn;
 	char *buffer;
@@ -153,7 +153,7 @@ static bool_t clish_shell_tinyrl_key_space(tinyrl_t *this, int key)
 	clish_context_t *context = tinyrl__get_context(this);
 	clish_shell_t *shell = clish_context__get_shell(context);
 	const char *line = tinyrl__get_line(this);
-	clish_pargv_status_t arg_status;
+	clish_pargv_status_e arg_status;
 	const clish_command_t *cmd = NULL;
 	clish_pargv_t *pargv = NULL;
 
@@ -270,7 +270,7 @@ static bool_t clish_shell_tinyrl_key_enter(tinyrl_t *this, int key)
 		}
 	}
 	if (cmd) {
-		clish_pargv_status_t arg_status;
+		clish_pargv_status_e arg_status;
 		tinyrl_multi_crlf(this);
 		/* we've got a command so check the syntax */
 		arg_status = clish_shell_parse(shell,