gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash backend/sound_handler_gst.cpp backend/sou...


From: John Gilmore
Subject: [Gnash-commit] gnash backend/sound_handler_gst.cpp backend/sou...
Date: Mon, 14 May 2007 09:44:23 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     John Gilmore <jgilmore> 07/05/14 09:44:22

Modified files:
        backend        : sound_handler_gst.cpp sound_handler_mp3.cpp 
        po             : Makefile.am 
        .              : ChangeLog 
        cygnal         : README cygnal.cpp http.cpp statistics.cpp 
                         stream.cpp 
        gui            : Player.cpp gtk.cpp gtk_glue_gtkglext.cpp 
                         kde.cpp sdl_agg_glue.cpp 
        libamf         : amf.cpp rtmp.cpp 
        libbase        : network.cpp rc.cpp sharedlib.cpp 
        server         : as_function.cpp debugger.cpp dlist.cpp 
                         movie_root.cpp 
        utilities      : parser.cpp processor.cpp 
Removed files:
        po             : LINGUAS 

Log message:
        Internationalization, further cleanup:
        
        * po/Makefile.am:  Pass proper flags to xgettext to handle _(...).
        * po/LINGUAS:  Remove, superseded by Makefile.am's "translations".
        * backend/sound_handler_gst.cpp, cygnal/cygnal.cpp, cygnal/http.cpp,
          cygnal/statistics.cpp, cygnal/stream.cpp, gui/gtk.cpp,
          gui/gtk_glue_gtkglext.cpp, gui/kde.cpp, gui/stl_agg_glue.cpp,
          libamf/amf.cpp, libamf/rtmp.cpp, libbase/rc.cpp,
          libbase/sharedlib.cpp, server/movie_root.cpp, utilities/parser.cpp,
          utilities/processor.cpp: Insert header
          comment and fix up copyright spacing.
        * backend/sound_handler_gst.cpp, cygnal/cygnal.cpp, cygnal/http.cpp,
          cygnal/statistics.cpp, cygnal/stream.cpp, gui/Player.cpp,
          gui/gtk.cpp, gui/gtk_glue_gtkglext.cpp, gui/stl_agg_glue.cpp,
          libamf/amf.cpp, libamf/rtmp.cpp, libbase/network.cpp, libbase/rc.cpp,
          libbase/sharedlib.cpp, server/as_function.cpp, server/debugger.cpp,
          server/movie_root.cpp, utilities/parser.cpp, utilities/processor.cpp:
          Pass messages through _(...).
        * backend/sound_handler_gst.cpp, backend/sound_handler_mp3.cpp,
          cygnal/README, cygnal/cygnal.cpp, cygnal/http.cpp,
          cygnal/statistics.cpp, cygnal/stream.cpp, gui/Player.cpp,
          gui/gtk.cpp, gui/gtk_glue_gtkglext.cpp, gui/stl_agg_glue.cpp,
          libamf/amf.cpp, libamf/rtmp.cpp, libbase/network.cpp,
          libbase/rc.cpp, libbase/sharedlib.cpp, server/as_function.cpp,
          server/debugger.cpp, server/dlist.cpp, server/movie_root.cpp,
          utilities/parser.cpp, utilities/processor.cpp:
          Clean up messages (remove \n's and !s, change wording, use
          log_XXX functions rather than dbglogfile <<, use proper log_XXX
          function, fix typos, etc).
        * backend/sound_handler_mp3.cpp: New 2007 Free Software Foundation
          copyrights applied (to formerly public domain code)
        * cygnal/cygnal.cpp, cygnal/http.cpp, cygnal/statistics.cpp,
          cygnal/stream.cpp, gui/gtk_glue_gtkglext.cpp, gui/kde.cpp,
          gui/stl_agg_glue.cpp, libbase/sharedlib.cpp: Update copyright
          to 2007.
        * cygnal/http.cpp (HTTP::sendGetReply),
          cygnal/stream.cpp (sendfile_thread),
          libamf/amf.cpp (AMF::encodeElement, AMF::extractElementLength,
          AMF::parseBody, AMF::extractVariable),
          server/debugger.cpp (Debugger::dumpStackFrame): Insert FIXME
          about likely bug.
        * gui/kde.cpp (qwidget::qwidget):  Translate strings for the
          pop-up menu items.
        * libbase/network.cpp (Network::writeNet):  Remove dead code.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_gst.cpp?cvsroot=gnash&r1=1.38&r2=1.39
http://cvs.savannah.gnu.org/viewcvs/gnash/backend/sound_handler_mp3.cpp?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/po/Makefile.am?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/po/LINGUAS?cvsroot=gnash&r1=1.2&r2=0
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3187&r2=1.3188
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/README?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/cygnal.cpp?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/http.cpp?cvsroot=gnash&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/statistics.cpp?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/stream.cpp?cvsroot=gnash&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.89&r2=1.90
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk_glue_gtkglext.cpp?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/kde.cpp?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdl_agg_glue.cpp?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/amf.cpp?cvsroot=gnash&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/gnash/libamf/rtmp.cpp?cvsroot=gnash&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/network.cpp?cvsroot=gnash&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.cpp?cvsroot=gnash&r1=1.21&r2=1.22
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/sharedlib.cpp?cvsroot=gnash&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/gnash/server/as_function.cpp?cvsroot=gnash&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/gnash/server/debugger.cpp?cvsroot=gnash&r1=1.18&r2=1.19
http://cvs.savannah.gnu.org/viewcvs/gnash/server/dlist.cpp?cvsroot=gnash&r1=1.63&r2=1.64
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.60&r2=1.61
http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/parser.cpp?cvsroot=gnash&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/gnash/utilities/processor.cpp?cvsroot=gnash&r1=1.55&r2=1.56

Patches:
Index: backend/sound_handler_gst.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_gst.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -b -r1.38 -r1.39
--- backend/sound_handler_gst.cpp       12 May 2007 09:59:44 -0000      1.38
+++ backend/sound_handler_gst.cpp       14 May 2007 09:44:19 -0000      1.39
@@ -1,15 +1,17 @@
+// sound_handler_gst.cpp: Audio output via GStreamer, for Gnash.
+//
 //   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
 // the Free Software Foundation; either version 2 of the License, or
 // (at your option) any later version.
-
+//
 // This program is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
-
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
@@ -18,13 +20,13 @@
 // Based on sound_handler_sdl.cpp by Thatcher Ulrich http://tulrich.com 2003
 // which has been donated to the Public Domain.
 
