[Xfce4-commits] <libxfce4util:master> Remove trailing spaces and tabs.
Nick Schermer
noreply at xfce.org
Sun Mar 6 19:40:01 CET 2011
Updating branch refs/heads/master
to e260e213584a38d0b7f5026ec2eaea2d2a588f10 (commit)
from 57c306e902068cb0fe2ecc8271e36718dd8c058b (commit)
commit e260e213584a38d0b7f5026ec2eaea2d2a588f10
Author: Nick Schermer <nick at xfce.org>
Date: Sun Mar 6 19:28:13 2011 +0100
Remove trailing spaces and tabs.
libxfce4util/debug.h | 6 ++--
libxfce4util/xfce-desktopentry.c | 30 +++++++++++-----------
libxfce4util/xfce-desktopentry.h | 2 +-
libxfce4util/xfce-fileutils.c | 2 +-
libxfce4util/xfce-i18n.c | 12 ++++----
libxfce4util/xfce-kiosk.c | 2 +-
libxfce4util/xfce-miscutils.c | 32 ++++++++++++------------
libxfce4util/xfce-miscutils.h | 10 +++---
libxfce4util/xfce-posix-signal-handler.c | 40 +++++++++++++++---------------
libxfce4util/xfce-rc-config.c | 2 +-
libxfce4util/xfce-rc-simple.c | 14 +++++-----
libxfce4util/xfce-rc.c | 6 ++--
libxfce4util/xfce-rc.h | 2 +-
libxfce4util/xfce-resource.c | 2 +-
libxfce4util/xfce-utf8.c | 6 ++--
libxfce4util/xfce-utf8.h | 4 +-
16 files changed, 86 insertions(+), 86 deletions(-)
diff --git a/libxfce4util/debug.h b/libxfce4util/debug.h
index 29a05e8..7611b41 100644
--- a/libxfce4util/debug.h
+++ b/libxfce4util/debug.h
@@ -36,9 +36,9 @@
#if defined(__NetBSD__) || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
#define __DBG_FUNC__ __func__
#elif defined(__GNUC__) && __GNUC__ >= 3
-#define __DBG_FUNC__ __FUNCTION__
+#define __DBG_FUNC__ __FUNCTION__
#elif defined(__SVR4) && defined(__sun)
-#define __DBG_FUNC__ __func__
+#define __DBG_FUNC__ __func__
#else
#define __DBG_FUNC__ "??"
#endif
@@ -96,4 +96,4 @@
#endif
-#endif /* !__LIBXFCE4UTIL_DEBUG_H__ */
+#endif /* !__LIBXFCE4UTIL_DEBUG_H__ */
diff --git a/libxfce4util/xfce-desktopentry.c b/libxfce4util/xfce-desktopentry.c
index c1afbcf..5de4fb0 100644
--- a/libxfce4util/xfce-desktopentry.c
+++ b/libxfce4util/xfce-desktopentry.c
@@ -107,7 +107,7 @@ xfce_desktop_entry_get_type (void)
NULL,
NULL,
(GClassInitFunc) xfce_desktop_entry_class_init,
- NULL,
+ NULL,
NULL,
sizeof (XfceDesktopEntry),
0,
@@ -199,20 +199,20 @@ parse_desktop_entry_line (const gchar *line,
const gchar *q;
const gchar *r;
const gchar *s;
-
+
/* initialize to NULL, so we don't have tho think about it anymore */
*section_return = NULL;
*key_return = NULL;
*value_return = NULL;
*locale_return = NULL;
-
+
/* skip whitespace */
while (g_ascii_isspace (*p))
++p;
if (*p == '#' || *p == '\n' || *p == '\0')
return FALSE;
-
+
if (*p == '[')
{
++p;
@@ -239,7 +239,7 @@ parse_desktop_entry_line (const gchar *line,
s = strchr (p, '[');
if (G_UNLIKELY (s == NULL))
return FALSE;
-
+
*key_return = g_strndup (p, s - p);
++s;
@@ -250,7 +250,7 @@ parse_desktop_entry_line (const gchar *line,
{
*key_return = g_strndup (p, (q + 1) - p);
}
-
+
while (g_ascii_isspace (*r))
++r;
@@ -301,10 +301,10 @@ xfce_desktop_entry_parse (XfceDesktopEntry *desktop_entry)
}
else if (**p == '[' && g_ascii_strncasecmp(*p, "[Desktop Entry]", 15))
in_d_e_section = FALSE;
-
+
if (!in_d_e_section)
continue;
-
+
if (!parse_desktop_entry_line (*p, §ion, &key, &value, &locale))
continue;
@@ -314,7 +314,7 @@ xfce_desktop_entry_parse (XfceDesktopEntry *desktop_entry)
current_section = section;
continue;
}
-
+
item = desktop_entry->priv->items;
for (i = 0; i < desktop_entry->priv->num_items; ++i, ++item)
@@ -336,7 +336,7 @@ xfce_desktop_entry_parse (XfceDesktopEntry *desktop_entry)
item->value = g_strdup (value);
result = TRUE;
}
-
+
if (current_section != NULL)
{
g_free (item->section);
@@ -346,7 +346,7 @@ xfce_desktop_entry_parse (XfceDesktopEntry *desktop_entry)
break;
}
}
-
+
g_free (value);
g_free (key);
g_free (locale);
@@ -590,23 +590,23 @@ xfce_desktop_entry_has_translated_entry (XfceDesktopEntry *desktop_entry,
{
const XfceDesktopEntryItem *item;
const gchar *current_locale;
-
+
g_return_val_if_fail (XFCE_IS_DESKTOP_ENTRY (desktop_entry), FALSE);
g_return_val_if_fail (key != NULL, FALSE);
-
+
item = xfce_desktop_entry_lookup (desktop_entry, key);
if (G_UNLIKELY (item == NULL || item->value == NULL || *item->value == '\0'))
return FALSE;
current_locale = setlocale (LC_MESSAGES, NULL);
-
+
if (item->translated_value == NULL
&& !xfce_locale_match (current_locale, "C")
&& !xfce_locale_match (current_locale, "POSIX"))
{
return FALSE;
}
-
+
return TRUE;
}
diff --git a/libxfce4util/xfce-desktopentry.h b/libxfce4util/xfce-desktopentry.h
index 2c33789..4d28de8 100644
--- a/libxfce4util/xfce-desktopentry.h
+++ b/libxfce4util/xfce-desktopentry.h
@@ -63,7 +63,7 @@ struct _XfceDesktopEntryClass
GType xfce_desktop_entry_get_type (void) G_GNUC_CONST;
-XfceDesktopEntry *xfce_desktop_entry_new (const gchar *file,
+XfceDesktopEntry *xfce_desktop_entry_new (const gchar *file,
const gchar **categories,
gint num_categories) G_GNUC_MALLOC;
XfceDesktopEntry *xfce_desktop_entry_new_from_data (const gchar *data,
diff --git a/libxfce4util/xfce-fileutils.c b/libxfce4util/xfce-fileutils.c
index a096964..efae3ce 100644
--- a/libxfce4util/xfce-fileutils.c
+++ b/libxfce4util/xfce-fileutils.c
@@ -93,7 +93,7 @@ xfce_mkdirhier (const gchar *whole_path,
else if (p[1] == '\0')
last = 1;
- *p = '\0';
+ *p = '\0';
if (first)
{
diff --git a/libxfce4util/xfce-i18n.c b/libxfce4util/xfce-i18n.c
index 34d096c..d6e7f97 100644
--- a/libxfce4util/xfce-i18n.c
+++ b/libxfce4util/xfce-i18n.c
@@ -295,7 +295,7 @@ xfce_get_dir_localized_r (gchar *buffer, gsize length, const gchar *directory)
* @paths is a ':'-separated list of pathnames.
*
* %F - The @filename
- * %L - The language string, as returned by
+ * %L - The language string, as returned by
* setlocale(LC_MESSAGES, NULL)
* %l - The language component of the language string
* %N - application name
@@ -392,7 +392,7 @@ xfce_get_path_localized (gchar *dst,
{
return dst;
}
-
+
if (*paths == ':')
{
d = dst;
@@ -400,7 +400,7 @@ xfce_get_path_localized (gchar *dst,
need_lang = FALSE;
continue;
}
-
+
break;
}
@@ -408,7 +408,7 @@ xfce_get_path_localized (gchar *dst,
{
if (paths[1] == 'F')
{
- /*
+ /*
* if "filename" is NULL, then simply skip
* the %F.
*/
@@ -452,12 +452,12 @@ xfce_get_path_localized (gchar *dst,
while (*f && d < dstlast)
*d++ = *f++;
}
-
+
paths += 2;
continue;
}
}
-
+
*d++ = *paths++;
}
diff --git a/libxfce4util/xfce-kiosk.c b/libxfce4util/xfce-kiosk.c
index 6af2430..e72b107 100644
--- a/libxfce4util/xfce-kiosk.c
+++ b/libxfce4util/xfce-kiosk.c
@@ -338,7 +338,7 @@ mtime (const gchar *path)
struct stat sb;
if (G_UNLIKELY (path == NULL) || stat (path, &sb) < 0)
- return (time_t) 0;
+ return (time_t) 0;
return sb.st_mtime;
}
diff --git a/libxfce4util/xfce-miscutils.c b/libxfce4util/xfce-miscutils.c
index 1b464aa..7714c3e 100644
--- a/libxfce4util/xfce-miscutils.c
+++ b/libxfce4util/xfce-miscutils.c
@@ -62,13 +62,13 @@
#include <libxfce4util/libxfce4util.h>
#include <libxfce4util/libxfce4util-alias.h>
-#define XFCE4DIR ".xfce4"
+#define XFCE4DIR ".xfce4"
/* environment variable the user can set to change the path to
* the users .xfce4 directory. If not set, the xfce_userdir defaults
* to "$HOME/.xfce4".
*/
-#define XFCE4HOME_ENVVAR "XFCE4HOME"
+#define XFCE4HOME_ENVVAR "XFCE4HOME"
G_LOCK_DEFINE_STATIC(_lock);
@@ -161,7 +161,7 @@ xfce_version_string (void)
/**
* xfce_get_homedir:
- *
+ *
* Similar to g_get_homedir() in functionality but will never return NULL.
* While g_get_homedir() may return NULL under certain circumstances, this
* function is garantied to never ever return NULL, but always return a
@@ -179,7 +179,7 @@ xfce_get_homedir (void)
if (!xfce_homedir)
internal_initialize ();
G_UNLOCK (_lock);
-
+
return xfce_homedir;
}
@@ -320,7 +320,7 @@ xfce_strjoin (const gchar *separator,
/**
* xfce_gethostname:
- *
+ *
* Portable way to query the hostname of the node running the process. This
* function does not ever return %NULL, but always returns a string containing
* the current node's hostname.
@@ -333,7 +333,7 @@ xfce_gethostname (void)
{
#if defined(HAVE_GETHOSTNAME)
#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN 256
+#define MAXHOSTNAMELEN 256
#endif
char hostname[MAXHOSTNAMELEN];
@@ -372,7 +372,7 @@ xfce_putenv (const gchar *string)
#ifdef HAVE_BROKEN_PUTENV
gchar* buffer;
int result, sverrno;
-
+
/*
* We need to use plattform malloc() here, cause g_malloc() need not
* to use malloc(), and we don't know about the evil interna of this
@@ -387,11 +387,11 @@ xfce_putenv (const gchar *string)
strcpy(buffer, string);
#endif
if ((result = putenv (buffer)) < 0)
- {
- sverrno = errno;
- free (buffer);
- errno = sverrno;
- }
+ {
+ sverrno = errno;
+ free (buffer);
+ errno = sverrno;
+ }
}
else
{
@@ -449,7 +449,7 @@ xfce_setenv (const gchar *name,
return result;
#else
return setenv (name, value, overwrite);
-#endif /* !HAVE_SETENV */
+#endif /* !HAVE_SETENV */
}
@@ -482,9 +482,9 @@ xfce_unsetenv (const gchar *name)
char **envp1;
char **envp2;
int length;
-
+
length = strlen (name);
-
+
for (envp1 = envp2 = environ; *envp1 != NULL; ++envp1)
if (strncmp (*envp1, name, length) != 0 || (*envp1)[length] != '=')
*envp2++ = *envp1;
@@ -583,7 +583,7 @@ xfce_expand_variables (const gchar *command,
{
/* walk to the end of a valid variable name */
for (start = ++p; *p != '\0' && (g_ascii_isalnum (*p) || *p == '_'); ++p);
-
+
if (start < p)
{
value = NULL;
diff --git a/libxfce4util/xfce-miscutils.h b/libxfce4util/xfce-miscutils.h
index d3b81bc..da7d87b 100644
--- a/libxfce4util/xfce-miscutils.h
+++ b/libxfce4util/xfce-miscutils.h
@@ -37,14 +37,14 @@ const gchar* xfce_version_string (void) G_GNUC_PURE;
const gchar* xfce_get_homedir (void) G_GNUC_PURE;
gchar* xfce_get_homefile_r (gchar *buffer,
- size_t length,
+ size_t length,
const gchar *format,
...);
const gchar* xfce_get_userdir (void) G_GNUC_PURE;
gchar* xfce_get_userfile_r (gchar *buffer,
- size_t length,
+ size_t length,
const gchar *format,
...);
@@ -58,10 +58,10 @@ gchar* xfce_get_userfile_r (gchar *buffer,
#elif defined(G_HAVE_GNUC_VARARGS)
-#define xfce_get_homefile(first_element...) \
+#define xfce_get_homefile(first_element...) \
(g_build_filename (xfce_get_homedir (), ## first_element))
-#define xfce_get_userfile(first_element...) \
+#define xfce_get_userfile(first_element...) \
(g_build_filename (xfce_get_userdir (), ## first_element))
#else
@@ -98,4 +98,4 @@ gchar* xfce_expand_variables (const gchar *command,
G_END_DECLS
-#endif /* __XFCE_MISCUTILS_H__ */
+#endif /* __XFCE_MISCUTILS_H__ */
diff --git a/libxfce4util/xfce-posix-signal-handler.c b/libxfce4util/xfce-posix-signal-handler.c
index 9d01a8d..e60c012 100644
--- a/libxfce4util/xfce-posix-signal-handler.c
+++ b/libxfce4util/xfce-posix-signal-handler.c
@@ -67,7 +67,7 @@ xfce_posix_signal_handler_data_free(XfcePosixSignalHandlerData *hdata)
{
if(!hdata)
return;
-
+
sigaction(hdata->signal_id, &hdata->old_sa, NULL);
g_free(hdata);
}
@@ -81,7 +81,7 @@ xfce_posix_signal_handler_pipe_io(GIOChannel *source,
GError *error = NULL;
gsize bin = 0;
XfcePosixSignalHandlerData *hdata;
-
+
if(G_IO_STATUS_NORMAL == g_io_channel_read_chars(source, (gchar *)&signal_id,
sizeof(signal_id), &bin,
&error)
@@ -99,7 +99,7 @@ xfce_posix_signal_handler_pipe_io(GIOChannel *source,
(int)sizeof(signal_id), (int)bin);
}
}
-
+
return TRUE;
}
@@ -125,7 +125,7 @@ xfce_posix_signal_handler_init(GError **error)
{
if(G_UNLIKELY(__inited))
return TRUE;
-
+
if(pipe(__signal_pipe)) {
if(error) {
g_set_error(error, G_FILE_ERROR, g_file_error_from_errno(errno),
@@ -133,17 +133,17 @@ xfce_posix_signal_handler_init(GError **error)
}
return FALSE;
}
-
+
__handlers = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL,
(GDestroyNotify)xfce_posix_signal_handler_data_free);
-
+
__signal_io = g_io_channel_unix_new(SIGNAL_PIPE_READ);
g_io_channel_set_close_on_unref(__signal_io, FALSE);
g_io_channel_set_encoding(__signal_io, NULL, NULL);
g_io_channel_set_buffered(__signal_io, FALSE);
__io_watch_id = g_io_add_watch(__signal_io, G_IO_IN,
xfce_posix_signal_handler_pipe_io, NULL);
-
+
__inited = TRUE;
return TRUE;
}
@@ -159,20 +159,20 @@ xfce_posix_signal_handler_shutdown(void)
{
if(G_UNLIKELY(!__inited))
return;
-
+
g_source_remove(__io_watch_id);
__io_watch_id = 0;
g_io_channel_unref(__signal_io);
__signal_io = NULL;
-
+
g_hash_table_destroy(__handlers);
__handlers = NULL;
-
+
close(SIGNAL_PIPE_READ);
SIGNAL_PIPE_READ = -1;
close(SIGNAL_PIPE_WRITE);
SIGNAL_PIPE_WRITE = -1;
-
+
__inited = FALSE;
}
@@ -198,7 +198,7 @@ xfce_posix_signal_handler_set_handler(gint signal_id,
{
XfcePosixSignalHandlerData *hdata;
struct sigaction sa;
-
+
if(G_UNLIKELY(!__inited)) {
if(error) {
g_set_error(error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
@@ -206,25 +206,25 @@ xfce_posix_signal_handler_set_handler(gint signal_id,
}
return FALSE;
}
-
+
if(!handler) {
g_warning("NULL signal handler supplied; removing existing handler");
xfce_posix_signal_handler_restore_handler(signal_id);
return TRUE;
}
-
+
if(g_hash_table_lookup(__handlers, GINT_TO_POINTER(signal_id)))
xfce_posix_signal_handler_restore_handler(signal_id);
-
+
hdata = g_new0(XfcePosixSignalHandlerData, 1);
hdata->signal_id = signal_id;
hdata->handler = handler;
hdata->user_data = user_data;
-
+
memset(&sa, 0, sizeof(sa));
sa.sa_handler = xfce_posix_signal_handler;
sa.sa_flags = SA_RESTART;
-
+
if(sigaction(signal_id, &sa, &hdata->old_sa)) {
if(error) {
g_set_error(error, G_FILE_ERROR, g_file_error_from_errno(errno),
@@ -233,9 +233,9 @@ xfce_posix_signal_handler_set_handler(gint signal_id,
g_free(hdata);
return FALSE;
}
-
+
g_hash_table_insert(__handlers, GINT_TO_POINTER(signal_id), hdata);
-
+
return TRUE;
}
@@ -250,7 +250,7 @@ xfce_posix_signal_handler_restore_handler(gint signal_id)
{
if(G_UNLIKELY(!__inited))
return;
-
+
g_hash_table_remove(__handlers, GINT_TO_POINTER(signal_id));
}
diff --git a/libxfce4util/xfce-rc-config.c b/libxfce4util/xfce-rc-config.c
index 7f8320d..8369a03 100644
--- a/libxfce4util/xfce-rc-config.c
+++ b/libxfce4util/xfce-rc-config.c
@@ -268,7 +268,7 @@ _xfce_rc_config_get_groups (const XfceRc *rc)
tmp = _xfce_rc_simple_get_groups (XFCE_RC_CONST (list->data));
if (tmp == NULL)
continue;
-
+
if (result == NULL)
result = tmp;
else
diff --git a/libxfce4util/xfce-rc-simple.c b/libxfce4util/xfce-rc-simple.c
index 585000d..7447a27 100644
--- a/libxfce4util/xfce-rc-simple.c
+++ b/libxfce4util/xfce-rc-simple.c
@@ -128,7 +128,7 @@ struct _Group
-/* because strcmp is by far the most called function in this code,
+/* because strcmp is by far the most called function in this code,
* we inline the comparison of the first character */
#define str_is_equal(a,b) (*(a) != *(b) ? FALSE : strcmp ((a), (b)) == 0)
@@ -188,18 +188,18 @@ simple_add_entry (XfceRcSimple *simple,
/* this point is reached when there is a .desktop file that lists a language specific key for something that had no language-neutral key yet.
Example:
b.desktop
-
+
[Desktop Entry]
Version=1.0
Name=xyz
GenericName[de_AT]=Test
-
+
here GenericName[de_AT] will end up here.
The previous way with g_return_val_if_fail would call an assertion failure and terminate the _whole application_(!!).
-
+
Saner ways to react are either just ignoring GenericName[de_AT] altogether, or, alternatively, just set the normal GenericName
to Test too (i.e. imply GenericName=Test).
-
+
For now, we are just ignoring the line altogether. But we aren't assert-failing anymore and the apps dont crash anymore.
*/
return NULL;
@@ -847,11 +847,11 @@ _xfce_rc_simple_get_entries (const XfceRc *rc,
if (group == NULL)
return NULL;
-
+
result = g_new (gchar *, 11);
size = 10;
pos = 0;
-
+
for (entry = group->efirst; entry != NULL; entry = entry->next)
{
if (size == pos)
diff --git a/libxfce4util/xfce-rc.c b/libxfce4util/xfce-rc.c
index bd816ad..13c3fdb 100644
--- a/libxfce4util/xfce-rc.c
+++ b/libxfce4util/xfce-rc.c
@@ -315,7 +315,7 @@ xfce_rc_get_groups (const XfceRc *rc)
* @rc : an #XfceRc object.
* @group : the name of the group to get entries from.
*
- * Returns the names of all entries in @group if any.
+ * Returns the names of all entries in @group if any.
*
* %NULL is a valid input value for @group. #xfce_rc_get_entries will
* then return all entries in the so called "NULL group". Though this
@@ -455,7 +455,7 @@ xfce_rc_delete_entry (XfceRc *rc, const gchar *key, gboolean global)
{
g_return_if_fail (rc != NULL);
g_return_if_fail (key != NULL);
-
+
if (rc->delete_entry != NULL)
(*rc->delete_entry) (rc, key, global);
}
@@ -467,7 +467,7 @@ xfce_rc_delete_entry (XfceRc *rc, const gchar *key, gboolean global)
* @rc : an #XfceRc object.
* @key : the key to search for.
*
- * Checks whether the @key has an entry in the current group.
+ * Checks whether the @key has an entry in the current group.
*
* Return value: %TRUE if the @key is available, else %FALSE.
*
diff --git a/libxfce4util/xfce-rc.h b/libxfce4util/xfce-rc.h
index 59b1116..cb3c0f6 100644
--- a/libxfce4util/xfce-rc.h
+++ b/libxfce4util/xfce-rc.h
@@ -98,7 +98,7 @@ void xfce_rc_write_list_entry (XfceRc *rc,
const gchar *key,
gchar **value,
const gchar *separator);
-
+
G_END_DECLS;
#endif /* !__XFCE_RC_H__ */
diff --git a/libxfce4util/xfce-resource.c b/libxfce4util/xfce-resource.c
index 0e9fe84..0390533 100644
--- a/libxfce4util/xfce-resource.c
+++ b/libxfce4util/xfce-resource.c
@@ -58,7 +58,7 @@ _res_getenv (const gchar *variable,
{
static gchar buffer[PATH_MAX];
const gchar *result;
-
+
result = g_getenv (variable);
if (result == NULL)
{
diff --git a/libxfce4util/xfce-utf8.c b/libxfce4util/xfce-utf8.c
index b78d523..338d3b5 100644
--- a/libxfce4util/xfce-utf8.c
+++ b/libxfce4util/xfce-utf8.c
@@ -50,9 +50,9 @@ gchar*
xfce_utf8_remove_controls (gchar *str, gssize max_len, const gchar *end)
{
gchar *p;
-
+
g_return_val_if_fail (str != NULL, NULL);
-
+
for (p = str; p != NULL && *p != '\0' && (!end || p < end) && (max_len < 0 || (p - str) < max_len); )
{
if ((*p > 0) && (*p < 32))
@@ -70,7 +70,7 @@ xfce_utf8_remove_controls (gchar *str, gssize max_len, const gchar *end)
* @src : target string.
* @max_len : max characters to duplicate or -1 for no character limit.
*
- * Duplicates the @src string up to @max_len characters
+ * Duplicates the @src string up to @max_len characters
* (note that characters does not mean bytes with UTF-8).
*
* The caller is responsible to free the returned string
diff --git a/libxfce4util/xfce-utf8.h b/libxfce4util/xfce-utf8.h
index 57c9d2c..05e7775 100644
--- a/libxfce4util/xfce-utf8.h
+++ b/libxfce4util/xfce-utf8.h
@@ -35,9 +35,9 @@ gchar *xfce_utf8_remove_controls (gchar *str,
gssize max_len,
const gchar *end);
-gchar *xfce_utf8_strndup (const gchar *src,
+gchar *xfce_utf8_strndup (const gchar *src,
gssize max_len) G_GNUC_MALLOC;
G_END_DECLS
-#endif /* !__XFCE_UTF8_H__ */
+#endif /* !__XFCE_UTF8_H__ */
More information about the Xfce4-commits
mailing list