diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-08-14 17:41:47 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-08-14 17:41:47 +0100 |
commit | bc93613db3a49f7b0570eb9b91c5de4b243f9e2c (patch) | |
tree | f56af3cfee81bd5fc248855ac20c50a0a0ecb05b | |
parent | d52fb8edc0b7c9e9a178f9f318f0e163f8d72c02 (diff) | |
download | rspamd-bc93613db3a49f7b0570eb9b91c5de4b243f9e2c.tar.gz rspamd-bc93613db3a49f7b0570eb9b91c5de4b243f9e2c.zip |
Some cleanups.
-rw-r--r-- | src/rcl/rcl_parser.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/rcl/rcl_parser.c b/src/rcl/rcl_parser.c index 36499df65..1c13922dd 100644 --- a/src/rcl/rcl_parser.c +++ b/src/rcl/rcl_parser.c @@ -165,6 +165,12 @@ rspamd_cl_includes_handler (const guchar *data, gsize len, gpointer ud, GError * return TRUE; } +/** + * Return multiplier for a character + * @param c multiplier character + * @param is_bytes if TRUE use 1024 multiplier + * @return multiplier + */ static inline gulong rspamd_cl_lex_num_multiplier (const guchar c, gboolean is_bytes) { const struct { @@ -190,6 +196,12 @@ rspamd_cl_lex_num_multiplier (const guchar c, gboolean is_bytes) { return 1; } + +/** + * Return multiplier for time scaling + * @param c + * @return + */ static inline gdouble rspamd_cl_lex_time_multiplier (const guchar c) { const struct { @@ -213,6 +225,11 @@ rspamd_cl_lex_time_multiplier (const guchar c) { return 1; } +/** + * Return TRUE if a character is a end of an atom + * @param c + * @return + */ static inline gboolean rspamd_cl_lex_is_atom_end (const guchar c) { @@ -1071,6 +1088,8 @@ rspamd_cl_state_machine (struct rspamd_cl_parser *parser, GError **err) parser->state = RSPAMD_RCL_STATE_MACRO; } break; + case RSPAMD_RCL_STATE_MACRO: + break; default: /* TODO: add all states */ return FALSE; |