author | bdonegan |
Tue, 21 Sep 2010 10:35:24 +0100 | |
changeset 15 | e37098e40f6a |
parent 2 | 0cb2248d0edc |
permissions | -rw-r--r-- |
2
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
1 |
/* GLIB - Library of useful routines for C programming |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
2 |
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
3 |
* |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
4 |
* This library is free software; you can redistribute it and/or |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
5 |
* modify it under the terms of the GNU Lesser General Public |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
6 |
* License as published by the Free Software Foundation; either |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
7 |
* version 2 of the License, or (at your option) any later version. |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
8 |
* |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
9 |
* This library is distributed in the hope that it will be useful, |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
12 |
* Lesser General Public License for more details. |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
13 |
* |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU Lesser General Public |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
15 |
* License along with this library; if not, write to the |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
16 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
17 |
* Boston, MA 02111-1307, USA. |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
18 |
*/ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
19 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
20 |
/* |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
21 |
* Modified by the GLib Team and others 1997-2000. See the AUTHORS |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
22 |
* file for a list of people on the GLib Team. See the ChangeLog |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
23 |
* files for a list of changes. These files are distributed with |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
24 |
* GLib at ftp://ftp.gtk.org/pub/gtk/. |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
25 |
*/ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
26 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
27 |
#undef G_DISABLE_ASSERT |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
28 |
#undef G_LOG_DOMAIN |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
29 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
30 |
#include <stdio.h> |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
31 |
#include <string.h> |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
32 |
#include "glib.h" |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
33 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
34 |
#ifdef SYMBIAN |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
35 |
#include "mrt2_glib2_test.h" |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
36 |
#endif /*SYMBIAN*/ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
37 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
38 |
static gint |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
39 |
my_compare (gconstpointer a, |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
40 |
gconstpointer b) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
41 |
{ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
42 |
const char *cha = a; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
43 |
const char *chb = b; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
44 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
45 |
return *cha - *chb; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
46 |
} |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
47 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
48 |
static gint |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
49 |
my_search (gconstpointer a, |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
50 |
gconstpointer b) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
51 |
{ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
52 |
return my_compare (b, a); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
53 |
} |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
54 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
55 |
static gpointer destroyed_key = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
56 |
static gpointer destroyed_value = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
57 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
58 |
static void |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
59 |
my_key_destroy (gpointer key) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
60 |
{ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
61 |
destroyed_key = key; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
62 |
} |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
63 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
64 |
static void |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
65 |
my_value_destroy (gpointer value) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
66 |
{ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
67 |
destroyed_value = value; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
68 |
} |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
69 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
70 |
static gint |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
71 |
my_traverse (gpointer key, |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
72 |
gpointer value, |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
73 |
gpointer data) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
74 |
{ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
75 |
char *ch = key; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
76 |
g_assert ((*ch) > 0); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
77 |
return FALSE; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
78 |
} |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
79 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
80 |
char chars[] = |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
81 |
"0123456789" |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
82 |
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
83 |
"abcdefghijklmnopqrstuvwxyz"; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
84 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
85 |
char chars2[] = |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
86 |
"0123456789" |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
87 |
"abcdefghijklmnopqrstuvwxyz"; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
88 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
89 |
static gint |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
90 |
check_order (gpointer key, |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
91 |
gpointer value, |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
92 |
gpointer data) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
93 |
{ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
94 |
char **p = data; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
95 |
char *ch = key; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
96 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
97 |
g_assert (**p == *ch); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
98 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
99 |
(*p)++; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
100 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
101 |
return FALSE; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
102 |
} |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
103 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
104 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
105 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
106 |
int |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
107 |
main (int argc, |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
108 |
char *argv[]) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
109 |
{ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
110 |
gint i; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
111 |
GTree *tree; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
112 |
gboolean removed; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
113 |
char c, d; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
114 |
char *p; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
115 |
#ifdef SYMBIAN |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
116 |
g_log_set_handler (NULL, G_LOG_FLAG_FATAL| G_LOG_FLAG_RECURSION | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING | G_LOG_LEVEL_MESSAGE | G_LOG_LEVEL_INFO | G_LOG_LEVEL_DEBUG, &mrtLogHandler, NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
117 |
g_set_print_handler(mrtPrintHandler); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
118 |
#endif /*SYMBIAN*/ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
119 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
120 |
tree = g_tree_new (my_compare); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
121 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
122 |
for (i = 0; chars[i]; i++) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
123 |
g_tree_insert (tree, &chars[i], &chars[i]); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
124 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
125 |
g_tree_foreach (tree, my_traverse, NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
126 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
127 |
g_assert (g_tree_nnodes (tree) == strlen (chars)); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
128 |
g_assert (g_tree_height (tree) == 6); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
129 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
130 |
p = chars; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
131 |
g_tree_foreach (tree, check_order, &p); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
132 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
133 |
for (i = 0; i < 26; i++) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
134 |
{ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
135 |
removed = g_tree_remove (tree, &chars[i + 10]); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
136 |
g_assert (removed); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
137 |
} |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
138 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
139 |
c = '\0'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
140 |
removed = g_tree_remove (tree, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
141 |
g_assert (removed == FALSE); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
142 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
143 |
g_tree_foreach (tree, my_traverse, NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
144 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
145 |
g_assert (g_tree_nnodes (tree) == strlen (chars2)); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
146 |
g_assert (g_tree_height (tree) == 6); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
147 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
148 |
p = chars2; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
149 |
g_tree_foreach (tree, check_order, &p); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
150 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
151 |
for (i = 25; i >= 0; i--) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
152 |
g_tree_insert (tree, &chars[i + 10], &chars[i + 10]); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
153 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
154 |
p = chars; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
155 |
g_tree_foreach (tree, check_order, &p); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
156 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
157 |
c = '0'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
158 |
p = g_tree_lookup (tree, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
159 |
g_assert (p && *p == c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
160 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
161 |
c = 'A'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
162 |
p = g_tree_lookup (tree, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
163 |
g_assert (p && *p == c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
164 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
165 |
c = 'a'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
166 |
p = g_tree_lookup (tree, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
167 |
g_assert (p && *p == c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
168 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
169 |
c = 'z'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
170 |
p = g_tree_lookup (tree, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
171 |
g_assert (p && *p == c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
172 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
173 |
c = '!'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
174 |
p = g_tree_lookup (tree, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
175 |
g_assert (p == NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
176 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
177 |
c = '='; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
178 |
p = g_tree_lookup (tree, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
179 |
g_assert (p == NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
180 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
181 |
c = '|'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
182 |
p = g_tree_lookup (tree, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
183 |
g_assert (p == NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
184 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
185 |
c = '0'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
186 |
p = g_tree_search (tree, my_search, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
187 |
g_assert (p && *p == c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
188 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
189 |
c = 'A'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
190 |
p = g_tree_search (tree, my_search, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
191 |
g_assert (p && *p == c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
192 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
193 |
c = 'a'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
194 |
p = g_tree_search (tree, my_search, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
195 |
g_assert (p &&*p == c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
196 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
197 |
c = 'z'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
198 |
p = g_tree_search (tree, my_search, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
199 |
g_assert (p && *p == c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
200 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
201 |
c = '!'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
202 |
p = g_tree_search (tree, my_search, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
203 |
g_assert (p == NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
204 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
205 |
c = '='; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
206 |
p = g_tree_search (tree, my_search, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
207 |
g_assert (p == NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
208 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
209 |
c = '|'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
210 |
p = g_tree_search (tree, my_search, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
211 |
g_assert (p == NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
212 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
213 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
214 |
g_tree_destroy (tree); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
215 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
216 |
tree = g_tree_new_full ((GCompareDataFunc)my_compare, NULL, my_key_destroy, my_value_destroy); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
217 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
218 |
for (i = 0; chars[i]; i++) |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
219 |
g_tree_insert (tree, &chars[i], &chars[i]); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
220 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
221 |
c = '0'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
222 |
g_tree_insert (tree, &c, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
223 |
g_assert (destroyed_key == &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
224 |
g_assert (destroyed_value == &chars[0]); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
225 |
destroyed_key = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
226 |
destroyed_value = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
227 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
228 |
d = '1'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
229 |
g_tree_replace (tree, &d, &d); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
230 |
g_assert (destroyed_key == &chars[1]); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
231 |
g_assert (destroyed_value == &chars[1]); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
232 |
destroyed_key = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
233 |
destroyed_value = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
234 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
235 |
c = '2'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
236 |
removed = g_tree_remove (tree, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
237 |
g_assert (removed); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
238 |
g_assert (destroyed_key == &chars[2]); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
239 |
g_assert (destroyed_value == &chars[2]); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
240 |
destroyed_key = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
241 |
destroyed_value = NULL; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
242 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
243 |
c = '3'; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
244 |
removed = g_tree_steal (tree, &c); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
245 |
g_assert (removed); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
246 |
g_assert (destroyed_key == NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
247 |
g_assert (destroyed_value == NULL); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
248 |
#ifdef SYMBIAN |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
249 |
testResultXml("tree-test"); |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
250 |
#endif /* EMULATOR */ |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
251 |
|
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
252 |
return 0; |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
253 |
} |
0cb2248d0edc
New BC drivers added are - Phonebook, Speed dial utility control, MMS Client MTM, Plugin Bio control, Organizer,
shrivatsa
parents:
diff
changeset
|
254 |