mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 12:27:36 +00:00
Big, possibly complete sweep of naming changes.
This commit is contained in:
parent
27fa09aee4
commit
ffab6897aa
93 changed files with 830 additions and 885 deletions
|
@ -34,7 +34,7 @@ ClockWidget::ClockWidget(GWidget* parent)
|
|||
: GWidget(parent)
|
||||
{
|
||||
set_relative_rect({ 0, 0, 100, 40 });
|
||||
startTimer(250);
|
||||
start_timer(250);
|
||||
}
|
||||
|
||||
void ClockWidget::paint_event(GPaintEvent&)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <AK/AKString.h>
|
||||
|
||||
static unsigned parseUInt(const String& str, bool& ok)
|
||||
static unsigned parse_uint(const String& str, bool& ok)
|
||||
{
|
||||
if (str.is_empty()) {
|
||||
ok = false;
|
||||
|
@ -40,13 +40,13 @@ int main(int argc, char** argv)
|
|||
pid_argi = 2;
|
||||
if (argv[1][0] != '-')
|
||||
print_usage_and_exit();
|
||||
signum = parseUInt(&argv[1][1], ok);
|
||||
signum = parse_uint(&argv[1][1], ok);
|
||||
if (!ok) {
|
||||
printf("'%s' is not a valid signal number\n", &argv[1][1]);
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
unsigned pid = parseUInt(argv[pid_argi], ok);
|
||||
unsigned pid = parse_uint(argv[pid_argi], ok);
|
||||
if (!ok) {
|
||||
printf("'%s' is not a valid PID\n", argv[pid_argi]);
|
||||
return 3;
|
||||
|
|
|
@ -184,12 +184,12 @@ static int sh_cd(int argc, char** argv)
|
|||
else
|
||||
sprintf(pathbuf, "%s/%s", g->cwd.characters(), argv[1]);
|
||||
|
||||
FileSystemPath canonicalPath(pathbuf);
|
||||
if (!canonicalPath.is_valid()) {
|
||||
FileSystemPath canonical_path(pathbuf);
|
||||
if (!canonical_path.is_valid()) {
|
||||
printf("FileSystemPath failed to canonicalize '%s'\n", pathbuf);
|
||||
return 1;
|
||||
}
|
||||
const char* path = canonicalPath.string().characters();
|
||||
const char* path = canonical_path.string().characters();
|
||||
|
||||
struct stat st;
|
||||
int rc = stat(path, &st);
|
||||
|
@ -206,7 +206,7 @@ static int sh_cd(int argc, char** argv)
|
|||
printf("chdir(%s) failed: %s\n", path, strerror(errno));
|
||||
return 1;
|
||||
}
|
||||
g->cwd = canonicalPath.string();
|
||||
g->cwd = canonical_path.string();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <signal.h>
|
||||
#include <AK/AKString.h>
|
||||
|
||||
static unsigned parseUInt(const String& str, bool& ok)
|
||||
static unsigned parse_uint(const String& str, bool& ok)
|
||||
{
|
||||
unsigned value = 0;
|
||||
for (size_t i = 0; i < str.length(); ++i) {
|
||||
|
@ -29,7 +29,7 @@ int main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
bool ok;
|
||||
unsigned secs = parseUInt(argv[1], ok);
|
||||
unsigned secs = parse_uint(argv[1], ok);
|
||||
if (!ok) {
|
||||
fprintf(stderr, "Not a valid number of seconds: \"%s\"\n", argv[1]);
|
||||
return 1;
|
||||
|
|
|
@ -84,7 +84,7 @@ static String read_var(const String& name)
|
|||
StringBuilder builder;
|
||||
builder.append("/proc/sys/");
|
||||
builder.append(name);
|
||||
auto path = builder.build();
|
||||
auto path = builder.to_string();
|
||||
int fd = open(path.characters(), O_RDONLY);
|
||||
if (fd < 0) {
|
||||
perror("open");
|
||||
|
@ -105,7 +105,7 @@ static void write_var(const String& name, const String& value)
|
|||
StringBuilder builder;
|
||||
builder.append("/proc/sys/");
|
||||
builder.append(name);
|
||||
auto path = builder.build();
|
||||
auto path = builder.to_string();
|
||||
int fd = open(path.characters(), O_WRONLY);
|
||||
if (fd < 0) {
|
||||
perror("open");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue