projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8fe3fb2
)
Removed IsEmptyStr from some loops as its quicker this way (probably).
author
Dave West
<davew@uncensored.citadel.org>
Thu, 23 Aug 2007 09:52:33 +0000
(09:52 +0000)
committer
Dave West
<davew@uncensored.citadel.org>
Thu, 23 Aug 2007 09:52:33 +0000
(09:52 +0000)
citadel/modules/imap/imap_fetch.c
patch
|
blob
|
history
diff --git
a/citadel/modules/imap/imap_fetch.c
b/citadel/modules/imap/imap_fetch.c
index 9f08131dfb91e94d3882ab75d60a23832351f4ee..49818e4387b5de52b4d3513928d7498b96161e32 100644
(file)
--- a/
citadel/modules/imap/imap_fetch.c
+++ b/
citadel/modules/imap/imap_fetch.c
@@
-510,11
+510,11
@@
void imap_strip_headers(char *section) {
if (!strncasecmp(which_fields, "HEADER.FIELDS.NOT", 17))
headers_not = 1;
if (!strncasecmp(which_fields, "HEADER.FIELDS.NOT", 17))
headers_not = 1;
- for (i=0;
!IsEmptyStr(&which_fields[i])
; ++i) {
+ for (i=0;
which_fields[i]
; ++i) {
if (which_fields[i]=='(')
strcpy(which_fields, &which_fields[i+1]);
}
if (which_fields[i]=='(')
strcpy(which_fields, &which_fields[i+1]);
}
- for (i=0;
!IsEmptyStr(&which_fields[i])
; ++i) {
+ for (i=0;
which_fields[i]
; ++i) {
if (which_fields[i]==')') {
which_fields[i] = 0;
break;
if (which_fields[i]==')') {
which_fields[i] = 0;
break;
@@
-1096,7
+1096,7
@@
void imap_handle_macros(char *str) {
int i;
int nest = 0;
int i;
int nest = 0;
- for (i=0;
!IsEmptyStr(&str[i])
; ++i) {
+ for (i=0;
str[i]
; ++i) {
if (str[i]=='(') ++nest;
if (str[i]=='[') ++nest;
if (str[i]=='<') ++nest;
if (str[i]=='(') ++nest;
if (str[i]=='[') ++nest;
if (str[i]=='<') ++nest;
@@
-1142,7
+1142,7
@@
int imap_extract_data_items(char **argv, char *items) {
long initial_len;
/* Convert all whitespace to ordinary space characters. */
long initial_len;
/* Convert all whitespace to ordinary space characters. */
- for (i=0;
!IsEmptyStr(&items[i])
; ++i) {
+ for (i=0;
items[i]
; ++i) {
if (isspace(items[i])) items[i]=' ';
}
if (isspace(items[i])) items[i]=' ';
}