~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to camel/camel-mime-filter-enriched.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
        { "/param",      " -->",                FALSE, NULL               },
89
89
};
90
90
 
91
 
#define NUM_ENRICHED_TAGS (sizeof (enriched_tags) / sizeof (enriched_tags[0]))
92
 
 
93
91
static GHashTable *enriched_hash = NULL;
94
92
 
95
93
static void camel_mime_filter_enriched_class_init (CamelMimeFilterEnrichedClass *klass);
137
135
 
138
136
        if (!enriched_hash) {
139
137
                enriched_hash = g_hash_table_new (camel_strcase_hash, camel_strcase_equal);
140
 
                for (i = 0; i < NUM_ENRICHED_TAGS; i++)
 
138
                for (i = 0; i < G_N_ELEMENTS (enriched_tags); i++)
141
139
                        g_hash_table_insert (
142
140
                                enriched_hash,
143
141
                                (gpointer) enriched_tags[i].enriched,
164
162
{
165
163
        gint i;
166
164
 
167
 
        for (i = 0; i < NUM_ENRICHED_TAGS; i++)
 
165
        for (i = 0; i < G_N_ELEMENTS (enriched_tags); i++)
168
166
                if (!g_ascii_strcasecmp (tag, enriched_tags[i].enriched))
169
167
                        return enriched_tags[i].needs_param;
170
168
 
182
180
        "red", "green", "blue", "yellow", "cyan", "magenta", "black", "white"
183
181
};
184
182
 
185
 
#define NUM_VALID_COLOURS  (sizeof (valid_colours) / sizeof (valid_colours[0]))
186
 
 
187
183
static gchar *
188
184
param_parse_colour (const gchar *inptr, gint inlen)
189
185
{
192
188
        guint v;
193
189
        gint i;
194
190
 
195
 
        for (i = 0; i < NUM_VALID_COLOURS; i++) {
 
191
        for (i = 0; i < G_N_ELEMENTS (valid_colours); i++) {
196
192
                if (!g_ascii_strncasecmp (inptr, valid_colours[i], inlen))
197
193
                        return g_strdup (valid_colours[i]);
198
194
        }
260
256
{
261
257
        gint i;
262
258
 
263
 
        for (i = 0; i < NUM_ENRICHED_TAGS; i++) {
 
259
        for (i = 0; i < G_N_ELEMENTS (enriched_tags); i++) {
264
260
                if (!g_ascii_strcasecmp (enriched, enriched_tags[i].enriched))
265
261
                        return enriched_tags[i].parse_param (inptr, inlen);
266
262
        }