db = bf->priv->file_db;
query = e_data_book_view_get_card_query (book_view);
- if ( ! strcmp (query, "(contains \"x-evolution-any-field\" \"\")")) {
+ if ( !strcmp (query, "(contains \"x-evolution-any-field\" \"\")")) {
e_data_book_view_notify_status_message (book_view, _("Loading..."));
allcontacts = TRUE;
} else {
g_assert (backend != NULL);
g_assert (E_IS_BOOK_BACKEND_FILE (backend));
- if (! e_book_backend_construct (E_BOOK_BACKEND (backend)))
+ if (!e_book_backend_construct (E_BOOK_BACKEND (backend)))
return FALSE;
return TRUE;
backend = g_object_new (E_TYPE_BOOK_BACKEND_FILE, NULL);
- if (! e_book_backend_file_construct (backend)) {
+ if (!e_book_backend_file_construct (backend)) {
g_object_unref (backend);
return NULL;
EBookBackend *e_book_backend_file_new (void);
GType e_book_backend_file_get_type (void);
-#endif /* ! __E_BOOK_BACKEND_FILE_H__ */
+#endif /* __E_BOOK_BACKEND_FILE_H__ */
}
}
- if (! ims_matched)
+ if (!ims_matched)
added_ims = g_list_append (added_ims, im1);
}
if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION)
status = e_gw_connection_get_address_book_id (priv->cnc, priv->book_name, &id, &is_writable);
if (status == E_GW_CONNECTION_STATUS_OK) {
- if ( (id == NULL) && !priv->only_if_exists ) {
+ if ((id == NULL) && !priv->only_if_exists) {
status = e_gw_connection_create_book (priv->cnc, priv->book_name, &id);
is_writable = TRUE;
if (status != E_GW_CONNECTION_STATUS_OK ) {
EBookBackend *e_book_backend_groupwise_new (void);
GType e_book_backend_groupwise_get_type (void);
-#endif /* ! __E_BOOK_BACKEND_GROUPWISE_H__ */
+#endif /* __E_BOOK_BACKEND_GROUPWISE_H__ */
g_assert (backend != NULL);
g_assert (E_IS_BOOK_BACKEND_LDAP (backend));
- if (! e_book_backend_construct (E_BOOK_BACKEND (backend)))
+ if (!e_book_backend_construct (E_BOOK_BACKEND (backend)))
return FALSE;
return TRUE;
backend = g_object_new (E_TYPE_BOOK_BACKEND_LDAP, NULL);
- if (! e_book_backend_ldap_construct (backend)) {
+ if (!e_book_backend_ldap_construct (backend)) {
g_object_unref (backend);
return NULL;
}
EBookBackend *e_book_backend_ldap_new (void);
GType e_book_backend_ldap_get_type (void);
-#endif /* ! __E_BOOK_BACKEND_LDAP_H__ */
+#endif /* __E_BOOK_BACKEND_LDAP_H__ */
#ifndef LDAP_INSUFFICIENT_ACCESS
#define LDAP_INSUFFICIENT_ACCESS 0x32
#endif
-
+
#endif
#define LDAP_SCHERR_OUTOFMEM 1
kind = TK_QDSTRING;
(*sp)++;
p = *sp;
- while ( **sp != '\'' && **sp != '\0' )
+ while (**sp != '\'' && **sp != '\0')
(*sp)++;
- if ( **sp == '\'' ) {
+ if (**sp == '\'') {
q = *sp;
res = LDAP_MALLOC(q-p+1);
- if ( !res ) {
+ if (!res) {
kind = TK_OUTOFMEM;
} else {
strncpy(res,p,q-p);
(*sp)++;
q = *sp;
res = LDAP_MALLOC(q-p+1);
- if ( !res ) {
+ if (!res) {
kind = TK_OUTOFMEM;
} else {
strncpy(res,p,q-p);
gint quoted = 0;
/* Netscape puts the SYNTAX value in quotes (incorrectly) */
- if ( flags & LDAP_SCHEMA_ALLOW_QUOTED && **sp == '\'' ) {
+ if (flags & LDAP_SCHEMA_ALLOW_QUOTED && **sp == '\'') {
quoted = 1;
(*sp)++;
start++;
}
/* Each iteration of this loop gets one decimal string */
while (**sp) {
- if ( !LDAP_DIGIT(**sp) ) {
+ if (!LDAP_DIGIT(**sp)) {
/*
* Initial gchar is not a digit or gchar after dot is
* not a digit
return NULL;
}
(*sp)++;
- while ( LDAP_DIGIT(**sp) )
+ while (LDAP_DIGIT(**sp))
(*sp)++;
- if ( **sp != '.' )
+ if (**sp != '.')
break;
/* Otherwise, gobble the dot and loop again */
(*sp)++;
}
/* Now *sp points at the gchar past the numericoid. Perfect. */
len = *sp - start;
- if ( flags & LDAP_SCHEMA_ALLOW_QUOTED && quoted ) {
- if ( **sp == '\'' ) {
+ if (flags & LDAP_SCHEMA_ALLOW_QUOTED && quoted) {
+ if (**sp == '\'') {
(*sp)++;
} else {
*code = LDAP_SCHERR_UNEXPTOKEN;
parse_whsp(sp);
kind = get_token(sp,&sval);
- if ( kind == TK_LEFTPAREN ) {
+ if (kind == TK_LEFTPAREN) {
/* Let's presume there will be at least 2 entries */
size = 3;
res = LDAP_CALLOC(3,sizeof(gchar *));
- if ( !res ) {
+ if (!res) {
*code = LDAP_SCHERR_OUTOFMEM;
return NULL;
}
while (1) {
parse_whsp(sp);
kind = get_token(sp,&sval);
- if ( kind == TK_RIGHTPAREN )
+ if (kind == TK_RIGHTPAREN)
break;
- if ( kind == TK_QDESCR ) {
- if ( pos == size-2 ) {
+ if (kind == TK_QDESCR) {
+ if (pos == size-2) {
size++;
res1 = LDAP_REALLOC(res,size*sizeof(gchar *));
- if ( !res1 ) {
+ if (!res1) {
LDAP_VFREE(res);
LDAP_FREE(sval);
*code = LDAP_SCHERR_OUTOFMEM;
}
parse_whsp(sp);
return(res);
- } else if ( kind == TK_QDESCR ) {
+ } else if (kind == TK_QDESCR) {
res = LDAP_CALLOC(2,sizeof(gchar *));
- if ( !res ) {
+ if (!res) {
*code = LDAP_SCHERR_OUTOFMEM;
return NULL;
}
*/
parse_whsp(sp);
kind = get_token(sp,&sval);
- if ( kind == TK_LEFTPAREN ) {
+ if (kind == TK_LEFTPAREN) {
/* Let's presume there will be at least 2 entries */
size = 3;
res = LDAP_CALLOC(3,sizeof(gchar *));
- if ( !res ) {
+ if (!res) {
*code = LDAP_SCHERR_OUTOFMEM;
return NULL;
}
parse_whsp(sp);
while (1) {
kind = get_token(sp,&sval);
- if ( kind == TK_RIGHTPAREN )
+ if (kind == TK_RIGHTPAREN)
break;
- if ( kind == TK_DOLLAR ) {
+ if (kind == TK_DOLLAR) {
parse_whsp(sp);
kind = get_token(sp,&sval);
if ( kind == TK_BAREWORD ||
( allow_quoted &&
kind == TK_QDSTRING ) ) {
- if ( pos == size-2 ) {
+ if (pos == size-2) {
size++;
res1 = LDAP_REALLOC(res,size*sizeof(gchar *));
- if ( !res1 ) {
+ if (!res1) {
LDAP_FREE(sval);
LDAP_VFREE(res);
*code = LDAP_SCHERR_OUTOFMEM;
} else if ( kind == TK_BAREWORD ||
( allow_quoted && kind == TK_QDSTRING ) ) {
res = LDAP_CALLOC(2,sizeof(gchar *));
- if ( !res ) {
+ if (!res) {
LDAP_FREE(sval);
*code = LDAP_SCHERR_OUTOFMEM;
return NULL;
gchar ** ext_vals;
const gchar * savepos;
- if ( !s ) {
+ if (!s) {
*code = LDAP_SCHERR_EMPTY;
*errp = "";
return NULL;
*errp = s;
oc = LDAP_CALLOC(1,sizeof(LDAPObjectClass));
- if ( !oc ) {
+ if (!oc) {
*code = LDAP_SCHERR_OUTOFMEM;
return NULL;
}
oc->oc_kind = LDAP_SCHEMA_STRUCTURAL;
kind = get_token(&ss,&sval);
- if ( kind != TK_LEFTPAREN ) {
+ if (kind != TK_LEFTPAREN) {
*code = LDAP_SCHERR_NOLEFTPAREN;
LDAP_FREE(sval);
ldap_objectclass_free(oc);
parse_whsp(&ss);
savepos = ss;
oc->oc_oid = ldap_int_parse_numericoid(&ss,code,0);
- if ( !oc->oc_oid ) {
- if ( (flags & LDAP_SCHEMA_ALLOW_ALL) && (ss == savepos) ) {
+ if (!oc->oc_oid) {
+ if ((flags & LDAP_SCHEMA_ALLOW_ALL) && (ss == savepos)) {
/* Backtracking */
ss = savepos;
kind = get_token(&ss,&sval);
- if ( kind == TK_BAREWORD ) {
+ if (kind == TK_BAREWORD) {
if ( !strcasecmp(sval, "NAME") ||
!strcasecmp(sval, "DESC") ||
!strcasecmp(sval, "OBSOLETE") ||
case TK_RIGHTPAREN:
return oc;
case TK_BAREWORD:
- if ( !strcasecmp(sval,"NAME") ) {
+ if (!strcasecmp(sval,"NAME")) {
LDAP_FREE(sval);
- if ( seen_name ) {
+ if (seen_name) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
ldap_objectclass_free(oc);
}
seen_name = 1;
oc->oc_names = parse_qdescrs(&ss,code);
- if ( !oc->oc_names ) {
- if ( *code != LDAP_SCHERR_OUTOFMEM )
+ if (!oc->oc_names) {
+ if (*code != LDAP_SCHERR_OUTOFMEM)
*code = LDAP_SCHERR_BADNAME;
*errp = ss;
ldap_objectclass_free(oc);
return NULL;
}
- } else if ( !strcasecmp(sval,"DESC") ) {
+ } else if (!strcasecmp(sval,"DESC")) {
LDAP_FREE(sval);
- if ( seen_desc ) {
+ if (seen_desc) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
ldap_objectclass_free(oc);
seen_desc = 1;
parse_whsp(&ss);
kind = get_token(&ss,&sval);
- if ( kind != TK_QDSTRING ) {
+ if (kind != TK_QDSTRING) {
*code = LDAP_SCHERR_UNEXPTOKEN;
*errp = ss;
LDAP_FREE(sval);
}
oc->oc_desc = sval;
parse_whsp(&ss);
- } else if ( !strcasecmp(sval,"OBSOLETE") ) {
+ } else if (!strcasecmp(sval,"OBSOLETE")) {
LDAP_FREE(sval);
- if ( seen_obsolete ) {
+ if (seen_obsolete) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
ldap_objectclass_free(oc);
seen_obsolete = 1;
oc->oc_obsolete = LDAP_SCHEMA_YES;
parse_whsp(&ss);
- } else if ( !strcasecmp(sval,"SUP") ) {
+ } else if (!strcasecmp(sval,"SUP")) {
LDAP_FREE(sval);
- if ( seen_sup ) {
+ if (seen_sup) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
ldap_objectclass_free(oc);
oc->oc_sup_oids = parse_oids(&ss,
code,
flags);
- if ( !oc->oc_sup_oids ) {
+ if (!oc->oc_sup_oids) {
*errp = ss;
ldap_objectclass_free(oc);
return NULL;
}
- } else if ( !strcasecmp(sval,"ABSTRACT") ) {
+ } else if (!strcasecmp(sval,"ABSTRACT")) {
LDAP_FREE(sval);
- if ( seen_kind ) {
+ if (seen_kind) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
ldap_objectclass_free(oc);
seen_kind = 1;
oc->oc_kind = LDAP_SCHEMA_ABSTRACT;
parse_whsp(&ss);
- } else if ( !strcasecmp(sval,"STRUCTURAL") ) {
+ } else if (!strcasecmp(sval,"STRUCTURAL")) {
LDAP_FREE(sval);
- if ( seen_kind ) {
+ if (seen_kind) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
ldap_objectclass_free(oc);
seen_kind = 1;
oc->oc_kind = LDAP_SCHEMA_STRUCTURAL;
parse_whsp(&ss);
- } else if ( !strcasecmp(sval,"AUXILIARY") ) {
+ } else if (!strcasecmp(sval,"AUXILIARY")) {
LDAP_FREE(sval);
- if ( seen_kind ) {
+ if (seen_kind) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
ldap_objectclass_free(oc);
seen_kind = 1;
oc->oc_kind = LDAP_SCHEMA_AUXILIARY;
parse_whsp(&ss);
- } else if ( !strcasecmp(sval,"MUST") ) {
+ } else if (!strcasecmp(sval,"MUST")) {
LDAP_FREE(sval);
- if ( seen_must ) {
+ if (seen_must) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
ldap_objectclass_free(oc);
}
seen_must = 1;
oc->oc_at_oids_must = parse_oids(&ss,code,0);
- if ( !oc->oc_at_oids_must ) {
+ if (!oc->oc_at_oids_must) {
*errp = ss;
ldap_objectclass_free(oc);
return NULL;
}
parse_whsp(&ss);
- } else if ( !strcasecmp(sval,"MAY") ) {
+ } else if (!strcasecmp(sval,"MAY")) {
LDAP_FREE(sval);
- if ( seen_may ) {
+ if (seen_may) {
*code = LDAP_SCHERR_DUPOPT;
*errp = ss;
ldap_objectclass_free(oc);
}
seen_may = 1;
oc->oc_at_oids_may = parse_oids(&ss,code,0);
- if ( !oc->oc_at_oids_may ) {
+ if (!oc->oc_at_oids_may) {
*errp = ss;
ldap_objectclass_free(oc);
return NULL;
}
parse_whsp(&ss);
- } else if ( sval[0] == 'X' && sval[1] == '-' ) {
+ } else if (sval[0] == 'X' && sval[1] == '-') {
/* Should be parse_qdstrings */
ext_vals = parse_qdescrs(&ss, code);
- if ( !ext_vals ) {
+ if (!ext_vals) {
*errp = ss;
ldap_objectclass_free(oc);
return NULL;
static gchar *ldap_utf8_strchr( const gchar *str, const gchar *chr )
{
for (; *str != '\0'; LDAP_UTF8_INCR(str) ) {
- if ( ldap_x_utf8_to_ucs4( str ) == ldap_x_utf8_to_ucs4( chr ) ) {
+ if (ldap_x_utf8_to_ucs4( str ) == ldap_x_utf8_to_ucs4( chr )) {
return (gchar *) str;
}
}
for ( cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr) ) {
for ( cset = set; *cset != '\0'; LDAP_UTF8_INCR(cset) ) {
- if ( ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset ) ) {
+ if (ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset )) {
return cstr - str;
}
}
for ( cstr = str; *cstr != '\0'; LDAP_UTF8_INCR(cstr) ) {
for ( cset = set; ; LDAP_UTF8_INCR(cset) ) {
- if ( *cset == '\0' ) {
+ if (*cset == '\0') {
return cstr - str;
}
- if ( ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset ) ) {
+ if (ldap_x_utf8_to_ucs4( cstr ) == ldap_x_utf8_to_ucs4( cset )) {
break;
}
}
gchar *begin;
gchar *end;
- if ( last == NULL ) return NULL;
+ if (last == NULL) return NULL;
begin = str ? str : *last;
begin += ldap_utf8_strspn( begin, sep );
- if ( *begin == '\0' ) {
+ if (*begin == '\0') {
*last = NULL;
return NULL;
}
end = &begin[ ldap_utf8_strcspn( begin, sep ) ];
- if ( *end != '\0' ) {
+ if (*end != '\0') {
gchar *next = LDAP_UTF8_NEXT( end );
*end = '\0';
end = next;
*/
const gchar *p;
- if ( url == NULL ) {
+ if (url == NULL) {
return( NULL );
}
p = url;
/* skip leading '<' (if any) */
- if ( *p == '<' ) {
+ if (*p == '<') {
*enclosedp = 1;
++p;
} else {
}
/* skip leading "URL:" (if any) */
- if ( strncasecmp( p, LDAP_URL_URLCOLON, LDAP_URL_URLCOLON_LEN ) == 0 ) {
+ if (strncasecmp( p, LDAP_URL_URLCOLON, LDAP_URL_URLCOLON_LEN ) == 0) {
p += LDAP_URL_URLCOLON_LEN;
}
/* check for "ldap://" prefix */
- if ( strncasecmp( p, LDAP_URL_PREFIX, LDAP_URL_PREFIX_LEN ) == 0 ) {
+ if (strncasecmp( p, LDAP_URL_PREFIX, LDAP_URL_PREFIX_LEN ) == 0) {
/* skip over "ldap://" prefix and return success */
p += LDAP_URL_PREFIX_LEN;
*scheme = "ldap";
}
/* check for "ldaps://" prefix */
- if ( strncasecmp( p, LDAPS_URL_PREFIX, LDAPS_URL_PREFIX_LEN ) == 0 ) {
+ if (strncasecmp( p, LDAPS_URL_PREFIX, LDAPS_URL_PREFIX_LEN ) == 0) {
/* skip over "ldaps://" prefix and return success */
p += LDAPS_URL_PREFIX_LEN;
*scheme = "ldaps";
}
/* check for "ldapi://" prefix */
- if ( strncasecmp( p, LDAPI_URL_PREFIX, LDAPI_URL_PREFIX_LEN ) == 0 ) {
+ if (strncasecmp( p, LDAPI_URL_PREFIX, LDAPI_URL_PREFIX_LEN ) == 0) {
/* skip over "ldapi://" prefix and return success */
p += LDAPI_URL_PREFIX_LEN;
*scheme = "ldapi";
#ifdef LDAP_CONNECTIONLESS
/* check for "cldap://" prefix */
- if ( strncasecmp( p, LDAPC_URL_PREFIX, LDAPC_URL_PREFIX_LEN ) == 0 ) {
+ if (strncasecmp( p, LDAPC_URL_PREFIX, LDAPC_URL_PREFIX_LEN ) == 0) {
/* skip over "cldap://" prefix and return success */
p += LDAPC_URL_PREFIX_LEN;
*scheme = "cldap";
static gint str2scope( const gchar *p )
{
- if ( strcasecmp( p, "one" ) == 0 ) {
+ if (strcasecmp( p, "one" ) == 0) {
return LDAP_SCOPE_ONELEVEL;
- } else if ( strcasecmp( p, "onelevel" ) == 0 ) {
+ } else if (strcasecmp( p, "onelevel" ) == 0) {
return LDAP_SCOPE_ONELEVEL;
- } else if ( strcasecmp( p, "base" ) == 0 ) {
+ } else if (strcasecmp( p, "base" ) == 0) {
return LDAP_SCOPE_BASE;
- } else if ( strcasecmp( p, "sub" ) == 0 ) {
+ } else if (strcasecmp( p, "sub" ) == 0) {
return LDAP_SCOPE_SUBTREE;
- } else if ( strcasecmp( p, "subtree" ) == 0 ) {
+ } else if (strcasecmp( p, "subtree" ) == 0) {
return LDAP_SCOPE_SUBTREE;
}
static void
ldap_free_urldesc( LDAPURLDesc *ludp )
{
- if ( ludp == NULL ) {
+ if (ludp == NULL) {
return;
}
- if ( ludp->lud_scheme != NULL ) {
+ if (ludp->lud_scheme != NULL) {
LDAP_FREE( ludp->lud_scheme );
}
- if ( ludp->lud_host != NULL ) {
+ if (ludp->lud_host != NULL) {
LDAP_FREE( ludp->lud_host );
}
- if ( ludp->lud_dn != NULL ) {
+ if (ludp->lud_dn != NULL) {
LDAP_FREE( ludp->lud_dn );
}
- if ( ludp->lud_filter != NULL ) {
+ if (ludp->lud_filter != NULL) {
LDAP_FREE( ludp->lud_filter);
}
- if ( ludp->lud_attrs != NULL ) {
+ if (ludp->lud_attrs != NULL) {
LDAP_VFREE( ludp->lud_attrs );
}
- if ( ludp->lud_exts != NULL ) {
+ if (ludp->lud_exts != NULL) {
LDAP_VFREE( ludp->lud_exts );
}
gchar *p;
for ( p = s; *s != '\0'; ++s ) {
- if ( *s == '%' ) {
- if ( *++s == '\0' ) {
+ if (*s == '%') {
+ if (*++s == '\0') {
break;
}
*p = ldap_int_unhex( *s ) << 4;
- if ( *++s == '\0' ) {
+ if (*++s == '\0') {
break;
}
*p++ += ldap_int_unhex( *s );
/* protect the input string from strtok */
str = LDAP_STRDUP( str_in );
- if ( str == NULL ) {
+ if (str == NULL) {
return NULL;
}
i = 1;
for ( s = str; *s; s++ ) {
- if ( ldap_utf8_strchr( brkstr, s ) != NULL ) {
+ if (ldap_utf8_strchr( brkstr, s ) != NULL) {
i++;
}
}
res = (gchar **) LDAP_MALLOC( (i + 1) * sizeof(gchar *) );
- if ( res == NULL ) {
+ if (res == NULL) {
LDAP_FREE( str );
return NULL;
}
const gchar *url_tmp;
gchar *url;
- if ( url_in == NULL || ludpp == NULL ) {
+ if (url_in == NULL || ludpp == NULL) {
return LDAP_URL_ERR_PARAM;
}
url_tmp = skip_url_prefix( url_in, &enclosed, &scheme );
- if ( url_tmp == NULL ) {
+ if (url_tmp == NULL) {
return LDAP_URL_ERR_BADSCHEME;
}
/* make working copy of the remainder of the URL */
url = LDAP_STRDUP( url_tmp );
- if ( url == NULL ) {
+ if (url == NULL) {
return LDAP_URL_ERR_MEM;
}
- if ( enclosed ) {
+ if (enclosed) {
p = &url[strlen(url)-1];
- if ( *p != '>' ) {
+ if (*p != '>') {
LDAP_FREE( url );
return LDAP_URL_ERR_BADENCLOSURE;
}
/* allocate return struct */
ludp = (LDAPURLDesc *)LDAP_CALLOC( 1, sizeof( LDAPURLDesc ));
- if ( ludp == NULL ) {
+ if (ludp == NULL) {
LDAP_FREE( url );
return LDAP_URL_ERR_MEM;
}
ludp->lud_scheme = LDAP_STRDUP( scheme );
- if ( ludp->lud_scheme == NULL ) {
+ if (ludp->lud_scheme == NULL) {
LDAP_FREE( url );
ldap_free_urldesc( ludp );
return LDAP_URL_ERR_MEM;
/* scan forward for '/' that marks end of hostport and begin. of dn */
p = strchr( url, '/' );
- if ( p != NULL ) {
+ if (p != NULL) {
/* terminate hostport; point to start of dn */
*p++ = '\0';
}
/* IPv6 syntax with [ip address]:port */
- if ( *url == '[' ) {
+ if (*url == '[') {
r = strchr( url, ']' );
- if ( r == NULL ) {
+ if (r == NULL) {
LDAP_FREE( url );
ldap_free_urldesc( ludp );
return LDAP_URL_ERR_BADURL;
q = strchr( url, ':' );
}
- if ( q != NULL ) {
+ if (q != NULL) {
gchar *next;
*q++ = '\0';
ldap_pvt_hex_unescape( q );
- if ( *q == '\0' ) {
+ if (*q == '\0') {
LDAP_FREE( url );
ldap_free_urldesc( ludp );
return LDAP_URL_ERR_BADURL;
}
ludp->lud_port = strtol( q, &next, 10 );
- if ( next == NULL || next[0] != '\0' ) {
+ if (next == NULL || next[0] != '\0') {
LDAP_FREE( url );
ldap_free_urldesc( ludp );
return LDAP_URL_ERR_BADURL;
/* If [ip address]:port syntax, url is [ip and we skip the [ */
ludp->lud_host = LDAP_STRDUP( url + ( *url == '[' ) );
- if ( ludp->lud_host == NULL ) {
+ if (ludp->lud_host == NULL) {
LDAP_FREE( url );
ldap_free_urldesc( ludp );
return LDAP_URL_ERR_MEM;
/* ? immediately followed by question */
if ( *q == '?') {
q++;
- if ( *q != '\0' ) {
+ if (*q != '\0') {
/* parse dn part */
ldap_pvt_hex_unescape( q );
ludp->lud_dn = LDAP_STRDUP( q );
ludp->lud_dn = LDAP_STRDUP( "" );
}
- if ( ludp->lud_dn == NULL ) {
+ if (ludp->lud_dn == NULL) {
LDAP_FREE( url );
ldap_free_urldesc( ludp );
return LDAP_URL_ERR_MEM;
}
}
- if ( p == NULL ) {
+ if (p == NULL) {
LDAP_FREE( url );
*ludpp = ludp;
return LDAP_URL_SUCCESS;
/* scan forward for '?' that may marks end of dn */
q = strchr( p, '?' );
- if ( q != NULL ) {
+ if (q != NULL) {
/* terminate dn part */
*q++ = '\0';
}
- if ( *p != '\0' ) {
+ if (*p != '\0') {
/* parse dn part */
ldap_pvt_hex_unescape( p );
ludp->lud_dn = LDAP_STRDUP( p );
ludp->lud_dn = LDAP_STRDUP( "" );
}
- if ( ludp->lud_dn == NULL ) {
+ if (ludp->lud_dn == NULL) {
LDAP_FREE( url );
ldap_free_urldesc( ludp );
return LDAP_URL_ERR_MEM;
}
- if ( q == NULL ) {
+ if (q == NULL) {
/* no more */
LDAP_FREE( url );
*ludpp = ludp;
p = q;
q = strchr( p, '?' );
- if ( q != NULL ) {
+ if (q != NULL) {
/* terminate attributes part */
*q++ = '\0';
}
- if ( *p != '\0' ) {
+ if (*p != '\0') {
/* parse attributes */
ldap_pvt_hex_unescape( p );
ludp->lud_attrs = ldap_str2charray( p, "," );
- if ( ludp->lud_attrs == NULL ) {
+ if (ludp->lud_attrs == NULL) {
LDAP_FREE( url );
ldap_free_urldesc( ludp );
return LDAP_URL_ERR_BADATTRS;
}
}
- if ( q == NULL ) {
+ if (q == NULL) {
/* no more */
LDAP_FREE( url );
*ludpp = ludp;
p = q;
q = strchr( p, '?' );
- if ( q != NULL ) {
+ if (q != NULL) {
/* terminate the scope part */
*q++ = '\0';
}
- if ( *p != '\0' ) {
+ if (*p != '\0') {
/* parse the scope */
ldap_pvt_hex_unescape( p );
ludp->lud_scope = str2scope( p );
- if ( ludp->lud_scope == -1 ) {
+ if (ludp->lud_scope == -1) {
LDAP_FREE( url );
ldap_free_urldesc( ludp );
return LDAP_URL_ERR_BADSCOPE;
}
}
- if ( q == NULL ) {
+ if (q == NULL) {
/* no more */
LDAP_FREE( url );
*ludpp = ludp;
p = q;
q = strchr( p, '?' );
- if ( q != NULL ) {
+ if (q != NULL) {
/* terminate the filter part */
*q++ = '\0';
}
- if ( *p != '\0' ) {
+ if (*p != '\0') {
/* parse the filter */
ldap_pvt_hex_unescape( p );
- if ( ! *p ) {
+ if (!*p) {
/* missing filter */
LDAP_FREE( url );
ldap_free_urldesc( ludp );
LDAP_FREE( ludp->lud_filter );
ludp->lud_filter = LDAP_STRDUP( p );
- if ( ludp->lud_filter == NULL ) {
+ if (ludp->lud_filter == NULL) {
LDAP_FREE( url );
ldap_free_urldesc( ludp );
return LDAP_URL_ERR_MEM;
}
}
- if ( q == NULL ) {
+ if (q == NULL) {
/* no more */
LDAP_FREE( url );
*ludpp = ludp;
p = q;
q = strchr( p, '?' );
- if ( q != NULL ) {
+ if (q != NULL) {
/* extra '?' */
LDAP_FREE( url );
ldap_free_urldesc( ludp );
/* parse the extensions */
ludp->lud_exts = ldap_str2charray( p, "," );
- if ( ludp->lud_exts == NULL ) {
+ if (ludp->lud_exts == NULL) {
LDAP_FREE( url );
ldap_free_urldesc( ludp );
return LDAP_URL_ERR_BADEXTS;
for ( i=0; ludp->lud_exts[i] != NULL; i++ ) {
ldap_pvt_hex_unescape( ludp->lud_exts[i] );
- if ( *ludp->lud_exts[i] == '!' ) {
+ if (*ludp->lud_exts[i] == '!') {
/* count the number of critical extensions */
ludp->lud_crit_exts++;
}
}
- if ( i == 0 ) {
+ if (i == 0) {
/* must have 1 or more */
LDAP_FREE( url );
ldap_free_urldesc( ludp );
{
gint rc = ldap_url_parse_ext( url_in, ludpp );
- if ( rc != LDAP_URL_SUCCESS ) {
+ if (rc != LDAP_URL_SUCCESS) {
return rc;
}
}
if ((*ludpp)->lud_port == 0) {
- if ( strcmp((*ludpp)->lud_scheme, "ldap") == 0 ) {
+ if (strcmp((*ludpp)->lud_scheme, "ldap") == 0) {
(*ludpp)->lud_port = LDAP_PORT;
#ifdef LDAP_CONNECTIONLESS
- } else if ( strcmp((*ludpp)->lud_scheme, "cldap") == 0 ) {
+ } else if (strcmp((*ludpp)->lud_scheme, "cldap") == 0) {
(*ludpp)->lud_port = LDAP_PORT;
#endif
- } else if ( strcmp((*ludpp)->lud_scheme, "ldaps") == 0 ) {
+ } else if (strcmp((*ludpp)->lud_scheme, "ldaps") == 0) {
(*ludpp)->lud_port = LDAPS_PORT;
}
}
query = e_data_book_view_get_card_query (book_view);
- if ( ! strcmp (query, "(contains \"x-evolution-any-field\" \"\")"))
+ if ( !strcmp (query, "(contains \"x-evolution-any-field\" \"\")"))
e_data_book_view_notify_status_message (book_view, _("Loading..."));
else
e_data_book_view_notify_status_message (book_view, _("Searching..."));
g_assert (backend != NULL);
g_assert (E_IS_BOOK_BACKEND_VCF (backend));
- if (! e_book_backend_construct (E_BOOK_BACKEND (backend)))
+ if (!e_book_backend_construct (E_BOOK_BACKEND (backend)))
return FALSE;
return TRUE;
backend = g_object_new (E_TYPE_BOOK_BACKEND_VCF, NULL);
- if (! e_book_backend_vcf_construct (backend)) {
+ if (!e_book_backend_vcf_construct (backend)) {
g_object_unref (backend);
return NULL;
EBookBackend *e_book_backend_vcf_new (void);
GType e_book_backend_vcf_get_type (void);
-#endif /* ! __E_BOOK_BACKEND_VCF_H__ */
+#endif /* __E_BOOK_BACKEND_VCF_H__ */
{
static GType type = 0;
- if (! type) {
+ if (!type) {
GTypeInfo info = {
sizeof(EBookBackendWebdavClass),
NULL, /* base_class_init */
G_END_DECLS
-#endif /* ! __E_ADDRESS_WESTERN_H__ */
+#endif /* !__E_ADDRESS_WESTERN_H__ */
G_END_DECLS
-#endif /* ! __E_BOOK_TYPES_H__ */
+#endif /* __E_BOOK_TYPES_H__ */
G_END_DECLS
-#endif /* ! __E_BOOK_VIEW_PRIVATE_H__ */
+#endif /* __E_BOOK_VIEW_PRIVATE_H__ */
G_END_DECLS
-#endif /* ! __E_BOOK_VIEW_H__ */
+#endif /* __E_BOOK_VIEW_H__ */
G_END_DECLS
-#endif /* ! __E_BOOK_H__ */
+#endif /* __E_BOOK_H__ */
date->year = str[0] * 1000 + str[1] * 100 + str[2] * 10 + str[3] - '0' * 1111;
date->month = str[5] * 10 + str[6] - '0' * 11;
date->day = str[8] * 10 + str[9] - '0' * 11;
- } else if ( length == 8 ) {
+ } else if (length == 8) {
date->year = str[0] * 1000 + str[1] * 100 + str[2] * 10 + str[3] - '0' * 1111;
date->month = str[4] * 10 + str[5] - '0' * 11;
date->day = str[6] * 10 + str[7] - '0' * 11;
/* Check equality of contacts. */
if (pa->contact || pb->contact) {
- if (! (pa->contact && pb->contact))
+ if (!(pa->contact && pb->contact))
return FALSE;
if (pa->contact == pb->contact || !strcmp (e_contact_get_const (pa->contact, E_CONTACT_UID),
/* Just in case name returns NULL */
na = e_destination_get_name (a);
nb = e_destination_get_name (b);
- if ((na || nb) && !(na && nb && ! utf8_casefold_collate (na, nb)))
+ if ((na || nb) && !(na && nb && !utf8_casefold_collate (na, nb)))
return FALSE;
if (!g_ascii_strcasecmp (e_destination_get_email (a), e_destination_get_email (b)))
dest_doc = xmlParseMemory ((gchar *) str, strlen (str));
if (dest_doc && dest_doc->xmlRootNode) {
dest = e_destination_new ();
- if (! e_destination_xml_decode (dest, dest_doc->xmlRootNode)) {
+ if (!e_destination_xml_decode (dest, dest_doc->xmlRootNode)) {
g_object_unref (dest);
dest = NULL;
}
xmlDocSetRootElement (destv_doc, destv_node);
for (i = 0; destv[i]; i++) {
- if (! e_destination_empty (destv[i])) {
+ if (!e_destination_empty (destv[i])) {
xmlNodePtr dest_node = e_destination_xml_encode (destv[i]);
if (dest_node)
xmlAddChild (destv_node, dest_node);
p = g_utf8_prev_char (p);
/* advance p to after the character that caused us to exit the
previous loop, and end the string. */
- if ((! g_unichar_isspace (g_utf8_get_char (p))) && *p != ',')
+ if ((!g_unichar_isspace (g_utf8_get_char (p))) && *p != ',')
p = g_utf8_next_char (p);
*p = '\0';
}
word_count = 0;
p = str + idx;
while (word_count < num_words && *p != '\0') {
- while (! g_unichar_isspace (g_utf8_get_char (p)) && *p != '\0') {
+ while (!g_unichar_isspace (g_utf8_get_char (p)) && *p != '\0') {
words = g_string_append_unichar (words, g_utf8_get_char (p));
p = g_utf8_next_char (p);
}
words = e_name_western_get_words_at_idx (str, 0, pfx_words);
folded_words = g_utf8_casefold (words, -1);
- if (! g_utf8_collate (folded_words, prefix)) {
+ if (!g_utf8_collate (folded_words, prefix)) {
g_free (folded_words);
return words;
}
for (i = 0; i < G_N_ELEMENTS (western_complex_last_index); i++) {
const gchar *last = western_complex_last_table + western_complex_last_index[i];
- if (! g_utf8_collate (folded_word, last)) {
+ if (!g_utf8_collate (folded_word, last)) {
g_free (folded_word);
return TRUE;
}
*/
if (idx == -1) {
word = e_name_western_get_words_at_idx (name->full, 0, 1);
- if (! e_name_western_is_complex_last_beginning (word)) {
+ if (!e_name_western_is_complex_last_beginning (word)) {
g_free (word);
return;
}
while (g_unichar_isspace (g_utf8_get_char (p)) && p > str)
p = g_utf8_prev_char (p);
- while (! g_unichar_isspace (g_utf8_get_char (p)) && p > str)
+ while (!g_unichar_isspace (g_utf8_get_char (p)) && p > str)
p = g_utf8_prev_char (p);
if (g_unichar_isspace (g_utf8_get_char (p)))
gchar *comma;
gchar *p;
- if (! e_name_western_detect_backwards (name, idxs))
+ if (!e_name_western_detect_backwards (name, idxs))
return;
/*
* Walk backwards until we hit the space which
* separates the suffix from firstmidnick.
*/
- while (! g_unichar_isspace (g_utf8_get_char (q)) && q > comma)
+ while (!g_unichar_isspace (g_utf8_get_char (q)) && q > comma)
q = g_utf8_prev_char (q);
if ((q - p + 1) > 0) {
G_END_DECLS
-#endif /* ! __E_NAME_WESTERN_H__ */
+#endif /* __E_NAME_WESTERN_H__ */
lp = g_utf8_next_char (lp);
/* -- skip over the endline */
- while ( *lp == '\r' || *lp == '\n' ) {
+ while (*lp == '\r' || *lp == '\n') {
lp = g_utf8_next_char (lp);
}
{
static GType type = 0;
- if (! type) {
+ if (!type) {
GTypeInfo info = {
sizeof (EBookBackendFactoryClass),
NULL, /* base_class_init */
{
static GType type = 0;
- if (! type) {
+ if (!type) {
GTypeInfo info = {
sizeof (EBookBackendSExpClass),
NULL, /* base_class_init */
{
static GType type = 0;
- if (! type) {
+ if (!type) {
GTypeInfo info = {
sizeof (EBookBackendSummaryClass),
NULL, /* base_class_init */
{
static GType type = 0;
- if (! type) {
+ if (!type) {
GTypeInfo info = {
sizeof (EBookBackendSyncClass),
NULL, /* base_class_init */
G_END_DECLS
-#endif /* ! __E_BOOK_BACKEND_SYNC_H__ */
+#endif /* __E_BOOK_BACKEND_SYNC_H__ */
{
static GType type = 0;
- if (! type) {
+ if (!type) {
GTypeInfo info = {
sizeof (EBookBackendClass),
NULL, /* base_class_init */
G_END_DECLS
-#endif /* ! __E_BOOK_BACKEND_H__ */
+#endif /* __E_BOOK_BACKEND_H__ */
G_END_DECLS
-#endif /* ! __E_DATA_BOOK_FACTORY_H__ */
+#endif /* __E_DATA_BOOK_FACTORY_H__ */
G_END_DECLS
-#endif /* ! __E_DATA_BOOK_VIEW_H__ */
+#endif /* __E_DATA_BOOK_VIEW_H__ */
G_END_DECLS
-#endif /* ! __E_DATA_BOOK_H__ */
+#endif /* __E_DATA_BOOK_H__ */
if (priv->mode == CAL_MODE_LOCAL) {
- if (! priv->do_offline) {
+ if (!priv->do_offline) {
return GNOME_Evolution_Calendar_RepositoryOffline;
}
send_and_handle_redirection (priv->session, message, NULL);
- if (! SOUP_STATUS_IS_SUCCESSFUL (message->status_code)) {
+ if (!SOUP_STATUS_IS_SUCCESSFUL (message->status_code)) {
guint status_code = message->status_code;
g_object_unref (message);
g_object_unref (message);
if (calendar_access) {
- priv->read_only = ! (put_allowed && delete_allowed);
+ priv->read_only = !(put_allowed && delete_allowed);
return GNOME_Evolution_Calendar_Success;
}
{
static GType type = 0;
- if (! type) {
+ if (!type) {
GTypeInfo info = {
sizeof (ECalBackendFactoryClass),
NULL, /* base_class_init */
{
static GType type = 0;
- if (! type) {
+ if (!type) {
GTypeInfo info = {
sizeof (ECalBackendLoaderFactoryClass),
NULL, /* base_class_init */
{
static GType type = 0;
- if (! type) {
+ if (!type) {
GTypeInfo info = {
sizeof (ECalBackendSExpClass),
NULL, /* base_class_init */
{
static GType type = 0;
- if (! type) {
+ if (!type) {
GTypeInfo info = {
sizeof (ECalBackendSyncClass),
NULL, /* base_class_init */
G_END_DECLS
-#endif /* ! __E_CAL_BACKEND_SYNC_H__ */
+#endif /* __E_CAL_BACKEND_SYNC_H__ */
G_END_DECLS
-#endif /* ! _CAMEL_ADDRESS_H */
+#endif /* _CAMEL_ADDRESS_H */
G_END_DECLS
-#endif /* ! _CAMEL_BLOCK_FILE_H */
+#endif /* _CAMEL_BLOCK_FILE_H */
return isocharset;
}
-#endif /* !BUILD_MAP */
+#endif /* BUILD_MAP */
G_END_DECLS
-#endif /* ! _CAMEL_CHARSET_MAP_H */
+#endif /* _CAMEL_CHARSET_MAP_H */
return;
s = g_string_new("");
- while ( (dname = g_dir_read_name(dir)) ) {
+ while ((dname = g_dir_read_name(dir))) {
if (strcmp(dname, keep) == 0)
continue;
G_END_DECLS
-#endif /* ! _CAMEL_DIGEST_FOLDER_H */
+#endif /* _CAMEL_DIGEST_FOLDER_H */
#endif /* CAMEL_DISABLE_DEPRECATED */
G_END_DECLS
-#endif /* ! _CAMEL_FILTER_DRIVER_H */
+#endif /* _CAMEL_FILTER_DRIVER_H */
G_END_DECLS
-#endif /* ! CAMEL_FILTER_SEARCH_H */
+#endif /* CAMEL_FILTER_SEARCH_H */
gint res = TRUE;
if (argv[0]->type == ESEXP_RES_BOOL)
- res = ! argv[0]->value.bool;
+ res = !argv[0]->value.bool;
r = e_sexp_result_new(f, ESEXP_RES_BOOL);
r->value.bool = res;
G_END_DECLS
-#endif /* ! _CAMEL_FOLDER_SEARCH_H */
+#endif /* _CAMEL_FOLDER_SEARCH_H */
for (i = 0; i < ncol; ++i) {
- if ( !strcmp (name [i], "uid") )
+ if (!strcmp (name [i], "uid"))
mir->uid = (gchar *) camel_pstring_strdup (cols [i]);
- else if ( !strcmp (name [i], "flags") )
+ else if (!strcmp (name [i], "flags"))
mir->flags = cols [i] ? strtoul (cols [i], NULL, 10) : 0;
- else if ( !strcmp (name [i], "read") )
+ else if (!strcmp (name [i], "read"))
mir->read = (cols [i]) ? ( ((strtoul (cols [i], NULL, 10)) ? TRUE : FALSE)) : FALSE;
- else if ( !strcmp (name [i], "deleted") )
+ else if (!strcmp (name [i], "deleted"))
mir->deleted = (cols [i]) ? ( ((strtoul (cols [i], NULL, 10)) ? TRUE : FALSE)) : FALSE;
- else if ( !strcmp (name [i], "replied") )
+ else if (!strcmp (name [i], "replied"))
mir->replied = (cols [i]) ? ( ((strtoul (cols [i], NULL, 10)) ? TRUE : FALSE)) : FALSE;
- else if ( !strcmp (name [i], "important") )
+ else if (!strcmp (name [i], "important"))
mir->important = (cols [i]) ? ( ((strtoul (cols [i], NULL, 10)) ? TRUE : FALSE)) : FALSE;
- else if ( !strcmp (name [i], "junk") )
+ else if (!strcmp (name [i], "junk"))
mir->junk = (cols [i]) ? ( ((strtoul (cols [i], NULL, 10)) ? TRUE : FALSE)) : FALSE;
- else if ( !strcmp (name [i], "attachment") )
+ else if (!strcmp (name [i], "attachment"))
mir->attachment = (cols [i]) ? ( ((strtoul (cols [i], NULL, 10)) ? TRUE : FALSE)) : FALSE;
- else if ( !strcmp (name [i], "size") )
+ else if (!strcmp (name [i], "size"))
mir->size = cols [i] ? strtoul (cols [i], NULL, 10) : 0;
- else if ( !strcmp (name [i], "dsent") )
+ else if (!strcmp (name [i], "dsent"))
mir->dsent = cols [i] ? strtol (cols [i], NULL, 10) : 0;
- else if ( !strcmp (name [i], "dreceived") )
+ else if (!strcmp (name [i], "dreceived"))
mir->dreceived = cols [i] ? strtol (cols [i], NULL, 10) : 0;
- else if ( !strcmp (name [i], "subject") )
+ else if (!strcmp (name [i], "subject"))
mir->subject = (gchar *) camel_pstring_strdup (cols [i]);
- else if ( !strcmp (name [i], "mail_from") )
+ else if (!strcmp (name [i], "mail_from"))
mir->from = (gchar *) camel_pstring_strdup (cols [i]);
- else if ( !strcmp (name [i], "mail_to") )
+ else if (!strcmp (name [i], "mail_to"))
mir->to = (gchar *) camel_pstring_strdup (cols [i]);
- else if ( !strcmp (name [i], "mail_cc") )
+ else if (!strcmp (name [i], "mail_cc"))
mir->cc = (gchar *) camel_pstring_strdup(cols [i]);
- else if ( !strcmp (name [i], "mlist") )
+ else if (!strcmp (name [i], "mlist"))
mir->mlist = (gchar *) camel_pstring_strdup (cols [i]);
- else if ( !strcmp (name [i], "followup_flag") )
+ else if (!strcmp (name [i], "followup_flag"))
mir->followup_flag = (gchar *) camel_pstring_strdup(cols [i]);
- else if ( !strcmp (name [i], "followup_completed_on") )
+ else if (!strcmp (name [i], "followup_completed_on"))
mir->followup_completed_on = (gchar *) camel_pstring_strdup(cols [i]);
- else if ( !strcmp (name [i], "followup_due_by") )
+ else if (!strcmp (name [i], "followup_due_by"))
mir->followup_due_by = (gchar *) camel_pstring_strdup(cols [i]);
- else if ( !strcmp (name [i], "part") )
+ else if (!strcmp (name [i], "part"))
mir->part = g_strdup (cols [i]);
- else if ( !strcmp (name [i], "labels") )
+ else if (!strcmp (name [i], "labels"))
mir->labels = g_strdup (cols [i]);
- else if ( !strcmp (name [i], "usertags") )
+ else if (!strcmp (name [i], "usertags"))
mir->usertags = g_strdup (cols [i]);
- else if ( !strcmp (name [i], "cinfo") )
+ else if (!strcmp (name [i], "cinfo"))
mir->cinfo = g_strdup(cols [i]);
- else if ( !strcmp (name [i], "bdata") )
+ else if (!strcmp (name [i], "bdata"))
mir->bdata = g_strdup(cols [i]);
/* Evolution itself doesn't yet use this, ignoring
- else if ( !strcmp (name [i], "bodystructure") )
+ else if (!strcmp (name [i], "bodystructure"))
mir->bodystructure = g_strdup(cols [i]); */
}
G_END_DECLS
-#endif /* ! _CAMEL_FOLDER_SUMMARY_H */
+#endif /* _CAMEL_FOLDER_SUMMARY_H */
G_END_DECLS
-#endif /* !_CAMEL_FOLDER_THREAD_H */
+#endif /* _CAMEL_FOLDER_THREAD_H */
deleted++;
if (flags & CAMEL_MESSAGE_JUNK) {
junked++;
- if (! (flags & CAMEL_MESSAGE_DELETED))
+ if (!(flags & CAMEL_MESSAGE_DELETED))
junked_not_deleted++;
}
if ((flags & (CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_JUNK)) == 0)
void camel_folder_sync (CamelFolder *folder,
gboolean expunge,
CamelException *ex);
-void camel_folder_set_lock_async (CamelFolder *folder,
+void camel_folder_set_lock_async (CamelFolder *folder,
gboolean async);
CamelStore * camel_folder_get_parent_store (CamelFolder *folder);
G_END_DECLS
-#endif /* ! _CAMEL_HTML_PARSER_H */
+#endif /* _CAMEL_HTML_PARSER_H */
}
}
-/* NOTE: Owns the lock on return if keep is TRUE ! */
+/* NOTE: Owns the lock on return if keep is TRUE !*/
static void
camel_iconv_init(gint keep)
{
G_END_DECLS
-#endif /* ! _CAMEL_INDEX_H */
+#endif /* _CAMEL_INDEX_H */
G_END_DECLS
-#endif /* ! _CAMEL_INTERNET_ADDRESS_H */
+#endif /* _CAMEL_INTERNET_ADDRESS_H */
CamelSListNode *p, *q;
p = (CamelSListNode *)l;
- while ( (q = p->next) ) {
+ while ((q = p->next)) {
if (q == n) {
p->next = n->next;
return n;
default:
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM,
_("Could not lock '%s'"), path);
- d(printf("locking failed ! status = %d\n", msg->id));
+ d(printf("locking failed !status = %d\n", msg->id));
break;
}
} else if (retry > 0) {
res = 0;
break;
default:
- d(printf("locking failed ! \n"));
+ d(printf("locking failed !\n"));
break;
}
} else if (retry > 0) {
G_END_DECLS
-#endif /* !_CAMEL_LOCK_HELPER_H */
+#endif /* _CAMEL_LOCK_HELPER_H */
G_END_DECLS
-#endif /* !_CAMEL_LOCK_HELPER_H */
+#endif /* _CAMEL_LOCK_HELPER_H */
camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, _("Timed out trying to get lock file on %s. Try again later."), path);
return -1;
-#else /* ! USE_DOT */
+#else /* !USE_DOT */
return 0;
#endif
}
G_END_DECLS
-#endif /* !_CAMEL_LOCK_H */
+#endif /* _CAMEL_LOCK_H */
G_END_DECLS
-#endif /* ! _CAMEL_MIME_FILTER_BASIC_H */
+#endif /* _CAMEL_MIME_FILTER_BASIC_H */
G_END_DECLS
-#endif /* ! _CAMEL_MIME_FILTER_BESTENC_H */
+#endif /* _CAMEL_MIME_FILTER_BESTENC_H */
G_END_DECLS
-#endif /* ! _CAMEL_MIME_FILTER_CANON_H */
+#endif /* _CAMEL_MIME_FILTER_CANON_H */
G_END_DECLS
-#endif /* ! _CAMEL_MIME_FILTER_CHARSET_H */
+#endif /* _CAMEL_MIME_FILTER_CHARSET_H */
G_END_DECLS
-#endif /* ! _CAMEL_MIME_FILTER_CRLF_H */
+#endif /* _CAMEL_MIME_FILTER_CRLF_H */
G_END_DECLS
-#endif /* ! _CAMEL_MIME_FILTER_FROM_H */
+#endif /* _CAMEL_MIME_FILTER_FROM_H */
G_END_DECLS
-#endif /* ! _CAMEL_MIME_FILTER_HTML_H */
+#endif /* _CAMEL_MIME_FILTER_HTML_H */
G_END_DECLS
-#endif /* ! _CAMEL_MIME_FILTER_INDEX_H */
+#endif /* _CAMEL_MIME_FILTER_INDEX_H */
G_END_DECLS
-#endif /* ! _CAMEL_MIME_FILTER_LINEWRAP_H */
+#endif /* _CAMEL_MIME_FILTER_LINEWRAP_H */
G_END_DECLS
-#endif /* ! _CAMEL_MIME_FILTER_PGP_H */
+#endif /* _CAMEL_MIME_FILTER_PGP_H */
G_END_DECLS
-#endif /* ! _CAMEL_MIME_FILTER_H */
+#endif /* _CAMEL_MIME_FILTER_H */
}
}
- return ! (*found);
+ return !(*found);
}
/**
#else
case CAMEL_MIME_PARSER_STATE_INITIAL:
case CAMEL_MIME_PARSER_STATE_PRE_FROM:
-#endif /* !USE_FROM */
+#endif /* USE_FROM */
scan_header:
case CAMEL_MIME_PARSER_STATE_FROM:
G_END_DECLS
-#endif /* ! _CAMEL_MIME_PARSER_H */
+#endif /* _CAMEL_MIME_PARSER_H */
out = g_string_new (charset);
g_string_append(out, "''");
- while ( (c = *inptr++) ) {
+ while ((c = *inptr++)) {
if (camel_mime_is_attrchar(c))
g_string_append_c (out, c);
else
quote = 1;
}
- while ( (c = *in++) ) {
+ while ((c = *in++)) {
if (quote && c=='"')
break;
if (!camel_mime_is_lwsp(c))
G_END_DECLS
-#endif /* ! _CAMEL_MIME_UTILS_H */
+#endif /* _CAMEL_MIME_UTILS_H */
G_END_DECLS
-#endif /* ! _CAMEL_NEWS_ADDRESS_H */
+#endif /* _CAMEL_NEWS_ADDRESS_H */
#endif /* CAMEL_DISABLE_DEPRECATED */
G_END_DECLS
-#endif /* ! _CAMEL_NNTP_ADDRESS_H */
+#endif /* _CAMEL_NNTP_ADDRESS_H */
bl = bl->next;
}
- g_warning("could not find a partition that could fit ! partition table corrupt!");
+ g_warning("could not find a partition that could fit !partition table corrupt!");
/* This should never be reached */
G_END_DECLS
-#endif /* ! _CAMEL_PARTITION_TABLE_H */
+#endif /* _CAMEL_PARTITION_TABLE_H */
G_END_DECLS
-#endif /* ! _CAMEL_SEARCH_PRIVATE_H */
+#endif /* _CAMEL_SEARCH_PRIVATE_H */
G_END_DECLS
-#endif /* ! _CAMEL_SEARCH_SQL_H */
+#endif /* _CAMEL_SEARCH_SQL_H */
G_END_DECLS
-#endif /* ! _CAMEL_SEARCH_SQL_H */
+#endif /* _CAMEL_SEARCH_SQL_H */
}
out = fdopen(fd, "wb");
- if ( out == NULL ) {
+ if (out == NULL) {
i = errno;
printf("** fdopen error: %s\n", g_strerror (errno));
close(fd);
G_END_DECLS
-#endif /* ! _CAMEL_STORE_SUMMARY_H */
+#endif /* _CAMEL_STORE_SUMMARY_H */
G_END_DECLS
-#endif /* ! _CAMEL_STREAM_FILTER_H */
+#endif /* _CAMEL_STREAM_FILTER_H */
G_END_DECLS
-#endif /* ! _CAMEL_STREAM_NULL_H */
+#endif /* _CAMEL_STREAM_NULL_H */
G_END_DECLS
-#endif /* ! _CAMEL_STREAM_PROCESS_H */
+#endif /* _CAMEL_STREAM_PROCESS_H */
work = !camel_dlist_empty(&p->word_cache);
- while ( (ww = (struct _CamelTextIndexWord *)camel_dlist_remhead(&p->word_cache)) ) {
+ while ((ww = (struct _CamelTextIndexWord *)camel_dlist_remhead(&p->word_cache))) {
if (ww->used > 0) {
io(printf("writing key file entry '%s' [%x]\n", ww->word, ww->data));
if (camel_key_file_write(p->links, &ww->data, ww->used, ww->names) != -1) {
remap = g_hash_table_new(NULL, NULL);
oldkeyid = 0;
deleted = 0;
- while ( (oldkeyid = camel_key_table_next(oldp->name_index, oldkeyid, &name, &flags, &data)) ) {
+ while ((oldkeyid = camel_key_table_next(oldp->name_index, oldkeyid, &name, &flags, &data))) {
if ((flags&1) == 0) {
io(printf("copying name '%s'\n", name));
newkeyid = camel_key_table_add(newp->name_index, name, data, flags);
/* We re-block the data into 256 entry lots while we're at it, since we only
have to do 1 at a time and its cheap */
oldkeyid = 0;
- while ( (oldkeyid = camel_key_table_next(oldp->word_index, oldkeyid, &name, &flags, &data)) ) {
+ while ((oldkeyid = camel_key_table_next(oldp->word_index, oldkeyid, &name, &flags, &data))) {
io(printf("copying word '%s'\n", name));
newdata = 0;
newcount = 0;
printf("UID's in index\n");
keyid = 0;
- while ( (keyid = camel_key_table_next(p->name_index, keyid, &word, &flags, &data)) ) {
+ while ((keyid = camel_key_table_next(p->name_index, keyid, &word, &flags, &data))) {
if ((flags & 1) == 0)
printf(" %s\n", word);
else
printf("Word's in index\n");
keyid = 0;
- while ( (keyid = camel_key_table_next(p->word_index, keyid, &word, &flags, &data)) ) {
+ while ((keyid = camel_key_table_next(p->word_index, keyid, &word, &flags, &data))) {
CamelIndexCursor *idc;
printf("Word: '%s':\n", word);
idc = camel_index_find((CamelIndex *)idx, word);
- while ( (name = camel_index_cursor_next(idc)) ) {
+ while ((name = camel_index_cursor_next(idc))) {
printf(" %s", name);
}
printf("\n");
printf("Checking UID consistency\n");
keyid = 0;
- while ( (keyid = camel_key_table_next(p->name_index, keyid, &word, &flags, &data)) ) {
+ while ((keyid = camel_key_table_next(p->name_index, keyid, &word, &flags, &data))) {
if ((oldword = g_hash_table_lookup(names, GINT_TO_POINTER(keyid))) != NULL
|| (oldword = g_hash_table_lookup(deleted, GINT_TO_POINTER(keyid))) != NULL) {
printf("Warning, name '%s' duplicates key (%x) with name '%s'\n", word, keyid, oldword);
printf("Checking WORD member consistency\n");
keyid = 0;
- while ( (keyid = camel_key_table_next(p->word_index, keyid, &word, &flags, &data)) ) {
+ while ((keyid = camel_key_table_next(p->word_index, keyid, &word, &flags, &data))) {
CamelIndexCursor *idc;
GHashTable *used;
used = g_hash_table_new(g_str_hash, g_str_equal);
idc = camel_index_find((CamelIndex *)idx, word);
- while ( (name = camel_index_cursor_next(idc)) ) {
+ while ((name = camel_index_cursor_next(idc))) {
if (g_hash_table_lookup(name_word, name) == NULL) {
printf("word '%s' references non-existant name '%s'\n", word, name);
}
if (p == ptrend)
return 0;
- while ( (c = *p++) ) {
+ while ((c = *p++)) {
if (c < 0x80) {
*ptr = p;
return c;
g_free(p->current);
p->current = NULL;
- while ( (p->keyid = camel_key_table_next(p->table, p->keyid, &p->current, &p->flags, &p->data)) ) {
+ while ((p->keyid = camel_key_table_next(p->table, p->keyid, &p->current, &p->flags, &p->data))) {
if ((p->flags & 1) == 0) {
return p->current;
} else {
printf("Looking up which names contain word 'word'\n");
idc = camel_index_find(idx, "words");
- while ( (word = camel_index_cursor_next(idc)) != NULL ) {
+ while ((word = camel_index_cursor_next(idc)) != NULL) {
printf(" name is '%s'\n", word);
}
camel_object_unref((CamelObject *)idc);
printf("Looking up which names contain word 'truncate'\n");
idc = camel_index_find(idx, "truncate");
- while ( (word = camel_index_cursor_next(idc)) != NULL ) {
+ while ((word = camel_index_cursor_next(idc)) != NULL) {
printf(" name is '%s'\n", word);
}
camel_object_unref((CamelObject *)idc);
G_END_DECLS
-#endif /* ! _CAMEL_TEXT_INDEX_H */
+#endif /* _CAMEL_TEXT_INDEX_H */
out = g_string_new("");
- while ( (c = camel_utf8_getc(&p)) ) {
+ while ((c = camel_utf8_getc(&p))) {
if (c >= 0x20 && c <= 0x7e) {
if (state == 1) {
utf7_closeb64(out, v, i);
/* what if c is > 0xffff ? */
- while ( (c = camel_utf8_getc(&ptr)) ) {
+ while ((c = camel_utf8_getc(&ptr))) {
guint16 s = g_htons(c);
g_byte_array_append(work, (guchar *) &s, 2);
GString *work = g_string_new("");
gchar *out;
- while ( (c = *ucs++) )
+ while ((c = *ucs++))
g_string_append_u(work, g_ntohs(c));
out = g_strdup(work->str);
G_END_DECLS
-#endif /* ! _CAMEL_UTF8_H */
+#endif /* _CAMEL_UTF8_H */
deleted++;
if (flags & CAMEL_MESSAGE_JUNK) {
junked++;
- if (! (flags & CAMEL_MESSAGE_DELETED))
+ if (!(flags & CAMEL_MESSAGE_DELETED))
junked_not_deleted++;
}
if ((flags & (CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_JUNK)) == 0)
G_END_DECLS
-#endif /* ! _CAMEL_VEE_FOLDER_H */
+#endif /* _CAMEL_VEE_FOLDER_H */
G_END_DECLS
-#endif /* ! _CAMEL_VEE_STORE_H */
+#endif /* _CAMEL_VEE_STORE_H */
G_END_DECLS
-#endif /* ! _CAMEL_VEE_SUMMARY_H */
+#endif /* _CAMEL_VEE_SUMMARY_H */
deleted++;
if (flags & CAMEL_MESSAGE_JUNK) {
junked++;
- if (! (flags & CAMEL_MESSAGE_DELETED))
+ if (!(flags & CAMEL_MESSAGE_DELETED))
junked_not_deleted++;
}
if ((flags & (CAMEL_MESSAGE_DELETED|CAMEL_MESSAGE_JUNK)) == 0)
G_END_DECLS
-#endif /* ! _CAMEL_VTRASH_FOLDER_H */
+#endif /* _CAMEL_VTRASH_FOLDER_H */
// rc = sqlite3_open_v2("test.db", &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE , NULL);
rc = sqlite3_open("test.db", &db);
- if ( rc ) {
+ if (rc) {
fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db));
sqlite3_close(db);
exit(1);
if (!is_proxy) {
const gchar *source;
- if ( !strcmp (folder->full_name, RECEIVED) || !strcmp(folder->full_name, SENT) ) {
+ if (!strcmp (folder->full_name, RECEIVED) || !strcmp(folder->full_name, SENT)) {
source = NULL;
} else {
source = "sent received";
!g_ascii_strcasecmp (attach->name, "meeting.ics")) && (attach->hidden == TRUE))
continue;
- if ( (attach->item_reference) && (!g_ascii_strcasecmp (attach->item_reference, "1")) ) {
+ if ((attach->item_reference) && (!g_ascii_strcasecmp (attach->item_reference, "1"))) {
CamelMimeMessage *temp_msg = NULL;
status = e_gw_connection_get_item (cnc, container_id, attach->id, GET_ITEM_VIEW_WITH_CACHE, &temp_item);
if (status != E_GW_CONNECTION_STATUS_OK) {
break;
if (delete_originals) {
- if ( !strcmp(source->full_name, SENT) ) {
+ if (!strcmp(source->full_name, SENT)) {
camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE,
_("This message is not available in offline mode."));
if (dir_sep != '/') {
p = path = alloca(strlen(full_name)*3+1);
f = full_name;
- while ( (c = *f++ & 0xff) ) {
+ while ((c = *f++ & 0xff)) {
if (c == dir_sep)
*p++ = '/';
else if (c == '/' || c == '%')
else
p = path;
- while ( (c = camel_utf8_getc((const guchar **)&p)) ) {
+ while ((c = camel_utf8_getc((const guchar **)&p))) {
switch (state) {
case 0:
if (c == '%')
G_END_DECLS
-#endif /* ! _CAMEL_IMAP_STORE_SUMMARY_H */
+#endif /* _CAMEL_IMAP_STORE_SUMMARY_H */
if (e_gw_container_is_root(container))
continue;
- if ( (type == E_GW_CONTAINER_TYPE_CALENDAR) || (type == E_GW_CONTAINER_TYPE_CONTACTS) )
+ if ((type == E_GW_CONTAINER_TYPE_CALENDAR) || (type == E_GW_CONTAINER_TYPE_CONTACTS))
continue;
info = convert_to_folder_info (store, E_GW_CONTAINER (folder_list->data), (const gchar *)url, ex);
file_path = g_strdup_printf ("%s/%s", subfolder_directory_path, dirent);
if (g_stat (file_path, &file_stat) < 0 ||
- ! S_ISDIR (file_stat.st_mode)) {
+ !S_ISDIR (file_stat.st_mode)) {
g_free (file_path);
continue;
}
{
struct _match_record *mr;
- while ( (mr = (struct _match_record *)camel_dlist_remtail(&is->matches)) )
+ while ((mr = (struct _match_record *)camel_dlist_remtail(&is->matches)))
free_match(is, mr);
g_hash_table_destroy(is->matches_hash);
if (is->cache)
G_END_DECLS
-#endif /* ! _CAMEL_IMAP_SEARCH_H */
+#endif /* _CAMEL_IMAP_SEARCH_H */
if (dir_sep != '/') {
p = path = alloca(strlen(full_name)*3+1);
f = full_name;
- while ( (c = *f++ & 0xff) ) {
+ while ((c = *f++ & 0xff)) {
if (c == dir_sep)
*p++ = '/';
else if (c == '/' || c == '%')
G_END_DECLS
-#endif /* ! _CAMEL_IMAP_STORE_SUMMARY_H */
+#endif /* _CAMEL_IMAP_STORE_SUMMARY_H */
G_END_DECLS
-#endif /* ! _CAMEL_IMAP_SUMMARY_H */
+#endif /* _CAMEL_IMAP_SUMMARY_H */
dirent);
if (g_stat (file_path, &file_stat) < 0 ||
- ! S_ISDIR (file_stat.st_mode)) {
+ !S_ISDIR (file_stat.st_mode)) {
g_free (file_path);
continue;
}
p = fmt;
ps = fmt;
- while ( ( c = *p++ ) ) {
+ while (( c = *p++ )) {
switch (c) {
case '%':
if (*p == '%') {
imap_free_status(ic->status);
g_free(ic->select);
- while ( (cp = ((CamelIMAPXCommandPart *)camel_dlist_remhead(&ic->parts))) ) {
+ while ((cp = ((CamelIMAPXCommandPart *)camel_dlist_remhead(&ic->parts)))) {
g_free(cp->data);
if (cp->ob) {
switch (cp->type & CAMEL_IMAPX_COMMAND_MASK) {
op = camel_operation_new (NULL, NULL);
op = camel_operation_register (op);
while (TRUE) {
-
+
CAMEL_SERVICE_REC_LOCK (is->store, connect_lock);
if (!is->stream)
imapx_reconnect(is, &ex);
CamelStream *camel_imapx_server_get_message(CamelIMAPXServer *is, CamelFolder *folder, const gchar *uid, struct _CamelException *ex);
void camel_imapx_server_append_message(CamelIMAPXServer *is, CamelFolder *folder, struct _CamelMimeMessage *message, const struct _CamelMessageInfo *mi, CamelException *ex);
-#endif /* ! _CAMEL_IMAPX_SERVER_H */
+#endif /* _CAMEL_IMAPX_SERVER_H */
if (dir_sep != '/') {
p = path = alloca(strlen(full_name)*3+1);
f = full_name;
- while ( (c = *f++ & 0xff) ) {
+ while ((c = *f++ & 0xff)) {
if (c == dir_sep)
*p++ = '/';
else if (c == '/' || c == '%')
G_END_DECLS
-#endif /* ! _CAMEL_IMAP_STORE_SUMMARY_H */
+#endif /* _CAMEL_IMAP_STORE_SUMMARY_H */
/* skips the rest of a line, including literals, etc */
gint camel_imapx_stream_skip(CamelIMAPXStream *is, CamelException *ex);
-#endif /* ! _CAMEL_IMAPX_STREAM_H */
+#endif /* _CAMEL_IMAPX_STREAM_H */
G_END_DECLS
-#endif /* ! _CAMEL_IMAPX_SUMMARY_H */
+#endif /* _CAMEL_IMAPX_SUMMARY_H */
return NULL;
}
- while ( (tok = camel_imapx_stream_token(is, &token, &len, ex)) == IMAP_TOK_TOKEN ) {
+ while ((tok = camel_imapx_stream_token(is, &token, &len, ex)) == IMAP_TOK_TOKEN) {
p = token;
while ((c=*p))
return NULL;
}
- while ( (tok = camel_imapx_stream_token(is, &token, &len, ex)) == IMAP_TOK_TOKEN ) {
+ while ((tok = camel_imapx_stream_token(is, &token, &len, ex)) == IMAP_TOK_TOKEN) {
switch (imap_tokenise((gchar *) token, len)) {
case IMAP_MESSAGES:
sinfo->messages = camel_imapx_stream_number (is, ex);
return NULL;
}
- while ( (tok = camel_imapx_stream_token(is, &token, &len, ex)) != ')' ) {
+ while ((tok = camel_imapx_stream_token(is, &token, &len, ex)) != ')') {
if (tok == IMAP_TOK_STRING || tok == IMAP_TOK_TOKEN) {
p = token;
while ((c=*p))
if (li->separator != 0 && li->separator != '/') {
p = path = alloca(strlen(li->name)*3+1);
f = li->name;
- while ( (c = *f++ & 0xff) ) {
+ while ((c = *f++ & 0xff)) {
if (c == li->separator)
*p++ = '/';
else if (c == '/' || c == '%')
guint32 camel_imapx_view_next_uid(CamelIMAPXView *view);
void camel_imapx_view_last_uid(CamelIMAPXView *view, guint32 uid);
-#endif /* ! _CAMEL_IMAPX_VIEW_SUMMARY_H */
+#endif /* _CAMEL_IMAPX_VIEW_SUMMARY_H */
G_END_DECLS
-#endif /* ! _CAMEL_LOCAL_SUMMARY_H */
+#endif /* _CAMEL_LOCAL_SUMMARY_H */
/* for tmp (only), its contents is irrelevant */
dir = opendir(tmp);
if (dir) {
- while ( (d=readdir(dir)) ) {
+ while ((d=readdir(dir))) {
gchar *name = d->d_name, *file;
if (!strcmp(name, ".") || !strcmp(name, ".."))
goto fail;
}
- while ( (d = readdir(dir)) ) {
+ while ((d = readdir(dir))) {
if (strcmp(d->d_name, "tmp") == 0
|| strcmp(d->d_name, "cur") == 0
|| strcmp(d->d_name, "new") == 0
mds->priv->load_map = g_hash_table_new(g_str_hash, g_str_equal);
pool = e_mempool_new(1024, 512, E_MEMPOOL_ALIGN_BYTE);
- while ( (d = readdir(dir)) ) {
+ while ((d = readdir(dir))) {
if (d->d_name[0] == '.')
continue;
/* joy, use this to pre-count the total, so we can report progress meaningfully */
total = 0;
count = 0;
- while ( (d = readdir(dir)) )
+ while ((d = readdir(dir)))
total++;
rewinddir(dir);
- while ( (d = readdir(dir)) ) {
+ while ((d = readdir(dir))) {
gint pc = count * 100 / total;
camel_operation_progress(NULL, pc);
if (dir != NULL) {
total = 0;
count = 0;
- while ( (d = readdir(dir)) )
+ while ((d = readdir(dir)))
total++;
rewinddir(dir);
- while ( (d = readdir(dir)) ) {
+ while ((d = readdir(dir))) {
gchar *name, *newname, *destname, *destfilename;
gchar *src, *dest;
gint pc = count * 100 / total;
G_END_DECLS
-#endif /* ! _CAMEL_MAILDIR_SUMMARY_H */
+#endif /* _CAMEL_MAILDIR_SUMMARY_H */
G_END_DECLS
-#endif /* ! _CAMEL_MBOX_SUMMARY_H */
+#endif /* _CAMEL_MBOX_SUMMARY_H */
}
}
- while ( (d = readdir(dir)) ) {
+ while ((d = readdir(dir))) {
/* FIXME: also run stat to check for regular file */
p = d->d_name;
- while ( (c = *p++) ) {
+ while ((c = *p++)) {
if (!isdigit(c))
break;
}
G_END_DECLS
-#endif /* ! _CAMEL_MH_SUMMARY_H */
+#endif /* _CAMEL_MH_SUMMARY_H */
parent = fi;
}
- while ( (d = readdir(dir)) ) {
+ while ((d = readdir(dir))) {
if (strcmp(d->d_name, ".") == 0
|| strcmp(d->d_name, "..") == 0)
continue;
G_END_DECLS
-#endif /* ! _CAMEL_SPOOL_SUMMARY_H */
+#endif /* _CAMEL_SPOOL_SUMMARY_H */
G_END_DECLS
-#endif /* ! _CAMEL_NNTP_STORE_SUMMARY_H */
+#endif /* _CAMEL_NNTP_STORE_SUMMARY_H */
&& !camel_service_connect (CAMEL_SERVICE (store), ex))
return -1;
- /* Check for unprocessed data, ! */
+ /* Check for unprocessed data, !*/
if (store->stream->mode == CAMEL_NNTP_STREAM_DATA) {
g_warning("Unprocessed data left in stream, flushing");
while (camel_nntp_stream_getd(store->stream, (guchar **)&p, &u) > 0)
G_END_DECLS
-#endif /* ! _CAMEL_NNTP_STREAM_H */
+#endif /* _CAMEL_NNTP_STREAM_H */
G_END_DECLS
-#endif /* ! _CAMEL_NNTP_SUMMARY_H */
+#endif /* _CAMEL_NNTP_SUMMARY_H */
return pe->current==NULL?0:1;
ioerror:
/* we assume all outstanding commands are gunna fail now */
- while ( (pw = (CamelPOP3Command*)camel_dlist_remhead(&pe->active)) ) {
+ while ((pw = (CamelPOP3Command*)camel_dlist_remhead(&pe->active))) {
pw->state = CAMEL_POP3_COMMAND_ERR;
camel_dlist_addtail(&pe->done, (CamelDListNode *)pw);
}
- while ( (pw = (CamelPOP3Command*)camel_dlist_remhead(&pe->queue)) ) {
+ while ((pw = (CamelPOP3Command*)camel_dlist_remhead(&pe->queue))) {
pw->state = CAMEL_POP3_COMMAND_ERR;
camel_dlist_addtail(&pe->done, (CamelDListNode *)pw);
}
G_END_DECLS
-#endif /* ! _CAMEL_POP3_ENGINE_H */
+#endif /* _CAMEL_POP3_ENGINE_H */
G_END_DECLS
-#endif /* ! _CAMEL_POP3_STREAM_H */
+#endif /* _CAMEL_POP3_STREAM_H */
gchar *addr;
gchar *utf8; /* the utf8 in this table was generated by camel itself. As a result i'm making the assumption it
was right when it was created. It also depends on the format of ::format(),. which is likely to
- change, to handle other bugs ! */
+ change, to handle other bugs !*/
} test_address[] = {
{ 1, "\"=?ISO-8859-1?Q?David_Guti=E9rrez_Magallanes?=\" <david@iiia.csic.es>", "David Gutiérrez Magallanes <david@iiia.csic.es>" },
{ 1, "\"=?iso-8859-1?Q?Jos=E9?= Antonio Milke G.\" <gerencia@ovoplus.com>", "José Antonio Milke G. <gerencia@ovoplus.com>" },
G_END_DECLS
-#endif /* ! __E_DB3_UTILS_H__ */
+#endif /* __E_DB3_UTILS_H__ */
G_END_DECLS
-#endif /* ! __E_DBHASH_H__ */
+#endif /* __E_DBHASH_H__ */
}
}
-/* NOTE: Owns the lock on return if keep is TRUE ! */
+/* NOTE: Owns the lock on return if keep is TRUE !*/
static void
e_iconv_init(gint keep)
{
#endif /* EDS_DISABLE_DEPRECATED */
-#endif /* !_E_ICONV_H_ */
+#endif /* _E_ICONV_H_ */
G_END_DECLS
-#endif /* ! __E_ITERATOR_H__ */
+#endif /* __E_ITERATOR_H__ */
G_END_DECLS
-#endif /* ! __E_LIST_ITERATOR_H__ */
+#endif /* __E_LIST_ITERATOR_H__ */
G_END_DECLS
-#endif /* ! __E_LIST_H__ */
+#endif /* __E_LIST_H__ */
poolv->s[index] = e_mempool_strdup(poolv_mempool, str);
g_hash_table_insert(poolv_pool, poolv->s[index], poolv->s[index]);
}
-#endif /* !POOLV_REFCNT */
+#endif /* POOLV_REFCNT */
#ifdef G_THREADS_ENABLED
g_static_mutex_unlock(&poolv_mutex);
G_END_DECLS
-#endif /* ! _E_MEMORY_H */
+#endif /* _E_MEMORY_H */
GList *l;
/* make sure we soak up all the messages first */
- while ( (msg = e_msgport_get(e->server_port)) ) {
+ while ((msg = e_msgport_get(e->server_port))) {
thread_destroy_msg(e, msg);
}
#include <winsock2.h>
#ifndef IN6_ARE_ADDR_EQUAL
#define IN6_ARE_ADDR_EQUAL(a, b) \
- (memcmp ((void*)(a), (void*)(b), sizeof (struct in6_addr)) == 0)
+ (memcmp ((gpointer)(a), (gpointer)(b), sizeof (struct in6_addr)) == 0)
#endif
#else
#include <netinet/in.h>
else
p = string;
g_string_append(s, " \"");
- while ( (c = *p++) ) {
+ while ((c = *p++)) {
if (c=='\\' || c=='\"' || c=='\'')
g_string_append_c(s, '\\');
g_string_append_c(s, c);
source_changed_callback (ESource *source,
ESourceGroup *group)
{
- if (! group->priv->ignore_source_changed)
+ if (!group->priv->ignore_source_changed)
g_signal_emit (group, signals[CHANGED], 0);
}
g_signal_handlers_disconnect_by_func (source, source_changed_callback, group);
}
- if (! changed && q != NULL) {
+ if (!changed && q != NULL) {
if (q->data != p->data)
changed = TRUE;
q = q->next;
g_signal_handlers_disconnect_by_func (group, group_changed_callback, list);
}
- if (! changed && q != NULL) {
+ if (!changed && q != NULL) {
if (q->data != p->data)
changed = TRUE;
q = q->next;
{
GError *error = NULL;
- if (! e_source_list_sync (list, &error)) {
+ if (!e_source_list_sync (list, &error)) {
g_warning ("Cannot update \"%s\": %s", list->priv->gconf_path, error ? error->message : "Unknown error");
g_error_free (error);
}
group_changed_callback (ESourceGroup *group,
ESourceList *list)
{
- if (! list->priv->ignore_group_changed)
+ if (!list->priv->ignore_group_changed)
g_signal_emit (list, signals[CHANGED], 0);
if (list->priv->sync_idle_id == 0)
g_source_remove (priv->sync_idle_id);
priv->sync_idle_id = 0;
- if (! e_source_list_sync (E_SOURCE_LIST (object), &error))
+ if (!e_source_list_sync (E_SOURCE_LIST (object), &error))
g_warning ("Could not update \"%s\": %s",
priv->gconf_path, error->message);
}
# endif /* GCC. */
#endif /* Not __P. */
-#if ! HAVE_LOCALTIME_R && ! defined localtime_r
+#if !HAVE_LOCALTIME_R && !defined localtime_r
# ifdef _LIBC
# define localtime_r __localtime_r
# else
struct tm *tp;
{
struct tm *l = localtime (t);
- if (! l)
+ if (!l)
return 0;
*tp = *l;
return tp;
}
-# endif /* ! _LIBC */
-#endif /* ! HAVE_LOCALTIME_R && ! defined (localtime_r) */
+# endif /* !_LIBC */
+#endif /* HAVE_LOCALTIME_R && !defined (localtime_r) */
#define match_char(ch1, ch2) if (ch1 != ch2) return NULL
#if defined _LIBC && defined __GNUC__ && __GNUC__ >= 2
- (int64_t) era->start_date[0])
* era->absolute_direction));
}
- if (! match)
+ if (!match)
return NULL;
break;
if (dump)
dump_list ();
- if (! listen)
+ if (!listen)
g_main_loop_quit (main_loop);
return FALSE;
show_menu = TRUE;
g_object_set_data (G_OBJECT (menu_item), "order", GINT_TO_POINTER (i));
- if ( i == email_num && len > 1 ) {
+ if (i == email_num && len > 1) {
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), TRUE);
g_signal_connect_swapped (menu_item, "activate", G_CALLBACK (popup_activate_email),
name_selector_entry);
show_menu = TRUE;
g_object_set_data (G_OBJECT (menu_item), "order", GINT_TO_POINTER (i));
- if ( i == email_num && len > 1 ) {
+ if (i == email_num && len > 1) {
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), TRUE);
g_signal_connect_swapped (menu_item, "activate", G_CALLBACK (popup_activate_email),
name_selector_entry);
if (path_currently_selected)
return TRUE;
- if (! gtk_tree_model_get_iter (model, &iter, path))
+ if (!gtk_tree_model_get_iter (model, &iter, path))
return FALSE;
gtk_tree_model_get (model, &iter, 0, &data, -1);
ESource *source;
gpointer data;
- if (! gtk_tree_model_get_iter (model, &iter, path)) {
+ if (!gtk_tree_model_get_iter (model, &iter, path)) {
gtk_tree_path_free (path);
return;
}
}
}
- if (!have_iter && ! gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (selector)), NULL, &iter))
+ if (!have_iter && !gtk_tree_selection_get_selected (gtk_tree_view_get_selection (GTK_TREE_VIEW (selector)), NULL, &iter))
return NULL;
gtk_tree_model_get (model, &iter, 0, &data, -1);
if (!data)
return NULL;
- if (! E_IS_SOURCE (data)) {
+ if (!E_IS_SOURCE (data)) {
g_object_unref (data);
return NULL;
SoupSoapParameter *temp_param;
recipient->status_enabled = TRUE;
- if ( (temp_param = soup_soap_parameter_get_first_child_by_name (subparam, "deleted")) ) {
+ if ((temp_param = soup_soap_parameter_get_first_child_by_name (subparam, "deleted"))) {
recipient->status = E_GW_ITEM_STAT_DELETED;
value = soup_soap_parameter_get_string_value (temp_param);
formatted_date = e_gw_connection_format_date_string (value);
g_free (value), value = NULL;
g_free (formatted_date), formatted_date = NULL;
}
- if ( (temp_param = soup_soap_parameter_get_first_child_by_name (subparam, "declined")) ) {
+ if ((temp_param = soup_soap_parameter_get_first_child_by_name (subparam, "declined"))) {
recipient->status = E_GW_ITEM_STAT_DECLINED;
value = soup_soap_parameter_get_string_value (temp_param);
formatted_date = e_gw_connection_format_date_string (value);
priv = item->priv;
- if ( (subparam = soup_soap_parameter_get_first_child_by_name (param, "requestReply")) ) {
+ if ((subparam = soup_soap_parameter_get_first_child_by_name (param, "requestReply"))) {
child = soup_soap_parameter_get_first_child_by_name (subparam, "whenConvenient");
if (child) {
value = soup_soap_parameter_get_string_value (child);