VLC  4.0.0-dev
Macros | Functions | Variables
help.c File Reference
Include dependency graph for help.c:

Macros

#define ShowConsole()   (void)0
 
#define PauseConsole()   (void)0
 
#define COL(x)   "\033[" #x ";1m"
 
#define RED   COL(31)
 
#define GREEN   COL(32)
 
#define YELLOW   COL(33)
 
#define BLUE   COL(34)
 
#define MAGENTA   COL(35)
 
#define CYAN   COL(36)
 
#define WHITE   COL(0)
 
#define GRAY   "\033[0m"
 
#define LINE_START   8
 
#define PADDING_SPACES   25
 
#define OPTION_VALUE_SEP   " "
 

Functions

static void Help (vlc_object_t *, const char *)
 
static void Usage (vlc_object_t *, const char *)
 
static void Version (void)
 
static void ListModules (vlc_object_t *, bool)
 
static unsigned ConsoleWidth (void)
 Returns the console width or a best guess. More...
 
bool config_PrintHelp (vlc_object_t *obj)
 Checks for help command line options such as –help or –version. More...
 
static void print_help_on_full_help (void)
 
static void print_section (const module_t *m, const module_config_t **sect, bool color, bool desc)
 
static void print_desc (const char *str, unsigned margin, bool color)
 
static int vlc_swidth (const char *str)
 
static void print_item (const module_t *m, const module_config_t *item, const module_config_t **section, bool color, bool desc)
 
static bool module_match (const module_t *m, const char *pattern, bool strict)
 
static bool plugin_show (const vlc_plugin_t *plugin)
 

Variables

static const char vlc_usage []
 

Macro Definition Documentation

◆ BLUE

#define BLUE   COL(34)

Referenced by print_desc().

◆ COL

#define COL (   x)    "\033[" #x ";1m"

◆ CYAN

#define CYAN   COL(36)

Referenced by ListModules(), print_item(), and Usage().

◆ GRAY

#define GRAY   "\033[0m"

◆ GREEN

#define GREEN   COL(32)

Referenced by ListModules(), print_item(), and Usage().

◆ LINE_START

#define LINE_START   8

Referenced by print_item().

◆ MAGENTA

#define MAGENTA   COL(35)

Referenced by ListModules(), and print_section().

◆ OPTION_VALUE_SEP

#define OPTION_VALUE_SEP   " "

Referenced by print_item().

◆ PADDING_SPACES

#define PADDING_SPACES   25

Referenced by print_item().

◆ PauseConsole

#define PauseConsole ( )    (void)0

Referenced by Help(), ListModules(), and Version().

◆ RED

#define RED   COL(31)

Referenced by print_section().

◆ ShowConsole

#define ShowConsole ( )    (void)0

Referenced by Help(), ListModules(), and Version().

◆ WHITE

#define WHITE   COL(0)

Referenced by ListModules(), print_item(), and Usage().

◆ YELLOW

#define YELLOW   COL(33)

Referenced by print_item().

Function Documentation

◆ config_PrintHelp()

bool config_PrintHelp ( vlc_object_t obj)

Checks for help command line options such as –help or –version.

If one is found, print the corresponding text.

Returns
true if a command line options caused some help message to be printed, false otherwise.

References Help(), ListModules(), var_Create(), var_InheritBool(), var_InheritString(), var_SetBool(), Version(), and VLC_VAR_BOOL.

Referenced by libvlc_InternalInit().

◆ ConsoleWidth()

static unsigned ConsoleWidth ( void  )
static

Returns the console width or a best guess.

Referenced by print_desc().

◆ Help()

static void Help ( vlc_object_t p_this,
const char *  psz_help_name 
)
static

◆ ListModules()

static void ListModules ( vlc_object_t p_this,
bool  b_verbose 
)
static

◆ module_match()

static bool module_match ( const module_t m,
const char *  pattern,
bool  strict 
)
static

◆ plugin_show()

static bool plugin_show ( const vlc_plugin_t plugin)
static

◆ print_desc()

static void print_desc ( const char *  str,
unsigned  margin,
bool  color 
)
static

References BLUE, ConsoleWidth(), GRAY, unlikely, and vlc_towc().

Referenced by print_item().

◆ print_help_on_full_help()

static void print_help_on_full_help ( void  )
inlinestatic

References _.

Referenced by Help().

◆ print_item()

static void print_item ( const module_t m,
const module_config_t item,
const module_config_t **  section,
bool  color,
bool  desc 
)
static

◆ print_section()

static void print_section ( const module_t m,
const module_config_t **  sect,
bool  color,
bool  desc 
)
static

◆ Usage()

static void Usage ( vlc_object_t p_this,
const char *  psz_search 
)
static

◆ Version()

static void Version ( void  )
static

◆ vlc_swidth()

static int vlc_swidth ( const char *  str)
static

References vlc_towc().

Referenced by print_item().

Variable Documentation

◆ vlc_usage

const char vlc_usage[]
static

Referenced by Help().