summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2020-10-14 20:21:09 +0200
committerBenny Baumann <BenBE@geshi.org>2020-10-16 20:30:21 +0200
commit872e542f4eca52ce2198ba3fc30a51bc5d672dae (patch)
treed47d619840ec26bdc099ceff1351f5e6cc901e1c
parentc6f04a9c5d33d16623f1c20f0987dd3a992379e7 (diff)
Rename StringUtils.[ch] to XUtils.[ch]
-rw-r--r--Action.c2
-rw-r--r--AffinityPanel.c2
-rw-r--r--AvailableColumnsPanel.c2
-rw-r--r--AvailableMetersPanel.c2
-rw-r--r--BatteryMeter.c2
-rw-r--r--CPUMeter.c2
-rw-r--r--CRT.c2
-rw-r--r--ColorsPanel.c2
-rw-r--r--ColumnsPanel.c2
-rw-r--r--CommandScreen.c2
-rw-r--r--DiskIOMeter.c2
-rw-r--r--DisplayOptionsPanel.c2
-rw-r--r--EnvScreen.c2
-rw-r--r--FunctionBar.c2
-rw-r--r--Header.c2
-rw-r--r--IncSet.c3
-rw-r--r--InfoScreen.c2
-rw-r--r--ListItem.c2
-rw-r--r--LoadAverageMeter.c2
-rw-r--r--Makefile.am8
-rw-r--r--Meter.c2
-rw-r--r--OpenFilesScreen.c2
-rw-r--r--Panel.c2
-rw-r--r--Process.c2
-rw-r--r--ProcessList.c4
-rw-r--r--Settings.c6
-rw-r--r--SignalsPanel.c2
-rw-r--r--TasksMeter.c2
-rw-r--r--TraceScreen.c2
-rw-r--r--UptimeMeter.c2
-rw-r--r--UsersTable.c2
-rw-r--r--XUtils.c (renamed from StringUtils.c)2
-rw-r--r--XUtils.h (renamed from StringUtils.h)4
-rw-r--r--htop.c2
-rw-r--r--linux/Battery.c9
-rw-r--r--linux/IOPriorityPanel.c2
-rw-r--r--linux/LinuxProcess.c3
-rw-r--r--linux/LinuxProcessList.c3
-rw-r--r--linux/Platform.c2
-rw-r--r--linux/PressureStallMeter.c2
-rw-r--r--zfs/ZfsCompressedArcMeter.c2
41 files changed, 55 insertions, 51 deletions
diff --git a/Action.c b/Action.c
index 6d7782ca..f53acf7b 100644
--- a/Action.c
+++ b/Action.c
@@ -19,9 +19,9 @@ in the source distribution for its full text.
#include "Process.h"
#include "ScreenManager.h"
#include "SignalsPanel.h"
-#include "StringUtils.h"
#include "TraceScreen.h"
#include "Platform.h"
+#include "XUtils.h"
#include <ctype.h>
#include <math.h>
diff --git a/AffinityPanel.c b/AffinityPanel.c
index 0027d4a4..ab17b420 100644
--- a/AffinityPanel.c
+++ b/AffinityPanel.c
@@ -13,8 +13,8 @@ in the source distribution for its full text.
#include <string.h>
#include "CRT.h"
-#include "StringUtils.h"
#include "Vector.h"
+#include "XUtils.h"
#ifdef HAVE_LIBHWLOC
#include <hwloc.h>
diff --git a/AvailableColumnsPanel.c b/AvailableColumnsPanel.c
index a2a6aba6..32bb470e 100644
--- a/AvailableColumnsPanel.c
+++ b/AvailableColumnsPanel.c
@@ -15,7 +15,7 @@ in the source distribution for its full text.
#include "ColumnsPanel.h"
#include "Header.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
static const char* const AvailableColumnsFunctions[] = {" ", " ", " ", " ", "Add ", " ", " ", " ", " ", "Done ", NULL};
diff --git a/AvailableMetersPanel.c b/AvailableMetersPanel.c
index b90912bd..faa69a8f 100644
--- a/AvailableMetersPanel.c
+++ b/AvailableMetersPanel.c
@@ -12,7 +12,7 @@ in the source distribution for its full text.
#include "Header.h"
#include "ListItem.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
#include <assert.h>
#include <stdlib.h>
diff --git a/BatteryMeter.c b/BatteryMeter.c
index 060b125c..22a63c7a 100644
--- a/BatteryMeter.c
+++ b/BatteryMeter.c
@@ -12,8 +12,8 @@ This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
#include "Battery.h"
#include "ProcessList.h"
#include "CRT.h"
-#include "StringUtils.h"
#include "Platform.h"
+#include "XUtils.h"
#include <math.h>
#include <string.h>
diff --git a/CPUMeter.c b/CPUMeter.c
index c3133a2c..7e70f454 100644
--- a/CPUMeter.c
+++ b/CPUMeter.c
@@ -10,7 +10,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include "Settings.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
#include <assert.h>
#include <stdlib.h>
diff --git a/CRT.c b/CRT.c
index 06ce0451..2f9eb2b6 100644
--- a/CRT.c
+++ b/CRT.c
@@ -8,8 +8,8 @@ in the source distribution for its full text.
#include "config.h"
#include "CRT.h"
-#include "StringUtils.h"
#include "RichString.h"
+#include "XUtils.h"
#include <stdio.h>
#include <errno.h>
diff --git a/ColorsPanel.c b/ColorsPanel.c
index 45745a73..5b189ea3 100644
--- a/ColorsPanel.c
+++ b/ColorsPanel.c
@@ -9,7 +9,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include "CheckItem.h"
-#include "StringUtils.h"
+#include "XUtils.h"
#include <assert.h>
#include <stdlib.h>
diff --git a/ColumnsPanel.c b/ColumnsPanel.c
index e4fe4fc1..a0e9fd31 100644
--- a/ColumnsPanel.c
+++ b/ColumnsPanel.c
@@ -8,7 +8,7 @@ in the source distribution for its full text.
#include "ColumnsPanel.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
#include "ListItem.h"
#include "CRT.h"
diff --git a/CommandScreen.c b/CommandScreen.c
index 58ed8840..df039645 100644
--- a/CommandScreen.c
+++ b/CommandScreen.c
@@ -5,7 +5,7 @@
#include "IncSet.h"
#include "ListItem.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
#include <stdlib.h>
#include <string.h>
diff --git a/DiskIOMeter.c b/DiskIOMeter.c
index 34b0f081..d882b433 100644
--- a/DiskIOMeter.c
+++ b/DiskIOMeter.c
@@ -11,7 +11,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
static const int DiskIOMeter_attributes[] = {
diff --git a/DisplayOptionsPanel.c b/DisplayOptionsPanel.c
index d6534887..d667ab7f 100644
--- a/DisplayOptionsPanel.c
+++ b/DisplayOptionsPanel.c
@@ -13,7 +13,7 @@ in the source distribution for its full text.
#include "CheckItem.h"
#include "CRT.h"
-#include "StringUtils.h"
+#include "XUtils.h"
static const char* const DisplayOptionsFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL};
diff --git a/EnvScreen.c b/EnvScreen.c
index 1f107457..10060ec7 100644
--- a/EnvScreen.c
+++ b/EnvScreen.c
@@ -5,7 +5,7 @@
#include "IncSet.h"
#include "ListItem.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
#include <stdlib.h>
#include <string.h>
diff --git a/FunctionBar.c b/FunctionBar.c
index 3e00b87e..4e9d30cd 100644
--- a/FunctionBar.c
+++ b/FunctionBar.c
@@ -8,8 +8,8 @@ in the source distribution for its full text.
#include "FunctionBar.h"
#include "CRT.h"
#include "RichString.h"
-#include "StringUtils.h"
#include "XAlloc.h"
+#include "XUtils.h"
#include <assert.h>
#include <string.h>
diff --git a/Header.c b/Header.c
index e5a64db1..f5233370 100644
--- a/Header.c
+++ b/Header.c
@@ -8,8 +8,8 @@ in the source distribution for its full text.
#include "Header.h"
#include "CRT.h"
-#include "StringUtils.h"
#include "Platform.h"
+#include "XUtils.h"
#include <assert.h>
#include <time.h>
diff --git a/IncSet.c b/IncSet.c
index 9dda3ce1..3534f857 100644
--- a/IncSet.c
+++ b/IncSet.c
@@ -6,9 +6,10 @@ in the source distribution for its full text.
*/
#include "IncSet.h"
-#include "StringUtils.h"
#include "ListItem.h"
#include "CRT.h"
+#include "XUtils.h"
+
#include <string.h>
#include <stdlib.h>
diff --git a/InfoScreen.c b/InfoScreen.c
index ecde6d91..ed890f7d 100644
--- a/InfoScreen.c
+++ b/InfoScreen.c
@@ -6,7 +6,7 @@
#include "IncSet.h"
#include "ListItem.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
#include <stdlib.h>
#include <string.h>
diff --git a/ListItem.c b/ListItem.c
index d9d36f89..c4479d73 100644
--- a/ListItem.c
+++ b/ListItem.c
@@ -8,8 +8,8 @@ in the source distribution for its full text.
#include "ListItem.h"
#include "CRT.h"
-#include "StringUtils.h"
#include "RichString.h"
+#include "XUtils.h"
#include <string.h>
#include <assert.h>
diff --git a/LoadAverageMeter.c b/LoadAverageMeter.c
index 507d3dc3..c52bffc1 100644
--- a/LoadAverageMeter.c
+++ b/LoadAverageMeter.c
@@ -9,7 +9,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
static const int LoadAverageMeter_attributes[] = {
diff --git a/Makefile.am b/Makefile.am
index 600f2afc..0c3b68c0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -56,14 +56,14 @@ myhtopsources = \
ScreenManager.c \
Settings.c \
SignalsPanel.c \
- StringUtils.c \
SwapMeter.c \
TasksMeter.c \
TraceScreen.c \
UptimeMeter.c \
UsersTable.c \
Vector.c \
- XAlloc.c
+ XAlloc.c \
+ XUtils.c
myhtopheaders = \
Action.h \
@@ -108,14 +108,14 @@ myhtopheaders = \
ScreenManager.h \
Settings.h \
SignalsPanel.h \
- StringUtils.h \
SwapMeter.h \
TasksMeter.h \
TraceScreen.h \
UptimeMeter.h \
UsersTable.h \
Vector.h \
- XAlloc.h
+ XAlloc.h \
+ XUtils.h
# Linux
# -----
diff --git a/Meter.c b/Meter.c
index 3edfb233..154a5a64 100644
--- a/Meter.c
+++ b/Meter.c
@@ -10,8 +10,8 @@ in the source distribution for its full text.
#include "RichString.h"
#include "Object.h"
#include "CRT.h"
-#include "StringUtils.h"
#include "Settings.h"
+#include "XUtils.h"
#include <math.h>
#include <string.h>
diff --git a/OpenFilesScreen.c b/OpenFilesScreen.c
index 1973cc45..8e099bbe 100644
--- a/OpenFilesScreen.c
+++ b/OpenFilesScreen.c
@@ -10,8 +10,8 @@ in the source distribution for its full text.
#include "CRT.h"
#include "ProcessList.h"
#include "IncSet.h"
-#include "StringUtils.h"
#include "FunctionBar.h"
+#include "XUtils.h"
#include <string.h>
#include <stdio.h>
diff --git a/Panel.c b/Panel.c
index 06a15c6b..76e45d6e 100644
--- a/Panel.c
+++ b/Panel.c
@@ -10,7 +10,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include "RichString.h"
#include "ListItem.h"
-#include "StringUtils.h"
+#include "XUtils.h"
#include <math.h>
#include <stdbool.h>
diff --git a/Process.c b/Process.c
index 43a4c47e..147caee6 100644
--- a/Process.c
+++ b/Process.c
@@ -12,9 +12,9 @@ in the source distribution for its full text.
#include "config.h"
#include "CRT.h"
-#include "StringUtils.h"
#include "RichString.h"
#include "Platform.h"
+#include "XUtils.h"
#include <stdio.h>
#include <sys/time.h>
diff --git a/ProcessList.c b/ProcessList.c
index 1b364cfc..b7445431 100644
--- a/ProcessList.c
+++ b/ProcessList.c
@@ -6,10 +6,10 @@ in the source distribution for its full text.
*/
#include "ProcessList.h"
-#include "Platform.h"
#include "CRT.h"
-#include "StringUtils.h"
+#include "Platform.h"
+#include "XUtils.h"
#include <stdlib.h>
#include <string.h>
diff --git a/Settings.c b/Settings.c
index 7a90ec47..fd623ad8 100644
--- a/Settings.c
+++ b/Settings.c
@@ -6,11 +6,11 @@ in the source distribution for its full text.
*/
#include "Settings.h"
-#include "Platform.h"
-#include "StringUtils.h"
-#include "Vector.h"
#include "CRT.h"
+#include "Platform.h"
+#include "Vector.h"
+#include "XUtils.h"
#include <sys/stat.h>
#include <stdlib.h>
diff --git a/SignalsPanel.c b/SignalsPanel.c
index e15e6c8d..0ebe16d3 100644
--- a/SignalsPanel.c
+++ b/SignalsPanel.c
@@ -16,7 +16,7 @@ in the source distribution for its full text.
#include "ListItem.h"
#include "Platform.h"
#include "RichString.h"
-#include "StringUtils.h"
+#include "XUtils.h"
Panel* SignalsPanel_new() {
diff --git a/TasksMeter.c b/TasksMeter.c
index ef7e4964..a13766ed 100644
--- a/TasksMeter.c
+++ b/TasksMeter.c
@@ -9,7 +9,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
static const int TasksMeter_attributes[] = {
diff --git a/TraceScreen.c b/TraceScreen.c
index 2956b569..314efc93 100644
--- a/TraceScreen.c
+++ b/TraceScreen.c
@@ -11,8 +11,8 @@ in the source distribution for its full text.
#include "ProcessList.h"
#include "ListItem.h"
#include "IncSet.h"
-#include "StringUtils.h"
#include "FunctionBar.h"
+#include "XUtils.h"
#include <stdio.h>
#include <unistd.h>
diff --git a/UptimeMeter.c b/UptimeMeter.c
index c8e511f1..1011aa10 100644
--- a/UptimeMeter.c
+++ b/UptimeMeter.c
@@ -9,7 +9,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
static const int UptimeMeter_attributes[] = {
diff --git a/UsersTable.c b/UsersTable.c
index 208fc8d8..e37c9038 100644
--- a/UsersTable.c
+++ b/UsersTable.c
@@ -17,8 +17,8 @@ in the source distribution for its full text.
#include <stdlib.h>
#include <assert.h>
-#include "StringUtils.h"
#include "XAlloc.h"
+#include "XUtils.h"
UsersTable* UsersTable_new() {
diff --git a/StringUtils.c b/XUtils.c
index 4eb76968..9228c5e8 100644
--- a/StringUtils.c
+++ b/XUtils.c
@@ -7,7 +7,7 @@ in the source distribution for its full text.
#include "config.h"
-#include "StringUtils.h"
+#include "XUtils.h"
#include <stdarg.h>
#include <stdlib.h>
diff --git a/StringUtils.h b/XUtils.h
index 5a1af9ad..4880d1a1 100644
--- a/StringUtils.h
+++ b/XUtils.h
@@ -1,5 +1,5 @@
-#ifndef HEADER_StringUtils
-#define HEADER_StringUtils
+#ifndef HEADER_XUtils
+#define HEADER_XUtils
/*
htop - StringUtils.h
(C) 2004-2011 Hisham H. Muhammad
diff --git a/htop.c b/htop.c
index 9ce966f7..39aeec1a 100644
--- a/htop.c
+++ b/htop.c
@@ -16,9 +16,9 @@ in the source distribution for its full text.
#include "ProcessList.h"
#include "ScreenManager.h"
#include "Settings.h"
-#include "StringUtils.h"
#include "UsersTable.h"
#include "Platform.h"
+#include "XUtils.h"
#include <getopt.h>
#include <locale.h>
diff --git a/linux/Battery.c b/linux/Battery.c
index 14fcc90b..faf4064c 100644
--- a/linux/Battery.c
+++ b/linux/Battery.c
@@ -7,11 +7,10 @@ in the source distribution for its full text.
Linux battery readings written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
*/
+#include "config.h" // IWYU pragma: keep
+
#include "Battery.h"
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
#include <dirent.h>
#include <errno.h>
#include <unistd.h>
@@ -20,7 +19,9 @@ Linux battery readings written by Ian P. Hands (iphands@gmail.com, ihands@redhat
#include <fcntl.h>
#include <time.h>
#include <math.h>
-#include "StringUtils.h"
+
+#include "XUtils.h"
+
#define SYS_POWERSUPPLY_DIR "/sys/class/power_supply"
diff --git a/linux/IOPriorityPanel.c b/linux/IOPriorityPanel.c
index ce7f01e4..cc1b3916 100644
--- a/linux/IOPriorityPanel.c
+++ b/linux/IOPriorityPanel.c
@@ -7,7 +7,7 @@ in the source distribution for its full text.
#include "IOPriorityPanel.h"
-#include "StringUtils.h"
+#include "XUtils.h"
Panel* IOPriorityPanel_new(IOPriority currPrio) {
diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c
index 9e3c2f89..75900b5a 100644
--- a/linux/LinuxProcess.c
+++ b/linux/LinuxProcess.c
@@ -11,7 +11,7 @@ in the source distribution for its full text.
#include "LinuxProcess.h"
#include "CRT.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
#include <stdlib.h>
#include <unistd.h>
@@ -20,6 +20,7 @@ in the source distribution for its full text.
#include <time.h>
#include <math.h>
+
/* semi-global */
long long btime;
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c
index 6dcc5e5a..57fab842 100644
--- a/linux/LinuxProcessList.c
+++ b/linux/LinuxProcessList.c
@@ -8,7 +8,8 @@ in the source distribution for its full text.
#include "LinuxProcessList.h"
#include "LinuxProcess.h"
#include "CRT.h"
-#include "StringUtils.h"
+#include "XUtils.h"
+
#include <errno.h>
#include <sys/time.h>
#include <sys/utsname.h>
diff --git a/linux/Platform.c b/linux/Platform.c
index 6a3ffab2..feb6b6cf 100644
--- a/linux/Platform.c
+++ b/linux/Platform.c
@@ -30,7 +30,7 @@ in the source distribution for its full text.
#include "zfs/ZfsCompressedArcMeter.h"
#include "LinuxProcess.h"
#include "SELinuxMeter.h"
-#include "StringUtils.h"
+#include "XUtils.h"
#include <math.h>
#include <assert.h>
diff --git a/linux/PressureStallMeter.c b/linux/PressureStallMeter.c
index 518e66c8..4733415f 100644
--- a/linux/PressureStallMeter.c
+++ b/linux/PressureStallMeter.c
@@ -12,7 +12,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
static const int PressureStallMeter_attributes[] = {
diff --git a/zfs/ZfsCompressedArcMeter.c b/zfs/ZfsCompressedArcMeter.c
index def88d02..0153fccb 100644
--- a/zfs/ZfsCompressedArcMeter.c
+++ b/zfs/ZfsCompressedArcMeter.c
@@ -10,7 +10,7 @@ in the source distribution for its full text.
#include "CRT.h"
#include "Platform.h"
-#include "StringUtils.h"
+#include "XUtils.h"
#include <stdlib.h>
#include <string.h>

© 2014-2024 Faster IT GmbH | imprint | privacy policy