From d4a9354a05295e8a07459d2872fa0501ca23cda4 Mon Sep 17 00:00:00 2001 From: THE-Spellchecker Date: Sat, 3 Jan 2026 16:44:16 -0600 Subject: [PATCH] Typographical Fixes --- CommandLine.c | 2 +- docs/styleguide.md | 2 +- dragonflybsd/DragonFlyBSDMachine.c | 2 +- freebsd/FreeBSDMachine.c | 2 +- linux/LinuxProcess.c | 4 ++-- linux/Platform.c | 14 +++++++------- linux/PressureStallMeter.c | 2 +- solaris/Platform.h | 2 +- solaris/SolarisProcess.h | 2 +- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CommandLine.c b/CommandLine.c index 070995f8d..0d0f31d43 100644 --- a/CommandLine.c +++ b/CommandLine.c @@ -426,7 +426,7 @@ int CommandLine_run(int argc, char** argv) { #endif /* NDEBUG */ int r = Settings_write(settings, false); if (r < 0) - fprintf(stderr, "Can not save configuration to %s: %s\n", settings->filename, strerror(-r)); + fprintf(stderr, "Cannot save configuration to %s: %s\n", settings->filename, strerror(-r)); } Header_delete(header); diff --git a/docs/styleguide.md b/docs/styleguide.md index 92e69f5a3..f3371235f 100644 --- a/docs/styleguide.md +++ b/docs/styleguide.md @@ -215,7 +215,7 @@ Thus when you want to use such features you should try to have an alternative av An example for this are functions like `fstatat` on Linux that extend the kernel API on modern systems. But even though it has been around for over a decade you are asked to provide a POSIX alternative like emulating such calls by `fstat` if this is doable. -If an alternative can not be provided you should gracefully downgrade. That could make a feature that requires this shiny API unavailable on systems that lack support for that API. Make this case visually clear to the user. +If an alternative cannot be provided you should gracefully downgrade. That could make a feature that requires this shiny API unavailable on systems that lack support for that API. Make this case visually clear to the user. In general, code written for the project should be able to compile on any C99-compliant compiler. diff --git a/dragonflybsd/DragonFlyBSDMachine.c b/dragonflybsd/DragonFlyBSDMachine.c index 39b86ba48..12f16354a 100644 --- a/dragonflybsd/DragonFlyBSDMachine.c +++ b/dragonflybsd/DragonFlyBSDMachine.c @@ -233,7 +233,7 @@ static void DragonFlyBSDMachine_scanMemoryInfo(Machine* super) { // user_free (avail to procs) = buffers + inactive + cache + free size_t len = sizeof(super->totalMem); - //disabled for now, as it is always smaller than phycal amount of memory... + //disabled for now, as it is always smaller than physical amount of memory... //...to avoid "where is my memory?" questions //sysctl(MIB_vm_stats_vm_v_page_count, 4, &(this->totalMem), &len, NULL, 0); //this->totalMem *= pageSizeKb; diff --git a/freebsd/FreeBSDMachine.c b/freebsd/FreeBSDMachine.c index c42ef705c..f35007b36 100644 --- a/freebsd/FreeBSDMachine.c +++ b/freebsd/FreeBSDMachine.c @@ -331,7 +331,7 @@ static void FreeBSDMachine_scanMemoryInfo(Machine* super) { size_t len; struct vmtotal vmtotal; - //disabled for now, as it is always smaller than phycal amount of memory... + //disabled for now, as it is always smaller than physical amount of memory... //...to avoid "where is my memory?" questions //sysctl(MIB_vm_stats_vm_v_page_count, 4, &(super->totalMem), &len, NULL, 0); //super->totalMem *= this->pageSizeKb; diff --git a/linux/LinuxProcess.c b/linux/LinuxProcess.c index bf5879705..3f917d870 100644 --- a/linux/LinuxProcess.c +++ b/linux/LinuxProcess.c @@ -138,8 +138,8 @@ void Process_delete(Object* cast) { [1] Note that before kernel 2.6.26 a process that has not asked for an io priority formally uses "none" as scheduling class, but the io scheduler will treat such processes as if it were in the best -effort class. The priority within the best effort class will be -dynamically derived from the cpu nice level of the process: +effort class. The priority within the best effort class will be +dynamically derived from the cpu nice level of the process: io_priority = (cpu_nice + 20) / 5. -- From ionice(1) man page */ static int LinuxProcess_effectiveIOPriority(const LinuxProcess* this) { diff --git a/linux/Platform.c b/linux/Platform.c index 5320ca6b7..6597d4b87 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -1042,19 +1042,19 @@ static int dropCapabilities(enum CapMode mode) { cap_t caps = cap_init(); if (caps == NULL) { - fprintf(stderr, "Error: can not initialize capabilities: %s\n", strerror(errno)); + fprintf(stderr, "Error: cannot initialize capabilities: %s\n", strerror(errno)); return -1; } if (cap_clear(caps) < 0) { - fprintf(stderr, "Error: can not clear capabilities: %s\n", strerror(errno)); + fprintf(stderr, "Error: cannot clear capabilities: %s\n", strerror(errno)); cap_free(caps); return -1; } cap_t currCaps = cap_get_proc(); if (currCaps == NULL) { - fprintf(stderr, "Error: can not get current process capabilities: %s\n", strerror(errno)); + fprintf(stderr, "Error: cannot get current process capabilities: %s\n", strerror(errno)); cap_free(caps); return -1; } @@ -1065,7 +1065,7 @@ static int dropCapabilities(enum CapMode mode) { cap_flag_value_t current; if (cap_get_flag(currCaps, keepcaps[i], CAP_PERMITTED, ¤t) < 0) { - fprintf(stderr, "Error: can not get current value of capability %d: %s\n", keepcaps[i], strerror(errno)); + fprintf(stderr, "Error: cannot get current value of capability %d: %s\n", keepcaps[i], strerror(errno)); cap_free(currCaps); cap_free(caps); return -1; @@ -1075,14 +1075,14 @@ static int dropCapabilities(enum CapMode mode) { continue; if (cap_set_flag(caps, CAP_PERMITTED, 1, &keepcaps[i], CAP_SET) < 0) { - fprintf(stderr, "Error: can not set permitted capability %d: %s\n", keepcaps[i], strerror(errno)); + fprintf(stderr, "Error: cannot set permitted capability %d: %s\n", keepcaps[i], strerror(errno)); cap_free(currCaps); cap_free(caps); return -1; } if (cap_set_flag(caps, CAP_EFFECTIVE, 1, &keepcaps[i], CAP_SET) < 0) { - fprintf(stderr, "Error: can not set effective capability %d: %s\n", keepcaps[i], strerror(errno)); + fprintf(stderr, "Error: cannot set effective capability %d: %s\n", keepcaps[i], strerror(errno)); cap_free(currCaps); cap_free(caps); return -1; @@ -1090,7 +1090,7 @@ static int dropCapabilities(enum CapMode mode) { } if (cap_set_proc(caps) < 0) { - fprintf(stderr, "Error: can not set process capabilities: %s\n", strerror(errno)); + fprintf(stderr, "Error: cannot set process capabilities: %s\n", strerror(errno)); cap_free(currCaps); cap_free(caps); return -1; diff --git a/linux/PressureStallMeter.c b/linux/PressureStallMeter.c index 942213ea5..1566d0471 100644 --- a/linux/PressureStallMeter.c +++ b/linux/PressureStallMeter.c @@ -48,7 +48,7 @@ static void PressureStallMeter_updateValues(Meter* this) { Platform_getPressureStall(file, some, &this->values[0], &this->values[1], &this->values[2]); - /* only print bar for ten (not sixty and threehundred), cause the sum is meaningless */ + /* only print bar for ten (not sixty and three hundred), cause the sum is meaningless */ this->curItems = 1; xSnprintf(this->txtBuffer, sizeof(this->txtBuffer), "%s %s %5.2lf%% %5.2lf%% %5.2lf%%", some ? "some" : "full", file, this->values[0], this->values[1], this->values[2]); diff --git a/solaris/Platform.h b/solaris/Platform.h index 9bb09cd13..ce4d142f8 100644 --- a/solaris/Platform.h +++ b/solaris/Platform.h @@ -12,7 +12,7 @@ in the source distribution for its full text. #include /* On OmniOS /usr/include/sys/regset.h redefines ERR to 13 - \r, breaking the Enter key. - * Since ncruses macros use the ERR macro, we can not use another name. + * Since ncruses macros use the ERR macro, we cannot use another name. */ #undef ERR #include diff --git a/solaris/SolarisProcess.h b/solaris/SolarisProcess.h index 292a05f2d..f9e7c7f3c 100644 --- a/solaris/SolarisProcess.h +++ b/solaris/SolarisProcess.h @@ -12,7 +12,7 @@ in the source distribution for its full text. #include /* On OmniOS /usr/include/sys/regset.h redefines ERR to 13 - \r, breaking the Enter key. - * Since ncruses macros use the ERR macro, we can not use another name. + * Since ncruses macros use the ERR macro, we cannot use another name. */ #undef ERR #include