-/* $Id: sound_handler_gst.cpp,v 1.38 2007/05/12 09:59:44 tgc Exp $ */
+/* $Id: sound_handler_gst.cpp,v 1.39 2007/05/14 09:44:19 jgilmore Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-// Assume people running --enable-sound=gst know what they are doing
+// Assume people running --enable-media=gst know what they are doing
 // (HAVE_GST_GST_H seems broken atm, specifically when an older glib
 //  install is around)
 //
@@ -73,7 +75,7 @@
 
        sound_data *sounddata = new sound_data;
        if (!sounddata) {
-               gnash::log_error("could not allocate memory for sounddata !");
+               gnash::log_error(_("Could not allocate memory for sound data"));
                return -1;
        }
 
@@ -98,7 +100,7 @@
                 signed: { true, false }*/
                sounddata->data = new guint8[data_bytes];
                if (!sounddata->data) { 
-                       gnash::log_error("could not allocate space for data in 
soundhandler.");
+                       gnash::log_error(_("Could not allocate space for data 
in sound handler"));
                        return -1;
                }
                memcpy(sounddata->data, data, data_bytes);
@@ -115,7 +117,7 @@
                 signed: { true, false }*/
                sounddata->data = new guint8[data_bytes];
                if (!sounddata->data) { 
-                       gnash::log_error("could not allocate space for data in 
soundhandler.");
+                       gnash::log_error(_("Could not allocate space for data 
in sound handler"));
                        return -1;
                }
                memcpy(sounddata->data, data, data_bytes);
@@ -125,7 +127,7 @@
        //case FORMAT_VORBIS:
                sounddata->data = new guint8[data_bytes];
                if (!sounddata->data) { 
-                       gnash::log_error("could not allocate space for data in 
soundhandler.");
+                       gnash::log_error(_("Could not allocate space for data 
in sound handler"));
                        return -1;
                }
                memcpy(sounddata->data, data, data_bytes);
@@ -135,17 +137,17 @@
        case FORMAT_ADPCM:
        case FORMAT_UNCOMPRESSED:
                // These should have been converted to FORMAT_NATIVE16
-               gnash::log_error("Sound data format not properly converted");
+               gnash::log_error(_("Sound data format not properly converted"));
                assert(0);
                break;
 
        case FORMAT_NELLYMOSER:
-               gnash::log_unimpl("Nellymoser sound format requested, gnash 
does not handle it.");
+               gnash::log_unimpl(_("Nellymoser sound format requested; gnash 
does not handle it"));
                return -1;
 
        default:
                // Unhandled format.
-               gnash::log_error(_("unknown sound format %d requested; gnash 
does not handle it"), (int)format);
+               gnash::log_error(_("Unknown sound format %d requested; gnash 
does not handle it"), (int)format);
                return -1; // Unhandled format, set to NULL.
        }
 
@@ -281,7 +283,7 @@
        // Make a "gst_elements" for this sound which is latter placed on the 
vector of instances of this sound being played
        gst_elements* gst_element = new gst_elements;
        if (gst_element == NULL) {
-               gnash::log_error ("could not allocate memory for gst_element 
!");
+               gnash::log_error (_("Could not allocate memory for 
gst_element"));
                return;
        }
        // Copy data-info to the "gst_elements"
@@ -306,10 +308,10 @@
 
        // Check if the creation of the gstreamer pipeline, adder and audiosink 
was a succes
        if (!gst_element->pipeline) {
-               gnash::log_error("The gstreamer pipeline element could not be 
created!");
+               gnash::log_error(_("The gstreamer pipeline element could not be 
created"));
        }
        if (!gst_element->audiosink) {
-               gnash::log_error("The gstreamer audiosink element could not be 
created!");
+               gnash::log_error(_("The gstreamer audiosink element could not 
be created"));
        }
 
        // link adder and output to bin
@@ -335,7 +337,7 @@
                || !gst_element->audioconvert
                || !gst_element->audioresample) {
 
-               gnash::log_error("Gstreamer element for audio handling could 
not be created!");
+               gnash::log_error(_("Gstreamer element for audio handling could 
not be created"));
                return;
        }
 
@@ -349,12 +351,12 @@
                        if (gst_element->decoder != NULL && 
!gst_default_registry_check_feature_version("flump3dec", 0, 10, 4))
                        {
                                // I keep getting these messages even if I hear 
sound... too much paranoia ?
-                               gnash::log_debug("This version of fluendos mp3 
plugin does not support flash streaming sounds, please upgrade to version 
0.10.4 or higher.");
+                               gnash::log_debug(_("This version of fluendos 
mp3 plugin does not support flash streaming sounds, please upgrade to version 
0.10.4 or higher"));
                        }
                }
                // Check if the element was correctly created
                if (!gst_element->decoder) {
-                       gnash::log_error("A gstreamer mp3-decoder element could 
not be created! You probably need to install a mp3-decoder plugin like 
gstreamer0.10-mad or gstreamer0.10-fluendo-mp3.");
+                       gnash::log_error(_("A gstreamer mp3-decoder element 
could not be created.  You probably need to install a mp3-decoder plugin like 
gstreamer0.10-mad or gstreamer0.10-fluendo-mp3."));
                        return;
                }
                gst_bin_add (GST_BIN (gst_element->bin), gst_element->decoder);
@@ -582,12 +584,12 @@
 
 void GST_sound_handler::attach_aux_streamer(aux_streamer_ptr /*ptr*/, void* 
/*owner*/)
 {
-       gnash::log_msg("%s: unimplemented \n", __PRETTY_FUNCTION__);
+       gnash::log_unimpl(__PRETTY_FUNCTION__);
 }
 
 void GST_sound_handler::detach_aux_streamer(void* /*owner*/)
 {
-       gnash::log_msg("%s: unimplemented \n", __PRETTY_FUNCTION__);
+       gnash::log_unimpl(__PRETTY_FUNCTION__);
 }
 
 void GST_sound_handler::convert_raw_data(
@@ -599,7 +601,7 @@
        int /*sample_rate*/,
        bool /*stereo*/)
 {
-       gnash::log_msg("%s: unimplemented \n", __PRETTY_FUNCTION__);
+       gnash::log_unimpl(__PRETTY_FUNCTION__);
 }
 
 

Index: backend/sound_handler_mp3.cpp
===================================================================
RCS file: /sources/gnash/gnash/backend/sound_handler_mp3.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- backend/sound_handler_mp3.cpp       15 Oct 2006 09:11:20 -0000      1.5
+++ backend/sound_handler_mp3.cpp       14 May 2007 09:44:19 -0000      1.6
@@ -1,16 +1,32 @@
+// sound_handler_mp3.cpp: Audio output via libmad (MP3), for Gnash.
+//
+//   Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+// Based on sound_handler_mp3.cpp by "tbp", 2003
+// which has been donated to the Public Domain.
+
 /*
- * sound_handler_mp3.cpp       --      tbp, 2003
- *
- * This source code has been donated to the Public Domain.
- * Do whatever you want with it.
- *
  * Some brain damaged helpers to decode mp3 streams for use in
  * a gnash::sound_handler that uses SDL for output.
  * (even comments are cut&paste compliant)
- *
  */
 
-/* $Id: sound_handler_mp3.cpp,v 1.5 2006/10/15 09:11:20 nihilus Exp $ */
+/* $Id: sound_handler_mp3.cpp,v 1.6 2007/05/14 09:44:19 jgilmore Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -35,7 +51,7 @@
 #endif
 
 using gnash::log_error;
-using gnash::log_parse;
+using gnash::log_msg;
 
 namespace mad_helpers {
        static const char *parse_layer(const mad_header& h)
@@ -153,7 +169,7 @@
                const int sample_rate, const bool stereo)
 {
 
-       //log_msg("convert_mp3_data sample count %d rate %d stereo %s\n", 
sample_count, sample_rate, stereo?"yes":"no");
+       //log_msg("convert_mp3_data sample count %d rate %d stereo %s", 
sample_count, sample_rate, stereo?"yes":"no");
 
        mad_stream      stream;
        mad_frame       frame;
@@ -187,7 +203,7 @@
                                // kludge as we stop decoding on LOSTSYNC.
                                if (stream.error != MAD_ERROR_LOSTSYNC)
                                {
-                                       log_error("** MP3 frame error: %s\n", 
mad_stream_errorstr(&stream));
+                                       log_error(_("** MP3 frame error: %s"), 
mad_stream_errorstr(&stream));
                                }
                                break;
                        }
@@ -195,7 +211,7 @@
 
                if (fc == 0)
                {
-                       log_parse("%s", 
mad_helpers::parse_frame_info(frame.header));
+                       log_msg("%s", 
mad_helpers::parse_frame_info(frame.header));
                }
 
                ++fc;
@@ -209,7 +225,7 @@
 
        if (total == 0) goto cleanup; // yay
 
-       log_parse("decoded frames %d bytes %d(diff %d) -- original rate 
%d\n\n", fc, total, total - sample_count, sample_rate);
+       log_msg("decoded frames %d bytes %d (diff %d) -- original rate %d", fc, 
total, total - sample_count, sample_rate);
 
        // assemble together all decoded frames. another round of memcpy.
        {

Index: po/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/po/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- po/Makefile.am      13 May 2007 22:37:34 -0000      1.5
+++ po/Makefile.am      14 May 2007 09:44:20 -0000      1.6
@@ -39,6 +39,7 @@
 gnash.pot: POTFILES
        $(XGETTEXT) --language=C++ --files-from=POTFILES -o gnash.pot \
          --default-domain=gnash --force \
+         --flag=_:1:pass-c-format --keyword=_ \
          --copyright-holder='Free Software Foundation, Inc.'
 
 update-po: gnash.pot

Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3187
retrieving revision 1.3188
diff -u -b -r1.3187 -r1.3188
--- ChangeLog   14 May 2007 09:32:20 -0000      1.3187
+++ ChangeLog   14 May 2007 09:44:20 -0000      1.3188
@@ -1,3 +1,50 @@
+2007-05-14  John Gilmore  <address@hidden>
+
+       Internationalization, further cleanup:
+       
+       * po/Makefile.am:  Pass proper flags to xgettext to handle _(...).
+       * po/LINGUAS:  Remove, superseded by Makefile.am's "translations".
+       * backend/sound_handler_gst.cpp, cygnal/cygnal.cpp, cygnal/http.cpp,
+         cygnal/statistics.cpp, cygnal/stream.cpp, gui/gtk.cpp,
+         gui/gtk_glue_gtkglext.cpp, gui/kde.cpp, gui/stl_agg_glue.cpp,
+         libamf/amf.cpp, libamf/rtmp.cpp, libbase/rc.cpp,
+         libbase/sharedlib.cpp, server/movie_root.cpp, utilities/parser.cpp,
+         utilities/processor.cpp: Insert header
+         comment and fix up copyright spacing.
+       * backend/sound_handler_gst.cpp, cygnal/cygnal.cpp, cygnal/http.cpp,
+         cygnal/statistics.cpp, cygnal/stream.cpp, gui/Player.cpp,
+         gui/gtk.cpp, gui/gtk_glue_gtkglext.cpp, gui/stl_agg_glue.cpp,
+         libamf/amf.cpp, libamf/rtmp.cpp, libbase/network.cpp, libbase/rc.cpp,
+         libbase/sharedlib.cpp, server/as_function.cpp, server/debugger.cpp,
+         server/movie_root.cpp, utilities/parser.cpp, utilities/processor.cpp:
+         Pass messages through _(...).
+       * backend/sound_handler_gst.cpp, backend/sound_handler_mp3.cpp,
+         cygnal/README, cygnal/cygnal.cpp, cygnal/http.cpp,
+         cygnal/statistics.cpp, cygnal/stream.cpp, gui/Player.cpp,
+         gui/gtk.cpp, gui/gtk_glue_gtkglext.cpp, gui/stl_agg_glue.cpp,
+         libamf/amf.cpp, libamf/rtmp.cpp, libbase/network.cpp,
+         libbase/rc.cpp, libbase/sharedlib.cpp, server/as_function.cpp,
+         server/debugger.cpp, server/dlist.cpp, server/movie_root.cpp,
+         utilities/parser.cpp, utilities/processor.cpp:
+         Clean up messages (remove \n's and !s, change wording, use
+         log_XXX functions rather than dbglogfile <<, use proper log_XXX
+         function, fix typos, etc).
+       * backend/sound_handler_mp3.cpp: New 2007 Free Software Foundation
+         copyrights applied (to formerly public domain code)
+       * cygnal/cygnal.cpp, cygnal/http.cpp, cygnal/statistics.cpp,
+         cygnal/stream.cpp, gui/gtk_glue_gtkglext.cpp, gui/kde.cpp,
+         gui/stl_agg_glue.cpp, libbase/sharedlib.cpp: Update copyright
+         to 2007.
+       * cygnal/http.cpp (HTTP::sendGetReply),
+         cygnal/stream.cpp (sendfile_thread),
+         libamf/amf.cpp (AMF::encodeElement, AMF::extractElementLength,
+         AMF::parseBody, AMF::extractVariable),
+         server/debugger.cpp (Debugger::dumpStackFrame): Insert FIXME
+         about likely bug.
+       * gui/kde.cpp (qwidget::qwidget):  Translate strings for the
+         pop-up menu items.
+       * libbase/network.cpp (Network::writeNet):  Remove dead code.
+       
 2007-05-14 Sandro Santilli <address@hidden>
 
        * server/rect.{cpp,h} (read): check for min/max values swapped
@@ -20,7 +67,6 @@
        * po/Makefile.am: Add install-data-hook target so the .gmo files
        get installed. Build and install German translation.
        * po/de.po: German translation by address@hidden        
-
        * doc/C/sources.xml: Fix unclosed <para> tags.
        * macros/ffmpeg.m4: Only print warning and reset
        ac_cv_path_ffmpeg_incl if avformat.h doesn't exist.

Index: cygnal/README
===================================================================
RCS file: /sources/gnash/gnash/cygnal/README,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- cygnal/README       6 Mar 2007 18:06:13 -0000       1.4
+++ cygnal/README       14 May 2007 09:44:20 -0000      1.5
@@ -13,7 +13,7 @@
 "pause". Progressive streaming doesn't even require a Media server, it
 can be done with any web server, which doesn't do any special
 handling. This is often reffered to as RTMP over HTTP, but there isn't
-and RTMP protocol used within the client-server communication. The
+any RTMP protocol used within the client-server communication. The
 protocol is purely HTTP using GET and POST directives.
 
 A Flash media server has several abilities other than just sending a
@@ -22,7 +22,7 @@
 on the server side instead of the client side. This is called dynamic
 streaming. Along with seeking, dynamic streaming also supports
 capturing a stream, which allows one to send a data stream to the
-server, where it can stored, and the later replayed.
+server, where it can be stored, and then later replayed.
 
 The server collects statistics on the mumber of connections, the
 bandwidth consumed, which files are streamed, the frame rate,
@@ -50,7 +50,7 @@
 navigation purposes. The main one is used to generate thumbnails or a
 short preview of a movie automatically, without having to do this as
 part of another operation. This features can also be used to merge
-clips from multiple movies.. Each clip is played for the specified
+clips from multiple movies.  Each clip is played for the specified
 amount of time, and then the next clip is played starting and stopping
 at the specificied times, and so on until all the clips are played.
 

Index: cygnal/cygnal.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/cygnal.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- cygnal/cygnal.cpp   24 Apr 2007 17:52:47 -0000      1.9
+++ cygnal/cygnal.cpp   14 May 2007 09:44:20 -0000      1.10
@@ -1,5 +1,6 @@
+// cygnal.cpp:  GNU streaming Flash media server, for Gnash.
 // 
-//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -15,7 +16,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 // 
 
-/* $Id: cygnal.cpp,v 1.9 2007/04/24 17:52:47 rsavoye Exp $ */
+/* $Id: cygnal.cpp,v 1.10 2007/05/14 09:44:20 jgilmore Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -154,8 +155,8 @@
     
     if (rcfile.getDocumentRoot().size() > 0) {
        docroot = rcfile.getDocumentRoot().c_str();
-       dbglogfile << "Document Root for media files is: "
-                  << docroot << endl;
+       log_msg (_("Document Root for media files is: %s"),
+                  docroot);
     } else {
        docroot = "/var/www";
     }
@@ -167,14 +168,13 @@
               exit(0);
          case 'v':
               dbglogfile.setVerbosity();
-             dbglogfile << "Verbose output turned on" << endl;
+             log_msg (_("Verbose output turned on"));
              break;
          case 'w':
               dbglogfile.setWriteDisk(true);
-             dbglogfile << "Logging to disk enabled." << endl;
+             log_msg (_("Logging to disk enabled"));
              break;
          case 'p':
-             dbglogfile << "Logging to disk enabled." << endl;
              port_offset = strtol(optarg, NULL, 0);
              break;
         }
@@ -183,7 +183,7 @@
 
     // get the file name from the command line
     while (optind < argc) {
-        dbglogfile << "Extraneous argument!" << endl;
+        log_error (_("Extraneous argument: %s"), argv[optind]);
     }
 
     // Remove the logfile that's created by default, since leaving a short
@@ -192,7 +192,7 @@
         dbglogfile.removeLog();
     }
     
-    // Trap ^C so we can kill all the threads
+    // Trap ^C (SIGINT) so we can kill all the threads
     act.sa_handler = cntrlc_handler;
     sigaction (SIGINT, &act, NULL);
 
@@ -205,7 +205,7 @@
     http_port.join();
     ssl_port.join();
 
-    dbglogfile << "All done I think..." << endl;
+    log_msg (_("All done I think..."));
     
     return(0);
 }
@@ -222,7 +222,7 @@
     
     proto.createServer(RTMP);
     while (retries++ < thread_retries) {
-       printf("%s: Thread for RTMP port looping...\n", __PRETTY_FUNCTION__);
+       log_msg(_("%s: Thread for RTMP port looping..."), __PRETTY_FUNCTION__);
        proto.newConnection(true);
        st.startClock();
        proto.handShakeWait();
@@ -231,8 +231,8 @@
        
        // Keep track of the network statistics
        st.stopClock();
-       dbglogfile << "Bytes read: " << proto.getBytesIn() << endl;
-       dbglogfile << "Bytes written: " << proto.getBytesOut() << endl;
+       log_msg (_("Bytes read: %d"), proto.getBytesIn());
+       log_msg (_("Bytes written: %d"), proto.getBytesOut());
        st.setBytes(proto.getBytesIn() + proto.getBytesOut());
        st.addStats();
        proto.resetBytesIn();
@@ -255,7 +255,7 @@
 
     www.createServer(port);
     while (retries++ < thread_retries) {
-       printf("%s: Thread for port %d looping...\n", __PRETTY_FUNCTION__, 
port);
+       log_msg(_("%s: Thread for port %d looping..."), __PRETTY_FUNCTION__, 
port);
        www.newConnection(true);
        Statistics st;
        st.setFileType(NetStats::RTMPT);
@@ -278,16 +278,16 @@
        
        // Keep track of the network statistics
        st.stopClock();
-//     dbglogfile << "Bytes read: " << www.getBytesIn() << endl;
-//     dbglogfile << "Bytes written: " << www.getBytesOut() << endl;
+//     log_msg (_("Bytes read: %d"), www.getBytesIn());
+//     log_msg (_("Bytes written: %d"), www.getBytesOut());
 //     st.setBytes(www.getBytesIn() + www.getBytesOut());
        st.addStats();
 //     www.resetBytesIn();
 //     www.resetBytesOut();
        
        if (url != docroot) {
-           dbglogfile << "File to load is: " << filespec << endl;
-           dbglogfile << "Parameters are: " << parameters << endl;
+           log_msg (_("File to load is: %s"), filespec.c_str());
+           log_msg (_("Parameters are: %s"), parameters.c_str());
            memcpy(thread_data.filespec, filespec.c_str(), filespec.size());
            boost::thread sendthr(boost::bind(&stream_thread, &thread_data));
            sendthr.join();
@@ -317,7 +317,7 @@
     www.createServer(port);
     
     while (retries++ < thread_retries) {
-       printf("%s: Thread for port %d looping...\n", __PRETTY_FUNCTION__, 
port);
+       log_msg (_("%s: Thread for port %d looping..."), __PRETTY_FUNCTION__, 
port);
        www.newConnection(true);
        loadfile.netfd = www.getFileFd();
        strcpy(loadfile.filespec, "Hello World");
@@ -335,7 +335,7 @@
     //struct stat stats;
     //struct thread_params loadfile;
     
-    dbglogfile << __PRETTY_FUNCTION__ << ": " << params->filespec << endl;
+    log_msg ("%s: %s", __PRETTY_FUNCTION__, params->filespec);
     
     Stream str;
     str.open(params->filespec, params->netfd, params->statistics);
@@ -346,7 +346,7 @@
 static void
 cntrlc_handler (int /*sig*/)
 {
-    log_msg("Got a ^C !\n");
+    log_msg(_("Got an interrupt"));
 
     exit(-1);
 }
@@ -354,19 +354,19 @@
 static void
 version_and_copyright()
 {
-    printf (
-"Cygnal " VERSION "\n"
-"Copyright (C) 2006 Free Software Foundation, Inc.\n"
+    printf (_(
+"Cygnal %s\n"
+"Copyright (C) 2006, 2007 Free Software Foundation, Inc.\n"
 "Cygnal comes with NO WARRANTY, to the extent permitted by law.\n"
 "You may redistribute copies of Cygnal under the terms of the GNU General\n"
-"Public License.  For more information, see the file named COPYING.\n"
-       );
+"Public License.  For more information, see the file named COPYING.\n"),
+        VERSION);
 }
 
 static void
 usage(const char* /*proc*/)
 {
-    printf(
+    printf(_(
        "cygnal -- an streaming media server.\n"
        "\n"
        "usage: cygnal [options...]\n"
@@ -374,7 +374,7 @@
        "  --version   Print the version numbers.\n"
        "  --verbose (-v)   Output verbose debug info.\n"
        "  --port-offset (-p)   RTMPT port offset.\n"
-       );
+       ));
 }
  
 // local Variables:

Index: cygnal/http.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/http.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- cygnal/http.cpp     27 Apr 2007 07:49:36 -0000      1.7
+++ cygnal/http.cpp     14 May 2007 09:44:20 -0000      1.8
@@ -1,5 +1,6 @@
+// http.cpp:  HyperText Transport Protocol handler for Cygnal, for Gnash.
 // 
-//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -10,12 +11,13 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: http.cpp,v 1.7 2007/04/27 07:49:36 strk Exp $ */
+/* $Id: http.cpp,v 1.8 2007/05/14 09:44:20 jgilmore Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -37,10 +39,7 @@
 namespace cygnal
 {
 
-namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-}
-
+// FIXME, this seems too small to me.  --gnu
 static const int readsize = 1024;
 
 HTTP::HTTP()
@@ -80,9 +79,9 @@
     char buffer[readsize+1];
     memset(buffer, 0, readsize+1);
     if (readNet(buffer, readsize) > 0) {
-        dbglogfile << "Read initial GET Request" << endl;
+        log_msg (_("Read initial GET Request"));
     } else {
-        dbglogfile << "Couldn't read initial GET Request" << endl;
+        log_error (_("Couldn't read initial GET Request"));
     }
     
     extractMethod(buffer);
@@ -98,9 +97,9 @@
 
     // See if we got a legit GET request
     if (strncmp(buffer, "GET ", 4) == 0) {
-        dbglogfile << "Got legit GET request: " << endl;
+        log_msg (_("Got legit GET request"));
     } else {
-        dbglogfile << "ERROR: Got bogus GET request!" << endl;
+        log_error (_("Got bogus GET request"));
     }
 
     return _url;
@@ -127,13 +126,15 @@
     // without any memory allocation, which could incur a small performance 
hit.
     char *length = strstr(reply, " XX");
     sprintf(length, " %d", filesize);
+// FIXME:  Doesn't this write to a const array?  And doesn't it fail to
+// supply the two \r\n's needed to finish the string?  --gnu
     
     int ret = writeNet(reply, strlen(reply));
 
     if (ret >= 0 && (unsigned)ret == strlen(reply)) {
-        dbglogfile << "Sent GET Reply: " << reply << endl;
+        log_msg (_("Sent GET Reply: %s"), reply);
     } else {
-        dbglogfile << "Couldn't send GET Reply, writeNet returned " << ret << 
endl;
+        log_msg (_("Couldn't send GET Reply, writeNet returned %d"), ret);
        // TODO: FIXME: shouldn't we return false here ?
     }
     return true; // Default to true
@@ -378,20 +379,20 @@
     
     boost::mutex::scoped_lock lock(stl_mutex);
     
-    dbglogfile << "==== The HTTP header breaks down as follows: ====" << endl;
-    dbglogfile << "Filespec: " << _filespec.c_str() << endl;
-    dbglogfile << "URL: " << _url.c_str() << endl;
-    dbglogfile << "Version: " << _version.c_str() << endl;
-    dbglogfile << "Method: " << _method.c_str() << endl;
-    dbglogfile << "Referer: " << _referer.c_str() << endl;
-    dbglogfile << "Connection: " << _connection.c_str() << endl;
-    dbglogfile << "Host: " << _host.c_str() << endl;
-    dbglogfile << "User Agent: " << _agent.c_str() << endl;
-    dbglogfile << "Language: " << _language.c_str() << endl;
-    dbglogfile << "Charset: " << _charset.c_str() << endl;
-    dbglogfile << "Encoding: " << _encoding << endl;
-    dbglogfile << "TE: " << _te.c_str() << endl;
-    dbglogfile << "==== ==== ====" << endl;
+    log_msg (_("==== The HTTP header breaks down as follows: ===="));
+    log_msg (_("Filespec: %s"), _filespec.c_str());
+    log_msg (_("URL: %s"), _url.c_str());
+    log_msg (_("Version: %s"), _version.c_str());
+    log_msg (_("Method: %s"), _method.c_str());
+    log_msg (_("Referer: %s"), _referer.c_str());
+    log_msg (_("Connection: %s"), _connection.c_str());
+    log_msg (_("Host: %s"), _host.c_str());
+    log_msg (_("User Agent: %s"), _agent.c_str());
+    log_msg (_("Language: %s"), _language.c_str());
+    log_msg (_("Charset: %s"), _charset.c_str());
+    log_msg (_("Encoding: %s"), _encoding.c_str());
+    log_msg (_("TE: %s"), _te.c_str());
+    log_msg (_("==== ==== ===="));
 }
 
 } // end of cygnal namespace

Index: cygnal/statistics.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/statistics.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- cygnal/statistics.cpp       27 Apr 2007 07:49:36 -0000      1.2
+++ cygnal/statistics.cpp       14 May 2007 09:44:20 -0000      1.3
@@ -1,5 +1,6 @@
+// statistics.cpp:  Network performance stats for Cygnal, for Gnash.
 // 
-//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -10,11 +11,14 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
+/* $Id: statistics.cpp,v 1.3 2007/05/14 09:44:20 jgilmore Exp $ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -31,10 +35,6 @@
 using namespace gnash;
 using namespace std;
 
-namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-}
-
 static boost::mutex io_mutex;
 
 // The string versions of the codec, used for debugging. If you add
@@ -51,7 +51,7 @@
     "VP7"
 };
 
-// The string versions of the codec, used for debugging. If you add
+// The string versions of the file type, used for debugging. If you add
 // another enum type to filetypes_e, you have to add the string
 // representation here or you'll get the wrong output.
 const char *filetype_names[] = {
@@ -113,15 +113,15 @@
     for (it = _netstats.begin(); it != _netstats.end(); it++) {
         NetStats *stats = (*it);
         if (stats->getFileType() <= VIDEO) {
-            dbglogfile << "Stream type is: " << 
filetype_names[stats->getFileType()] << endl;
+            log_msg (_("Stream type is: %s"), 
filetype_names[stats->getFileType()]);
         }
         if (((stats->getFileType() == VIDEO) || (stats->getFileType() == 
AUDIO)) &&
             stats->getCodec() <= VP7) {
-            dbglogfile << "Stream codec is: " << 
codec_names[stats->getCodec()];
+            log_msg (_("Stream codec is: %s"), codec_names[stats->getCodec()]);
         }
-        dbglogfile << stats->getBytes() << " bytes were transfered in "
-                   << to_simple_string(stats->getTimeSpan()).c_str()
-                   << " seconds." << endl;
+        log_msg (_("%d bytes were transfered in %s seconds"),
+                stats->getBytes(),
+                 to_simple_string(stats->getTimeSpan()).c_str());
     }
 }
 

Index: cygnal/stream.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/stream.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- cygnal/stream.cpp   27 Apr 2007 07:49:36 -0000      1.4
+++ cygnal/stream.cpp   14 May 2007 09:44:21 -0000      1.5
@@ -1,5 +1,6 @@
+// stream.cpp:  Network streaming server for Cygnal, for Gnash.
 // 
-//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -10,11 +11,14 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
+/* $Id: stream.cpp,v 1.5 2007/05/14 09:44:21 jgilmore Exp $ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -62,24 +66,22 @@
     if (stat(loadfile.filespec, &stats) == 0) {
 
        fd = open(loadfile.filespec, O_RDONLY);
-//     dbglogfile << "File " << loadfile.filespec
-//                << " is " << stats.st_size
-//                << " bytes in size." << endl;
+//     log_msg ("File %s is %lld bytes in size",
+//              loadfile.filespec, (long long int)(stats.st_size));
        if (fd) {
            fdptr = static_cast<char *>(mmap(0, stats.st_size,
                   PROT_READ, MAP_SHARED, fd, 0));
        } else {
-           dbglogfile << "ERROR: Couldn't load "
-                      << loadfile.filespec << endl;
+           log_error (_("Couldn't load file %s"), loadfile.filespec);
+// FIXME: now handle the error!
        }
        
        if (fdptr == MAP_FAILED) {
-           dbglogfile << "ERROR: Couldn't map file "
-                      << loadfile.filespec << " into memory! "
-                      << strerror(errno) << endl;
+           log_error (_("Couldn't map file %s into memory: %s"),
+                      loadfile.filespec, strerror(errno));
        } else {            
-           dbglogfile << "File " << loadfile.filespec
-                      << " mapped to: " << (void *)fdptr << endl;
+           log_msg (_("File %s mapped to: %p"), loadfile.filespec,
+                      (void *)fdptr);
        }
        
 //     if (stats.st_size > 1024*8) {
@@ -91,8 +93,7 @@
 //     if (stats.st_blocks > 10) {
 //     }
     } else {
-       dbglogfile << "ERROR: File " << loadfile.filespec
-                  << " doesn't exist!" << endl;
+       log_error (_("File %s doesn't exist"), loadfile.filespec);
     }
 
     int filesize = stats.st_size;
@@ -111,7 +112,7 @@
        }
        
        if (nbytes <= 0) {
-           dbglogfile << "Done..." << endl;
+           log_msg (_("Done..."));
            return &nbytes;
        }
     }
@@ -177,26 +178,23 @@
         _filesize = st.st_size;
         boost::mutex::scoped_lock lock(io_mutex);
        _filefd = ::open(filespec, O_RDONLY);
-       dbglogfile << "File " << filespec
-                  << " is " << _filesize
-                  << " bytes in size." << endl;
+       log_msg (_("File %s is %lld bytes in size."), filespec,
+                  (long long int) _filesize);
        if (_filefd) {
            _dataptr = static_cast<unsigned char *>(mmap(0, _filesize,
                   PROT_READ, MAP_SHARED, _filefd, 0));
        } else {
-           dbglogfile << "ERROR: Couldn't load "
-                      << filespec << endl;
+           log_error (_("Couldn't load file %s"), filespec);
             return false;
        }
        
        if (_seekptr == MAP_FAILED) {
-           dbglogfile << "ERROR: Couldn't map file "
-                      << filespec << " into memory! "
-                      << strerror(errno) << endl;
+           log_error (_("Couldn't map file %s into memory: %s"),
+                      filespec, strerror(errno));
             return false;
        } else {            
-           dbglogfile << "File " << filespec
-                      << " mapped to: " << (void *)_dataptr << endl;
+           log_msg (_("File %s mapped to: %p"), filespec,
+                      (void *)_dataptr);
             _seekptr = _dataptr;
             _state = OPEN;
             return true;
@@ -210,11 +208,9 @@
 //     if (stats.st_blocks > 10) {
 //     }
     } else {
-       dbglogfile << "ERROR: File " << filespec
-                  << " doesn't exist!" << endl;
+       log_error (_("File %s doesn't exist"), filespec);
     }
 
-    
     return true;
 }
 

Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- gui/Player.cpp      6 May 2007 22:43:17 -0000       1.48
+++ gui/Player.cpp      14 May 2007 09:44:21 -0000      1.49
@@ -167,7 +167,7 @@
     //
     if (!delay && rcfile.getTimerDelay() > 0) {
         delay = rcfile.getTimerDelay();
-        dbglogfile << "Timer delay set to " << delay << "milliseconds" << endl;
+        log_msg (_("Timer delay set to %d milliseconds"), delay);
     }    
 
     // Remove the logfile that's created by default, since leaving a short

Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -b -r1.89 -r1.90
--- gui/gtk.cpp 9 May 2007 10:19:58 -0000       1.89
+++ gui/gtk.cpp 14 May 2007 09:44:21 -0000      1.90
@@ -1,3 +1,4 @@
+// gtk.cpp: Gnome ToolKit graphical user interface, for Gnash.
 // 
 //   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
@@ -10,11 +11,13 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
 
-/* $Id: gtk.cpp,v 1.89 2007/05/09 10:19:58 strk Exp $ */
+/* $Id: gtk.cpp,v 1.90 2007/05/14 09:44:21 jgilmore Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -40,10 +43,6 @@
 
 using namespace std;
 
-namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-}
-
 namespace gnash 
 {
 
@@ -77,10 +76,10 @@
 
     if (_xid) {
       _window = gtk_plug_new(_xid);
-      dbglogfile << "Created XEmbedded window" << endl;
+      log_msg (_("Created XEmbedded window"));
     } else {
       _window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-      dbglogfile << "Created top level window" << endl;
+      log_msg (_("Created top level window"));
     }
 
     // XXXbjacques: why do we need this?
@@ -206,15 +205,14 @@
     pathname = find_pixmap_file (filename);
 
     if (!pathname) {
-        dbglogfile << "Couldn't find pixmap file: " << filename << endl;
-        g_warning ("Couldn't find pixmap file: %s", filename);
+        log_error (_("Couldn't find pixmap file: %s"), filename);
+        g_warning (_("Couldn't find pixmap file: %s"), filename);
         return NULL;
     }
 
     pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
     if (!pixbuf) {
-        dbglogfile << "Failed to load pixbuf file: " <<pathname << 
error->message << endl;
-        //fprintf (stderr, "Failed to load pixbuf file: %s: %s\n", pathname, 
error->message);
+        log_error (_("Failed to load pixbuf file: %s: %s"), pathname, 
error->message);
         g_error_free (error);
     }
     g_free (pathname);
@@ -389,10 +387,9 @@
     // run() will return. If run() is then changed to return a pointer to the
     // next file to be played, then the Player class can play the next file,
     // unless run() returns NULL.
-    dbglogfile << "Attempting to open file " << filename << "." << endl
-               << "NOTE: the file open functionality is not yet implemented!"
-               << endl;
-
+    log_error (_("Attempting to open file %s.\n"
+               "NOTE: the file open functionality is not yet implemented!"),
+              filename);
 
 #if GTK_CHECK_VERSION(2,4,0)
     g_free(filename);
@@ -551,7 +548,7 @@
                       (GtkAttachOptions) (0), 0, 0);
     
     if (rcfile.useWriteLog() == true ) {
-        dbglogfile << "Debug log filename: " << rcfile.getDebugLog().c_str() 
<< endl;
+        log_msg (_("Debug log filename: %s"), rcfile.getDebugLog().c_str());
         gtk_entry_set_text( (GtkEntry*) logfilenameentry, 
rcfile.getDebugLog().c_str()); 
         gtk_widget_set_sensitive(logfilenameentry,TRUE);
     } else {

Index: gui/gtk_glue_gtkglext.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk_glue_gtkglext.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- gui/gtk_glue_gtkglext.cpp   11 Nov 2006 15:25:27 -0000      1.10
+++ gui/gtk_glue_gtkglext.cpp   14 May 2007 09:44:21 -0000      1.11
@@ -1,5 +1,6 @@
+// gtk_glue_gtkglext.cpp:  Gnome ToolKit glue of some sort, for Gnash.
 //
-//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -10,24 +11,19 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-//
 //
 
-/* $Id: gtk_glue_gtkglext.cpp,v 1.10 2006/11/11 15:25:27 strk Exp $ */
+/* $Id: gtk_glue_gtkglext.cpp,v 1.11 2007/05/14 09:44:21 jgilmore Exp $ */
 
 #include "gtk_glue_gtkglext.h"
 #include "log.h"
 
 using namespace std;
 
-namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-}
-
 namespace gnash
 {
 
@@ -69,8 +65,8 @@
 
     gint major, minor;
     gdk_gl_query_version (&major, &minor);
-    dbglogfile << "OpenGL extension version - "
-              << (int)major << "." << (int)minor << endl;
+    log_msg (_("OpenGL extension version - %d.%d"),
+              (int)major, (int)minor);
 
     GdkGLConfigMode glcmode = (GdkGLConfigMode)(GDK_GL_MODE_RGB |
                                                 GDK_GL_MODE_DEPTH |
@@ -78,19 +74,19 @@
     _glconfig = gdk_gl_config_new_by_mode (glcmode);
 
     if (!_glconfig) {
-      dbglogfile << "Cannot find the double-buffered visual." << endl;
-      dbglogfile << "Trying single-buffered visual." << endl;
+      log_error (_("Cannot find the double-buffered visual.\n"
+                  "Trying single-buffered visual."));
 
       glcmode = (GdkGLConfigMode)(GDK_GL_MODE_RGB | GDK_GL_MODE_DEPTH);
       _glconfig = gdk_gl_config_new_by_mode (glcmode);
       if (!_glconfig) {
-        dbglogfile << "No appropriate OpenGL-capable visual found." << endl;
+        log_error (_("No appropriate OpenGL-capable visual found."));
         gtk_main_quit(); // XXX
       } else {
-        dbglogfile << "Got single-buffered visual." << endl;
+        log_msg (_("Got single-buffered visual."));
       }
     } else {
-      dbglogfile << "Got double-buffered visual." << endl;
+      log_msg (_("Got double-buffered visual."));
     }
     
     return true;

Index: gui/kde.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/kde.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- gui/kde.cpp 13 Apr 2007 09:15:54 -0000      1.13
+++ gui/kde.cpp 14 May 2007 09:44:21 -0000      1.14
@@ -1,5 +1,6 @@
+// kde.cpp:  K Development Environment top level window, for Gnash.
 // 
-//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -10,12 +11,11 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
-//
-
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -42,10 +42,6 @@
 
 using namespace std;
 
-namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-}
-
 namespace gnash 
 {
 
@@ -342,15 +338,15 @@
 qwidget::qwidget(KdeGui* godfather)
   : QGLWidget(0, "hi")
 {
-    _qmenu.insertItem("Play Movie", this, SLOT(menuitem_play_callback()));
-    _qmenu.insertItem("Pause Movie", this, SLOT(menuitem_pause_callback()));
-    _qmenu.insertItem("Stop Movie", this, SLOT(menuitem_stop_callback()));
-    _qmenu.insertItem("Restart Movie", this, 
SLOT(menuitem_restart_callback()));
-    _qmenu.insertItem("Step Forward", this, 
SLOT(menuitem_step_forward_callback()));
-    _qmenu.insertItem("Step Backward", this, SLOT( 
menuitem_step_backward_callback()));
-    _qmenu.insertItem("Jump Forward", this, 
SLOT(menuitem_jump_forward_callback()));
-    _qmenu.insertItem("Jump Backward", this, 
SLOT(menuitem_jump_backward_callback()));
-    _qmenu.insertItem("Quit Gnash", this, SLOT(menuitem_quit_callback()));
+    _qmenu.insertItem(_("Play Movie"), this, SLOT(menuitem_play_callback()));
+    _qmenu.insertItem(_("Pause Movie"), this, SLOT(menuitem_pause_callback()));
+    _qmenu.insertItem(_("Stop Movie"), this, SLOT(menuitem_stop_callback()));
+    _qmenu.insertItem(_("Restart Movie"), this, 
SLOT(menuitem_restart_callback()));
+    _qmenu.insertItem(_("Step Forward"), this, 
SLOT(menuitem_step_forward_callback()));
+    _qmenu.insertItem(_("Step Backward"), this, SLOT( 
menuitem_step_backward_callback()));
+    _qmenu.insertItem(_("Jump Forward"), this, 
SLOT(menuitem_jump_forward_callback()));
+    _qmenu.insertItem(_("Jump Backward"), this, 
SLOT(menuitem_jump_backward_callback()));
+    _qmenu.insertItem(_("Quit Gnash"), this, SLOT(menuitem_quit_callback()));
 
     _godfather = godfather;
 

Index: gui/sdl_agg_glue.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/sdl_agg_glue.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- gui/sdl_agg_glue.cpp        3 Mar 2007 15:51:32 -0000       1.10
+++ gui/sdl_agg_glue.cpp        14 May 2007 09:44:21 -0000      1.11
@@ -1,5 +1,6 @@
+// sdl_agg_glue.cpp:  Glue between SDL and Anti-Grain Geometry, for Gnash.
 //
-//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -10,11 +11,10 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
-//
 //
 
 #include "sdl_agg_glue.h"
@@ -26,10 +26,6 @@
 
 using namespace std;
 
-namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-}
-
 namespace gnash
 {
 
@@ -73,7 +69,7 @@
         _agg_renderer = create_render_handler_agg("RGBA16");
         break;
       default:
-        dbglogfile << "ERROR: bit depth must be 16, 24 or 32 bits." << 
std::endl;
+        log_error (_("AGG's bit depth must be 16, 24 or 32 bits, not %d."), 
_bpp);
         assert(0);
     }
     return _agg_renderer;
@@ -90,7 +86,7 @@
     _screen = SDL_SetVideoMode(width, height, _bpp, sdl_flags | SDL_SWSURFACE);
 
     if (!_screen) {
-        fprintf(stderr, "SDL_SetVideoMode() failed.\n");
+        log_error (_("SDL_SetVideoMode() failed for SdlAggGlue."));
         exit(1);
     }
 
@@ -127,7 +123,7 @@
 
     _offscreenbuf = new unsigned char[bufsize];
 
-    log_msg("SDL-AGG: %i bytes offscreen buffer allocated\n", bufsize);
+    log_msg (_("SDL-AGG: %i byte offscreen buffer allocated"), bufsize);
 
 
     // Only the AGG renderer has the function init_buffer, which is *not* part 
of

Index: libamf/amf.cpp
===================================================================
RCS file: /sources/gnash/gnash/libamf/amf.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- libamf/amf.cpp      2 May 2007 14:18:05 -0000       1.36
+++ libamf/amf.cpp      14 May 2007 09:44:21 -0000      1.37
@@ -1,4 +1,4 @@
-//
+// amf.cpp:  AMF (Action Message Format) rpc marshalling, for Gnash.
 // 
 //   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
@@ -11,18 +11,19 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: amf.cpp,v 1.36 2007/05/02 14:18:05 martinwguy Exp $ */
+/* $Id: amf.cpp,v 1.37 2007/05/14 09:44:21 jgilmore Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-//#include <cstring> //For memcoy(), commented out atm.
+//#include <cstring> //For memcpy(), commented out atm.
 #include <string>
 #include <vector>
 
@@ -39,10 +40,6 @@
 using namespace std;
 using namespace gnash;
 
-namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-}
-
 namespace amf 
 {
 
@@ -196,18 +193,18 @@
     amfnum_t nanosecs;
     short length;
     
-    log_msg("Type is %s\n", astype_str[type]);
+    log_msg(_("Type is %s"), astype_str[type]);
 
     x++;                        // skip the type byte
     switch (type) {
       case NUMBER:
          // AMF numbers are 64-bit big-endian integers.
           num = *(amfnum_t *)swapBytes(x+1, 8);
-          log_msg("Number is " AMFNUM_F, num);
+          log_msg(_("Number is " AMFNUM_F), num);
           break;
       case BOOLEAN:
           boolshift = *x;
-          log_msg("Boolean is %d\n", boolshift);
+          log_msg(_("Boolean is %d"), boolshift);
           break;
       case STRING:
 //        int length = *(short *)swapBytes(x, 2);
@@ -220,58 +217,55 @@
           // *src to a sequence of wide characters as if by repeated
           // calls of the form:
 //          mbsrtowcs
-          log_msg("String is %s\n", mstr);
+          log_msg(_("String is %s"), mstr);
           break;
       case OBJECT:
 //          readElement();
-          log_msg("Object is unimplemented\n");
+          log_unimpl("Object AMF decoder");
           break;
       case MOVIECLIP:
-        log_msg("MovieClip is unimplemented\n");
+        log_unimpl("MovieClip AMF decoder");
           break;
       case UNSUPPORTED:
-        log_msg("MovieClip is unimplemented\n");
+        log_unimpl("Unsupported AMF decoder");
           break;
       case NULL_VALUE: 
-          log_msg("Null is unimplemented\n");
+          log_unimpl("Null AMF decoder");
           break;
       case UNDEFINED:
-          log_msg("Endefined element");
+          log_msg(_("Undefined element"));
           break;
       case REFERENCE:
-          log_msg("Reference is unimplemented\n");
+          log_unimpl("Reference AMF decoder");
           break;
       case ECMA_ARRAY:
-          log_msg("ECMAArray is unimplemented\n");
+          log_unimpl("ECMAArray AMF decoder");
           break;
       case OBJECT_END:
-          log_msg("ObjectEnd is unimplemented\n");
+          log_unimpl("ObjectEnd AMF decoder");
           break;
       case STRICT_ARRAY:
-          log_msg("StrictArray is unimplemented\n");
+          log_unimpl("StrictArray AMF decoder");
           break;
       case DATE:
           nanosecs = *(amfnum_t *)swapBytes(x+1, 8);
-          log_msg("Date is " AMFNUM_F " nanoseconds\n", nanosecs);
+          log_msg(_("Date is " AMFNUM_F " nanoseconds"), nanosecs);
           break;
       case LONG_STRING:
 //          int length = *(short *)swapBytes(x, 4);
           x+=4;                  // skip the length bytes
 //        mstr = new char[length+1];
 //          memcpy(mstr, x, length);
-          log_msg("String is %s\n", mstr);
+          log_msg(_("String is %s"), mstr);
           break;
-//       case Unsupported:
-          log_msg("Unsupported is unimplemented\n");
-//           break;
       case RECORD_SET:
-          log_msg("Recordset is unimplemented\n");
+          log_unimpl("Recordset AMF decoder");
           break;
       case XML_OBJECT:
-          log_msg("XMLObject is unimplemented\n");
+          log_unimpl("XMLObject AMF decoder");
           break;
       case TYPED_OBJECT:
-          log_msg("TypedObject is unimplemented\n");
+          log_unimpl("TypedObject AMF decoder");
           break;
       default:
           log_msg("Warning: Unknown AMF element type %d\n", type);
@@ -306,9 +300,9 @@
 
     char *out = NULL, *x;
     amfnum_t num;
-    int pktsize;
+    int pktsize = -1;
 
-    // Packets are of varying lenght. A few pass in a byte count, but
+    // Packets are of varying length. A few pass in a byte count, but
     // most packets have a hardcoded size.
     switch (type) {
         // Encode the data as a 64 bit, big-endian, numeric value
@@ -365,6 +359,7 @@
       case TYPED_OBJECT:
           pktsize = 0;          // look for the terminator
           break;
+// FIXME, shouldn't there be a default case here?
     };
     
     switch (type) {
@@ -397,13 +392,13 @@
           memcpy(x, in, nbytes);
           break;
       case OBJECT:
-          log_msg("Object unimplemented\n");
+          log_unimpl("Object AMF encoder");
           break;
       case MOVIECLIP:
-          log_msg("MovieClip unimplemented\n");
+          log_unimpl("MovieClip AMF encoder");
           break;
       case NULL_VALUE: 
-          log_msg("Null unimplemented\n");
+          log_unimpl("Null AMF encoder");
           break;
       case UNDEFINED:
           x = out = new char[pktsize];
@@ -416,16 +411,16 @@
           memcpy(x, in, nbytes);
          break;
       case REFERENCE:
-          log_msg("Reference unimplemented\n");
+          log_unimpl("Reference AMF encoder");
           break;
       case ECMA_ARRAY:
-          log_msg("ECMAArray unimplemented\n");
+          log_unimpl("ECMAArray AMF encoder");
           break;
       case OBJECT_END:
-          log_msg("ObjectEnd unimplemented\n");
+          log_unimpl("ObjectEnd AMF encoder");
           break;
       case STRICT_ARRAY:
-          log_msg("StrictArray unimplemented\n");
+          log_unimpl("StrictArray AMF encoder");
           break;
           // Encode the date as a 64 bit, big-endian, numeric value
       case DATE:
@@ -437,13 +432,13 @@
           memcpy(x, &num, 8);
           break;
       case LONG_STRING:
-          log_msg("LongString unimplemented\n");
+          log_unimpl("LongString AMF encoder");
           break;
       case UNSUPPORTED:
-          log_msg("Unsupported unimplemented\n");
+          log_unimpl("Unsupported AMF encoder");
           break;
       case RECORD_SET:
-          log_msg("Recordset unimplemented\n");
+          log_unimpl("Recordset AMF encoder");
           break;
       case XML_OBJECT:
           // Encode an XML object. The data follows a 4 byte length
@@ -456,7 +451,7 @@
           memcpy(x, in, nbytes);
           break;
       case TYPED_OBJECT:
-          log_msg("TypedObject unimplemented\n");
+          log_unimpl("TypedObject AMF encoder");
           break;
     };
     
@@ -659,6 +654,7 @@
           return 1;
           break;
       case STRING:              // the length is a 2 byte value
+               //FIXME, there are all kinds of byte order problems in this 
code.
           return (short)*(short *)x;
           break;
       case OBJECT:
@@ -666,25 +662,25 @@
           break;
       case MOVIECLIP:
           return -1;
-          log_msg("MovieClip unimplemented");
+          log_unimpl("MovieClip AMF extractor");
           break;
       case NULL_VALUE: 
           return -1;
-          log_msg("Null unimplemented");
+          log_unimpl("Null AMF extractor");
           break;
       case UNDEFINED:
           return 0;
           break;
       case REFERENCE:
           return -1;
-          log_msg("Reference unimplemented");
+          log_unimpl("Reference AMF extractor");
           break;
       case ECMA_ARRAY:
           return x - strchr(x, TERMINATOR);
           break;
       case OBJECT_END:
           return -1;
-          log_msg("ObjectEnd unimplemented");
+          log_unimpl("ObjectEnd AMF extractor");
           break;
       case STRICT_ARRAY:         // the length is a 4 byte value
 //          return (int *)x;
@@ -694,15 +690,15 @@
           break;
       case LONG_STRING:
           return -1;
-          log_msg("LongString unimplemented");
+          log_unimpl("LongString AMF extractor");
           break;
       case UNSUPPORTED:
           return -1;
-          log_msg("Unsupported unimplemented");
+          log_unimpl("Unsupported AMF extractor");
           break;
       case RECORD_SET:
           return -1;
-          log_msg("Recordset unimplemented");
+          log_unimpl("Recordset AMF extractor");
           break;
       case XML_OBJECT:           // the length is a 4 byte value
 //          return (int)*(int *)x;
@@ -893,7 +889,6 @@
     
     int headersize = -1;
     
-    unsigned char hexint[2];
     switch (header & AMF_HEADSIZE_MASK) {
       case HEADER_12:
           headersize = 12;
@@ -908,10 +903,8 @@
           headersize = 11;
           break;
       default:
-          char buf = header & AMF_HEADSIZE_MASK;
-          hexify((unsigned char *)hexint, (unsigned char *)&buf, 1, false);
-          dbglogfile << "ERROR: Header size bits out of range! was 0x"
-                     << hexint << endl;
+          log_error(_("AMF Header size bits (0x%X) out of range"),
+                       header & AMF_HEADSIZE_MASK);
           headersize = 1;
           break;
     };
@@ -927,26 +920,24 @@
     unsigned char *tmpptr = in;
     unsigned char hexint[32];
     
-    hexify((unsigned char *)hexint, (unsigned char *)tmpptr, 1, false);
-    dbglogfile << "AMF header byte is: 0x" << hexint << endl;
+    log_msg (_("AMF header byte is: 0x%X"), *in);
 
     _amf_index = *tmpptr & AMF_INDEX_MASK;
-    dbglogfile << "The AMF channel index is " << _amf_index << endl;
+    log_msg (_("The AMF channel index is %d"), _amf_index);
     
     _header_size = headerSize(*tmpptr++);
-    dbglogfile << "The header size is " << _header_size << endl;
+    log_msg (_("The header size is %d"), _header_size);
 
 #if 1
     hexify((unsigned char *)hexint, (unsigned char *)in, _header_size, false);
-    dbglogfile << "The packet head is: 0x" << hexint << endl;
+    log_msg(_("The packet head is: 0x%s"), hexint);
 #endif
     if (_header_size >= 4) {
         hexify((unsigned char *)hexint, (unsigned char *)tmpptr, 3, false);
         _mystery_word = *tmpptr++;
         _mystery_word = (_mystery_word << 12) + *tmpptr++;
         _mystery_word = (_mystery_word << 8) + *tmpptr++;
-         dbglogfile << "The mystery word is: " << _mystery_word
-                    << " Hex value is: 0x" << hexint << endl;
+        log_msg(_("The mystery word is: %d or 0x%s"), _mystery_word, hexint);
     }
 
     if (_header_size >= 8) {
@@ -955,8 +946,7 @@
         _total_size = (_total_size << 12) + *tmpptr++;
         _total_size = (_total_size << 8) + *tmpptr++;
         _total_size = _total_size & 0xffffff;
-        dbglogfile << "The body size is: " << _total_size
-                   << " Hex value is: " << (void *) _total_size << endl;
+        log_msg(_("The body size is: %d, or 0x%s"), _total_size, hexint);
         _amf_data = new unsigned char(_total_size+1);
         _seekptr = _amf_data;
 //        memset(_amf_data, 0, _total_size+1);
@@ -966,8 +956,7 @@
         hexify((unsigned char *)hexint, (unsigned char *)tmpptr, 1, false);
         _type = *(content_types_e *)tmpptr;
         tmpptr++;
-        dbglogfile << "The type is: " << _type
-                   << " Hex value is: 0x" << hexint << endl;
+        log_msg(_("The type is: %d, or 0x%s"), _type, hexint);
     }
 
     switch(_type) {
@@ -986,7 +975,7 @@
           _packet_size = AMF_AUDIO_PACKET_SIZE;
           break;
       default:
-          dbglogfile << "ERROR: Unidentified data type!" << endl;
+          log_error (_("ERROR: Unidentified AMF header data type %d"), _type);
           break;
     };
     
@@ -994,8 +983,7 @@
         hexify((unsigned char *)hexint, (unsigned char *)tmpptr, 3, false);
         _src_dest = *(reinterpret_cast<amfsource_e *>(tmpptr));
         tmpptr += sizeof(unsigned int);
-        dbglogfile << "The source/destination is: " << _src_dest
-                   << " Hex value is: 0x" << hexint << endl;
+        log_msg(_("The source/destination is: %d, or 0x%s"), _src_dest, 
hexint);
     }
 
     return _packet_size;
@@ -1038,7 +1026,7 @@
     }
     
     if (in == 0) {
-        dbglogfile << "ERROR: input data is NULL!" << endl;
+        log_error(_("AMF body input data is NULL"));
         return -1;
     }
 
@@ -1048,7 +1036,7 @@
 //     _read_size += bytes;
 #if 1
     hexify((unsigned char *)hexint, (unsigned char *)in, bytes, true);
-    dbglogfile << "The packet body is: 0x" << hexint << endl;
+    log_msg(_("The packet body is: 0x%s"), hexint);
 #endif
 
 //    tmpptr = in;
@@ -1061,7 +1049,7 @@
 // If it's a String type, then there is a count of characters, then the string 
value    
     
     while (tmpptr  != (in + bytes)) {
-        memset(buffer, 0, 500);
+        memset(buffer, 0, sizeof(buffer));     //FIXME, slow
         // Check the type of the element data
         char type = *(astype_e *)tmpptr;
         tmpptr++;                        // skip the header byte
@@ -1077,13 +1065,13 @@
               // get the length of the name
               length = ntohs((*(short *)tmpptr) & 0xffff);
               tmpptr += 2;
-              dbglogfile << "AMF String length is: " << length << endl;
+              log_msg(_("AMF String length is: %d"), length);
               // get the name of the element
               if (length) {
                   memcpy(buffer, tmpptr, length);
               }
               tmpptr += length;
-              dbglogfile << "AMF String is: " << buffer << endl;              
+              log_msg(_("AMF String is: %s"), buffer);              
               el.name = buffer;
               break;
           case OBJECT:
@@ -1105,8 +1093,7 @@
           case XML_OBJECT:
           case TYPED_OBJECT:
           default:
-//          dbglogfile << astype_str[(int)type] << ": unimplemented!" << endl;
-              dbglogfile << __PRETTY_FUNCTION__ << (int)type << ": 
unimplemented!" << endl;
+           log_unimpl("%s: type %d", __PRETTY_FUNCTION__, (int)type);
               return -1;
         }
     }
@@ -1140,7 +1127,7 @@
     el->length = length;
     if (length == 0) {
         if (*(tmpptr+2) == AMF::OBJECT_END) {
-            dbglogfile << "End of Object definition." << endl;
+            log_msg(_("End of Object definition"));
             el->length = 0;
             el->type = AMF::OBJECT_END;
             tmpptr+=3;
@@ -1151,22 +1138,22 @@
 #if 0
     unsigned char hexint[AMF_PACKET_SIZE];
     hexify((unsigned char *)hexint, (unsigned char *)tmpptr, length*3, true);
-    dbglogfile << "The element is: 0x" << hexint << endl;
+    log_msg(_("The element is: 0x%s", hexint);
 #endif
     tmpptr += 2;
     // get the name of the element
     if (length > 0) {
-        dbglogfile << "AMF element length is: " << length << endl;
+        log_msg(_("AMF element length is: %d"), length);
         memcpy(buffer, tmpptr, length);
         el->name = reinterpret_cast<char *>(buffer);
         tmpptr += length;
     }
     
-//    dbglogfile << "AMF element name is: " << buffer << endl;
+//    log_msg(_("AMF element name is: %s", buffer);
     astype_e type = (astype_e)((*tmpptr++) & 0xff);
 
     if (type <= AMF::TYPED_OBJECT) {
-        dbglogfile << "AMF type is: " << astype_str[(int)type] << endl;
+        log_msg(_("AMF type is: %s"), astype_str[(int)type]);
        el->type = type;
     }
 
@@ -1183,8 +1170,7 @@
           unsigned char hexint[AMF_NUMBER_SIZE*3];
           hexify((unsigned char *)hexint, (unsigned char *)buffer,
                 AMF_NUMBER_SIZE, false);
-          dbglogfile << "Number \"" << el->name.c_str() << "\" is: 0x"
-                    << hexint << endl;
+          log_msg(_("Number \"%s\" is: 0x%s"), el->name.c_str(), hexint);
 //          amfnum_t *num = extractNumber(tmpptr);
           tmpptr += 8;
           break;
@@ -1195,8 +1181,9 @@
           unsigned char* tmp = new unsigned char[1];
           memcpy(tmp, tmpptr, 1); 
           el->data = tmp;
-         dbglogfile << "Boolean \"" << el->name.c_str() << "\" is: "
-                    << ( (*tmpptr == 0) ? "true" :"false") << endl;
+         log_msg((*tmpptr == 0) ? 
+                 _("Boolean \"%s\" is: true"):
+                 _("Boolean \"%s\" is: false"), el->name.c_str());
          tmpptr += 1;
          break;
         }
@@ -1204,8 +1191,7 @@
          length = ntohs((*(const short *)tmpptr) & 0xffff);
           tmpptr += sizeof(short);
           el->data = (const unsigned char*)tmpptr; 
-          dbglogfile << "Variable \"" << el->name.c_str() << "\" is: "
-                    << el->data << endl;
+          log_msg(_("Variable \"%s\" is: %s"), el->name.c_str(), el->data);
           tmpptr += length;
           el->length = length;
           break;
@@ -1213,20 +1199,21 @@
       case MOVIECLIP:
       case NULL_VALUE:
          // Undefined types have a name, but no value
+               //FIXME this shouldn't fall through!
       case UNDEFINED:
-          dbglogfile << "Undefined type" << endl;
+          log_msg(_("Undefined type"));
          length = ntohs((*(const short *)tmpptr) & 0xffff);
           el->data = (const unsigned char*)tmpptr; 
-          dbglogfile << "Variable \"" << el->name.c_str() << "\" is: "
-                    << el->data << endl;
+          log_msg(_("Variable \"%s\" is: %s"), el->name.c_str(), el->data);
 //          tmpptr += length;
           el->length = length;
           el->type = AMF::UNDEFINED;
           break;
       case REFERENCE:
       case ECMA_ARRAY:
+                       // FIXME this shouldn't fall thru
       case OBJECT_END:
-          dbglogfile << "End of Object definition." << endl;
+          log_msg(_("End of Object definition"));
           el->name.erase();
           el->length = 0;
           el->data = 0;
@@ -1240,7 +1227,7 @@
       case XML_OBJECT:
       case TYPED_OBJECT:
       default:
-          dbglogfile << "astype_e of value: " << (int)type << " is 
unimplemented!" << endl;
+          log_unimpl(_("astype_e of value: %d"), (int)type);
           break;
     }
     

Index: libamf/rtmp.cpp
===================================================================
RCS file: /sources/gnash/gnash/libamf/rtmp.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- libamf/rtmp.cpp     3 May 2007 23:00:16 -0000       1.15
+++ libamf/rtmp.cpp     14 May 2007 09:44:21 -0000      1.16
@@ -1,4 +1,4 @@
-
+// rtmp.cpp:  Adobe/Macromedia Real Time Message Protocol handler, for Gnash.
 // 
 //   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
@@ -11,13 +11,13 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-
 //
 
-/* $Id: rtmp.cpp,v 1.15 2007/05/03 23:00:16 nihilus Exp $ */
+/* $Id: rtmp.cpp,v 1.16 2007/05/14 09:44:21 jgilmore Exp $ */
 
 // #ifdef HAVE_CONFIG_H
 // #include "config.h"
@@ -36,10 +36,6 @@
 using namespace amf;
 using namespace std;
 
-namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-}
-
 namespace gnash
 {
 
@@ -83,29 +79,29 @@
     memset(buffer, 0, RTMP_BODY_SIZE+16);
     
     if (readNet(buffer, 1) == 1) {
-        dbglogfile << "Read initial Handshake Request" << endl;
+        log_msg (_("Read initial Handshake Request"));
     } else {
-        dbglogfile << "Couldn't read initial Handshake Request" << endl;
+        log_error (_("Couldn't read initial Handshake Request"));
         return false;
     }
     _inbytes += 1;
     
     if (*buffer == 0x3) {
-        dbglogfile << "Handshake is correct" << endl;
+        log_msg (_("Handshake is correct"));
     } else {
-        dbglogfile << "Handshake isn't correct" << endl;
-        dbglogfile << "Data read is: " << buffer << endl;
+        log_error (_("Handshake isn't correct; "
+                    "Data read is: 0x%x"), *buffer);
 //        return false;
     }
     
     if (readNet(buffer, RTMP_BODY_SIZE) == RTMP_BODY_SIZE) {        
         _inbytes += RTMP_BODY_SIZE;
-        dbglogfile << "Read Handshake Data" << endl;
+        log_msg (_("Read Handshake Data"));
 //        _body = new char(RTMP_BODY_SIZE+1);
         memcpy(_body, buffer, RTMP_BODY_SIZE);        
     } else {
-        dbglogfile << "Couldn't read Handshake Data" << endl;
-        dbglogfile << "Data read is: " << buffer << endl;
+        log_error (_("Couldn't read Handshake Data" 
+                    "Data read is: %s"), buffer);
         return false;
     }
     
@@ -172,20 +168,18 @@
     memset(buffer, 0, RTMP_BODY_SIZE+1);
 
     if (readNet(buffer, RTMP_BODY_SIZE) == RTMP_BODY_SIZE) {        
-        dbglogfile << "Read first data block in handshake" << endl;
+        log_msg (_("Read first data block in handshake"));
     } else {
-        dbglogfile << "ERROR: Couldn't read first data block in handshake!"
-                   << endl;
+        log_error (_("Couldn't read first data block in handshake"));
         return false;
     }
     _inbytes += RTMP_BODY_SIZE;
     if (readNet(buffer, RTMP_BODY_SIZE) == RTMP_BODY_SIZE) {        
-        dbglogfile << "Read second data block in handshake" << endl;
+        log_msg (_("Read second data block in handshake"));
 //         _body = new char(RTMP_BODY_SIZE+1);
 //         memcpy(_body, buffer, RTMP_BODY_SIZE);
     } else {
-        dbglogfile << "ERROR: Couldn't read second data block in handshake!"
-                   << endl;
+        log_error (_("Couldn't read second data block in handshake"));
         return false;
     }
     _inbytes += RTMP_BODY_SIZE;
@@ -206,9 +200,9 @@
      memset(buffer, 0, RTMP_BODY_SIZE+1);
     
     if (readNet(buffer, RTMP_BODY_SIZE) == RTMP_BODY_SIZE) {
-        dbglogfile << "Read Handshake Finish Data" << endl;
+        log_msg (_("Read Handshake Finish Data"));
     } else {
-        dbglogfile << "ERROR: Couldn't read Handshake Finish Data!" << endl;
+        log_error (_("Couldn't read Handshake Finish Data"));
         return false;
     }
 
@@ -216,9 +210,9 @@
 // FIXME: These should match, and appear to in GDB, but this triggers
 // an error of some kind.    
 //     if (memcmp(buffer, _body, 10) == 0) {
-//         dbglogfile << "Handshake Finish Data matches" << endl;
+//         log_msg (_("Handshake Finish Data matches"));
 //     } else {
-//         dbglogfile << "ERROR: Handshake Finish Data doesn't match!" << endl;
+//         log_error (_("Handshake Finish Data doesn't match"));
 //         return false;
 //     }
         
@@ -265,24 +259,24 @@
 //    
address@hidden@\000\000\000\000\000\000\003\000\003app\002\000#software/gnash/tests/1153948634.flv\000\bflashVer\002\000\fLNX
 
6,0,82,0\000\006swfUrl\002\000\035file:///file|address@hidden://localhost/software/gnash/tests/1153948634
 
     if ((ret = readNet(reinterpret_cast<char *>(buffer), 1)) > 0) {
-        dbglogfile << "Read first RTMP header byte"<< endl;
+        log_msg (_("Read first RTMP header byte"));
     } else {
-        dbglogfile << "ERROR: Couldn't read first RTMP header byte!" << endl;
+        log_error (_("Couldn't read first RTMP header byte"));
         return false;
     }
     
     amf_index = *tmpptr & AMF_INDEX_MASK;
     headersize = AMF::headerSize(*tmpptr++);
-    dbglogfile << "The Header size is: " << headersize << endl;
-    dbglogfile << "The AMF index is: 0x" << amf_index << endl;
+    log_msg (_("The Header size is: %d"), headersize);
+    log_msg (_("The AMF index is: 0x%x"), amf_index);
 
     if (headersize > 1) {
         if ((ret = readNet(reinterpret_cast<char *>(tmpptr), headersize-1)) > 
0) {
-            dbglogfile << "Read first RTMP packet header of " << ret
-                       << " headersize." << endl;
+            log_msg (_("Read first RTMP packet header of header size %d"),
+                       ret);
             _inbytes += ret;
         } else {
-            dbglogfile << "ERROR: Couldn't read first RTMP packet header!" << 
endl;
+            log_error (_("Couldn't read first RTMP packet header"));
             return false;
         }
     }
@@ -295,18 +289,18 @@
     tmpptr = buffer;
     
     while ((ret = readNet(reinterpret_cast<char *>(buffer), packetsize)) > 0) {
-        dbglogfile << "Reading AMF packets till we're done..." << endl;
+        log_msg (_("Reading AMF packets till we're done..."));
         amf->addPacketData(tmpptr, ret);
         tmpptr = buffer + 1;
         _inbytes += ret;
 #if 0
         hexify(hexint, buffer, packetsize, true);
-        dbglogfile << "The packet data is: 0x" << (char *)hexint << endl;
+        log_msg (_("The packet data is: 0x%s"), (char *)hexint);
         hexify(hexint, buffer, packetsize, false);
-        dbglogfile << "The packet data is: 0x" << (char *)hexint << endl;
+        log_msg (_("The packet data is: 0x%s"), (char *)hexint);
 #endif    
     }
-    dbglogfile << "Done reading packet" << endl;
+    log_msg (_("Done reading packet"));
     amf->parseBody();
     
     return true;

Index: libbase/network.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/network.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- libbase/network.cpp 2 May 2007 16:24:12 -0000       1.26
+++ libbase/network.cpp 14 May 2007 09:44:21 -0000      1.27
@@ -54,10 +54,6 @@
 
 using namespace std;
 
-namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-}
-
 namespace gnash {
 
 static const char *DEFAULTPROTO = "tcp";
@@ -378,7 +374,7 @@
     _sockfd = ::socket(PF_INET, SOCK_STREAM, proto->p_proto);
     if (_sockfd < 0)
         {
-            log_error(_("unable to create socket : %s"), strerror(errno));
+            log_error(_("unable to create socket: %s"), strerror(errno));
             _sockfd = -1;
             return false;
         }
@@ -594,26 +590,22 @@
 
         // If interupted by a system call, try again
         if (ret == -1 && errno == EINTR) {
-            dbglogfile << "The socket for fd #" << fd
-                       << " we interupted by a system call!" << endl;
+            log_error (_("The socket for fd %d was interupted by a system 
call"), fd);
         }
 
         if (ret == -1) {
-            dbglogfile << "The socket for fd #" << fd
-                       << " never was available for reading!" << endl;
+            log_error (_("The socket for fd %d was never available for 
reading"), fd);
             return -1;
         }
 
         if (ret == 0) {
-            dbglogfile << "The socket for fd #" << fd
-                << " timed out waiting to read!" << endl;
+            log_error (_("The socket for fd %d timed out waiting to read"), 
fd);
             return -1;
         }
 
         ret = read(fd, buffer, nbytes);
        if (_debug) {
-           dbglogfile << "read " << ret << " bytes from fd #"
-                      << fd << endl;
+           log_msg (_("read %d bytes from fd %d"), ret, fd);
        }
     }
 
@@ -688,53 +680,44 @@
 
         // If interupted by a system call, try again
         if (ret == -1 && errno == EINTR) {
-            dbglogfile << "The socket for fd #" << fd
-                << " we interupted by a system call!" << endl;
+            log_error (_("The socket for fd %d was interupted by a system 
call"), fd);
         }
 
         if (ret == -1) {
-            dbglogfile << "The socket for fd #" << fd
-                << " never was available for writing!" << endl;
+            log_error (_("The socket for fd %d was never available for 
writing"), fd);
         }
 
         if (ret == 0) {
-            dbglogfile << "The socket for fd #" << fd
-                << " timed out waiting to write!" << endl;
+            log_error (_("The socket for fd %d timed out waiting to write"), 
fd);
         }
 
         ret = write(fd, bufptr, nbytes);
 
         if (ret == 0) {
-            dbglogfile
-                << "Couldn't write any bytes to fd #: " << fd
-                << strerror(errno) << endl;
+            log_error (_("Wrote zero out of %d bytes to fd %d: %s"), 
+               nbytes, fd, strerror(errno));
             return ret;
         }
         if (ret < 0) {
-            dbglogfile << "Couldn't write " << nbytes
-                       << " bytes to fd #" << fd << endl;
-
+            log_error (_("Couldn't write %d bytes to fd %d: %s"), 
+               nbytes, fd, strerror(errno));
             return ret;
         }
         if (ret > 0) {
             bufptr += ret;
             if (ret != nbytes) {
                if (_debug) {
-                   dbglogfile << "wrote " << ret << " bytes to fd #" << fd
-                              << " expected " << nbytes << endl;
+                   log_msg (_("wrote %d bytes to fd %d, expected %d"),
+                              ret, fd, nbytes);
                }
 //                retries++;
             } else {
                if (_debug) {
-                   dbglogfile << "wrote " << ret << " bytes to fd #"
-                              << fd << endl;
+                   log_msg (_("wrote %d bytes to fd %d"),
+                              ret, fd);
                }
                 return ret;
             }
-
-            if (ret == 0) {
-                dbglogfile << "Wrote 0 bytes to fd #" << fd << endl;
-            }
         }
     }
 
@@ -746,9 +729,8 @@
         if ((endtime.tv_sec - starttime.tv_sec) &&
             endtime.tv_usec - starttime.tv_usec)
         {
-            dbglogfile << "took " << endtime.tv_usec - starttime.tv_usec
-                       << " usec to write (" << bytes_written
-                       << " bytes)" << endl;
+            log_msg (_("took %d usec to write (%d bytes)"),
+               endtime.tv_usec - starttime.tv_usec, bytes_written);
         }
     }
 #endif

Index: libbase/rc.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- libbase/rc.cpp      8 Apr 2007 23:06:17 -0000       1.21
+++ libbase/rc.cpp      14 May 2007 09:44:21 -0000      1.22
@@ -1,3 +1,4 @@
+// rc.cpp:  "Run Command" configuration file, for Gnash.
 // 
 //   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
@@ -10,9 +11,11 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
 
 // This is generated by autoconf
 #ifdef HAVE_CONFIG_H
@@ -97,16 +100,16 @@
                            std::string &value)
 {
 //    GNASH_REPORT_FUNCTION;
-    //dbglogfile << variable << ": " << value << endl;
+    //log_msg ("%s: %s", variable, value);
     
        StringNoCaseEqual noCaseCompare;
     if ( noCaseCompare(variable, pattern) ) {
         if ( noCaseCompare(value, "on") || noCaseCompare(value, "yes") || 
noCaseCompare(value, "true")) {
-            //dbglogfile << variable << ": Enabled " << endl;
+            //log_msg ("%s: Enabled", variable);
             *var = true;
         }
         if (noCaseCompare(value, "off") || noCaseCompare(value, "no") || 
noCaseCompare(value, "false")) {
-            //dbglogfile << variable << ": Disabled " << endl;
+            //log_msg ("%s: Disabled", variable);
             *var = false;
         }
     }
@@ -118,7 +121,7 @@
                            std::string &value)
 {      
 //    GNASH_REPORT_FUNCTION;
-//        dbglogfile << variable.c_str() << ": " << value.c_str() << endl;
+//        log_msg ("%s: %s", variable.c_str(), value.c_str());
     if (variable == pattern) {
         *num = strtol(value.c_str(), NULL, 0);
     }
@@ -136,7 +139,7 @@
     string value;
     ifstream in;
     
-//  dbglogfile << "Seeing if " << filespec << " exists." << endl;
+//  log_msg ("Seeing if %s exists", filespec);
     if (filespec.size() == 0) {
         return false;
     }
@@ -145,7 +148,7 @@
         in.open(filespec.c_str());
         
         if (!in) {
-            log_error("Couldn't open file: %s", filespec.c_str());
+            log_error(_("Couldn't open file: %s"), filespec.c_str());
             return false;
         }
         
@@ -155,7 +158,7 @@
             in >> action;
             // Ignore comment lines
             if (action[0] == '#') {
-//        dbglogfile << "Ignoring comment line " << endl;
+//        log_msg ("Ignoring comment line");
                 // suck up the rest of the line
                 char name[128];
                 in.getline(name, 128);
@@ -163,7 +166,7 @@
             }
             
             in >> variable >> value;
-            //      dbglogfile << action << variable << value << endl;
+            //      log_msg ("%s %s %s", action, variable, value);
             
             if (action == "set") {
                 extractSetting(&_splash_screen, "splash_screen", variable, 
value);

Index: libbase/sharedlib.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/sharedlib.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- libbase/sharedlib.cpp       8 Apr 2007 23:06:17 -0000       1.15
+++ libbase/sharedlib.cpp       14 May 2007 09:44:22 -0000      1.16
@@ -1,5 +1,6 @@
+// sharedlib.cpp:  Shared Library support, for Gnash.
 // 
-//   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -10,11 +11,13 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
 
-/* $Id: sharedlib.cpp,v 1.15 2007/04/08 23:06:17 rsavoye Exp $ */
+/* $Id: sharedlib.cpp,v 1.16 2007/05/14 09:44:22 jgilmore Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -46,14 +49,8 @@
 typedef boost::mutex::scoped_lock scoped_lock;
 static boost::mutex lib_mutex;
 
-
 using namespace std;
 
-namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-}
-
-using namespace std;
 namespace gnash {
 
 #ifdef LT_DLMUTEX
@@ -107,10 +104,9 @@
     // Initialize libtool's dynamic library loader
     int errors = lt_dlinit ();
     if (errors) {
-        dbglogfile << "Couldn't initialize ltdl";
-        dbglogfile << lt_dlerror();
+        log_error (_("Couldn't initialize ltdl: %s"), lt_dlerror());
 //     } else {
-//         dbglogfile << "Initialized ltdl" << endl;
+//         log_msg ("Initialized ltdl");
     }
     char *pluginsdir;
     char *env = getenv ("GNASH_PLUGINS");
@@ -165,32 +161,23 @@
     
     scoped_lock lock(lib_mutex);
     
-//     // Initialize libtool's dynamic library loader
-//     errors = lt_dlinit ();
-    
-//     if (errors) {
-//         dbglogfile << "Couldn't initialize ltdl";
-//         dbglogfile << lt_dlerror();
-//         return false;
-// //    } else {
-// //    dbglogfile << "Initialized ltdl" << endl;
-//     }
+//     // libtool's dynamic library loader is already initialized in 
constructor
     
 //     cerr << "Searching in " << lt_dlgetsearchpath()
 //          << "for database drivers" << endl;
 
-//    dbglogfile << "Trying to open shared library \"" << filespec << "\"" << 
endl;
+//    log_msg ("Trying to open shared library \"%s\"", filespec);
     _dlhandle = lt_dlopenext (filespec);
     
     if (_dlhandle == NULL) {
-        dbglogfile << lt_dlerror();
+        log_error ("%s", lt_dlerror());
         return false;
     }
 
     // Make this module unloadable
     lt_dlmakeresident(_dlhandle);
     
-    dbglogfile << "Opened dynamic library \"" << filespec << "\"" << endl;
+    log_msg (_("Opened dynamic library \"%s\""), filespec);
 
     _filespec = filespec;
     
@@ -224,10 +211,10 @@
     run  = lt_dlsym (_dlhandle, symbol);
     
     if (run == NULL) {
-        dbglogfile << " Couldn't find symbol: " << symbol << endl;
+        log_error (_("Couldn't find symbol: %s"), symbol);
         return NULL;
     } else {
-        dbglogfile << "Found symbol " << symbol << " @ " << (void *)run << 
endl;
+        log_msg (_("Found symbol %s @ %p"), symbol, (void *)run);
     }
     
     return (initentry *)run;
@@ -249,10 +236,10 @@
     Markus: 'Id est NULL.'
     */
     if (run == NULL) {
-        dbglogfile << " Couldn't find symbol: " << symbol << endl;
+        log_error (_("Couldn't find symbol: %s"), symbol);
         return NULL;
     } else {
-        dbglogfile << "Found symbol " << symbol << " @ " << (void *)run << 
endl;
+        log_msg (_("Found symbol %s @ %p"), symbol, (void *)run);
     }
     
     return (entrypoint *)run;

Index: server/as_function.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/as_function.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- server/as_function.cpp      2 May 2007 07:34:35 -0000       1.31
+++ server/as_function.cpp      14 May 2007 09:44:22 -0000      1.32
@@ -36,10 +36,6 @@
 
 using namespace std;
 
-namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-}
-
 namespace gnash {
 
 // should be static, probably
@@ -290,7 +286,7 @@
 
        if ( ! fn.nargs )
        {
-                dbglogfile << "Function.call() with no args" << endl;
+                log_msg (_("Function.call() with no args"));
                new_fn_call.nargs=0;
        }
        else

Index: server/debugger.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/debugger.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- server/debugger.cpp 25 Apr 2007 06:58:56 -0000      1.18
+++ server/debugger.cpp 14 May 2007 09:44:22 -0000      1.19
@@ -34,7 +34,6 @@
 #include "movie_root.h"
 
 namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
 gnash::RcInitFile& rcfile = gnash::RcInitFile::getDefaultInstance();
 }
 
@@ -139,7 +138,7 @@
     Debugger::watch_state_e wstate;
     bool keep_going = true;
 
-    dbglogfile << "Debugger enabled >> " << endl;
+    log_msg (_("Debugger enabled >> "));
     while (keep_going) {
        cerr << "gnashdbg> ";
        cin >> action;
@@ -354,7 +353,7 @@
        cerr << "\tArg format is: " << as_arg_strs[fmt] << " Length is: " << 
length << endl;
        switch (fmt) {
          case ARG_NONE:
-             dbglogfile << "ERROR: No format flag!" << endl;
+             log_error (_("No format flag"));
              break;
          case ARG_STR:
              if ((length == 1) && (data[3] == 0)) {
@@ -400,7 +399,7 @@
          case ARG_FUNCTION2:
              break;
          default:
-             dbglogfile << "ERROR: No format flag!" << endl;
+             log_error (_("No format flag"));
              break;
        } // end of switch(fmt)
     }
@@ -452,11 +451,11 @@
     std::map<std::string, bool>::const_iterator it;
     it =_breakpoints.find(func);
     if (it == _breakpoints.end()) {
-//     dbglogfile << "No Match for variable \"" << var << "\"" << endl;
+//     log_msg ("No Match for variable \"%s\"", var);
        return false;
     } else {
        if (state == _breakpoints[func]) {
-//         dbglogfile << "Matched for Function \"" << func << "\"" << endl;
+//         log_msg ("Matched for Function \"%s\"", func);
            this->console();
            return true;
        }
@@ -469,7 +468,7 @@
 {
 //    GNASH_REPORT_FUNCTION;
     _watchpoints[var] = state;
-    dbglogfile << "Setting watchpoint for variable: \"" << var << "" << endl;
+    log_msg (_("Setting watchpoint for variable: \"%s\""), var.c_str());
 }
 
 void
@@ -512,12 +511,12 @@
     std::map<std::string, watch_state_e>::const_iterator it;
     it =_watchpoints.find(var);
     if (it == _watchpoints.end()) {
-//     dbglogfile << "No Match for variable \"" << var << "\"" << endl;
+//     log_msg ("No Match for variable \"%s\"", var);
        return false;
     } else {
        if (state == _watchpoints[var]) {
-           dbglogfile << "Matched for variable \"" << var << "\": \""
-                      << state_strs[state] << "\"" << endl;
+           log_msg (_("Matched for variable \"%s\": \"%s\""), var.c_str(),
+                      state_strs[state]);
            this->console();
            return true;
        }
@@ -531,7 +530,7 @@
 {
 //    GNASH_REPORT_FUNCTION;
     if (_env == 0) {
-       dbglogfile << "WARNING: environment not set in " << __PRETTY_FUNCTION__ 
<< endl;
+       log_error (_("WARNING: environment not set in %s"), 
__PRETTY_FUNCTION__);
        return;
     }
     this->dumpStackFrame(*_env);
@@ -550,7 +549,7 @@
 {
 //    GNASH_REPORT_FUNCTION;
     if (!_env) {
-       dbglogfile << "WARNING: environment not set in " << __PRETTY_FUNCTION__ 
<< endl;
+       log_error (_("WARNING: environment not set in %s"), 
__PRETTY_FUNCTION__);
        return;
     }
     if (env.stack_size()) {
@@ -563,12 +562,13 @@
 {
 //    GNASH_REPORT_FUNCTION;    
     if (!_env) {
-       dbglogfile << "WARNING: environment not set in " << __PRETTY_FUNCTION__ 
<< endl;
+       log_error (_("WARNING: environment not set in %s"), 
__PRETTY_FUNCTION__);
        return;
     }
     if (env.stack_size()) {
-        dbglogfile << "Stack Dump of: " << (void *)&env << endl;
+        log_msg (_("Stack Dump of: %p"), (void *)&env);
         for (unsigned int i=0, n=env.stack_size(); i<n; i++) {    
+           // FIXME, shouldn't these go to the log as well as to cerr?
             cerr << "\t" << i << ": ";
            as_value val = env.m_stack[i];
 // FIXME: we want to print the name of the function
@@ -592,7 +592,7 @@
        }
     }
     else {
-       dbglogfile << "Stack Dump of 0x" << (void *)&env << ": empty" << endl;
+       log_msg (_("Stack Dump of 0x%p: empty"), (void *)&env);
     }
 }
 
@@ -622,12 +622,12 @@
 {
 //    GNASH_REPORT_FUNCTION;  
     if (!_env) {
-       dbglogfile << "WARNING: environment not set in " << __PRETTY_FUNCTION__ 
<< endl;
+       log_error (_("WARNING: environment not set in %s"), 
__PRETTY_FUNCTION__);
        return;
     }
     std::string registers;
     stringstream ss;
-    dbglogfile << "Global Registers Dump:" << endl;
+    log_msg (_("Global Registers Dump:"));
     for (unsigned int i=0; i<4; ++i) {
        ss << "\treg #" << i << ": \"";
        ss << env.global_register(i).to_debug_string() << "\"" << endl;
@@ -707,7 +707,8 @@
        std::map<void *, std::string>::const_iterator it;
        for (it=_symbols.begin(); it != _symbols.end(); it++) {
            if (it->second == namei) {
-//             dbglogfile << "Found symbol " << namei.c_str() << " at address: 
" << it->first << endl;
+//             log_msg ("Found symbol %s at address %p", namei.c_str(),
+//                        it->first);
                return it->first;
            }
        }
@@ -725,7 +726,7 @@
        boost::to_lower(namei, vm.getLocale());
     }
     if (namei.size() > 1) {
-//     dbglogfile << "Adding symbol " << namei << " at address: " << ptr << 
endl;
+//     log_msg ("Adding symbol %s at address: %p", namei, ptr);
        _symbols[ptr] = namei;
     }
     
@@ -741,15 +742,15 @@
     if (_symbols.size()) {
        std::map<void *, std::string>::const_iterator it;
        it = _symbols.find(ptr);
-       dbglogfile.setStamp(false);
+//     dbglogfile.setStamp(false);
        if (it != _symbols.end()) {
-//         dbglogfile << "Found symbol " << it->second.c_str() << " at 
address: " << ptr << endl;
+//         log_msg ("Found symbol %s at address: %p", it->second.c_str(), ptr);
            str = it->second;
 //     } else {
-//         dbglogfile << "No symbol found for address " << ptr << endl;
+//         log_msg ("No symbol found for address %p", ptr);
        }
     }
-    dbglogfile.setStamp(false);
+//    dbglogfile.setStamp(false);
     return str;
 }
 

Index: server/dlist.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/dlist.cpp,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -b -r1.63 -r1.64
--- server/dlist.cpp    11 May 2007 17:53:29 -0000      1.63
+++ server/dlist.cpp    14 May 2007 09:44:22 -0000      1.64
@@ -28,10 +28,6 @@
 #include <iostream>
 #include <algorithm>
 
-namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-}
-
 namespace gnash {
 
 class DepthEquals {

Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- server/movie_root.cpp       27 Apr 2007 07:05:08 -0000      1.60
+++ server/movie_root.cpp       14 May 2007 09:44:22 -0000      1.61
@@ -1,3 +1,4 @@
+// movie_root.cpp:  The root movie, for Gnash.
 // 
 //   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
@@ -10,11 +11,11 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 // 
-//
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -38,10 +39,6 @@
 
 using namespace std;
 
-namespace {
-gnash::LogFile& dbglogfile = gnash::LogFile::getDefaultInstance();
-}
-
 namespace gnash
 {
 
@@ -476,9 +473,8 @@
 {
 //         GNASH_REPORT_FUNCTION;
 
-//             dbglogfile << "X is: " << m_mouse_x << " Y is: " << m_mouse_y
-//                        << " Button is: "
-//                        << m_mouse_buttons << endl;
+//             log_msg ("X is %d, Y is %d, Button is %d", m_mouse_x,
+//                      m_mouse_y, m_mouse_buttons);
 
        assert(testInvariant());
 
@@ -518,7 +514,7 @@
     string command = "mozilla -remote \"openurl";
     command += url;
     command += ")\"";
-    dbglogfile << "Launching URL... " << command << endl;
+    log_msg (_("Launching URL... %s"), command.c_str());
     system(command.c_str());
 }
 #endif

Index: utilities/parser.cpp
===================================================================
RCS file: /sources/gnash/gnash/utilities/parser.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- utilities/parser.cpp        6 Apr 2007 07:58:16 -0000       1.36
+++ utilities/parser.cpp        14 May 2007 09:44:22 -0000      1.37
@@ -1,3 +1,4 @@
+// parser.cpp:  Flash movie parser (gparser command), for Gnash.
 // 
 //   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
@@ -10,12 +11,13 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 // 
 
-/* $Id: parser.cpp,v 1.36 2007/04/06 07:58:16 jgilmore Exp $ */
+/* $Id: parser.cpp,v 1.37 2007/05/14 09:44:22 jgilmore Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -54,12 +56,12 @@
 bool gofast = false;           // FIXME: this flag gets set based on
                                // an XML message written using
                                // SendCommand(""). This way a movie
-                               // can optimize it's own performance
+                               // can optimize its own performance
                                // when needed,
 bool nodelay = false;           // FIXME: this flag gets set based on
                                // an XML message written using
                                // SendCommand(""). This way a movie
-                               // can optimize it's own performance
+                               // can optimize its own performance
                                // when needed,
 
 extern int xml_fd;             // FIXME: this is the file descriptor
@@ -365,13 +367,13 @@
        
        UNUSED(has_actions);
        
-       log_msg("depth: %i\n",input->read_u16());
+       log_msg("depth: %i",input->read_u16());
        
        if (has_char) {
-           log_msg("character ID: %i\n",input->read_u16());
+           log_msg("character ID: %i",input->read_u16());
        }
        if (has_matrix) {
-           log_msg("matrix:\n");
+           log_msg("matrix:");
            matrix::parse(input);
            matrix::write();
        }
@@ -381,24 +383,24 @@
            cxform::write();
        }                       
        if (has_ratio) {
-           log_msg("ratio: %i\n",input->read_u16());
+           log_msg("ratio: %i",input->read_u16());
        }                       
        if (has_name) {
-           log_msg("name: %s\n",input->read_string());
+           log_msg("name: %s",input->read_string());
        }
        if (has_clip_depth) {
-           log_msg("clipdepth: %i\n",input->read_u16());
+           log_msg("clipdepth: %i",input->read_u16());
        }                       
        if (has_clip_depth) {
-           log_msg("has_actions: to be implemented\n");
+           log_msg("has_actions: to be implemented");
        }
        
        if (has_char == true && flag_move == true) {
-           log_msg("replacing a character previously at this depth\n");
+           log_msg("replacing a character previously at this depth");
        } else if (has_char == false && flag_move == true) {
-           log_msg("moving a character previously at this depth\n");
+           log_msg("moving a character previously at this depth");
        } else if (has_char == true && flag_move == false) {
-           log_msg("placing a character first time at this depth\n");
+           log_msg("placing a character first time at this depth");
        }
        
        ident--;
@@ -410,16 +412,16 @@
 {
     assert(tag_type == 5 || tag_type == 28);
     if (tag_type==5) {
-       log_msg("remove_object\n");
+       log_msg("remove_object");
        ident++;
-       log_msg("character ID: %i\n", input->read_u16());
-       log_msg("depth: %i\n", input->read_u16());
+       log_msg("character ID: %i", input->read_u16());
+       log_msg("depth: %i", input->read_u16());
        ident--;
     }
     if (tag_type==28) {
-       log_msg("remove_object_2\n");
+       log_msg("remove_object_2");
        ident++;
-       log_msg("depth: %i\n", input->read_u16());
+       log_msg("depth: %i", input->read_u16());
        ident--;
     }
 }
@@ -428,9 +430,9 @@
 void parse_define_shape_morph(stream *input, int tag_type)
 {
     assert(tag_type == 46);
-    log_msg("define_shape_morph\n");
+    log_msg("define_shape_morph");
     ident++;
-    log_msg("character ID: %i\n", input->read_u16());
+    log_msg("character ID: %i", input->read_u16());
     ident--;
 }
 
@@ -438,51 +440,51 @@
 void parse_define_bits(stream* input, int tag_type)
 {
     assert(tag_type==6);
-    log_msg("define jpeg bits\n");
+    log_msg("define jpeg bits");
     ident++;
-    log_msg("character ID: %i\n", input->read_u16());
+    log_msg("character ID: %i", input->read_u16());
     ident--;
 }
 
 void parse_jpeg_tables(stream* /* input */, int tag_type)
 {
     assert(tag_type==8);
-    log_msg("define jpeg table\n\n");
+    log_msg("define jpeg table");
 }      
 
 void parse_set_background_color(stream* input, int tag_type)
 {
     assert(tag_type==9);
     rgb::parse(input);
-    log_msg("set background color to:\n");
+    log_msg("set background color to:");
     rgb::write();              
 }
 
 void parse_do_action(stream* /* input */, int tag_type)
 {
     assert(tag_type==12);
-    log_msg("do action:\n");
+    log_msg("do action:");
     ident++;
-    log_msg("to be implemented\n");
+    log_msg("to be implemented");  // FIXME!
     ident--;
 }              
 
 void parse_define_sprite(stream* input, int tag_type)
 {
     assert(tag_type==39);
-    log_msg("define a new sprite:\n");
+    log_msg("define a new sprite:");
     ident++;
     int        tag_end = input->get_tag_end_position();
     uint32_t char_id = input->read_u16();
     uint32_t sprite_frame_count = input->read_u16();
-    log_msg("character ID: %i\n", char_id);
-    log_msg("frame count of sprite: %i\n", sprite_frame_count);
+    log_msg("character ID: %i", char_id);
+    log_msg("frame count of sprite: %i", sprite_frame_count);
     uint32_t old_current_frame = current_frame;
     current_frame = 0;
     
     ident++;
     log_msg("\n");             
-    log_msg("starting frame 0\n\n");
+    log_msg("starting frame 0\n");
     ident++;
     
     while ((uint32_t) input->get_position() < (uint32_t) tag_end) {
@@ -493,11 +495,11 @@
            ident--;
            ident--;
            ident--;
-           log_msg("end of sprite definition\n\n");
+           log_msg("end of sprite definition\n");
        } else if (tag_loaders.get(tag_type, &lf)) {
            (*lf)(input, tag_type);
        } else {
-           log_msg("warning: no tag loader for tag_type %d\n", tag_type);
+           log_msg("warning: no tag loader for tag_type %d", tag_type);
        }
        input->close_tag();
     }
@@ -507,10 +509,10 @@
 void parse_set_framelabel(stream* input, int tag_type)
 {
     assert(tag_type==43);
-    log_msg("current framelabel:\n");
+    log_msg("current framelabel:");
     ident++;
     char* str = input->read_string();
-    log_msg("%s\n",str);
+    log_msg("%s",str);
     delete str;
     
     if (input->get_position() < input->get_tag_end_position()) {
@@ -548,16 +550,16 @@
     
     uint32_t version = (header >> 24) & 255;
     if ((header & 0x0FFFFFF) != 0x00535746 && (header & 0x0FFFFFF) != 
0x00535743) {
-       log_msg("\nNo valid SWF file, header is incorrect!\n");
+       log_error("No valid SWF file, header is incorrect");
        return;
     }
     
     bool compressed = (header & 255) == 'C';
     
-    log_msg("\nSWF version %i, file length = %i bytes\n", version, 
file_length);
+    log_msg("SWF version %i, file length = %i bytes", version, file_length);
     
     if (compressed) {
-       log_msg("file is compressed.\n");
+       log_msg("file is compressed.");
        file = zlib_adapter::make_inflater(file);
        file_length -= 8;
     }
@@ -568,12 +570,12 @@
     float frame_rate = str.read_u16() / 256.0f;
     int frame_count = str.read_u16();
     
-    log_msg("viewport:\n");
+    log_msg("viewport:");
     rect::write();
-    log_msg("frame rate = %f, number of frames = %d\n", frame_rate, 
frame_count);
+    log_msg("frame rate = %f, number of frames = %d", frame_rate, frame_count);
     
-    log_msg("\n");
-    log_msg("starting frame 0\n\n");
+    log_msg("");
+    log_msg("starting frame 0\n");
     ident++;
     
     while ((uint32_t) str.get_position() < file_length) {
@@ -584,14 +586,14 @@
        if (tag_loaders.get(tag_type, &lf)) {
            (*lf)(&str, tag_type);          
        } else {
-           log_msg("warning: no tag loader for tag_type %d\n", tag_type);
+           log_msg("warning: no tag loader for tag_type %d", tag_type);
        }
        
        str.close_tag();
        
        if (tag_type == 0) {
            if ((unsigned int)str.get_position() != file_length) {
-               log_msg("warning: end of file tag found, while not at the end 
of the file, aborting\n");
+               log_error("warning: end of file tag found, while not at the end 
of the file, aborting");
                break;
            }
        }
@@ -619,8 +621,8 @@
            exit(0);
        }
        if (strcmp("--version", argv[c]) == 0) {
-           std::cerr << "Gnash gparser version: " << GPARSE_VERSION;
-           std::cerr << ", Gnash version: " << VERSION << std::endl;
+           log_msg (_("Gnash gparser version: %s, Gnash version: %s"), 
+                       GPARSE_VERSION, VERSION);
             dbglogfile.removeLog();
            exit(0);
        }
@@ -654,9 +656,9 @@
 #ifdef USE_DEBUGGER
               debugger.enabled(true);
               debugger.console();
-              dbglogfile << "Setting debugger ON" << std::endl;
+              log_msg (_("Setting debugger ON"));
 #else
-              dbglogfile << "WARNING: The debugger has been disabled at 
configuration time" << std::endl;
+              log_error (_("The debugger has been disabled at configuration 
time"));
 #endif
          default:
              break;
@@ -671,7 +673,7 @@
   
     // No file names were supplied
     if (infiles.size() == 0) {
-       printf("no input files\n");
+       log_error (_("No input files"));
        usage(argv[0]);
         dbglogfile.removeLog();
        exit(1);
@@ -683,9 +685,9 @@
     parser::register_all_loaders();
     for (int i = 0, n = infiles.size(); i < n; i++) {
         std::auto_ptr<tu_file> in ( new tu_file(infiles[i], "rb") );
-       std::cerr << "Processing file: " << infiles[i] << std::endl;
+       log_msg (_("Processing file: %s"), infiles[i]);
        if (in->get_error()) {
-           log_msg("can't open '%s' for input\n", infiles[i]);
+           log_error(_("Can't open file '%s' for input"), infiles[i]);
            exit(1);
        }
     
@@ -699,14 +701,14 @@
 static void
 usage (const char *)
 {
-    printf(
+    printf(_(
        "gparser -- an SWF parser for Gnash.\n"
        "\n"
        "usage: gparser [swf files to process...]\n"
        "  --help(-h)  Print this info.\n"
        "  --version   Print the version numbers.\n"
        "  -g          Start the Flash debugger.\n"
-       );
+       ));
 }
 
 // Local Variables:

Index: utilities/processor.cpp
===================================================================
RCS file: /sources/gnash/gnash/utilities/processor.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- utilities/processor.cpp     6 Apr 2007 07:58:16 -0000       1.55
+++ utilities/processor.cpp     14 May 2007 09:44:22 -0000      1.56
@@ -1,3 +1,4 @@
+// processor.cpp:  Flash movie processor (gprocessor command), for Gnash.
 // 
 //   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 // 
@@ -10,12 +11,13 @@
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 // GNU General Public License for more details.
+//
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 // 
 
-/* $Id: processor.cpp,v 1.55 2007/04/06 07:58:16 jgilmore Exp $ */
+/* $Id: processor.cpp,v 1.56 2007/05/14 09:44:22 jgilmore Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -149,8 +151,8 @@
         exit(0);
       }
       if (strcmp("--version", argv[c]) == 0) {
-        cerr << "Gnash gprocessor version: " << GPROC_VERSION;
-        cerr << ", Gnash version: " << VERSION << endl;
+        log_msg (_("Gnash gprocessor version: %s, Gnash version: %s"),
+                  GPROC_VERSION, VERSION);
         dbglogfile.removeLog();
         exit(0);
       }
@@ -186,28 +188,28 @@
              break;
          case 'v':
              dbglogfile.setVerbosity();
-             dbglogfile << "Verbose output turned on" << endl;
+             log_msg (_("Verbose output turned on"));
              break;
           case 'g':
 #ifdef USE_DEBUGGER
               debugger.enabled(true);
               debugger.console();
-              dbglogfile << "Setting debugger ON" << std::endl;
+              log_msg (_("Setting debugger ON"));
 #else
-              dbglogfile << "WARNING: The debugger has been disabled at 
configuration time" << std::endl;
+              log_error (_("The debugger has been disabled at configuration 
time"));
 #endif
          case 'a':
 #if VERBOSE_ACTION
              dbglogfile.setActionDump(true); 
 #else
-              dbglogfile << "Verbose actions disabled at compile time" << endl;
+              log_error (_("Verbose actions disabled at compile time"));
 #endif
              break;
          case 'p':
 #if VERBOSE_PARSE
              dbglogfile.setParserDump(true); 
 #else
-              dbglogfile << "Verbose parsing disabled at compile time" << endl;
+              log_error (_("Verbose parsing disabled at compile time"));
 #endif
              break;
          case 'r':
@@ -456,34 +458,40 @@
 usage (const char *name)
 {
     printf(
-       "gprocessor -- an SWF preprocessor for Gnash.\n"
+       _("gprocessor -- an SWF preprocessor for Gnash.\n"
        "\n"
        "usage: %s [options] <file>\n"
        "\n"
        "Preprocesses the given SWF movie files.  Optionally write preprocessed 
shape\n"
        "and font data to cache files, so the associated SWF files can be 
loaded\n"
-       "faster by gameswf.\n"
+       "faster.\n"
        "\n"
+        "%s%s%s%s"), name, _(
        "options:\n"
        "\n"
        "  --help(-h)  Print this info.\n"      
        "  --version   Print the version numbers.\n"    
        "  -w          Write a .gsc file with preprocessed info, for each input 
file.\n"        
        "  -v          Be verbose; i.e. print log messages to stdout\n"
+          ),
 #if VERBOSE_PARSE
-       "  -vp         Be verbose about movie parsing\n"
+       _("  -vp         Be verbose about movie parsing\n"),
+#else
+       "",
 #endif
 #if VERBOSE_ACTION
-       "  -va         Be verbose about ActionScript\n"
+       _("  -va         Be verbose about ActionScript\n"),
+#else
+       "",
 #endif
+       _(
        "  -r <times>  Allow the given number of complete runs.\n"
        "              Keep looping undefinitely if set to 0.\n"
        "              Default is 1 (end as soon as the last frame is 
reached).\n"
        "  -f <frames>  \n"
        "              Allow the given number of frame advancements.\n"
        "              Keep advancing untill any other stop condition\n"
-        "              is encountered if set to 0 (default).\n"
-       , name
+        "              is encountered if set to 0 (default).\n")
        );
 }
 

Index: po/LINGUAS
===================================================================
RCS file: po/LINGUAS
diff -N po/LINGUAS
--- po/LINGUAS  20 Apr 2007 11:11:36 -0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-# Set of available languages.
-es
-fr




reply via email to

[Prev in Thread] Current Thread [Next in Thread]