glib r6341 - trunk/gio
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: glib r6341 - trunk/gio
- Date: Mon, 21 Jan 2008 14:02:19 +0000 (GMT)
Author: matthiasc
Date: Mon Jan 21 14:02:19 2008
New Revision: 6341
URL: http://svn.gnome.org/viewvc/glib?rev=6341&view=rev
Log:
2008-01-21 Matthias Clasen <mclasen redhat com>
* glocal*.c:
* gvolumemanager.c: Whitespace cleanups.
* glocalfileoutputsteam.c (_g_local_file_output_stream_create):
Use the right mode when creating the file.
Modified:
trunk/gio/ChangeLog
trunk/gio/glocaldirectorymonitor.c
trunk/gio/glocalfile.c
trunk/gio/glocalfileinfo.c
trunk/gio/glocalfileinputstream.c
trunk/gio/glocalfilemonitor.c
trunk/gio/glocalfileoutputstream.c
trunk/gio/glocalvfs.c
trunk/gio/gvolumemonitor.c
Modified: trunk/gio/glocaldirectorymonitor.c
==============================================================================
--- trunk/gio/glocaldirectorymonitor.c (original)
+++ trunk/gio/glocaldirectorymonitor.c Mon Jan 21 14:02:19 2008
@@ -37,15 +37,16 @@
PROP_DIRNAME
};
-static gboolean g_local_directory_monitor_cancel (GFileMonitor* monitor);
-static void mounts_changed (GUnixMountMonitor *mount_monitor, gpointer user_data);
+static gboolean g_local_directory_monitor_cancel (GFileMonitor *monitor);
+static void mounts_changed (GUnixMountMonitor *mount_monitor,
+ gpointer user_data);
G_DEFINE_ABSTRACT_TYPE (GLocalDirectoryMonitor, g_local_directory_monitor, G_TYPE_FILE_MONITOR)
static void
-g_local_directory_monitor_finalize (GObject* object)
+g_local_directory_monitor_finalize (GObject *object)
{
- GLocalDirectoryMonitor* local_monitor;
+ GLocalDirectoryMonitor *local_monitor;
local_monitor = G_LOCAL_DIRECTORY_MONITOR (object);
g_free (local_monitor->dirname);
@@ -161,7 +162,7 @@
}
static void
-g_local_directory_monitor_init (GLocalDirectoryMonitor* local_monitor)
+g_local_directory_monitor_init (GLocalDirectoryMonitor *local_monitor)
{
}
@@ -248,7 +249,7 @@
klass = G_LOCAL_DIRECTORY_MONITOR_CLASS (g_type_class_ref (monitor_impls[i]));
- if (klass->is_supported())
+ if (klass->is_supported ())
{
chosen_class = klass;
break;
@@ -269,7 +270,7 @@
}
/**
- * g_local_directory_monitor_new:
+ * _g_local_directory_monitor_new:
* @dirname: filename of the directory to monitor.
* @flags: #GFileMonitorFlags.
*
@@ -308,7 +309,7 @@
}
static gboolean
-g_local_directory_monitor_cancel (GFileMonitor* monitor)
+g_local_directory_monitor_cancel (GFileMonitor *monitor)
{
GLocalDirectoryMonitor *local_monitor = G_LOCAL_DIRECTORY_MONITOR (monitor);
Modified: trunk/gio/glocalfile.c
==============================================================================
--- trunk/gio/glocalfile.c (original)
+++ trunk/gio/glocalfile.c Mon Jan 21 14:02:19 2008
@@ -94,7 +94,7 @@
#include "gioalias.h"
-static void g_local_file_file_iface_init (GFileIface *iface);
+static void g_local_file_file_iface_init (GFileIface *iface);
static GFileAttributeInfoList *local_writable_attributes = NULL;
static GFileAttributeInfoList *local_writable_namespaces = NULL;
@@ -111,7 +111,7 @@
G_IMPLEMENT_INTERFACE (G_TYPE_FILE,
g_local_file_file_iface_init))
-static char * find_mountpoint_for (const char *file, dev_t dev);
+static char *find_mountpoint_for (const char *file, dev_t dev);
static void
g_local_file_finalize (GObject *object)
@@ -355,7 +355,7 @@
while ((c = *string++) != 0)
{
- if (g_ascii_iscntrl(c))
+ if (g_ascii_iscntrl (c))
return FALSE;
}
@@ -684,7 +684,7 @@
device_equal (gconstpointer v1,
gconstpointer v2)
{
- return *(dev_t *)v1 == * (dev_t *)v2;
+ return *(dev_t *)v1 == *(dev_t *)v2;
}
static guint
@@ -936,7 +936,7 @@
return NULL;
}
- new_file = g_file_get_child_for_display_name (parent, display_name, error);
+ new_file = g_file_get_child_for_display_name (parent, display_name, error);
g_object_unref (parent);
if (new_file == NULL)
@@ -1025,13 +1025,13 @@
}
static gboolean
-g_local_file_set_attribute (GFile *file,
- const char *attribute,
- GFileAttributeType type,
- gpointer value_p,
- GFileQueryInfoFlags flags,
- GCancellable *cancellable,
- GError **error)
+g_local_file_set_attribute (GFile *file,
+ const char *attribute,
+ GFileAttributeType type,
+ gpointer value_p,
+ GFileQueryInfoFlags flags,
+ GCancellable *cancellable,
+ GError **error)
{
GLocalFile *local = G_LOCAL_FILE (file);
@@ -1053,7 +1053,7 @@
{
GLocalFile *local = G_LOCAL_FILE (file);
int res, chained_res;
- GFileIface* default_iface;
+ GFileIface *default_iface;
res = _g_local_file_info_set_attributes (local->filename,
info, flags,
Modified: trunk/gio/glocalfileinfo.c
==============================================================================
--- trunk/gio/glocalfileinfo.c (original)
+++ trunk/gio/glocalfileinfo.c Mon Jan 21 14:02:19 2008
@@ -546,7 +546,7 @@
char *value_p;
ssize_t len;
- len = g_fgetxattr (fd, xattr, value, sizeof (value)-1);
+ len = g_fgetxattr (fd, xattr, value, sizeof (value) - 1);
value_p = NULL;
if (len >= 0)
@@ -558,7 +558,7 @@
if (len < 0)
return;
- value_p = g_malloc (len+1);
+ value_p = g_malloc (len + 1);
len = g_fgetxattr (fd, xattr, value_p, len);
@@ -1072,11 +1072,11 @@
if (data->user_name != NULL)
data->real_name = g_strdup (data->user_name);
else
- data->real_name = g_strdup_printf("user #%d", (int)uid);
+ data->real_name = g_strdup_printf ("user #%d", (int)uid);
}
if (data->user_name == NULL)
- data->user_name = g_strdup_printf("%d", (int)uid);
+ data->user_name = g_strdup_printf ("%d", (int)uid);
g_hash_table_replace (uid_cache, GINT_TO_POINTER (uid), data);
@@ -1244,7 +1244,7 @@
basename = g_strconcat (g_checksum_get_string (checksum), ".png", NULL);
g_checksum_free (checksum);
- filename = g_build_filename (g_get_home_dir(),
+ filename = g_build_filename (g_get_home_dir (),
".thumbnails", "normal", basename,
NULL);
@@ -1253,7 +1253,7 @@
else
{
g_free (filename);
- filename = g_build_filename (g_get_home_dir(),
+ filename = g_build_filename (g_get_home_dir (),
".thumbnails", "fail",
"gnome-thumbnail-factory",
basename,
@@ -1268,10 +1268,10 @@
#ifdef G_OS_WIN32
static void
-win32_get_file_user_info (const gchar* filename,
- gchar **group_name,
- gchar **user_name,
- gchar **real_name)
+win32_get_file_user_info (const gchar *filename,
+ gchar **group_name,
+ gchar **user_name,
+ gchar **real_name)
{
PSECURITY_DESCRIPTOR psd = NULL;
DWORD sd_size = 0; /* first call calculates the size required */
@@ -1308,8 +1308,8 @@
domain, &domain_len, /* no domain info yet */
&name_use) && (ERROR_INSUFFICIENT_BUFFER != GetLastError()))
break;
- name = g_try_malloc (name_len*sizeof(wchar_t));
- domain = g_try_malloc (domain_len*sizeof(wchar_t));
+ name = g_try_malloc (name_len * sizeof (wchar_t));
+ domain = g_try_malloc (domain_len * sizeof (wchar_t));
if (name && domain &&
LookupAccountSidW (NULL, /* local machine */
psid,
@@ -1335,8 +1335,8 @@
domain, &domain_len, /* no domain info yet */
&name_use) && (ERROR_INSUFFICIENT_BUFFER != GetLastError()))
break;
- name = g_try_malloc (name_len*sizeof(wchar_t));
- domain = g_try_malloc (domain_len*sizeof(wchar_t));
+ name = g_try_malloc (name_len * sizeof (wchar_t));
+ domain = g_try_malloc (domain_len * sizeof (wchar_t));
if (name && domain &&
LookupAccountSidW (NULL, /* local machine */
psid,
@@ -1490,7 +1490,7 @@
mimetype_icon = g_strdup (content_type);
- while ((p = strchr(mimetype_icon, '/')) != NULL)
+ while ((p = strchr (mimetype_icon, '/')) != NULL)
*p = '-';
p = strchr (content_type, '/');
@@ -1927,7 +1927,7 @@
times[1].tv_usec = val_usec;
}
- res = utimes(filename, times);
+ res = utimes (filename, times);
if (res == -1)
{
g_set_error (error, G_IO_ERROR,
@@ -1941,13 +1941,13 @@
#endif
gboolean
-_g_local_file_info_set_attribute (char *filename,
- const char *attribute,
- GFileAttributeType type,
- gpointer value_p,
- GFileQueryInfoFlags flags,
- GCancellable *cancellable,
- GError **error)
+_g_local_file_info_set_attribute (char *filename,
+ const char *attribute,
+ GFileAttributeType type,
+ gpointer value_p,
+ GFileQueryInfoFlags flags,
+ GCancellable *cancellable,
+ GError **error)
{
GFileAttributeValue value = { 0 };
Modified: trunk/gio/glocalfileinputstream.c
==============================================================================
--- trunk/gio/glocalfileinputstream.c (original)
+++ trunk/gio/glocalfileinputstream.c Mon Jan 21 14:02:19 2008
@@ -256,8 +256,7 @@
pos = lseek (file->priv->fd, 0, SEEK_CUR);
- if (pos == (off_t)-1 &&
- errno == ESPIPE)
+ if (pos == (off_t)-1 && errno == ESPIPE)
return FALSE;
return TRUE;
Modified: trunk/gio/glocalfilemonitor.c
==============================================================================
--- trunk/gio/glocalfilemonitor.c (original)
+++ trunk/gio/glocalfilemonitor.c Mon Jan 21 14:02:19 2008
@@ -110,8 +110,7 @@
(*G_OBJECT_CLASS (g_local_file_monitor_parent_class)->finalize) (object);
}
-static void
-g_local_file_monitor_class_init (GLocalFileMonitorClass* klass)
+static void g_local_file_monitor_class_init (GLocalFileMonitorClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
@@ -177,7 +176,7 @@
klass = G_LOCAL_FILE_MONITOR_CLASS (g_type_class_ref (monitor_impls[i]));
- if (klass->is_supported())
+ if (klass->is_supported ())
{
chosen_class = klass;
break;
Modified: trunk/gio/glocalfileoutputstream.c
==============================================================================
--- trunk/gio/glocalfileoutputstream.c (original)
+++ trunk/gio/glocalfileoutputstream.c Mon Jan 21 14:02:19 2008
@@ -306,8 +306,7 @@
pos = lseek (file->priv->fd, 0, SEEK_CUR);
- if (pos == (off_t)-1 &&
- errno == ESPIPE)
+ if (pos == (off_t)-1 && errno == ESPIPE)
return FALSE;
return TRUE;
@@ -437,9 +436,7 @@
else
mode = 0666;
- fd = g_open (filename,
- O_CREAT | O_EXCL | O_WRONLY,
- 0666);
+ fd = g_open (filename, O_CREAT | O_EXCL | O_WRONLY, mode);
if (fd == -1)
{
int errsv = errno;
@@ -480,9 +477,7 @@
else
mode = 0666;
- fd = g_open (filename,
- O_CREAT | O_APPEND | O_WRONLY,
- mode);
+ fd = g_open (filename, O_CREAT | O_APPEND | O_WRONLY, mode);
if (fd == -1)
{
int errsv = errno;
@@ -863,9 +858,7 @@
mode = 0666;
/* If the file doesn't exist, create it */
- fd = g_open (filename,
- O_CREAT | O_EXCL | O_WRONLY,
- mode);
+ fd = g_open (filename, O_CREAT | O_EXCL | O_WRONLY, mode);
if (fd == -1 && errno == EEXIST)
{
Modified: trunk/gio/glocalvfs.c
==============================================================================
--- trunk/gio/glocalvfs.c (original)
+++ trunk/gio/glocalvfs.c Mon Jan 21 14:02:19 2008
@@ -134,7 +134,7 @@
user_end = parse_name;
if (user_end == user_start)
- user_prefix = g_strdup (g_get_home_dir());
+ user_prefix = g_strdup (g_get_home_dir ());
else
{
#ifdef HAVE_PWD_H
Modified: trunk/gio/gvolumemonitor.c
==============================================================================
--- trunk/gio/gvolumemonitor.c (original)
+++ trunk/gio/gvolumemonitor.c Mon Jan 21 14:02:19 2008
@@ -312,8 +312,8 @@
* Returns: a #GVolume or %NULL if no such volume is available.
**/
GVolume *
-g_volume_monitor_get_volume_for_uuid (GVolumeMonitor *volume_monitor,
- const char *uuid)
+g_volume_monitor_get_volume_for_uuid (GVolumeMonitor *volume_monitor,
+ const char *uuid)
{
GVolumeMonitorClass *class;
@@ -335,8 +335,8 @@
* Returns: a #GMount or %NULL if no such mount is available.
**/
GMount *
-g_volume_monitor_get_mount_for_uuid (GVolumeMonitor *volume_monitor,
- const char *uuid)
+g_volume_monitor_get_mount_for_uuid (GVolumeMonitor *volume_monitor,
+ const char *uuid)
{
GVolumeMonitorClass *class;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]