gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog libbase/log.cpp libbase/log.h s...


From: John Gilmore
Subject: [Gnash-commit] gnash ChangeLog libbase/log.cpp libbase/log.h s...
Date: Mon, 16 Apr 2007 10:27:00 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     John Gilmore <jgilmore> 07/04/16 10:26:59

Modified files:
        .              : ChangeLog 
        libbase        : log.cpp log.h 
        server         : gnash.h 

Log message:
        * libbase/log.h: Update documentation for log_* functions; rename
          log_warning to log_unimpl (with temporary #define for a few days);
          move gettext and _ definitions from gnash.h to log.h.
        * libbase/log.cpp:  Update log_* functions as above.
        * server/gnash.h:  Move gettext and _ to log.h.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2885&r2=1.2886
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.cpp?cvsroot=gnash&r1=1.45&r2=1.46
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.h?cvsroot=gnash&r1=1.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/gnash/server/gnash.h?cvsroot=gnash&r1=1.93&r2=1.94

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2885
retrieving revision 1.2886
diff -u -b -r1.2885 -r1.2886
--- ChangeLog   16 Apr 2007 09:43:13 -0000      1.2885
+++ ChangeLog   16 Apr 2007 10:26:59 -0000      1.2886
@@ -1,3 +1,11 @@
+2007-04-16  John Gilmore  <address@hidden>
+
+       * libbase/log.h: Update documentation for log_* functions; rename
+         log_warning to log_unimpl (with temporary #define for a few days);
+         move gettext and _ definitions from gnash.h to log.h.
+       * libbase/log.cpp:  Update log_* functions as above.
+       * server/gnash.h:  Move gettext and _ to log.h.
+
 2007-04-16 Sandro Santilli <address@hidden>
 
        * libbase/log.h: draft documentation for the log_* functions.

Index: libbase/log.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/log.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- libbase/log.cpp     10 Apr 2007 14:17:15 -0000      1.45
+++ libbase/log.cpp     16 Apr 2007 10:26:59 -0000      1.46
@@ -14,7 +14,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: log.cpp,v 1.45 2007/04/10 14:17:15 strk Exp $ */
+/* $Id: log.cpp,v 1.46 2007/04/16 10:26:59 jgilmore Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -136,7 +136,7 @@
     return x << buf;
 }
 
-// This is a bit of a hack. We impleemnt wrappers for the old
+// This is a bit of a hack. We implement wrappers for the old
 // functions so we don't have to change files everywhere, but get the
 // new behaviours, like logging to disk.
 // THIS IS DANGEROUS AS TIME OF INITIALIZATION IS UNPREDICTABLE,
@@ -151,7 +151,7 @@
        return o;
 }
 
-// Printf-style informational log.
+// Printf-style log for debugging info.
 void
 log_msg(const char* fmt, ...)
 {
@@ -272,7 +272,7 @@
 }
 
 void
-log_warning(const char* fmt, ...)
+log_unimpl(const char* fmt, ...)
 {
     LogFile& dbglogfile = LogFile::getDefaultInstance();
 
@@ -283,7 +283,7 @@
     vsnprintf (tmp, BUFFER_SIZE-1, fmt, ap);
     tmp[BUFFER_SIZE-1] = '\0';
     
-    dbglogfile << "WARNING: " << tmp << endl;
+    dbglogfile << "ERROR: Unimplemented: " << tmp << endl;
     
     va_end (ap);    
 }

Index: libbase/log.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/log.h,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- libbase/log.h       16 Apr 2007 09:08:38 -0000      1.46
+++ libbase/log.h       16 Apr 2007 10:26:59 -0000      1.47
@@ -14,7 +14,7 @@
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-/* $Id: log.h,v 1.46 2007/04/16 09:08:38 strk Exp $ */
+/* $Id: log.h,v 1.47 2007/04/16 10:26:59 jgilmore Exp $ */
 
 #ifndef GNASH_LOG_H
 #define GNASH_LOG_H
@@ -23,6 +23,11 @@
 #include "config.h"
 #endif
 
+// Support compilation with (or without) native language support
+#include "gettext.h"   // for internationalization (GNU gettext)
+#define        _(String) gettext (String)
+#define N_(String) gettext_noop (String)
+
 #include "rc.h" // for IF_VERBOSE_* implementation
 //#include "tu_config.h"
 
@@ -166,28 +171,33 @@
 #define GNUC_LOG_ATTRS __attribute__((format (printf, 1, 2)))
 #endif
 
-/// Log a generic message. This is usually used for debugging, so I guess
-/// should be log_debug instead.
+/// Log a generic message
 //
+/// This is usually used for debugging, so most
+/// such calls should be in comments, unless you're actively debugging
+/// that piece of code right now.
+///
 DSOEXPORT void log_msg(const char* fmt, ...) GNUC_LOG_ATTRS;
 
-/// Log a error
+/// Log a runtime error
 //
-/// Errors have to be used to warn user about missing Gnash features.
-///
-/// NOTE: it has to be decided what difference this makes with
-///       log_warning...
+/// Runtime errors, such as un-openable files, un-allocatable memory,
+/// etc, are logged (for convenience of the user or debugger) this way.
+/// This function is not used to report coding errors; use log_aserror
+/// or log_swferror for that.
 ///
 DSOEXPORT void log_error(const char* fmt, ...) GNUC_LOG_ATTRS;
 
-/// Log a warning
+// Temporary expedient til the other source files are converted.  --gnu
+#define log_warning    log_unimpl
+
+/// Log a message about unimplemented features.
 //
-/// Warnings have to be used to warn user about missing Gnash features.
-///
-/// NOTE: it has to be decided what difference this makes with
-///       log_error...
+/// This function must be used to warn user about missing Gnash features.
+/// We expect all calls to this function to disappear over time, as we
+/// implement those features of Flash.
 ///
-DSOEXPORT void log_warning(const char* fmt, ...) GNUC_LOG_ATTRS;
+DSOEXPORT void log_unimpl(const char* fmt, ...) GNUC_LOG_ATTRS;
 
 /// Use only for explicit user traces
 //
@@ -196,7 +206,10 @@
 ///
 DSOEXPORT void log_trace(const char* fmt, ...) GNUC_LOG_ATTRS;
 
-/// Log debug info (unused! deprecated?)
+/// Log debug info
+//
+/// Used for function entry/exit tracing.
+///
 DSOEXPORT void log_debug(const char* fmt, ...) GNUC_LOG_ATTRS;
 
 /// Log action execution info
@@ -222,6 +235,9 @@
 
 /// Log a malformed SWF error
 //
+/// This indicates an error in how the binary SWF file was constructed, i.e.
+/// probably a bug in the tools used to build the SWF file.
+///
 /// Wrap all calls to this function (and other related statements)
 /// into an IF_VERBOSE_MALFORMED_SWF macro, so to allow completely
 /// removing all the overhead at compile time and reduce it
@@ -231,6 +247,9 @@
 
 /// Log an ActionScript error
 //
+/// This indicates an error by the programmer who wrote the ActionScript
+/// code, such as too few or too many arguments to a function.
+///
 /// Wrap all calls to this function (and other related statements)
 /// into an IF_VERBOSE_ASCODING_ERRORS macro, so to allow completely
 /// removing all the overhead at compile time and reduce it
@@ -238,6 +257,8 @@
 ///
 DSOEXPORT void log_aserror(const char* fmt, ...) GNUC_LOG_ATTRS;
 
+
+
 // Define to 0 to completely remove parse debugging at compile-time
 #ifndef VERBOSE_PARSE
 #define VERBOSE_PARSE 1
@@ -289,7 +310,7 @@
 public:
     const char *func;
 
-    // Only print function tracing messages when tmultiplewo -v
+    // Only print function tracing messages when multiple -v
     // options have been supplied. 
     __Host_Function_Report__(void) {
        log_debug("entering");

Index: server/gnash.h
===================================================================
RCS file: /sources/gnash/gnash/server/gnash.h,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -b -r1.93 -r1.94
--- server/gnash.h      15 Apr 2007 10:52:09 -0000      1.93
+++ server/gnash.h      16 Apr 2007 10:26:59 -0000      1.94
@@ -17,7 +17,7 @@
 // 
 //
 
-/* $Id: gnash.h,v 1.93 2007/04/15 10:52:09 bjacques Exp $ */
+/* $Id: gnash.h,v 1.94 2007/04/16 10:26:59 jgilmore Exp $ */
 
 /// \mainpage
 ///
@@ -39,11 +39,6 @@
 
 #include "as_value.h" // FIXME: for as_c_function_ptr typedef 
(register_component)
 
-// Support compilation with (or without) native language support
-#include "gettext.h"   // for internationalization (GNU gettext)
-#define        _(String) gettext (String)
-#define N_(String) gettext_noop (String)
-
 // FIXME: The local usage of these constants should probably be renamed in this
 // file because they conflict with definitions in the system header files. 
Luckily
 // they are used in files we don't need, so we should be able to safely 
redefine




reply via email to

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