From dd0462c78f5ab6fdf4e7f543db08eb7833bc7d9a Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Tue, 18 Feb 2003 20:31:04 +0000 Subject: [PATCH] Added description for the hand-made finite state machine. --- ext/mbstring/mbstring.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 131dba9c1e..3f9558efc7 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2691,6 +2691,17 @@ static int _php_mbstr_parse_mail_headers(HashTable *ht, const char *str, size_t ps = str; icnt = str_len; + /* + * C o n t e n t - T y p e : t e x t / h t m l \r\n + * ^ ^^^^^^^^^^^^^^^^^^^^^ ^^^ ^^^^^^^^^^^^^^^^^ ^^^^ + * state 0 1 2 3 + * + * C o n t e n t - T y p e : t e x t / h t m l \r\n + * ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^ + * crlf_state -1 0 1 -1 + * + */ + while (icnt > 0) { switch (*ps) { case ':': -- 2.50.1