Rename StringUtils.[ch] to XUtils.[ch]

This commit is contained in:
Benny Baumann 2020-10-14 20:21:09 +02:00
parent c6f04a9c5d
commit 872e542f4e
41 changed files with 55 additions and 51 deletions

View File

@ -19,9 +19,9 @@ in the source distribution for its full text.
#include "Process.h" #include "Process.h"
#include "ScreenManager.h" #include "ScreenManager.h"
#include "SignalsPanel.h" #include "SignalsPanel.h"
#include "StringUtils.h"
#include "TraceScreen.h" #include "TraceScreen.h"
#include "Platform.h" #include "Platform.h"
#include "XUtils.h"
#include <ctype.h> #include <ctype.h>
#include <math.h> #include <math.h>

View File

@ -13,8 +13,8 @@ in the source distribution for its full text.
#include <string.h> #include <string.h>
#include "CRT.h" #include "CRT.h"
#include "StringUtils.h"
#include "Vector.h" #include "Vector.h"
#include "XUtils.h"
#ifdef HAVE_LIBHWLOC #ifdef HAVE_LIBHWLOC
#include <hwloc.h> #include <hwloc.h>

View File

@ -15,7 +15,7 @@ in the source distribution for its full text.
#include "ColumnsPanel.h" #include "ColumnsPanel.h"
#include "Header.h" #include "Header.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
static const char* const AvailableColumnsFunctions[] = {" ", " ", " ", " ", "Add ", " ", " ", " ", " ", "Done ", NULL}; static const char* const AvailableColumnsFunctions[] = {" ", " ", " ", " ", "Add ", " ", " ", " ", " ", "Done ", NULL};

View File

@ -12,7 +12,7 @@ in the source distribution for its full text.
#include "Header.h" #include "Header.h"
#include "ListItem.h" #include "ListItem.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -12,8 +12,8 @@ This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
#include "Battery.h" #include "Battery.h"
#include "ProcessList.h" #include "ProcessList.h"
#include "CRT.h" #include "CRT.h"
#include "StringUtils.h"
#include "Platform.h" #include "Platform.h"
#include "XUtils.h"
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>

View File

@ -10,7 +10,7 @@ in the source distribution for its full text.
#include "CRT.h" #include "CRT.h"
#include "Settings.h" #include "Settings.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>

2
CRT.c
View File

@ -8,8 +8,8 @@ in the source distribution for its full text.
#include "config.h" #include "config.h"
#include "CRT.h" #include "CRT.h"
#include "StringUtils.h"
#include "RichString.h" #include "RichString.h"
#include "XUtils.h"
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>

View File

@ -9,7 +9,7 @@ in the source distribution for its full text.
#include "CRT.h" #include "CRT.h"
#include "CheckItem.h" #include "CheckItem.h"
#include "StringUtils.h" #include "XUtils.h"
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -8,7 +8,7 @@ in the source distribution for its full text.
#include "ColumnsPanel.h" #include "ColumnsPanel.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
#include "ListItem.h" #include "ListItem.h"
#include "CRT.h" #include "CRT.h"

View File

@ -5,7 +5,7 @@
#include "IncSet.h" #include "IncSet.h"
#include "ListItem.h" #include "ListItem.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -11,7 +11,7 @@ in the source distribution for its full text.
#include "CRT.h" #include "CRT.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
static const int DiskIOMeter_attributes[] = { static const int DiskIOMeter_attributes[] = {

View File

@ -13,7 +13,7 @@ in the source distribution for its full text.
#include "CheckItem.h" #include "CheckItem.h"
#include "CRT.h" #include "CRT.h"
#include "StringUtils.h" #include "XUtils.h"
static const char* const DisplayOptionsFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL}; static const char* const DisplayOptionsFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL};

View File

@ -5,7 +5,7 @@
#include "IncSet.h" #include "IncSet.h"
#include "ListItem.h" #include "ListItem.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -8,8 +8,8 @@ in the source distribution for its full text.
#include "FunctionBar.h" #include "FunctionBar.h"
#include "CRT.h" #include "CRT.h"
#include "RichString.h" #include "RichString.h"
#include "StringUtils.h"
#include "XAlloc.h" #include "XAlloc.h"
#include "XUtils.h"
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>

View File

@ -8,8 +8,8 @@ in the source distribution for its full text.
#include "Header.h" #include "Header.h"
#include "CRT.h" #include "CRT.h"
#include "StringUtils.h"
#include "Platform.h" #include "Platform.h"
#include "XUtils.h"
#include <assert.h> #include <assert.h>
#include <time.h> #include <time.h>

View File

