summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-02-07 23:08:53 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-02-07 23:08:53 +0100
commiteafe336a8e5580bbd76546970351956810f01d8f (patch)
tree131b770ca194f2d840208ae9e52ee650b12e75e0 /lib
parent5ddcae3c61341e655e98470ceb26dda91b013704 (diff)
downloadabrt-eafe336a8e5580bbd76546970351956810f01d8f.tar.gz
abrt-eafe336a8e5580bbd76546970351956810f01d8f.tar.xz
abrt-eafe336a8e5580bbd76546970351956810f01d8f.zip
*: remove all usages of C++ streams (-10k in code size)
Also add copyright banners to all files which were missing them Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Plugins/Bugzilla.cpp20
-rw-r--r--lib/Plugins/Bugzilla.h18
-rw-r--r--lib/Plugins/CCpp.cpp46
-rw-r--r--lib/Plugins/CCpp.h5
-rw-r--r--lib/Plugins/Catcut.cpp18
-rw-r--r--lib/Plugins/Catcut.h18
-rw-r--r--lib/Plugins/FileTransfer.cpp3
-rw-r--r--lib/Plugins/FileTransfer.h3
-rw-r--r--lib/Plugins/Firefox.cpp5
-rw-r--r--lib/Plugins/Firefox.h3
-rw-r--r--lib/Plugins/Logger.cpp5
-rw-r--r--lib/Plugins/Logger.h3
-rw-r--r--lib/Plugins/Mailx.cpp5
-rw-r--r--lib/Plugins/Mailx.h3
-rw-r--r--lib/Plugins/Python.cpp18
-rw-r--r--lib/Plugins/Python.h18
-rw-r--r--lib/Plugins/RunApp.cpp3
-rw-r--r--lib/Plugins/RunApp.h3
-rw-r--r--lib/Plugins/SOSreport.cpp2
-rw-r--r--lib/Plugins/SOSreport.h3
-rw-r--r--lib/Plugins/SQLite3.cpp4
-rw-r--r--lib/Plugins/SQLite3.h3
-rw-r--r--lib/Plugins/TicketUploader.cpp3
-rw-r--r--lib/Plugins/TicketUploader.h3
-rw-r--r--lib/Utils/ABRTException.cpp18
-rw-r--r--lib/Utils/Action.h3
-rw-r--r--lib/Utils/Analyzer.h3
-rw-r--r--lib/Utils/CommLayerInner.cpp18
-rw-r--r--lib/Utils/CommLayerInner.h18
-rw-r--r--lib/Utils/CrashTypesSocket.cpp3
-rw-r--r--lib/Utils/DBusCommon.h3
-rw-r--r--lib/Utils/Database.h4
-rw-r--r--lib/Utils/DebugDump.cpp14
-rw-r--r--lib/Utils/DebugDump.h3
-rw-r--r--lib/Utils/Makefile.am2
-rw-r--r--lib/Utils/Observer.h18
-rw-r--r--lib/Utils/Plugin.cpp3
-rw-r--r--lib/Utils/Plugin.h3
-rw-r--r--lib/Utils/Reporter.h3
-rw-r--r--lib/Utils/abrt_dbus.cpp18
-rw-r--r--lib/Utils/abrt_dbus.h18
-rw-r--r--lib/Utils/abrt_xmlrpc.cpp18
-rw-r--r--lib/Utils/abrt_xmlrpc.h18
-rw-r--r--lib/Utils/make_descr.cpp18
-rw-r--r--lib/Utils/parse_release.cpp18
-rw-r--r--lib/Utils/stringops.cpp18
-rw-r--r--lib/Utils/test.cpp3
-rw-r--r--lib/Utils/xconnect.cpp1
48 files changed, 361 insertions, 100 deletions
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp
index fa6b35e4..b809e34c 100644
--- a/lib/Plugins/Bugzilla.cpp
+++ b/lib/Plugins/Bugzilla.cpp
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#include <xmlrpc-c/base.h>
#include <xmlrpc-c/client.h>
#include "abrtlib.h"
@@ -185,7 +203,7 @@ void ctx::add_plus_one_cc(uint32_t bug_id, const char* login)
xmlrpc_env env;
xmlrpc_env_init(&env);
- xmlrpc_value* param = xmlrpc_build_value(&env, "({s:i,s:{s:(s)}})", "ids", bug_id, "updates", "add_cc", login);
+ xmlrpc_value* param = xmlrpc_build_value(&env, "({s:i,s:{s:(s)}})", "ids", bug_id, "updates", "add_cc", login);
throw_if_xml_fault_occurred(&env); // failed to allocate memory
xmlrpc_value* result = NULL;
diff --git a/lib/Plugins/Bugzilla.h b/lib/Plugins/Bugzilla.h
index 571d0c60..7ee7b01d 100644
--- a/lib/Plugins/Bugzilla.h
+++ b/lib/Plugins/Bugzilla.h
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#ifndef BUGZILLA_H_
#define BUGZILLA_H_
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 50423b7c..7b3eab1c 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -17,10 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <fstream>
-#include <sstream>
+*/
#include <set>
#include <iomanip>
//#include <nss.h>
@@ -702,21 +699,21 @@ string CAnalyzerCCpp::GetGlobalUUID(const char *pDebugDumpDir)
{
perror_msg("abrt-backtrace not executed properly, "
"status: %x signal: %d", status, WIFSIGNALED(status));
- }
+ }
else
{
int exit_status = WEXITSTATUS(status);
if (exit_status == 79) /* EX_PARSINGFAILED */
{
- /* abrt-backtrace returns alternative backtrace
- representation in this case, so everything will work
+ /* abrt-backtrace returns alternative backtrace
+ representation in this case, so everything will work
as expected except worse duplication detection */
log_msg("abrt-backtrace failed to parse the backtrace");
}
else if (exit_status == 80) /* EX_THREADDETECTIONFAILED */
{
- /* abrt-backtrace returns backtrace with all threads
- in this case, so everything will work as expected
+ /* abrt-backtrace returns backtrace with all threads
+ in this case, so everything will work as expected
except worse duplication detection */
log_msg("abrt-backtrace failed to determine crash frame");
}
@@ -890,12 +887,13 @@ static int set_limits()
void CAnalyzerCCpp::Init()
{
- ifstream fInCorePattern;
- fInCorePattern.open(CORE_PATTERN_IFACE);
- if (fInCorePattern.is_open())
+ FILE *fp = fopen(CORE_PATTERN_IFACE, "r");
+ if (fp)
{
- getline(fInCorePattern, m_sOldCorePattern);
- fInCorePattern.close();
+ char line[PATH_MAX];
+ if (fgets(line, sizeof(line), fp))
+ m_sOldCorePattern = line;
+ fclose(fp);
}
if (m_sOldCorePattern[0] == '|')
{
@@ -915,28 +913,26 @@ void CAnalyzerCCpp::Init()
}
}
#ifdef HOSTILE_KERNEL
- if(set_limits() != 0)
+ if (set_limits() != 0)
log("warning: failed to set core_size limit, ABRT won't detect crashes in"
"compiled apps");
#endif
- ofstream fOutCorePattern;
- fOutCorePattern.open(CORE_PATTERN_IFACE);
- if (fOutCorePattern.is_open())
+ fp = fopen(CORE_PATTERN_IFACE, "w");
+ if (fp)
{
- fOutCorePattern << CORE_PATTERN << endl;
- fOutCorePattern.close();
+ fputs(CORE_PATTERN, fp);
+ fclose(fp);
}
}
void CAnalyzerCCpp::DeInit()
{
- ofstream fOutCorePattern;
- fOutCorePattern.open(CORE_PATTERN_IFACE);
- if (fOutCorePattern.is_open())
+ FILE *fp = fopen(CORE_PATTERN_IFACE, "w");
+ if (fp)
{
- fOutCorePattern << m_sOldCorePattern << endl;
- fOutCorePattern.close();
+ fputs(m_sOldCorePattern.c_str(), fp);
+ fclose(fp);
}
}
diff --git a/lib/Plugins/CCpp.h b/lib/Plugins/CCpp.h
index 03ba5ee4..afdc2c6e 100644
--- a/lib/Plugins/CCpp.h
+++ b/lib/Plugins/CCpp.h
@@ -1,6 +1,6 @@
/*
CCpp.h - header file for C/C++ analyzer plugin
- - it can ger UUID and memory maps from core files
+ - it can get UUID and memory maps from core files
Copyright (C) 2009 Zdenek Prikryl (zprikryl@redhat.com)
Copyright (C) 2009 RedHat inc.
@@ -18,8 +18,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef CCPP_H_
#define CCPP_H_
diff --git a/lib/Plugins/Catcut.cpp b/lib/Plugins/Catcut.cpp
index badca4b4..48546367 100644
--- a/lib/Plugins/Catcut.cpp
+++ b/lib/Plugins/Catcut.cpp
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#include "abrtlib.h"
#include "abrt_xmlrpc.h"
#include "Catcut.h"
diff --git a/lib/Plugins/Catcut.h b/lib/Plugins/Catcut.h
index 65c70444..427dd375 100644
--- a/lib/Plugins/Catcut.h
+++ b/lib/Plugins/Catcut.h
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#ifndef CATCUT_H_
#define CATCUT_H_
diff --git a/lib/Plugins/FileTransfer.cpp b/lib/Plugins/FileTransfer.cpp
index 5479f9fb..8f5bc6db 100644
--- a/lib/Plugins/FileTransfer.cpp
+++ b/lib/Plugins/FileTransfer.cpp
@@ -17,8 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef _GNU_SOURCE
# define _GNU_SOURCE
#endif
diff --git a/lib/Plugins/FileTransfer.h b/lib/Plugins/FileTransfer.h
index 2548c506..8f77223d 100644
--- a/lib/Plugins/FileTransfer.h
+++ b/lib/Plugins/FileTransfer.h
@@ -18,8 +18,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef FILETRANSFER_H_
#define FILETRANSFER_H_
diff --git a/lib/Plugins/Firefox.cpp b/lib/Plugins/Firefox.cpp
index 7bee46dc..3cb9c938 100644
--- a/lib/Plugins/Firefox.cpp
+++ b/lib/Plugins/Firefox.cpp
@@ -17,10 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <fstream>
-#include <sstream>
+*/
#include <set>
#include <iomanip>
#include <nss.h>
diff --git a/lib/Plugins/Firefox.h b/lib/Plugins/Firefox.h
index dd7758d9..d3f67ba4 100644
--- a/lib/Plugins/Firefox.h
+++ b/lib/Plugins/Firefox.h
@@ -18,8 +18,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef CCPP_H_
#define CCPP_H_
diff --git a/lib/Plugins/Logger.cpp b/lib/Plugins/Logger.cpp
index 3424d73d..a0c23645 100644
--- a/lib/Plugins/Logger.cpp
+++ b/lib/Plugins/Logger.cpp
@@ -17,10 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <fstream>
-#include <sstream>
+*/
#include "abrtlib.h"
#include "Logger.h"
#include "DebugDump.h"
diff --git a/lib/Plugins/Logger.h b/lib/Plugins/Logger.h
index 02429b2c..8801dd4f 100644
--- a/lib/Plugins/Logger.h
+++ b/lib/Plugins/Logger.h
@@ -18,8 +18,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef LOGGER_H_
#define LOGGER_H_
diff --git a/lib/Plugins/Mailx.cpp b/lib/Plugins/Mailx.cpp
index 2ee96455..50bc3920 100644
--- a/lib/Plugins/Mailx.cpp
+++ b/lib/Plugins/Mailx.cpp
@@ -17,10 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-
-#include <stdio.h>
+*/
#include "abrtlib.h"
#include "Mailx.h"
#include "DebugDump.h"
diff --git a/lib/Plugins/Mailx.h b/lib/Plugins/Mailx.h
index 619e349c..c71d83d8 100644
--- a/lib/Plugins/Mailx.h
+++ b/lib/Plugins/Mailx.h
@@ -18,8 +18,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef MAILX_H_
#define MAILX_H_
diff --git a/lib/Plugins/Python.cpp b/lib/Plugins/Python.cpp
index ad954681..cf4d81e2 100644
--- a/lib/Plugins/Python.cpp
+++ b/lib/Plugins/Python.cpp
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#include "abrtlib.h"
#include "Python.h"
#include "DebugDump.h"
diff --git a/lib/Plugins/Python.h b/lib/Plugins/Python.h
index 82f52c05..6de2cbbe 100644
--- a/lib/Plugins/Python.h
+++ b/lib/Plugins/Python.h
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#ifndef PYTHON_H_
#define PYTHON_H_
diff --git a/lib/Plugins/RunApp.cpp b/lib/Plugins/RunApp.cpp
index ecbecf20..c7d5183b 100644
--- a/lib/Plugins/RunApp.cpp
+++ b/lib/Plugins/RunApp.cpp
@@ -17,8 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#include "abrtlib.h"
#include "RunApp.h"
#include "DebugDump.h"
diff --git a/lib/Plugins/RunApp.h b/lib/Plugins/RunApp.h
index da465f89..390b60a2 100644
--- a/lib/Plugins/RunApp.h
+++ b/lib/Plugins/RunApp.h
@@ -17,8 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef RUNAPP_H_
#define RUNAPP_H_
diff --git a/lib/Plugins/SOSreport.cpp b/lib/Plugins/SOSreport.cpp
index bc71e236..188d16d6 100644
--- a/lib/Plugins/SOSreport.cpp
+++ b/lib/Plugins/SOSreport.cpp
@@ -17,8 +17,6 @@
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-//#include <fstream>
-//#include <sstream>
#include "abrtlib.h"
#include "abrt_types.h"
#include "ABRTException.h"
diff --git a/lib/Plugins/SOSreport.h b/lib/Plugins/SOSreport.h
index bd08eee1..d5c44235 100644
--- a/lib/Plugins/SOSreport.h
+++ b/lib/Plugins/SOSreport.h
@@ -16,8 +16,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef SOSREPORT_H_
#define SOSREPORT_H_
diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp
index 80cbd82b..97f99b68 100644
--- a/lib/Plugins/SQLite3.cpp
+++ b/lib/Plugins/SQLite3.cpp
@@ -17,10 +17,8 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#include <sqlite3.h>
-#include <string>
#include "abrtlib.h"
#include "SQLite3.h"
#include "ABRTException.h"
diff --git a/lib/Plugins/SQLite3.h b/lib/Plugins/SQLite3.h
index dfebf5d7..d4b321a2 100644
--- a/lib/Plugins/SQLite3.h
+++ b/lib/Plugins/SQLite3.h
@@ -17,8 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef SQLITE3_H_
#define SQLITE3_H_
diff --git a/lib/Plugins/TicketUploader.cpp b/lib/Plugins/TicketUploader.cpp
index d924b916..a7151b5e 100644
--- a/lib/Plugins/TicketUploader.cpp
+++ b/lib/Plugins/TicketUploader.cpp
@@ -16,8 +16,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-#include <string>
+*/
#include "abrtlib.h"
#include "abrt_xmlrpc.h" /* for xcurl_easy_init */
#include "TicketUploader.h"
diff --git a/lib/Plugins/TicketUploader.h b/lib/Plugins/TicketUploader.h
index a719d0bd..402e2ccf 100644
--- a/lib/Plugins/TicketUploader.h
+++ b/lib/Plugins/TicketUploader.h
@@ -20,8 +20,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef TICKETUPLOADER_H_
#define TICKETUPLOADER_H_
diff --git a/lib/Utils/ABRTException.cpp b/lib/Utils/ABRTException.cpp
index aa6c99d9..a451cbdf 100644
--- a/lib/Utils/ABRTException.cpp
+++ b/lib/Utils/ABRTException.cpp
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#include "ABRTException.h"
CABRTException::CABRTException(abrt_exception_t type, const char* fmt, ...)
diff --git a/lib/Utils/Action.h b/lib/Utils/Action.h
index d9a68b79..fc56277b 100644
--- a/lib/Utils/Action.h
+++ b/lib/Utils/Action.h
@@ -17,8 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef ACTION_H_
#define ACTION_H_
diff --git a/lib/Utils/Analyzer.h b/lib/Utils/Analyzer.h
index 9108a914..a45bd0e8 100644
--- a/lib/Utils/Analyzer.h
+++ b/lib/Utils/Analyzer.h
@@ -17,8 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef ANALYZER_H_
#define ANALYZER_H_
diff --git a/lib/Utils/CommLayerInner.cpp b/lib/Utils/CommLayerInner.cpp
index 4a3b80a8..bde3a71c 100644
--- a/lib/Utils/CommLayerInner.cpp
+++ b/lib/Utils/CommLayerInner.cpp
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#include <pthread.h>
#include <map>
#include "abrtlib.h"
diff --git a/lib/Utils/CommLayerInner.h b/lib/Utils/CommLayerInner.h
index 9c22968a..353cfc76 100644
--- a/lib/Utils/CommLayerInner.h
+++ b/lib/Utils/CommLayerInner.h
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#ifndef COMMLAYERINNER_H_
#define COMMLAYERINNER_H_
diff --git a/lib/Utils/CrashTypesSocket.cpp b/lib/Utils/CrashTypesSocket.cpp
index d555571b..710e31e9 100644
--- a/lib/Utils/CrashTypesSocket.cpp
+++ b/lib/Utils/CrashTypesSocket.cpp
@@ -17,8 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#include "abrtlib.h"
#include "CrashTypesSocket.h"
diff --git a/lib/Utils/DBusCommon.h b/lib/Utils/DBusCommon.h
index 2e3ed8a5..58b4c8dc 100644
--- a/lib/Utils/DBusCommon.h
+++ b/lib/Utils/DBusCommon.h
@@ -15,8 +15,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef DBUSCOMMON_H_
#define DBUSCOMMON_H_
diff --git a/lib/Utils/Database.h b/lib/Utils/Database.h
index 1691f1ce..ed4ef0ca 100644
--- a/lib/Utils/Database.h
+++ b/lib/Utils/Database.h
@@ -17,9 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-
+*/
#ifndef DATABASE_H_
#define DATABASE_H_
diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp
index a0a52ab9..b8f8827c 100644
--- a/lib/Utils/DebugDump.cpp
+++ b/lib/Utils/DebugDump.cpp
@@ -17,11 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#include <fstream>
-#include <iostream>
-#include <sstream>
+*/
#include <sys/utsname.h>
#include "abrtlib.h"
#include "DebugDump.h"
@@ -251,7 +247,7 @@ void CDebugDump::UnLock()
*
* Security: we should not allow users to write new files or write
* into existing ones, but they should be able to read them.
- *
+ *
* @param uid
* Crashed application's User Id
*
@@ -282,7 +278,7 @@ void CDebugDump::Create(const char *pDir, uid_t uid)
Lock();
m_bOpened = true;
- /* Was creating it with mode 0700 and user as the owner, but this allows
+ /* Was creating it with mode 0700 and user as the owner, but this allows
* the user to replace any file in the directory, changing security-sensitive data
* (e.g. "uid", "analyzer", "executable")
*/
@@ -302,7 +298,7 @@ void CDebugDump::Create(const char *pDir, uid_t uid)
}
/* Get ABRT's user id */
- m_uid = 0;
+ m_uid = 0;
struct passwd *pw = getpwnam("abrt");
if (pw)
m_uid = pw->pw_uid;
@@ -319,7 +315,7 @@ void CDebugDump::Create(const char *pDir, uid_t uid)
if (chown(m_sDebugDumpDir.c_str(), m_uid, m_gid) == -1)
{
- perror_msg("can't change '%s' ownership to %lu:%lu", m_sDebugDumpDir.c_str(),
+ perror_msg("can't change '%s' ownership to %lu:%lu", m_sDebugDumpDir.c_str(),
(long)m_uid, (long)m_gid);
}
diff --git a/lib/Utils/DebugDump.h b/lib/Utils/DebugDump.h
index 60d3bd3b..a5de743f 100644
--- a/lib/Utils/DebugDump.h
+++ b/lib/Utils/DebugDump.h
@@ -18,8 +18,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef DEBUGDUMP_H_
#define DEBUGDUMP_H_
diff --git a/lib/Utils/Makefile.am b/lib/Utils/Makefile.am
index 59607104..6bf11daa 100644
--- a/lib/Utils/Makefile.am
+++ b/lib/Utils/Makefile.am
@@ -15,7 +15,7 @@ libABRTUtils_la_SOURCES = \
copyfd.cpp \
daemon.cpp \
skip_whitespace.cpp \
- xatonum.cpp \
+ xatonum.cpp numtoa.cpp \
spawn.cpp \
stringops.cpp \
dirsize.cpp \
diff --git a/lib/Utils/Observer.h b/lib/Utils/Observer.h
index db748659..adf6844a 100644
--- a/lib/Utils/Observer.h
+++ b/lib/Utils/Observer.h
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#ifndef OBSERVER_H_
#define OBSERVER_H_
diff --git a/lib/Utils/Plugin.cpp b/lib/Utils/Plugin.cpp
index 4d561b46..2865027f 100644
--- a/lib/Utils/Plugin.cpp
+++ b/lib/Utils/Plugin.cpp
@@ -15,8 +15,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#include "Plugin.h"
CPlugin::CPlugin() {}
diff --git a/lib/Utils/Plugin.h b/lib/Utils/Plugin.h
index e8464032..c699eb36 100644
--- a/lib/Utils/Plugin.h
+++ b/lib/Utils/Plugin.h
@@ -18,8 +18,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef PLUGIN_H_
#define PLUGIN_H_
diff --git a/lib/Utils/Reporter.h b/lib/Utils/Reporter.h
index e9445f93..4144ec33 100644
--- a/lib/Utils/Reporter.h
+++ b/lib/Utils/Reporter.h
@@ -17,8 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#ifndef REPORTER_H_
#define REPORTER_H_
diff --git a/lib/Utils/abrt_dbus.cpp b/lib/Utils/abrt_dbus.cpp
index 8423e66c..66608410 100644
--- a/lib/Utils/abrt_dbus.cpp
+++ b/lib/Utils/abrt_dbus.cpp
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#include <dbus/dbus.h>
#include <glib.h>
#include "abrtlib.h"
diff --git a/lib/Utils/abrt_dbus.h b/lib/Utils/abrt_dbus.h
index 25e099ea..ffa4421b 100644
--- a/lib/Utils/abrt_dbus.h
+++ b/lib/Utils/abrt_dbus.h
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#ifndef ABRT_UTIL_DBUS_H
#define ABRT_UTIL_DBUS_H
diff --git a/lib/Utils/abrt_xmlrpc.cpp b/lib/Utils/abrt_xmlrpc.cpp
index c2d716e1..3737ee14 100644
--- a/lib/Utils/abrt_xmlrpc.cpp
+++ b/lib/Utils/abrt_xmlrpc.cpp
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#if HAVE_CONFIG_H
# include "config.h"
#endif
diff --git a/lib/Utils/abrt_xmlrpc.h b/lib/Utils/abrt_xmlrpc.h
index a0e9ca34..4d20d4e8 100644
--- a/lib/Utils/abrt_xmlrpc.h
+++ b/lib/Utils/abrt_xmlrpc.h
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#ifndef ABRT_XMLRPC_H_
#define ABRT_XMLRPC_H_ 1
diff --git a/lib/Utils/make_descr.cpp b/lib/Utils/make_descr.cpp
index b67dfe65..c2821a5f 100644
--- a/lib/Utils/make_descr.cpp
+++ b/lib/Utils/make_descr.cpp
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#include "abrtlib.h"
#include "CrashTypes.h"
#include "DebugDump.h" /* FILENAME_ARCHITECTURE etc */
diff --git a/lib/Utils/parse_release.cpp b/lib/Utils/parse_release.cpp
index 8a106b69..4f7d76e1 100644
--- a/lib/Utils/parse_release.cpp
+++ b/lib/Utils/parse_release.cpp
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#include "abrtlib.h"
#ifdef HAVE_CONFIG_H
# include "config.h"
diff --git a/lib/Utils/stringops.cpp b/lib/Utils/stringops.cpp
index dc71b5bd..7bc5413f 100644
--- a/lib/Utils/stringops.cpp
+++ b/lib/Utils/stringops.cpp
@@ -1,3 +1,21 @@
+/*
+ Copyright (C) 2010 ABRT team
+ Copyright (C) 2010 RedHat 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
#include "abrtlib.h"
void parse_args(const char *psArgs, vector_string_t& pArgs, int quote)
diff --git a/lib/Utils/test.cpp b/lib/Utils/test.cpp
index 3711ef18..24a62760 100644
--- a/lib/Utils/test.cpp
+++ b/lib/Utils/test.cpp
@@ -17,8 +17,7 @@
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
+*/
#include "MiddleWare.h"
#include "DebugDump.h"
#include "CrashTypes.h"
diff --git a/lib/Utils/xconnect.cpp b/lib/Utils/xconnect.cpp
index 746edd63..0d02b1a4 100644
--- a/lib/Utils/xconnect.cpp
+++ b/lib/Utils/xconnect.cpp
@@ -6,7 +6,6 @@
*
* Licensed under GPLv2, see file LICENSE in this tarball for details.
*/
-
#include "abrtlib.h"
#include <sys/socket.h> /* netinet/in.h needs it */
#include <netinet/in.h>