~ubuntu-branches/ubuntu/wily/libuser/wily

« back to all changes in this revision

Viewing changes to samples/testuser.c

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Habouzit
  • Date: 2006-09-03 21:58:15 UTC
  • mto: (2.1.1 edgy) (1.1.5 upstream) (3.1.1 lenny)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20060903215815-rtvvfzhaer8ymyp4
Tags: upstream-0.54.6-2.1.dfsg.1
ImportĀ upstreamĀ versionĀ 0.54.6-2.1.dfsg.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
17
 */
18
18
 
19
 
#ident "$Id: testuser.c,v 1.17 2004/11/13 23:50:30 mitr Exp $"
 
19
#ident "$Id: testuser.c,v 1.18 2005/10/09 05:15:47 mitr Exp $"
20
20
 
21
21
#ifdef HAVE_CONFIG_H
22
22
#include "config.h"
30
30
dump_attribute(const char *attribute, struct lu_ent *ent)
31
31
{
32
32
        GValueArray *array;
33
 
        GValue *value;
34
 
        size_t i;
35
33
 
36
34
        array = lu_ent_get(ent, attribute);
37
35
        if (array != NULL) {
 
36
                size_t i;
 
37
 
38
38
                for (i = 0; i < array->n_values; i++) {
 
39
                        GValue *value;
 
40
 
39
41
                        value = g_value_array_get_nth(array, i);
40
42
                        if (G_VALUE_HOLDS_STRING(value))
41
43
                                g_print("attribute %s = `%s'\n", attribute,
56
58
        struct lu_context *ctx;
57
59
        struct lu_ent *ent, *tmp, *temp;
58
60
        struct lu_error *error = NULL;
59
 
        GList *ret = NULL;
 
61
        GList *ret;
60
62
        size_t i;
61
 
        void *control = NULL;
 
63
        void *control;
62
64
 
63
65
        bindtextdomain(PACKAGE, LOCALEDIR);
64
66
        textdomain(PACKAGE);