}
/* because the priv->marked_for_offline is populated only after open,
- thus get the actual value directy from the source */
+ * thus get the actual value directy from the source */
static gboolean
get_marked_for_offline (EBookBackend *backend)
{
static void
book_backend_ldap_refresh (EBookBackend *backend,
- EDataBook *book,
- guint32 opid,
- GCancellable *cancellable)
+ EDataBook *book,
+ guint32 opid,
+ GCancellable *cancellable)
{
EBookBackendLDAP *ldap_backend = E_BOOK_BACKEND_LDAP (backend);
static void
webdav_contact_set_etag (EContact *contact,
- const gchar *etag)
+ const gchar *etag)
{
EVCardAttribute *attr;
stored_version = e_file_cache_get_object (E_FILE_CACHE (priv->cache), WEBDAV_CACHE_VERSION_KEY);
/* The ETag was moved from REV to its own attribute, thus
- if the cache version is too low, update it. */
+ * if the cache version is too low, update it. */
old_version = !stored_version || atoi (stored_version) < atoi (WEBDAV_CACHE_VERSION);
g_mutex_unlock (&priv->cache_lock);
if (!e_file_cache_replace_object (E_FILE_CACHE (priv->cache),
WEBDAV_CACHE_VERSION_KEY,
WEBDAV_CACHE_VERSION))
- e_file_cache_add_object (E_FILE_CACHE (priv->cache),
+ e_file_cache_add_object (
+ E_FILE_CACHE (priv->cache),
WEBDAV_CACHE_VERSION_KEY,
WEBDAV_CACHE_VERSION);
static ESExpResult *
func_regex_normal (struct _ESExp *f,
- gint argc,
- struct _ESExpResult **argv,
- gpointer data)
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
return func_field_test (E_BOOK_QUERY_REGEX_NORMAL, f, argc, argv, data);
}
static ESExpResult *
func_regex_raw (struct _ESExp *f,
- gint argc,
- struct _ESExpResult **argv,
- gpointer data)
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
return func_field_test (E_BOOK_QUERY_REGEX_RAW, f, argc, argv, data);
}
static gboolean
regex_helper (const gchar *ps1,
- const gchar *ps2,
- const gchar *region,
- gboolean normalize)
+ const gchar *ps2,
+ const gchar *region,
+ gboolean normalize)
{
const gchar *field_data = ps1;
const gchar *expression = ps2;
regex = g_regex_new (expression, 0, 0, &error);
if (!regex) {
- g_warning ("Failed to parse regular expression '%s': %s",
- expression, error ? error->message : _("Unknown error"));
+ g_warning (
+ "Failed to parse regular expression '%s': %s",
+ expression, error ? error->message : _("Unknown error"));
g_clear_error (&error);
return FALSE;
}
static gboolean
regex_normal_helper (const gchar *ps1,
- const gchar *ps2,
- const gchar *region)
+ const gchar *ps2,
+ const gchar *region)
{
return regex_helper (ps1, ps2, region, TRUE);
}
static gboolean
regex_raw_helper (const gchar *ps1,
- const gchar *ps2,
- const gchar *region)
+ const gchar *ps2,
+ const gchar *region)
{
return regex_helper (ps1, ps2, region, FALSE);
}
static ESExpResult *
func_regex_normal (struct _ESExp *f,
- gint argc,
- struct _ESExpResult **argv,
- gpointer data)
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
static ESExpResult *
func_regex_raw (struct _ESExp *f,
- gint argc,
- struct _ESExpResult **argv,
- gpointer data)
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
SearchContext *ctx = data;
}
static void
-ebsdb_regexp (sqlite3_context *context,
- int argc,
- sqlite3_value **argv)
+ebsdb_regexp (sqlite3_context *context,
+ gint argc,
+ sqlite3_value **argv)
{
GRegex *regex;
const gchar *expression;
if (!regex) {
GError *error = NULL;
- expression = (const gchar *)sqlite3_value_text (argv[0]);
+ expression = (const gchar *) sqlite3_value_text (argv[0]);
regex = g_regex_new (expression, 0, 0, &error);
if (!regex) {
- sqlite3_result_error (context,
- error ?
- error->message :
- _("Error parsing regular expression"),
- -1);
+ sqlite3_result_error (
+ context,
+ error ?
+ error->message :
+ _("Error parsing regular expression"),
+ -1);
g_clear_error (&error);
return;
}
/* SQLite will take care of freeing the GRegex when we're done with the query */
- sqlite3_set_auxdata (context, 0, regex, (void(*)(void*))g_regex_unref);
+ sqlite3_set_auxdata (context, 0, regex, (void (*)(gpointer)) g_regex_unref);
}
/* Now perform the comparison */
- text = (const gchar *)sqlite3_value_text (argv[1]);
+ text = (const gchar *) sqlite3_value_text (argv[1]);
if (text != NULL) {
gboolean match;
ret = sqlite3_collation_needed (ebsdb->priv->db, ebsdb, create_collation);
if (ret == SQLITE_OK)
- ret = sqlite3_create_function (ebsdb->priv->db, "regexp", 2, SQLITE_UTF8, ebsdb,
- ebsdb_regexp, NULL, NULL);
+ ret = sqlite3_create_function (
+ ebsdb->priv->db, "regexp", 2, SQLITE_UTF8, ebsdb,
+ ebsdb_regexp, NULL, NULL);
if (ret != SQLITE_OK) {
if (!ebsdb->priv->db) {
}
static ESExpResult *
-func_check_regex_raw (struct _ESExp *f,
- gint argc,
- struct _ESExpResult **argv,
- gpointer data)
+func_check_regex_raw (struct _ESExp *f,
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
/* Raw REGEX queries are not in the summary, we only keep
* normalized data in the summary
static ESExpResult *
func_regex (struct _ESExp *f,
- gint argc,
- struct _ESExpResult **argv,
- gpointer data)
+ gint argc,
+ struct _ESExpResult **argv,
+ gpointer data)
{
return convert_match_exp (f, argc, argv, data, MATCH_REGEX);
}
-
/* 'builtin' functions */
static struct {
const gchar *name;
**/
gchar *
e_cal_backend_store_get_components_by_uid_as_ical_string (ECalBackendStore *store,
- const gchar *uid)
+ const gchar *uid)
{
GSList *comps;
gchar *ical_string = NULL;
GThread *thread;
/* Do the actual free in a dedicated thread, because the driver or
- folder unref can do network/blocking I/O operations, but this
- function is called in the main (UI) thread.
+ * folder unref can do network/blocking I/O operations, but this
+ * function is called in the main (UI) thread.
*/
thread = g_thread_new (NULL, folder_filter_data_free_thread, data);
g_thread_unref (thread);
}
/* Report errors only if nothing was decrypted; missing sender's key used
- for signature of a signed and encrypted messages causes GPG to return
- failure, thus count with it.
+ * for signature of a signed and encrypted messages causes GPG to return
+ * failure, thus count with it.
*/
if (gpg_ctx_op_wait (gpg) != 0 && gpg->nodata) {
const gchar *diagnostics;
}
/* Ick. We need to store the original gobject pointer too, since that's
- used as the key in one of the hash tables. So to clean up after the
- object dies and the GWeakRef starts returning NULL, we'll need to
- know where it *was*. This is safe because we'll always check and
- avoid adding a duplicate. But still, ick. */
+ * used as the key in one of the hash tables. So to clean up after the
+ * object dies and the GWeakRef starts returning NULL, we'll need to
+ * know where it *was*. This is safe because we'll always check and
+ * avoid adding a duplicate. But still, ick. */
typedef struct {
GWeakRef ref;
gpointer obj;
static void
object_bag_notify (CamelObjectBag *bag,
- GObject *where_the_object_was)
+ GObject *where_the_object_was)
{
gconstpointer key;
if (obj) {
/* The object is being removed from the bag while it's
- still alive, e.g. by camel_object_bag_remove()
- or camel_object_bag_destroy(). Drop the weak_ref. */
- g_object_weak_unref (obj, (GWeakNotify) object_bag_notify,
- ref->bag);
+ * still alive, e.g. by camel_object_bag_remove()
+ * or camel_object_bag_destroy(). Drop the weak_ref. */
+ g_object_weak_unref (
+ obj, (GWeakNotify) object_bag_notify,
+ ref->bag);
g_object_unref (obj);
}
g_weak_ref_clear (&ref->ref);
}
static gboolean
-object_in_bag (CamelObjectBag *bag, gpointer object)
+object_in_bag (CamelObjectBag *bag,
+ gpointer object)
{
gconstpointer key;
ObjRef *ref;
ref = g_slice_new (ObjRef);
ref->bag = bag;
/* We need to stash a 'raw' pointer since that's the key we use
- in the key_table */
+ * in the key_table */
ref->obj = object;
g_weak_ref_init (&ref->ref, object);
copied_key = bag->key_copy_func (key);
g_hash_table_insert (bag->object_table, copied_key, ref);
object_bag_unreserve (bag, key);
- g_object_weak_ref (G_OBJECT (object),
- (GWeakNotify) object_bag_notify, bag);
+ g_object_weak_ref (
+ G_OBJECT (object),
+ (GWeakNotify) object_bag_notify, bag);
}
g_mutex_unlock (&bag->mutex);
return ret;
}
-
static void
sasl_ntlm_finalize (GObject *object)
{
service->priv->connection_op = op;
/* Do not change the status if "Connecting" - in case a provider calls
- "Disconnect" during the connection phase, which confuses the other
- logic here, effectively makes the service's connection state "Connected",
- instead of "Disconnected", at the end. */
+ * "Disconnect" during the connection phase, which confuses the other
+ * logic here, effectively makes the service's connection state "Connected",
+ * instead of "Disconnected", at the end. */
if (service->priv->status != CAMEL_SERVICE_CONNECTING) {
service->priv->status = CAMEL_SERVICE_DISCONNECTING;
service_queue_notify_connection_status (service);
suites[i].custom,
TRUE);
-
-
/*********************************************
* REGEX QUERIES FOLLOW *
*********************************************/
"/Regex/Normal/.*jack.*",
suites[i].func,
e_book_query_field_test (
- E_CONTACT_FULL_NAME,
+ E_CONTACT_FULL_NAME,
E_BOOK_QUERY_REGEX_NORMAL,
".*jack.*"),
2,
"/Regex/Normal/Keypad/^[jkl5][ghi4][mno6].*",
suites[i].func,
e_book_query_field_test (
- E_CONTACT_FULL_NAME,
+ E_CONTACT_FULL_NAME,
E_BOOK_QUERY_REGEX_NORMAL,
"^[jkl5][ghi4][mno6].*"),
3,
"/Regex/Normal/Fuzzy/VanityNumber/ELEPHANT",
suites[i].func,
e_book_query_field_test (
- E_CONTACT_TEL,
+ E_CONTACT_TEL,
E_BOOK_QUERY_REGEX_NORMAL,
".*[def3]" /* E */
"[^\\da-z]*[jkl5]" /* L */
"/Regex/Raw/.*Jack.*",
suites[i].func,
e_book_query_field_test (
- E_CONTACT_FULL_NAME,
+ E_CONTACT_FULL_NAME,
E_BOOK_QUERY_REGEX_RAW,
".*Jack.*"),
2,
"/Regex/Raw/Keypad/^[jkl5][ghi4][mno6].*",
suites[i].func,
e_book_query_field_test (
- E_CONTACT_FULL_NAME,
+ E_CONTACT_FULL_NAME,
E_BOOK_QUERY_REGEX_RAW,
"^[jklJKL5][ghiGHI4][mnoMNO6].*"),
3,
"/Regex/Raw/Fuzzy/VanityNumber/ELEPHANT",
suites[i].func,
e_book_query_field_test (
- E_CONTACT_TEL,
+ E_CONTACT_TEL,
E_BOOK_QUERY_REGEX_RAW,
".*[defDEF3]" /* E */
"[^\\da-z]*[jklJKL5]" /* L */