fix bound on for loop (gaaaargh). (main): re-enable shutdown of the
2002-12-02 James Henstridge <james@daa.com.au> * src/thumbnailer.c (main): fix bound on for loop (gaaaargh). (main): re-enable shutdown of the library * src/Makefile.am (libfont_method_la_LIBADD): fix typo. * src/ftstream-vfs.c (FT_New_URI_Face): FT_Stream is a pointer, so sizeof(FT_Stram) gives the wrong result :(
This commit is contained in:
parent
24a577acd6
commit
2f46bdaa37
4 changed files with 15 additions and 8 deletions
|
@ -1,3 +1,13 @@
|
|||
2002-12-02 James Henstridge <james@daa.com.au>
|
||||
|
||||
* src/thumbnailer.c (main): fix bound on for loop (gaaaargh).
|
||||
(main): re-enable shutdown of the library
|
||||
|
||||
* src/Makefile.am (libfont_method_la_LIBADD): fix typo.
|
||||
|
||||
* src/ftstream-vfs.c (FT_New_URI_Face): FT_Stream is a pointer, so
|
||||
sizeof(FT_Stram) gives the wrong result :(
|
||||
|
||||
2002-12-01 James Henstridge <james@daa.com.au>
|
||||
|
||||
* src/font-method.c (do_read_directory): include ".directory" in
|
||||
|
|
|
@ -8,7 +8,7 @@ vfsmodule_LTLIBRARIES = libfont-method.la
|
|||
noinst_PROGRAMS = thumbnailer
|
||||
|
||||
libfont_method_la_LDFLAGS = -module -avoid-version
|
||||
libfont_method_la_LIBS = $(FONT_METHOD_LIBS)
|
||||
libfont_method_la_LIBADD = $(FONT_METHOD_LIBS)
|
||||
libfont_method_la_SOURCES = font-method.c
|
||||
|
||||
vfsmoduleconfdir = $(sysconfdir)/gnome-vfs-2.0/modules
|
||||
|
|
|
@ -27,7 +27,6 @@ vfs_stream_close(FT_Stream stream)
|
|||
{
|
||||
GnomeVFSHandle *handle = (GnomeVFSHandle *)stream->descriptor.pointer;
|
||||
|
||||
g_message("closing handle");
|
||||
if (!handle)
|
||||
return;
|
||||
gnome_vfs_close(handle);
|
||||
|
@ -91,7 +90,7 @@ FT_New_URI_Face(FT_Library library,
|
|||
FT_Stream stream;
|
||||
FT_Error error;
|
||||
|
||||
if ((stream = calloc(1, sizeof(FT_Stream))) == NULL)
|
||||
if ((stream = calloc(1, sizeof(*stream))) == NULL)
|
||||
return FT_Err_Out_Of_Memory;
|
||||
|
||||
error = vfs_stream_open(stream, uri);
|
||||
|
|
|
@ -50,7 +50,7 @@ main(int argc, char **argv)
|
|||
FT_GlyphSlot slot;
|
||||
GdkPixbuf *pixbuf, *pixbuf2;
|
||||
guchar *buffer;
|
||||
gint width, height, i, pen_x, pen_y, max_width, max_height;
|
||||
gint width, height, i, len, pen_x, pen_y, max_width, max_height;
|
||||
|
||||
if (argc != 3) {
|
||||
g_message("eek: bad args");
|
||||
|
@ -95,8 +95,8 @@ main(int argc, char **argv)
|
|||
pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, width*3, height*1.5);
|
||||
buffer = gdk_pixbuf_get_pixels(pixbuf);
|
||||
|
||||
for (i = gdk_pixbuf_get_rowstride(pixbuf) *
|
||||
gdk_pixbuf_get_height(pixbuf); i >= 0; i--)
|
||||
len = gdk_pixbuf_get_rowstride(pixbuf) * gdk_pixbuf_get_height(pixbuf);
|
||||
for (i = 0; i < len; i++)
|
||||
buffer[i] = 255;
|
||||
|
||||
pen_x = 0;
|
||||
|
@ -129,7 +129,6 @@ main(int argc, char **argv)
|
|||
gdk_pixbuf_unref(pixbuf);
|
||||
|
||||
/* freeing the face causes a crash I haven't tracked down yet */
|
||||
#if 0
|
||||
error = FT_Done_Face(face);
|
||||
if (error) {
|
||||
g_message("eek: done face");
|
||||
|
@ -140,7 +139,6 @@ main(int argc, char **argv)
|
|||
g_message("eek: done library");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue