/* * IO layer : handles for URIs * * Authors: * Johan Ceuppens * * Copyright (C) 2004 Johan Ceuppens * * Released under GNU LGPL, read the file 'COPYING.LIB' for more information */ #include "streams-handles.h" #include "uri.h" #include namespace Inkscape { /** * FileHandle */ int FileHandle::open(URI const& uri, char const* mode) { if (sys_open(uri, mode) == 0) return 0; else return 1; } FILE *FileHandle::sys_open(URI const& uri, char const* mode) { gchar *filename = uri.toNativeFilename(); if ((fp = std::fopen(filename, mode)) == 0) { error("fopen"); } #ifdef DEBUG_STREAMS std::cout<<"file opened fp="<