summaryrefslogtreecommitdiffstats
path: root/lib/Utils
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/Utils
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/Utils')
-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
24 files changed, 214 insertions, 32 deletions
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>