~ubuntu-branches/ubuntu/trusty/librsvg/trusty-proposed

« back to all changes in this revision

Viewing changes to rsvg-convert.c

  • Committer: Package Import Robot
  • Author(s): Michael Biebl
  • Date: 2012-03-27 01:47:52 UTC
  • mfrom: (1.1.32) (34.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20120327014752-c9vmipiww40cnip7
Tags: 2.36.0-1
* New upstream release.
* Update debian/copyright using the machine-readable copyright format 1.0.
* Bump Standards-Version to 3.9.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include "rsvg.h"
40
40
#include "rsvg-cairo.h"
41
41
#include "rsvg-private.h"
 
42
#include "rsvg-size-callback.h"
42
43
 
43
44
#ifdef CAIRO_HAS_PS_SURFACE
44
45
#include <cairo-ps.h>
181
182
    /* Set the locale so that UTF-8 filenames work */
182
183
    setlocale(LC_ALL, "");
183
184
 
184
 
    g_thread_init(NULL);
 
185
    g_type_init ();
185
186
 
186
187
    g_option_context = g_option_context_new (_("- SVG Converter"));
187
188
    g_option_context_add_main_entries (g_option_context, options_table, NULL);
188
189
    g_option_context_set_help_enabled (g_option_context, TRUE);
189
190
    if (!g_option_context_parse (g_option_context, &argc, &argv, &error)) {
 
191
        g_option_context_free (g_option_context);
190
192
        display_error (error);
191
193
        exit (1);
192
194
    }
202
204
        output_file = fopen (output, "wb");
203
205
        if (!output_file) {
204
206
            fprintf (stderr, _("Error saving to file: %s\n"), output);
 
207
            g_free (output);
205
208
            exit (1);
206
209
        }
 
210
 
 
211
        g_free (output);
207
212
    }
208
213
 
209
214
    if (args)
221
226
    if (zoom != 1.0)
222
227
        x_zoom = y_zoom = zoom;
223
228
 
224
 
    rsvg_init ();
225
229
    rsvg_set_default_dpi_x_y (dpi_x, dpi_y);
226
230
 
227
231
    for (i = 0; i < n_args; i++) {
359
363
 
360
364
    fclose (output_file);
361
365
 
362
 
    rsvg_term ();
 
366
    g_strfreev (args);
 
367
 
 
368
    rsvg_cleanup ();
363
369
 
364
370
    return 0;
365
371
}