@ -6,9 +6,10 @@ in the source distribution for its full text.
*/ */
#include "IncSet.h" #include "IncSet.h"
#include "StringUtils.h"
#include "ListItem.h" #include "ListItem.h"
#include "CRT.h" #include "CRT.h"
#include "XUtils.h"
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -6,7 +6,7 @@
#include "IncSet.h" #include "IncSet.h"
#include "ListItem.h" #include "ListItem.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -8,8 +8,8 @@ in the source distribution for its full text.
#include "ListItem.h" #include "ListItem.h"
#include "CRT.h" #include "CRT.h"
#include "StringUtils.h"
#include "RichString.h" #include "RichString.h"
#include "XUtils.h"
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>

View File

@ -9,7 +9,7 @@ in the source distribution for its full text.
#include "CRT.h" #include "CRT.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
static const int LoadAverageMeter_attributes[] = { static const int LoadAverageMeter_attributes[] = {

View File

@ -56,14 +56,14 @@ myhtopsources = \
ScreenManager.c \ ScreenManager.c \
Settings.c \ Settings.c \
SignalsPanel.c \ SignalsPanel.c \
StringUtils.c \
SwapMeter.c \ SwapMeter.c \
TasksMeter.c \ TasksMeter.c \
TraceScreen.c \ TraceScreen.c \
UptimeMeter.c \ UptimeMeter.c \
UsersTable.c \ UsersTable.c \
Vector.c \ Vector.c \
XAlloc.c XAlloc.c \
XUtils.c
myhtopheaders = \ myhtopheaders = \
Action.h \ Action.h \
@ -108,14 +108,14 @@ myhtopheaders = \
ScreenManager.h \ ScreenManager.h \
Settings.h \ Settings.h \
SignalsPanel.h \ SignalsPanel.h \
StringUtils.h \
SwapMeter.h \ SwapMeter.h \
TasksMeter.h \ TasksMeter.h \
TraceScreen.h \ TraceScreen.h \
UptimeMeter.h \ UptimeMeter.h \
UsersTable.h \ UsersTable.h \
Vector.h \ Vector.h \
XAlloc.h XAlloc.h \
XUtils.h
# Linux # Linux
# ----- # -----

View File

@ -10,8 +10,8 @@ in the source distribution for its full text.
#include "RichString.h" #include "RichString.h"
#include "Object.h" #include "Object.h"
#include "CRT.h" #include "CRT.h"
#include "StringUtils.h"
#include "Settings.h" #include "Settings.h"
#include "XUtils.h"
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>

View File

@ -10,8 +10,8 @@ in the source distribution for its full text.
#include "CRT.h" #include "CRT.h"
#include "ProcessList.h" #include "ProcessList.h"
#include "IncSet.h" #include "IncSet.h"
#include "StringUtils.h"
#include "FunctionBar.h" #include "FunctionBar.h"
#include "XUtils.h"
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>

View File

@ -10,7 +10,7 @@ in the source distribution for its full text.
#include "CRT.h" #include "CRT.h"
#include "RichString.h" #include "RichString.h"
#include "ListItem.h" #include "ListItem.h"
#include "StringUtils.h" #include "XUtils.h"
#include <math.h> #include <math.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -12,9 +12,9 @@ in the source distribution for its full text.
#include "config.h" #include "config.h"
#include "CRT.h" #include "CRT.h"
#include "StringUtils.h"
#include "RichString.h" #include "RichString.h"
#include "Platform.h" #include "Platform.h"
#include "XUtils.h"
#include <stdio.h> #include <stdio.h>
#include <sys/time.h> #include <sys/time.h>

View File

@ -6,10 +6,10 @@ in the source distribution for its full text.
*/ */
#include "ProcessList.h" #include "ProcessList.h"
#include "Platform.h"
#include "CRT.h" #include "CRT.h"
#include "StringUtils.h" #include "Platform.h"
#include "XUtils.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -6,11 +6,11 @@ in the source distribution for its full text.
*/ */
#include "Settings.h" #include "Settings.h"
#include "Platform.h"
#include "StringUtils.h"
#include "Vector.h"
#include "CRT.h" #include "CRT.h"
#include "Platform.h"
#include "Vector.h"
#include "XUtils.h"
#include <sys/stat.h> #include <sys/stat.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -16,7 +16,7 @@ in the source distribution for its full text.
#include "ListItem.h" #include "ListItem.h"
#include "Platform.h" #include "Platform.h"
#include "RichString.h" #include "RichString.h"
#include "StringUtils.h" #include "XUtils.h"
Panel* SignalsPanel_new() { Panel* SignalsPanel_new() {

View File

@ -9,7 +9,7 @@ in the source distribution for its full text.
#include "CRT.h" #include "CRT.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
static const int TasksMeter_attributes[] = { static const int TasksMeter_attributes[] = {

View File

@ -11,8 +11,8 @@ in the source distribution for its full text.
#include "ProcessList.h" #include "ProcessList.h"
#include "ListItem.h" #include "ListItem.h"
#include "IncSet.h" #include "IncSet.h"
#include "StringUtils.h"
#include "FunctionBar.h" #include "FunctionBar.h"
#include "XUtils.h"
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>

View File

@ -9,7 +9,7 @@ in the source distribution for its full text.
#include "CRT.h" #include "CRT.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
static const int UptimeMeter_attributes[] = { static const int UptimeMeter_attributes[] = {

View File

@ -17,8 +17,8 @@ in the source distribution for its full text.
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
#include "StringUtils.h"
#include "XAlloc.h" #include "XAlloc.h"
#include "XUtils.h"
UsersTable* UsersTable_new() { UsersTable* UsersTable_new() {

View File

@ -7,7 +7,7 @@ in the source distribution for its full text.
#include "config.h" #include "config.h"
#include "StringUtils.h" #include "XUtils.h"
#include <stdarg.h> #include <stdarg.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,5 +1,5 @@
#ifndef HEADER_StringUtils #ifndef HEADER_XUtils
#define HEADER_StringUtils #define HEADER_XUtils
/* /*
htop - StringUtils.h htop - StringUtils.h
(C) 2004-2011 Hisham H. Muhammad (C) 2004-2011 Hisham H. Muhammad

2
htop.c
View File

@ -16,9 +16,9 @@ in the source distribution for its full text.
#include "ProcessList.h" #include "ProcessList.h"
#include "ScreenManager.h" #include "ScreenManager.h"
#include "Settings.h" #include "Settings.h"
#include "StringUtils.h"
#include "UsersTable.h" #include "UsersTable.h"
#include "Platform.h" #include "Platform.h"
#include "XUtils.h"
#include <getopt.h> #include <getopt.h>
#include <locale.h> #include <locale.h>

View File

@ -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). Linux battery readings written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com).
*/ */
#include "config.h" // IWYU pragma: keep
#include "Battery.h" #include "Battery.h"
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <dirent.h> #include <dirent.h>
#include <errno.h> #include <errno.h>
#include <unistd.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 <fcntl.h>
#include <time.h> #include <time.h>
#include <math.h> #include <math.h>
#include "StringUtils.h"
#include "XUtils.h"
#define SYS_POWERSUPPLY_DIR "/sys/class/power_supply" #define SYS_POWERSUPPLY_DIR "/sys/class/power_supply"

View File

@ -7,7 +7,7 @@ in the source distribution for its full text.
#include "IOPriorityPanel.h" #include "IOPriorityPanel.h"
#include "StringUtils.h" #include "XUtils.h"
Panel* IOPriorityPanel_new(IOPriority currPrio) { Panel* IOPriorityPanel_new(IOPriority currPrio) {

View File

@ -11,7 +11,7 @@ in the source distribution for its full text.
#include "LinuxProcess.h" #include "LinuxProcess.h"
#include "CRT.h" #include "CRT.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
@ -20,6 +20,7 @@ in the source distribution for its full text.
#include <time.h> #include <time.h>
#include <math.h> #include <math.h>
/* semi-global */ /* semi-global */
long long btime; long long btime;

View File

@ -8,7 +8,8 @@ in the source distribution for its full text.
#include "LinuxProcessList.h" #include "LinuxProcessList.h"
#include "LinuxProcess.h" #include "LinuxProcess.h"
#include "CRT.h" #include "CRT.h"
#include "StringUtils.h" #include "XUtils.h"
#include <errno.h> #include <errno.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/utsname.h> #include <sys/utsname.h>

View File

@ -30,7 +30,7 @@ in the source distribution for its full text.
#include "zfs/ZfsCompressedArcMeter.h" #include "zfs/ZfsCompressedArcMeter.h"
#include "LinuxProcess.h" #include "LinuxProcess.h"
#include "SELinuxMeter.h" #include "SELinuxMeter.h"
#include "StringUtils.h" #include "XUtils.h"
#include <math.h> #include <math.h>
#include <assert.h> #include <assert.h>

View File

@ -12,7 +12,7 @@ in the source distribution for its full text.
#include "CRT.h" #include "CRT.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
static const int PressureStallMeter_attributes[] = { static const int PressureStallMeter_attributes[] = {

View File

@ -10,7 +10,7 @@ in the source distribution for its full text.
#include "CRT.h" #include "CRT.h"
#include "Platform.h" #include "Platform.h"
#include "StringUtils.h" #include "XUtils.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>