CVSROOT: /sources/gnash Module name: gnash Branch: release_0_8_1 Changes by: Sandro Santilli <strk> 07/08/18 06:20:01
Modified files: . : ChangeLog server/parser : text_character_def.cpp Log message: * server/parser/text_character_def.cpp: use symbolic names for tag types, more verbose parsing. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.3971.2.26&r2=1.3971.2.27 http://cvs.savannah.gnu.org/viewcvs/gnash/server/parser/text_character_def.cpp?cvsroot=gnash&only_with_tag=release_0_8_1&r1=1.4&r2=1.4.2.1 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.3971.2.26 retrieving revision 1.3971.2.27 diff -u -b -r1.3971.2.26 -r1.3971.2.27 --- ChangeLog 18 Aug 2007 05:05:16 -0000 1.3971.2.26 +++ ChangeLog 18 Aug 2007 06:20:00 -0000 1.3971.2.27 @@ -1,5 +1,10 @@ 2007-08-18 Sandro Santilli <[EMAIL PROTECTED]> + * server/parser/text_character_def.cpp: use symbolic names for + tag types, more verbose parsing. + +2007-08-18 Sandro Santilli <[EMAIL PROTECTED]> + * libbase/jpeg.cpp (jpeg_error_exit): only print SWF errors if configured to do so; (input_impl): throw an exception if jpeg_read_header detected errors. Index: server/parser/text_character_def.cpp =================================================================== RCS file: /sources/gnash/gnash/server/parser/text_character_def.cpp,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -b -r1.4 -r1.4.2.1 --- server/parser/text_character_def.cpp 24 Jul 2007 19:43:30 -0000 1.4 +++ server/parser/text_character_def.cpp 18 Aug 2007 06:20:01 -0000 1.4.2.1 @@ -10,6 +10,7 @@ #include "stream.h" #include "log.h" #include "text_character_def.h" +#include "swf.h" namespace gnash { @@ -17,7 +18,7 @@ movie_definition* m) { assert(m != NULL); - assert(tag_type == 11 || tag_type == 33); + assert(tag_type == SWF::DEFINETEXT || tag_type == SWF::DEFINETEXT2); m_rect.read(in); m_matrix.read(in); @@ -26,7 +27,7 @@ int advance_bits = in->read_u8(); IF_VERBOSE_PARSE( - log_parse(_("begin text records")); + log_parse(_("begin text records for text_character_def %p"), (void*)this); ); bool last_record_was_style_change = false; @@ -34,7 +35,7 @@ text_style style; for (;;) { - int first_byte = in->read_u8(); + unsigned int first_byte = in->read_u8(); if (first_byte == 0) { @@ -73,13 +74,13 @@ } if (has_color) { - if (tag_type == 11) + if (tag_type == SWF::DEFINETEXT) { style.m_color.read_rgb(in); } else { - assert(tag_type == 33); + assert(tag_type == SWF::DEFINETEXT2); style.m_color.read_rgba(in); } IF_VERBOSE_PARSE( @@ -126,7 +127,7 @@ last_record_was_style_change = false; - int glyph_count = first_byte; + unsigned int glyph_count = first_byte; // if (! last_record_was_style_change) // { @@ -135,11 +136,17 @@ // // else { Don't mask the top bit; the first record is allowed to have > 127 glyphs. } m_text_glyph_records.resize(m_text_glyph_records.size() + 1); - m_text_glyph_records.back().m_style = style; - m_text_glyph_records.back().read(in, glyph_count, glyph_bits, advance_bits); + text_glyph_record& grecord = m_text_glyph_records.back(); + grecord.m_style = style; + grecord.read(in, glyph_count, glyph_bits, advance_bits); IF_VERBOSE_PARSE( log_parse(_(" glyph_records: count = %d"), glyph_count); + for (unsigned int i = 0; i < glyph_count; i++) + { + text_glyph_record::glyph_entry& ge = grecord.m_glyphs[i]; + log_parse(_(" glyph%d: index=%d, advance=%g"), i, ge.m_glyph_index, ge.m_glyph_advance); + } ); } } _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit