Browse Source

Stylistic changes

git-svn-id: https://klish.googlecode.com/svn/trunk@394 0eaa4687-2ee9-07dd-09d9-bcdd2d2dd5fb
Serj Kalichev 13 years ago
parent
commit
3e898ce777
3 changed files with 10 additions and 14 deletions
  1. 4 4
      clish/shell/shell_tinyrl.c
  2. 4 6
      tinyrl/tinyrl.c
  3. 2 4
      tinyrl/tinyrl.h

+ 4 - 4
clish/shell/shell_tinyrl.c

@@ -305,17 +305,17 @@ static void clish_shell_tinyrl_init(tinyrl_t * this)
 	bool_t status;
 	bool_t status;
 	/* bind the '?' key to the help function */
 	/* bind the '?' key to the help function */
 	status = tinyrl_bind_key(this, '?', clish_shell_tinyrl_key_help);
 	status = tinyrl_bind_key(this, '?', clish_shell_tinyrl_key_help);
-	assert(BOOL_TRUE == status);
+	assert(status);
 
 
 	/* bind the <RET> key to the help function */
 	/* bind the <RET> key to the help function */
 	status = tinyrl_bind_key(this, '\r', clish_shell_tinyrl_key_enter);
 	status = tinyrl_bind_key(this, '\r', clish_shell_tinyrl_key_enter);
-	assert(BOOL_TRUE == status);
+	assert(status);
 	status = tinyrl_bind_key(this, '\n', clish_shell_tinyrl_key_enter);
 	status = tinyrl_bind_key(this, '\n', clish_shell_tinyrl_key_enter);
-	assert(BOOL_TRUE == status);
+	assert(status);
 
 
 	/* bind the <SPACE> key to auto-complete if necessary */
 	/* bind the <SPACE> key to auto-complete if necessary */
 	status = tinyrl_bind_key(this, ' ', clish_shell_tinyrl_key_space);
 	status = tinyrl_bind_key(this, ' ', clish_shell_tinyrl_key_space);
-	assert(BOOL_TRUE == status);
+	assert(status);
 }
 }
 
 
 /*-------------------------------------------------------- */
 /*-------------------------------------------------------- */

+ 4 - 6
tinyrl/tinyrl.c

@@ -639,9 +639,8 @@ void tinyrl_redisplay(tinyrl_t * this)
 }
 }
 
 
 /*----------------------------------------------------------------------- */
 /*----------------------------------------------------------------------- */
-tinyrl_t *tinyrl_new(FILE * instream,
-		     FILE * outstream,
-		     unsigned stifle, tinyrl_completion_func_t * complete_fn)
+tinyrl_t *tinyrl_new(FILE * instream, FILE * outstream,
+	unsigned stifle, tinyrl_completion_func_t * complete_fn)
 {
 {
 	tinyrl_t *this = NULL;
 	tinyrl_t *this = NULL;
 
 
@@ -1021,9 +1020,8 @@ bool_t tinyrl_bind_key(tinyrl_t * this, int key, tinyrl_key_func_t * fn)
  * more matches. 
  * more matches. 
  */
  */
 char **tinyrl_completion(tinyrl_t * this,
 char **tinyrl_completion(tinyrl_t * this,
-			 const char *line,
-			 unsigned start,
-			 unsigned end, tinyrl_compentry_func_t * entry_func)
+	const char *line, unsigned start, unsigned end,
+	tinyrl_compentry_func_t * entry_func)
 {
 {
 	unsigned state = 0;
 	unsigned state = 0;
 	size_t size = 1;
 	size_t size = 1;

+ 2 - 4
tinyrl/tinyrl.h

@@ -54,13 +54,11 @@ typedef enum {
 
 
 /* virtual methods */
 /* virtual methods */
 typedef char *tinyrl_compentry_func_t(tinyrl_t * instance,
 typedef char *tinyrl_compentry_func_t(tinyrl_t * instance,
-				      const char *text,
-				      unsigned offset, unsigned state);
+	const char *text, unsigned offset, unsigned state);
 typedef int tinyrl_hook_func_t(tinyrl_t * instance);
 typedef int tinyrl_hook_func_t(tinyrl_t * instance);
 
 
 typedef char **tinyrl_completion_func_t(tinyrl_t * instance,
 typedef char **tinyrl_completion_func_t(tinyrl_t * instance,
-					const char *text,
-					unsigned start, unsigned end);
+	const char *text, unsigned start, unsigned end);
 /**
 /**
  * \return
  * \return
  * - BOOL_TRUE if the action associated with the key has
  * - BOOL_TRUE if the action associated with the key has