Browse Source

Rename strange SHELL_STATE_READY to SHELL_STATE_OK

git-svn-id: https://klish.googlecode.com/svn/trunk@393 0eaa4687-2ee9-07dd-09d9-bcdd2d2dd5fb
Serj Kalichev 13 years ago
parent
commit
4e1e45cde8

+ 1 - 1
clish/shell.h

@@ -32,7 +32,7 @@ typedef struct clish_shell_s clish_shell_t;
 
 typedef enum {
 	SHELL_STATE_INITIALISING,
-	SHELL_STATE_READY,
+	SHELL_STATE_OK,
 	SHELL_STATE_HELPING,
 	SHELL_STATE_SCRIPT_ERROR,/* Script execution error */
 	SHELL_STATE_EOF, /* EOF of input stream */

+ 3 - 3
clish/shell/private.h

@@ -35,7 +35,7 @@ typedef struct {
 	char *viewid;
 } clish_shell_pwd_t;
 
-/* 
+/*
  * The context structure
  */
 struct clish_context_s {
@@ -86,11 +86,11 @@ clish_shell_iterator_init(clish_shell_iterator_t * iter,
  */
 const clish_command_t *clish_shell_find_next_completion(const clish_shell_t *
 	instance, const char *line, clish_shell_iterator_t * iter);
-/** 
+/**
  * Pop the current file handle from the stack of file handles, shutting
  * the file down and freeing any associated memory. The next file handle
  * in the stack becomes associated with the input stream for this shell.
- * 
+ *
  * \return
  * BOOL_TRUE - the current file handle has been replaced.
  * BOOL_FALSE - there is only one handle on the stack which cannot be replaced.

+ 1 - 1
clish/shell/shell_command_generator.c

@@ -175,7 +175,7 @@ char *clish_shell_word_generator(clish_shell_t * this,
 	}
 	/* reset the state from a help perspective */
 	if (0 == state)
-		this->state = SHELL_STATE_READY;
+		this->state = SHELL_STATE_OK;
 
 	return result;
 }

+ 2 - 2
clish/shell/shell_help.c

@@ -107,7 +107,7 @@ void clish_shell_help(clish_shell_t * this, const char *line)
 				clish_command_help(cmd, this->viewid, line);
 			break;
 		}
-		case SHELL_STATE_READY:
+		case SHELL_STATE_OK:
 		case SHELL_STATE_SCRIPT_ERROR:
 		case SHELL_STATE_SYNTAX_ERROR:
 			/* get the command to provide help */
@@ -123,7 +123,7 @@ void clish_shell_help(clish_shell_t * this, const char *line)
 	}
 	/* update the state */
 	if (this->state == SHELL_STATE_HELPING)
-		this->state = SHELL_STATE_READY;
+		this->state = SHELL_STATE_OK;
 	else
 		this->state = SHELL_STATE_HELPING;
 }

+ 1 - 1
clish/shell/shell_tinyrl.c

@@ -361,7 +361,7 @@ bool_t clish_shell_execline(clish_shell_t *this, const char *line, char ** out)
 	int lerror = 0;
 
 	assert(this);
-	this->state = SHELL_STATE_READY;
+	this->state = SHELL_STATE_OK;
 	if (!line && !tinyrl__get_istream(this->tinyrl)) {
 		this->state = SHELL_STATE_SYSTEM_ERROR;
 		return BOOL_FALSE;