From 7f643de26236937cbdcb5553de83f5e100735859 Mon Sep 17 00:00:00 2001
From: Stephan Bosch <stephan.bosch@dovecot.fi>
Date: Wed, 24 Apr 2019 16:22:46 +0200
Subject: [PATCH] lib-sieve: Reformat sieve-lexer.h.

---
 src/lib-sieve/sieve-lexer.h | 55 +++++++++++++++++--------------------
 1 file changed, 25 insertions(+), 30 deletions(-)

diff --git a/src/lib-sieve/sieve-lexer.h b/src/lib-sieve/sieve-lexer.h
index d11bfe3b5..ad88c9bec 100644
--- a/src/lib-sieve/sieve-lexer.h
+++ b/src/lib-sieve/sieve-lexer.h
@@ -25,22 +25,22 @@ enum sieve_token_type {
 	STT_SEMICOLON,
 	STT_COMMA,
 
-	/* These are currently not used in the lexical specification, but a token
-	 * is assigned to these to generate proper error messages (these are
-	 * technically not garbage and possibly part of mistyped but otherwise
-	 * valid tokens).
+	/* These are currently not used in the lexical specification, but a
+	   token is assigned to these to generate proper error messages (these
+	   are technically not garbage and possibly part of mistyped but
+	   otherwise valid tokens).
 	 */
 	STT_SLASH,
 	STT_COLON,
 
 	/* Error tokens */
 	STT_GARBAGE, /* Error reporting deferred to parser */
-	STT_ERROR    /* Lexer is responsible for error, parser won't report additional
-	                errors */
+	STT_ERROR    /* Lexer is responsible for error, parser won't report
+	                additional errors */
 };
 
 /*
- * Lexer object;
+ * Lexer object
  */
 
 struct sieve_lexical_scanner;
@@ -55,9 +55,10 @@ struct sieve_lexer {
 	int token_line;
 };
 
-const struct sieve_lexer *sieve_lexer_create
-	(struct sieve_script *script, struct sieve_error_handler *ehandler,
-		enum sieve_error *error_r);
+const struct sieve_lexer *
+sieve_lexer_create(struct sieve_script *script,
+		   struct sieve_error_handler *ehandler,
+		   enum sieve_error *error_r);
 void sieve_lexer_free(const struct sieve_lexer **lexer);
 
 /*
@@ -70,54 +71,48 @@ void sieve_lexer_skip_token(const struct sieve_lexer *lexer);
  * Token access
  */
 
-static inline enum sieve_token_type sieve_lexer_token_type
-(const struct sieve_lexer *lexer)
+static inline enum sieve_token_type
+sieve_lexer_token_type(const struct sieve_lexer *lexer)
 {
 	return lexer->token_type;
 }
 
-static inline const string_t *sieve_lexer_token_str
-(const struct sieve_lexer *lexer)
+static inline const string_t *
+sieve_lexer_token_str(const struct sieve_lexer *lexer)
 {
-	i_assert(	lexer->token_type == STT_STRING );
+	i_assert(lexer->token_type == STT_STRING);
 
 	return lexer->token_str_value;
 }
 
-static inline const char *sieve_lexer_token_ident
-(const struct sieve_lexer *lexer)
+static inline const char *
+sieve_lexer_token_ident(const struct sieve_lexer *lexer)
 {
-	i_assert(
-		lexer->token_type == STT_TAG ||
-		lexer->token_type == STT_IDENTIFIER);
+	i_assert(lexer->token_type == STT_TAG ||
+		 lexer->token_type == STT_IDENTIFIER);
 
 	return str_c(lexer->token_str_value);
 }
 
-static inline int sieve_lexer_token_int
-(const struct sieve_lexer *lexer)
+static inline int sieve_lexer_token_int(const struct sieve_lexer *lexer)
 {
 	i_assert(lexer->token_type == STT_NUMBER);
 
 	return lexer->token_int_value;
 }
 
-static inline bool sieve_lexer_eof
-(const struct sieve_lexer *lexer)
+static inline bool sieve_lexer_eof(const struct sieve_lexer *lexer)
 {
 	return lexer->token_type == STT_EOF;
 }
 
-static inline int sieve_lexer_token_line
-(const struct sieve_lexer *lexer)
+static inline int sieve_lexer_token_line(const struct sieve_lexer *lexer)
 {
 	return lexer->token_line;
 }
 
-const char *sieve_lexer_token_description
-	(const struct sieve_lexer *lexer);
+const char *sieve_lexer_token_description(const struct sieve_lexer *lexer);
 
-void sieve_lexer_token_print
-	(const struct sieve_lexer *lexer);
+void sieve_lexer_token_print(const struct sieve_lexer *lexer);
 
 #endif
-- 
GitLab