[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog gui/Player.cpp gui/gnash.cpp li...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog gui/Player.cpp gui/gnash.cpp li... |
Date: |
Tue, 19 Feb 2008 00:47:18 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 08/02/19 00:47:18
Modified files:
. : ChangeLog
gui : Player.cpp gnash.cpp
libbase : log.cpp rc.cpp
Log message:
* gui/Player.cpp: don't remove the logfile if not enabled.
* gui/gnash.cpp: set write log to rcfile, not directly on the
LogFile (handling of -w). This is to cope with Player class
way of initializing log file.
* libbase/rc.cpp: don't use log_XXX during construction, as
those will need a constructed RcInitFile to work properly.
* libbase/log.cpp: get "write log" option from RcFile.
Fixes forced logfile writing from gprocessor, and should
make Player handling of the flag obsoleted.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5684&r2=1.5685
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/Player.cpp?cvsroot=gnash&r1=1.80&r2=1.81
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gnash.cpp?cvsroot=gnash&r1=1.99&r2=1.100
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/log.cpp?cvsroot=gnash&r1=1.60&r2=1.61
http://cvs.savannah.gnu.org/viewcvs/gnash/libbase/rc.cpp?cvsroot=gnash&r1=1.60&r2=1.61
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5684
retrieving revision 1.5685
diff -u -b -r1.5684 -r1.5685
--- ChangeLog 18 Feb 2008 23:15:29 -0000 1.5684
+++ ChangeLog 19 Feb 2008 00:47:16 -0000 1.5685
@@ -1,3 +1,15 @@
+2008-02-19 Sandro Santilli <address@hidden>
+
+ * gui/Player.cpp: don't remove the logfile if not enabled.
+ * gui/gnash.cpp: set write log to rcfile, not directly on the
+ LogFile (handling of -w). This is to cope with Player class
+ way of initializing log file.
+ * libbase/rc.cpp: don't use log_XXX during construction, as
+ those will need a constructed RcInitFile to work properly.
+ * libbase/log.cpp: get "write log" option from RcFile.
+ Fixes forced logfile writing from gprocessor, and should
+ make Player handling of the flag obsoleted.
+
2008-02-18 Sandro Santilli <address@hidden>
* testsuite/gnashrc.in: disable writing to the logfile..
Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -b -r1.80 -r1.81
--- gui/Player.cpp 31 Jan 2008 20:54:42 -0000 1.80
+++ gui/Player.cpp 19 Feb 2008 00:47:17 -0000 1.81
@@ -116,8 +116,6 @@
Player::init_logfile()
{
dbglogfile.setWriteDisk(false);
-// rcfile.loadFiles();
-// rcfile.dump();
RcInitFile& rcfile = RcInitFile::getDefaultInstance();
if (rcfile.useWriteLog()) {
@@ -150,12 +148,6 @@
log_msg (_("Timer delay set to %d milliseconds"), delay);
}
- // Remove the logfile that's created by default, since leaving a short
- // file is confusing.
- if (dbglogfile.getWriteDisk() == false) {
- dbglogfile.removeLog();
- }
-
}
void
Index: gui/gnash.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gnash.cpp,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -b -r1.99 -r1.100
--- gui/gnash.cpp 30 Jan 2008 14:51:48 -0000 1.99
+++ gui/gnash.cpp 19 Feb 2008 00:47:17 -0000 1.100
@@ -248,7 +248,7 @@
build_options();
exit(EXIT_SUCCESS);
case 'w':
- dbglogfile.setWriteDisk(true);
+ rcfile.useWriteLog(true); // dbglogfile.setWriteDisk(true);
log_msg (_("Logging to disk enabled"));
break;
case 'a':
@@ -428,7 +428,7 @@
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
#endif
- rcfile.loadFiles();
+ //rcfile.loadFiles();
try { parseCommandLine(argc, argv, player); }
catch (const std::exception& ex)
Index: libbase/log.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/log.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- libbase/log.cpp 23 Jan 2008 16:33:45 -0000 1.60
+++ libbase/log.cpp 19 Feb 2008 00:47:17 -0000 1.61
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
-/* $Id: log.cpp,v 1.60 2008/01/23 16:33:45 strk Exp $ */
+/* $Id: log.cpp,v 1.61 2008/02/19 00:47:17 strk Exp $ */
#ifdef HAVE_CONFIG_H
#include "gnashconfig.h"
@@ -387,6 +387,8 @@
RcInitFile& rcfile = RcInitFile::getDefaultInstance();
+ //rcfile.dump();
+ _write = rcfile.useWriteLog();
loadfile = rcfile.getDebugLog();
if ( loadfile.empty() ) loadfile = DEFAULT_LOGFILE;
Index: libbase/rc.cpp
===================================================================
RCS file: /sources/gnash/gnash/libbase/rc.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -b -r1.60 -r1.61
--- libbase/rc.cpp 11 Feb 2008 08:13:06 -0000 1.60
+++ libbase/rc.cpp 19 Feb 2008 00:47:17 -0000 1.61
@@ -49,6 +49,8 @@
#endif
using std::endl;
+using std::cout;
+using std::cerr;
namespace gnash {
@@ -152,18 +154,18 @@
std::string &variable, std::string &value)
{
// GNASH_REPORT_FUNCTION;
- //log_msg ("%s: %s", variable, value);
+ //cout << variable << ": " << value << endl;
StringNoCaseEqual noCaseCompare;
if ( noCaseCompare(variable, pattern) ) {
if ( noCaseCompare(value, "on") || noCaseCompare(value, "yes") ||
noCaseCompare(value, "true")) {
- //log_msg ("%s: Enabled", variable);
+ //cout << variable << ": enabled" << endl;
*var = true;
}
if (noCaseCompare(value, "off") || noCaseCompare(value, "no") ||
noCaseCompare(value, "false")) {
- //log_msg ("%s: Disabled", variable);
+ //cout << variable << ": disabled" << endl;
*var = false;
}
}
@@ -178,12 +180,12 @@
StringNoCaseEqual noCaseCompare;
-// log_msg ("%s: %s", variable.c_str(), value.c_str());
+// cout << variable << ": " << value << endl;
if ( noCaseCompare(variable, pattern) ) {
*num = strtoul(value.c_str(), NULL, 0);
if (*num == LONG_MAX) {
long long foo = strtoll(value.c_str(), NULL, 0);
- log_error("Conversion overflow!: %lld", foo);
+ cerr << "RcInitFile::extractNumber: conversion overflow!: " << foo
<< endl;
}
}
@@ -350,8 +352,8 @@
StringNoCaseEqual noCaseCompare;
-// log_msg ("Seeing if %s exists", filespec);
- if (filespec.size() == 0) {
+ if (filespec.empty()) {
+ cout << "RcInitFile::parseFile: empty filespec" << endl;
return false;
}
@@ -359,10 +361,12 @@
in.open(filespec.c_str());
if (!in) {
- log_error(_("Couldn't open file: %s"), filespec.c_str());
+ cerr << "Couldn't open file: " << filespec << endl;
return false;
}
+ cout << "RcInitFile: parsing " << filespec << endl;
+
// Read in each line and parse it
while (!in.eof()) {
@@ -493,6 +497,7 @@
}
} else {
+ //cout << filespec << ": no such file or directory" << endl;
if (in) {
in.close();
}
@@ -552,7 +557,7 @@
out.open(filespec.c_str());
if (!out) {
- log_error(_("Couldn't open file %s for writing"), filespec.c_str());
+ cerr << "Couldn't open file " << filespec << " for writing" << endl;
return false;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] gnash ChangeLog gui/Player.cpp gui/gnash.cpp li...,
Sandro Santilli <=