Arkanjo 0.2
A tool for find code duplicated functions in codebases
Loading...
Searching...
No Matches
UtilsOSDependable Class Reference

#include <os_utils.hpp>

Static Public Member Functions

static bool is_bg_color_dark ()
 Determines if terminal background color is dark.
 
static int run_process (const char *cmd, char *const argv[])
 Executes an external program, replacing the current process (exec-style).
 

Detailed Description

Definition at line 19 of file os_utils.hpp.

Member Function Documentation

◆ is_bg_color_dark()

bool UtilsOSDependable::is_bg_color_dark ( )
static

Determines if terminal background color is dark.

Returns
bool True if background is dark (luminance < 0.5), false otherwise
Note
Uses get_terminal_bg_color_luminance() internally

Definition at line 93 of file posix_utils.cpp.

◆ run_process()

int UtilsOSDependable::run_process ( const char * cmd,
char *const argv[] )
static

Executes an external program, replacing the current process (exec-style).

This function launches an external command using the given executable name and argument list.

Parameters
cmdName of the executable (e.g., "git", "ls")
argvArgument vector in C-style format (null-terminated). Example: {"git", "status", nullptr}
Returns
int Returns only on failure (e.g., -1). On success, does not return (POSIX).
Note
  • The command is searched in the system PATH.

Definition at line 97 of file posix_utils.cpp.


The documentation for this class was generated from the following files: