summaryrefslogtreecommitdiffabout
path: root/kmicromail/libetpan/imap/mailimap_keywords.c
Unidiff
Diffstat (limited to 'kmicromail/libetpan/imap/mailimap_keywords.c') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libetpan/imap/mailimap_keywords.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kmicromail/libetpan/imap/mailimap_keywords.c b/kmicromail/libetpan/imap/mailimap_keywords.c
index b277aed..4ec156e 100644
--- a/kmicromail/libetpan/imap/mailimap_keywords.c
+++ b/kmicromail/libetpan/imap/mailimap_keywords.c
@@ -32,49 +32,49 @@
32/* 32/*
33 * $Id$ 33 * $Id$
34 */ 34 */
35 35
36#include "mailimap_keywords.h" 36#include "mailimap_keywords.h"
37#include "mailimap_types.h" 37#include "mailimap_types.h"
38#include <string.h> 38#include <string.h>
39#include <stdio.h> 39#include <stdio.h>
40 40
41#ifndef UNSTRICT_SYNTAX 41#ifndef UNSTRICT_SYNTAX
42#define UNSTRICT_SYNTAX 42#define UNSTRICT_SYNTAX
43#endif 43#endif
44 44
45struct mailimap_token_value { 45struct mailimap_token_value {
46 int value; 46 int value;
47 const char * str; 47 const char * str;
48}; 48};
49 49
50int mailimap_token_case_insensitive_parse(mailstream * fd, 50int mailimap_token_case_insensitive_parse(mailstream * fd,
51 MMAPString * buffer, 51 MMAPString * buffer,
52 size_t * index, 52 size_t * index,
53 const char * token) 53 const char * token)
54{ 54{
55 int len; 55 int len;
56 int cur_token; 56 size_t cur_token;
57 int r; 57 int r;
58 58
59 cur_token = * index; 59 cur_token = * index;
60 len = strlen(token); 60 len = strlen(token);
61 61
62#ifdef UNSTRICT_SYNTAX 62#ifdef UNSTRICT_SYNTAX
63 r = mailimap_space_parse(fd, buffer, &cur_token); 63 r = mailimap_space_parse(fd, buffer, &cur_token);
64 if ((r != MAILIMAP_NO_ERROR) && (r != MAILIMAP_ERROR_PARSE)) 64 if ((r != MAILIMAP_NO_ERROR) && (r != MAILIMAP_ERROR_PARSE))
65 return r; 65 return r;
66#endif 66#endif
67 67
68 if (strncasecmp(buffer->str + cur_token, token, len) == 0) { 68 if (strncasecmp(buffer->str + cur_token, token, len) == 0) {
69 cur_token += len; 69 cur_token += len;
70 * index = cur_token; 70 * index = cur_token;
71 return MAILIMAP_NO_ERROR; 71 return MAILIMAP_NO_ERROR;
72 } 72 }
73 else 73 else
74 return MAILIMAP_ERROR_PARSE; 74 return MAILIMAP_ERROR_PARSE;
75} 75}
76 76
77 77
78static int is_space_or_tab(char ch) 78static int is_space_or_tab(char ch)
79{ 79{
80 return (ch == ' ') || (ch == '\t'); 80 return (ch == ' ') || (ch == '\t');