aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-04-12 18:12:11 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-04-12 18:24:46 +0100
commit00c74019f4d45ad41696e1c4f96be56d66cb4cce (patch)
tree9486ba49b317264b3bf18f723c54677180b2a03b
parent9d0063befaabefe185084fdb1696c86cf1112345 (diff)
imap: Moved utility functions to end of imap.c (Part 3/3)
Moved imap_is_bchar() be with the other utility based functions.
-rw-r--r--lib/imap.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/lib/imap.c b/lib/imap.c
index 401779916..2a9633334 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -1935,44 +1935,6 @@ static CURLcode imap_disconnect(struct connectdata *conn, bool dead_connection)
return CURLE_OK;
}
-/***********************************************************************
- *
- * imap_is_bchar()
- *
- * Portable test of whether the specified char is a "bchar" as defined in the
- * grammar of RFC-5092.
- */
-static bool imap_is_bchar(char ch)
-{
- switch(ch) {
- /* bchar */
- case ':': case '@': case '/':
- /* bchar -> achar */
- case '&': case '=':
- /* bchar -> achar -> uchar -> unreserved */
- case '0': case '1': case '2': case '3': case '4': case '5': case '6':
- case '7': case '8': case '9':
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G':
- case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N':
- case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U':
- case 'V': case 'W': case 'X': case 'Y': case 'Z':
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g':
- case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
- case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u':
- case 'v': case 'w': case 'x': case 'y': case 'z':
- case '-': case '.': case '_': case '~':
- /* bchar -> achar -> uchar -> sub-delims-sh */
- case '!': case '$': case '\'': case '(': case ')': case '*':
- case '+': case ',':
- /* bchar -> achar -> uchar -> pct-encoded */
- case '%': /* HEXDIG chars are already included above */
- return true;
-
- default:
- return false;
- }
-}
-
/* Call this when the DO phase has completed */
static CURLcode imap_dophase_done(struct connectdata *conn, bool connected)
{
@@ -2187,6 +2149,44 @@ static char *imap_atom(const char *str)
/***********************************************************************
*
+ * imap_is_bchar()
+ *
+ * Portable test of whether the specified char is a "bchar" as defined in the
+ * grammar of RFC-5092.
+ */
+static bool imap_is_bchar(char ch)
+{
+ switch(ch) {
+ /* bchar */
+ case ':': case '@': case '/':
+ /* bchar -> achar */
+ case '&': case '=':
+ /* bchar -> achar -> uchar -> unreserved */
+ case '0': case '1': case '2': case '3': case '4': case '5': case '6':
+ case '7': case '8': case '9':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G':
+ case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N':
+ case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U':
+ case 'V': case 'W': case 'X': case 'Y': case 'Z':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g':
+ case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
+ case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u':
+ case 'v': case 'w': case 'x': case 'y': case 'z':
+ case '-': case '.': case '_': case '~':
+ /* bchar -> achar -> uchar -> sub-delims-sh */
+ case '!': case '$': case '\'': case '(': case ')': case '*':
+ case '+': case ',':
+ /* bchar -> achar -> uchar -> pct-encoded */
+ case '%': /* HEXDIG chars are already included above */
+ return true;
+
+ default:
+ return false;
+ }
+}
+
+/***********************************************************************
+ *
* imap_parse_url_path()
*
* Parse the URL path into separate path components.