ARB
Functions
arb_misc.h File Reference
#include <attributes.h>
#include <cstdlib>
Include dependency graph for arb_misc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

const charGBS_readable_size (unsigned long long size, const char *unit_suffix)
 
const charGBS_readable_timediff (size_t seconds)
 
const charARB_float_2_ascii (const float f)
 
const charARB_getenv_ignore_empty (const char *envvar)
 
charARB_executable (const char *exe_name, const char *path)
 
char ARB_path_contains_unwanted_chars (const char *path)
 
void ARB_warn_about_unwanted_chars (const char *path, const char *path_description)
 

Function Documentation

const char* GBS_readable_size ( unsigned long long  size,
const char unit_suffix 
)
const char* GBS_readable_timediff ( size_t  seconds)

Definition at line 46 of file arb_misc.cxx.

References arb_assert, and buffer.

Referenced by ARB_main(), BasicStatus::set_gauge(), and start_pt_server().

const char* ARB_float_2_ascii ( const float  f)

calculate the "best" ascii representation for float 'f'

  • smaller conversion error is better
  • shorter representation is better (for equal conversion errors)

Definition at line 66 of file arb_misc.cxx.

References arb_assert, buffer, NULp, and result.

Referenced by dump_internal(), GB_read_as_string(), and gb_write_one_child().

const char* ARB_getenv_ignore_empty ( const char envvar)
char* ARB_executable ( const char exe_name,
const char path 
)

Search for full executable.

Parameters
exe_namename of executable (e.g. 'arb_edit4'). When specified with full path -> accepted as is.
pathcolon separated list of directories (as contained in environment variable PATH)
Returns
executable with full directory path

Definition at line 107 of file arb_misc.cxx.

References ARB_strdup(), buffer, GB_is_executablefile(), NULp, and start.

Referenced by ARB_zfopen(), detect_sina_version(), GB_find_executable(), and getenv_executable().

char ARB_path_contains_unwanted_chars ( const char path)
void ARB_warn_about_unwanted_chars ( const char path,
const char path_description 
)