"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/manual-paths.c" between
dbus-1.13.12.tar.xz and dbus-1.13.14.tar.xz

About: D-Bus is an inter-process communication (IPC) system, allowing multiple, concurrently-running applications to communicate with one another. D-Bus supplies both a system daemon and a per-user-login-session daemon. Development version.

manual-paths.c  (dbus-1.13.12.tar.xz):manual-paths.c  (dbus-1.13.14.tar.xz)
skipping to change at line 12 skipping to change at line 12
* Simple manual paths check * Simple manual paths check
* *
* syntax: manual-paths * syntax: manual-paths
* *
*/ */
#include "config.h" #include "config.h"
#include "dbus/dbus-list.h" #include "dbus/dbus-list.h"
#include "dbus/dbus-internals.h" #include "dbus/dbus-internals.h"
#include "dbus/dbus-sysdeps.h" #include "dbus/dbus-sysdeps.h"
#include "test-utils.h"
#include <stdio.h> #include <stdio.h>
static dbus_bool_t static dbus_bool_t
print_install_root (void) print_install_root (void)
{ {
DBusString runtime_prefix; DBusString runtime_prefix;
if (!_dbus_string_init (&runtime_prefix)) if (!_dbus_string_init (&runtime_prefix))
{ {
_dbus_assert_not_reached ("out of memory"); _dbus_test_fatal ("out of memory");
return FALSE; return FALSE;
} }
if (!_dbus_get_install_root (&runtime_prefix)) if (!_dbus_get_install_root (&runtime_prefix))
{ {
_dbus_assert_not_reached ("out of memory"); _dbus_test_fatal ("out of memory");
_dbus_string_free (&runtime_prefix); _dbus_string_free (&runtime_prefix);
return FALSE; return FALSE;
} }
if (_dbus_string_get_length (&runtime_prefix) == 0) if (_dbus_string_get_length (&runtime_prefix) == 0)
{ {
fprintf (stderr, "_dbus_get_install_root() failed\n"); fprintf (stderr, "_dbus_get_install_root() failed\n");
_dbus_string_free (&runtime_prefix); _dbus_string_free (&runtime_prefix);
return FALSE; return FALSE;
} }
skipping to change at line 54 skipping to change at line 55
} }
static dbus_bool_t static dbus_bool_t
print_service_dirs (void) print_service_dirs (void)
{ {
DBusList *dirs; DBusList *dirs;
DBusList *link; DBusList *link;
dirs = NULL; dirs = NULL;
if (!_dbus_get_standard_session_servicedirs (&dirs)) if (!_dbus_get_standard_session_servicedirs (&dirs))
_dbus_assert_not_reached ("couldn't get standard dirs"); _dbus_test_fatal ("couldn't get standard dirs");
while ((link = _dbus_list_pop_first_link (&dirs))) while ((link = _dbus_list_pop_first_link (&dirs)))
{ {
printf ("default service dir: %s\n", (char *)link->data); printf ("default service dir: %s\n", (char *)link->data);
dbus_free (link->data); dbus_free (link->data);
_dbus_list_free_link (link); _dbus_list_free_link (link);
} }
dbus_free (dirs); dbus_free (dirs);
return TRUE; return TRUE;
} }
static dbus_bool_t print_replace_install_prefix(const char *s) static dbus_bool_t print_replace_install_prefix(const char *s)
{ {
DBusString str; DBusString str;
if (!_dbus_string_init (&str)) if (!_dbus_string_init (&str))
{ {
_dbus_assert_not_reached ("out of memory"); _dbus_test_fatal ("out of memory");
return FALSE; return FALSE;
} }
if (!_dbus_string_append (&str, s) || if (!_dbus_string_append (&str, s) ||
!_dbus_replace_install_prefix (&str)) !_dbus_replace_install_prefix (&str))
{ {
_dbus_assert_not_reached ("out of memory"); _dbus_test_fatal ("out of memory");
_dbus_string_free (&str); _dbus_string_free (&str);
return FALSE; return FALSE;
} }
fprintf(stdout, "replaced '%s' by '%s'\n", s, fprintf(stdout, "replaced '%s' by '%s'\n", s,
_dbus_string_get_const_data (&str)); _dbus_string_get_const_data (&str));
_dbus_string_free (&str); _dbus_string_free (&str);
return TRUE; return TRUE;
} }
 End of changes. 6 change blocks. 
5 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)