~valavanisalex/ubuntu/oneiric/inkscape/inkscape_0.48.1-2ubuntu4

« back to all changes in this revision

Viewing changes to src/io/uristream.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook, Kees Cook, Ted Gould
  • Date: 2008-02-10 14:20:16 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080210142016-vcnb2zqyhszu0xvb
Tags: 0.46~pre1-0ubuntu1
[ Kees Cook ]
* debian/control:
  - add libgtkspell-dev build-dep to gain GtkSpell features (LP: #183547).
  - update Standards version (no changes needed).
  - add Vcs and Homepage fields.
  - switch to new python-lxml dep.
* debian/{control,rules}: switch from dpatch to quilt for more sanity.
* debian/patches/20_fix_glib_and_gxx43_ftbfs.patch:
  - merged against upstream fixes.
  - added additional fixes for newly written code.
* debian/rules: enable parallel building.

[ Ted Gould ]
* Updating POTFILES.in to make it so things build correctly.
* debian/control:
  - add ImageMagick++ and libboost-dev to build-deps

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 
14
14
#include "uristream.h"
15
15
#include "sys.h"
 
16
#include <string>
 
17
#include <cstring>
16
18
 
17
19
#ifdef WIN32
18
20
// For now to get at is_os_wide().
105
107
                    throw (StreamException): uri(source)
106
108
{
107
109
    //get information from uri
108
 
    char *schemestr = (char *) uri.getScheme();
 
110
    char const *schemestr = uri.getScheme();
109
111
    scheme = SCHEME_FILE;
110
112
    if (!schemestr || strncmp("file", schemestr, 4)==0)
111
113
        scheme = SCHEME_FILE;
112
114
    else if (strncmp("data", schemestr, 4)==0)
113
115
        scheme = SCHEME_DATA;
114
116
    //printf("in schemestr:'%s' scheme:'%d'\n", schemestr, scheme);
115
 
    char *cpath = NULL;
 
117
    gchar *cpath = NULL;
116
118
 
117
119
    switch (scheme) {
118
120
 
119
121
        case SCHEME_FILE:
120
 
            cpath     = (char *) uri.toNativeFilename();
 
122
            cpath = uri.toNativeFilename();
121
123
            //printf("in cpath:'%s'\n", cpath);
122
124
            inf = fopen_utf8name(cpath, FILE_READ);
123
125
            //inf = fopen(cpath, "rb");
317
319
                                             scheme(SCHEME_FILE)
318
320
{
319
321
    //get information from uri
320
 
    char *schemestr = (char *) uri.getScheme();
 
322
    char const *schemestr = uri.getScheme();
321
323
    if (!schemestr || strncmp("file", schemestr, 4)==0)
322
324
        scheme = SCHEME_FILE;
323
325
    else if (strncmp("data", schemestr, 4)==0)
324
326
        scheme = SCHEME_DATA;
325
327
    //printf("out schemestr:'%s' scheme:'%d'\n", schemestr, scheme);
326
 
    char *cpath = NULL;
 
328
    gchar *cpath = NULL;
327
329
 
328
330
    switch (scheme) {
329
331
 
330
332
        case SCHEME_FILE:
331
 
            cpath     = (char *) uri.toNativeFilename();
 
333
            cpath = uri.toNativeFilename();
332
334
            //printf("out path:'%s'\n", cpath);
333
335
            outf = fopen_utf8name(cpath, FILE_WRITE);
334
336
            //outf = fopen(cpath, "wb");