
Hi, all.
Today I added the /src/io dir to the automake tree. It has some new interfaces and implementations whose purpose is to make it easier to read and write streams of data.
Basically they are lightly based on java's input and output streams and readers and writers, and -not- on iostreams, which turned out to be too much of a burden for too little benefit. It is intended that they can be subclassed and/or chained together to get the desired effect.
Also, they encourage people to use Inkscape::URI's instead of char *filenames and FILE *. This has been discussed for months for the purpose of referring to resources, but has been slow in appearing.
These two are based on bytes (unsigned char) ================================= InputStream -- reads unformatted (aka binary) data OutputStream -- writes unformatted data
These are for formatted unicode IO (gunichar and Glib::ustring) ============================= Reader -- formatted (aka text) data input like stream >> data; Writer -- formatted output like stream << data. Also has a printf() InputStreamReader -- uses an inputstream as its source OutputStreamWriter -- uses an outputstream as its destination
So far there are =========== (these need to be filled out, but work for files now) UriInputStream --reads data from an Inkscape::URI UriOutputStream -- writes data to an Inkscape::URI
need to be implemented: ----------------------------- UriReader UriWriter
These work in the tests: ================= XsltInputStream XsltOutputStream GzipInputStream GzipOutputStream StringInputStream StringOutputStream
These need to be fleshed out and tweaked, but basically they are usable already.
I need to run to an appointment, so I'm making this brief. I just wanted people to know that this is available.
Bob

Hello.
This code does not build on my nightly build system, do I need to install something extra, or have I not got the update scripts quite right yet?
apg++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/freetype2 -DPOTRACE="potrace" -pthread -I/home/mike/.local/include/sigc++-2.0 -I/home/mike/.local/lib/sigc++-2.0/include -I/home/mike/.local/include/gtkmm-2.4 -I/home/mike/.local/lib/gtkmm-2.4/include -I/home/mike/.local/include/glibmm-2.4 -I/home/mike/.local/lib/glibmm-2.4/include -I/home/mike/.local/include/gdkmm-2.4 -I/home/mike/.local/lib/gdkmm-2.4/include -I/home/mike/.local/include/pangomm-1.4 -I/home/mike/.local/include/atkmm-1.6 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -O2 -march=i586 -mcpu=i686 -pipe -c -o io/GzipStream.o `test -f 'io/GzipStream.cpp' || echo './'`io/GzipStream.cpp io/GzipStream.cpp:17:20: zutil.h: No such file or directory io/GzipStream.cpp: In member function `bool Inkscape::IO::GzipInputStream::load()': io/GzipStream.cpp:160: warning: unused variable `long unsigned int srcCrc' io/GzipStream.cpp: In constructor ` Inkscape::IO::GzipOutputStream::GzipOutputStream(Inkscape::IO::OutputStream&) ': io/GzipStream.cpp:256: error: `OS_CODE' undeclared (first use this function) io/GzipStream.cpp:256: error: (Each undeclared identifier is reported only once for each function it appears in.) make[2]: *** [io/GzipStream.o] Error 1 make[2]: Leaving directory `/home/mike/inkscape/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/mike/inkscape' make: *** [all] Error 2 Making ... failed
By the way, the Inkscape 0.40 autopackage is available now, sorry it took so long but we wanted to get 0.7 out of the door first (many improvements in this new version).
thanks -mike

On Wed, 29 Dec 2004 14:40:21 +0000, Mike Hearn <mike@...333...> wrote:
By the way, the Inkscape 0.40 autopackage is available now, sorry it took so long but we wanted to get 0.7 out of the door first (many improvements in this new version).
Does it not crash on launch anymore? If so could we close bugs 1076338, 1064399 and 1059059?

On Wed, 2004-12-29 at 11:00 -0400, bulia byak wrote:
Does it not crash on launch anymore? If so could we close bugs 1076338, 1064399 and 1059059?
I don't think this is an autopackage specific bug, though I don't really know what causes it. I think it's when a user has gcc 3.4 compiled gtkmm libraries and uses a gcc 3.3 compiled inkscape installed and vice-versa.
This may happen with the autopackages, when the user already has GTKmm installed because they are built with gcc 3.3, but it can happen in other situations as well: for instance, if the user upgrades their distribution.
I am not sure what the solution is. Clearly we could statically link GTKmm and other libraries in the autopackages, we already do so for Boehm GC in fact. But this would not stop people filing these bugs, because it's (probably) a toolchain/compiler issue not an autopackage issue. It may reduce the number of reports.
For me, if I start from a clean system (no GTKmm installed from my distro) the autopackage versions do not crash.
I will investigate statically linking all C++ libraries this afternoon, as well as updating the dependencies to take into account the new libxslt dependency.
thanks -mike

I removed that #include, so it should compile now. I don't understand why they would want that macro to be private, yet require it for that field. It should be moved to zlib.h, I think.
Bob
Mike Hearn wrote:
Hello.
This code does not build on my nightly build system, do I need to install something extra, or have I not got the update scripts quite right yet?
apg++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/freetype2 -DPOTRACE="potrace" -pthread -I/home/mike/.local/include/sigc++-2.0 -I/home/mike/.local/lib/sigc++-2.0/include -I/home/mike/.local/include/gtkmm-2.4 -I/home/mike/.local/lib/gtkmm-2.4/include -I/home/mike/.local/include/glibmm-2.4 -I/home/mike/.local/lib/glibmm-2.4/include -I/home/mike/.local/include/gdkmm-2.4 -I/home/mike/.local/lib/gdkmm-2.4/include -I/home/mike/.local/include/pangomm-1.4 -I/home/mike/.local/include/atkmm-1.6 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -Wall -W -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch -Wno-unused-parameter -O2 -march=i586 -mcpu=i686 -pipe -c -o io/GzipStream.o `test -f 'io/GzipStream.cpp' || echo './'`io/GzipStream.cpp io/GzipStream.cpp:17:20: zutil.h: No such file or directory io/GzipStream.cpp: In member function `bool Inkscape::IO::GzipInputStream::load()': io/GzipStream.cpp:160: warning: unused variable `long unsigned int srcCrc' io/GzipStream.cpp: In constructor ` Inkscape::IO::GzipOutputStream::GzipOutputStream(Inkscape::IO::OutputStream&) ': io/GzipStream.cpp:256: error: `OS_CODE' undeclared (first use this function) io/GzipStream.cpp:256: error: (Each undeclared identifier is reported only once for each function it appears in.) make[2]: *** [io/GzipStream.o] Error 1 make[2]: Leaving directory `/home/mike/inkscape/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/mike/inkscape' make: *** [all] Error 2 Making ... failed
By the way, the Inkscape 0.40 autopackage is available now, sorry it took so long but we wanted to get 0.7 out of the door first (many improvements in this new version).
thanks -mike
participants (3)
-
Bob Jamison
-
bulia byak
-
Mike Hearn