VLC  4.0.0-dev
vlc_getopt.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Declarations for getopt_long()
3  *****************************************************************************
4  * Copyright (C) 1987-1997 Free Software Foundation, Inc.
5  * Copyright (C) 2005-2010 VLC authors and VideoLAN
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as published by
9  * the Free Software Foundation; either version 2.1 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this program; if not, write to the Free Software Foundation,
19  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
20  *****************************************************************************/
21 
22 #ifndef VLC_GETOPT_H
23 #define VLC_GETOPT_H 1
24 
25 typedef struct vlc_getopt_s
26 {
27 /* For communication from `getopt' to the caller.
28  When `getopt' finds an option that takes an argument,
29  the argument value is returned here. */
30 
31  char *arg;
32 
33 /* Index in ARGV of the next element to be scanned.
34  This is used for communication to and from the caller
35  and for communication between successive calls to `getopt'.
36 
37  On entry to `getopt', zero means this is the first call; initialize.
38 
39  When `getopt' returns -1, this is the index of the first of the
40  non-option elements that the caller should itself scan.
41 
42  Otherwise, `optind' communicates from one call to the next
43  how much of ARGV has been scanned so far. */
44 
45  int ind;
46 
47 /* Set to an option character which was unrecognized. */
48 
49  int opt;
50 
51 /* The next char to be scanned in the option-element
52  in which the last option character we returned was found.
53  This allows us to pick up the scan where we left off.
54 
55  If this is zero, or a null string, it means resume the scan
56  by advancing to the next ARGV-element. */
57 
58  char *nextchar;
59 
60 /* Handle permutation of arguments. */
61 
62 /* Describe the part of ARGV that contains non-options that have
63  been skipped. `first_nonopt' is the index in ARGV of the first of them;
64  `last_nonopt' is the index after the last of them. */
65 
66  int first_nonopt;
67  int last_nonopt;
68 
69 } vlc_getopt_t;
70 
71 /* Describe the long-named options requested by the application.
72  The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
73  of `struct option' terminated by an element containing a name which is
74  zero.
75 
76  The field `has_arg' is:
77  false if the option does not take an argument,
78  true if the option requires an argument.
79 
80  If the field `flag' is not NULL, it points to a variable that is set
81  to the value given in the field `val' when the option is found, but
82  left unchanged if the option is not found.
83 
84  To have a long-named option do something other than set an `int' to
85  a compiled-in constant, such as set a value from `optarg', set the
86  option's `flag' field to zero and its `val' field to a nonzero
87  value (the equivalent single-letter option character, if there is
88  one). For long options that have a zero `flag' field, `getopt'
89  returns the contents of the `val' field. */
90 
91 struct vlc_option
92 {
93  const char *name;
94  bool has_arg;
95  int *flag;
96  int val;
97 };
98 
99 extern int vlc_getopt_long(int argc, char *const *argv, const char *shortopts,
100  const struct vlc_option *longopts, int *longind,
101  vlc_getopt_t *restrict state);
102 
103 #endif /* VLC_GETOPT_H */
module_config_t::psz_name
const char * psz_name
Option name.
Definition: vlc_configuration.h:86
psz_vlc_changeset
const char psz_vlc_changeset[]
vlc_towc
size_t vlc_towc(const char *str, uint32_t *restrict pwc)
Decodes a code point from UTF-8.
Definition: unicode.c:113
vlc_getopt.h
vlc_option::name
const char * name
Definition: vlc_getopt.h:93
vlc_http_res_init
int vlc_http_res_init(struct vlc_http_resource *restrict res, const struct vlc_http_resource_cbs *cbs, struct vlc_http_mgr *mgr, const char *uri, const char *ua, const char *ref)
Definition: resource.c:168
count
size_t count
Definition: core.c:401
exchange
static void exchange(char **argv, vlc_getopt_t *restrict state)
Definition: getopt.c:41
BLUE
#define BLUE
Definition: help.c:237
print_help_on_full_help
static void print_help_on_full_help(void)
Definition: help.c:159
var_Create
int() var_Create(vlc_object_t *p_this, const char *psz_name, int i_type)
Creates a VLC object variable.
Definition: variables.c:291
PADDING_SPACES
#define PADDING_SPACES
Definition: help.c:243
atof
double atof(const char *)
config_FindConfig
module_config_t * config_FindConfig(const char *name)
Looks up a configuration item.
Definition: core.c:452
vlc_rwlock_rdlock
void vlc_rwlock_rdlock(vlc_rwlock_t *lock)
Acquires a read/write lock for reading.
Definition: threads.c:394
confnamecmp
static int confnamecmp(const void *key, const void *elem)
Definition: core.c:391
var_InheritBool
static bool var_InheritBool(vlc_object_t *obj, const char *name)
Definition: vlc_variables.h:675
OPTION_VALUE_SEP
#define OPTION_VALUE_SEP
config_CreateDir
static int config_CreateDir(vlc_object_t *p_this, char *psz_dirname)
Definition: file.c:270
module_list_get
module_t ** module_list_get(size_t *n)
Gets the flat list of VLC modules.
Definition: bank.c:765
vlc_http_file_can_seek
bool vlc_http_file_can_seek(struct vlc_http_resource *res)
Checks seeking support.
Definition: file.c:196
psz_name
const char * psz_name
Definition: text_style.c:53
MAGENTA
#define MAGENTA
Definition: help.c:238
vlc_getopt_long
int vlc_getopt_long(int argc, char *const *argv, const char *optstring, const struct vlc_option *restrict longopts, int *longind, vlc_getopt_t *restrict state)
Definition: getopt.c:146
vlc_http_res_open
struct vlc_http_msg * vlc_http_res_open(struct vlc_http_resource *res, void *opaque)
Definition: resource.c:84
vlc_plugin_t::conf
struct vlc_plugin_t::@96 conf
Variables set by the module to store its config options.
vlc_open
int vlc_open(const char *filename, int flags,...)
Opens a system file handle.
Definition: filesystem.c:52
unlikely
#define unlikely(p)
Predicted false condition.
Definition: vlc_common.h:227
LINE_START
#define LINE_START
Definition: help.c:242
vlc_common.h
CONFIG_ITEM_FLOAT
#define CONFIG_ITEM_FLOAT
Definition: vlc_plugin.h:120
module_t::pp_shortcuts
const char ** pp_shortcuts
Definition: modules.h:85
CONFIG_ITEM_STRING
#define CONFIG_ITEM_STRING
Definition: vlc_plugin.h:124
module_config_t::psz_text
const char * psz_text
Short comment on the configuration option.
Definition: vlc_configuration.h:87
ConsoleWidth
static unsigned ConsoleWidth(void)
Returns the console width or a best guess.
Definition: help.c:66
VLC_CompileHost
const char * VLC_CompileHost(void)
Definition: version.c:44
module_get_object
const char * module_get_object(const module_t *m)
Gets the internal name of a module.
Definition: modules.c:50
DIR_SEP
#define DIR_SEP
Definition: vlc_common.h:1221
VLC_CompileBy
const char * VLC_CompileBy(void)
Definition: version.c:43
module_config_t::list_text
const char ** list_text
Human-readable names for list values.
Definition: vlc_configuration.h:102
vlc_http_file_callbacks
static const struct vlc_http_resource_cbs vlc_http_file_callbacks
Definition: file.c:107
module_gettext
const char * module_gettext(const module_t *m, const char *str)
Translates a string using the module's text domain.
Definition: modules.c:82
IsConfigIntegerType
#define IsConfigIntegerType(type)
Definition: configuration.h:47
vlc_getopt_s::opt
int opt
Definition: vlc_getopt.h:68
block_t::i_buffer
size_t i_buffer
Payload length.
Definition: vlc_block.h:122
print_item
static void print_item(const module_t *m, const module_config_t *item, const module_config_t **section, bool color, bool desc)
Definition: help.c:346
msg_Info
#define msg_Info(p_this,...)
Definition: vlc_messages.h:100
vlc_plugin_t
VLC plugin.
Definition: modules.h:29
i_value
uint32_t i_value
Definition: text_style.c:54
vlc_rwlock
Read/write lock.
Definition: vlc_threads.h:532
config_AddIntf
void config_AddIntf(const char *psz_intf)
Definition: intf.c:32
uselocale
static locale_t uselocale(locale_t loc)
Definition: vlc_fixups.h:359
vlc_swidth
static int vlc_swidth(const char *str)
Definition: help.c:326
vlc_http_msg_destroy
void vlc_http_msg_destroy(struct vlc_http_msg *m)
Destroys an HTTP message.
Definition: message.c:193
module_config_t::i
const int * i
Table of possible integer choices.
Definition: vlc_configuration.h:100
locale_t
void * locale_t
Definition: vlc_fixups.h:344
print_section
static void print_section(const module_t *m, const module_config_t **sect, bool color, bool desc)
Definition: help.c:245
module_t::i_shortcuts
unsigned i_shortcuts
Shortcuts to the module.
Definition: modules.h:84
Usage
static void Usage(vlc_object_t *, const char *)
Definition: help.c:581
config_GetPszChoices
ssize_t config_GetPszChoices(const char *name, char ***restrict values, char ***restrict texts)
Definition: core.c:310
module_config_t::orig
module_value_t orig
Default value.
Definition: vlc_configuration.h:91
module_list_free
void module_list_free(module_t **list)
Frees the flat list of VLC modules.
Definition: bank.c:754
vlc_http_resource::response
struct vlc_http_msg * response
Definition: resource.h:46
vlc_http_mgr
Definition: connmgr.c:99
vlc_charset.h
VLC_VAR_BOOL
#define VLC_VAR_BOOL
Definition: vlc_variables.h:49
config_ExistIntf
bool config_ExistIntf(const char *psz_intf)
Definition: intf.c:135
CONFIG_SECTION
#define CONFIG_SECTION
Definition: vlc_plugin.h:117
config_UnsortConfig
void config_UnsortConfig(void)
Definition: core.c:441
module_value_t::psz
char * psz
Definition: vlc_configuration.h:62
msg_Dbg
#define msg_Dbg(p_this,...)
Definition: vlc_messages.h:106
vlc_http_file_get_size
uintmax_t vlc_http_file_get_size(struct vlc_http_resource *res)
Gets file size.
Definition: file.c:178
_
#define _(str)
Definition: vlc_fixups.h:374
vlc_getopt_s::ind
int ind
Definition: vlc_getopt.h:64
vlc_mkdir
int vlc_mkdir(const char *dirname, mode_t mode)
Creates a directory.
Definition: filesystem.c:96
var_InheritString
static char * var_InheritString(vlc_object_t *obj, const char *name)
Definition: vlc_variables.h:705
vlc_option::has_arg
bool has_arg
Definition: vlc_getopt.h:94
VLC_EGENERIC
#define VLC_EGENERIC
Unspecified error.
Definition: vlc_common.h:474
IsConfigStringType
#define IsConfigStringType(type)
Definition: configuration.h:45
VLC_Compiler
const char * VLC_Compiler(void)
Definition: version.c:45
CONFIG_CLASS
#define CONFIG_CLASS(x)
Definition: configuration.h:43
VLC_VAR_INTEGER
#define VLC_VAR_INTEGER
Definition: vlc_variables.h:50
VLC_VAR_STRING
#define VLC_VAR_STRING
Definition: vlc_variables.h:51
getenv
static char * getenv(const char *name)
Definition: vlc_fixups.h:292
freelocale
static void freelocale(locale_t loc)
Definition: vlc_fixups.h:346
VLC_VAR_FLOAT
#define VLC_VAR_FLOAT
Definition: vlc_variables.h:52
vlc_option::val
int val
Definition: vlc_getopt.h:96
resource.h
vlc_gettext
const char * vlc_gettext(const char *msgid)
In-tree plugins share their gettext domain with LibVLC.
Definition: textdomain.c:79
VLC_STATIC_MUTEX
#define VLC_STATIC_MUTEX
Static initializer for (static) mutex.
Definition: vlc_threads.h:249
vlc_http_msg_add_header
int vlc_http_msg_add_header(struct vlc_http_msg *m, const char *name, const char *fmt,...)
Definition: message.c:144
asprintf
int asprintf(char **, const char *,...)
config_dirty
bool config_dirty
Definition: core.c:41
VLC_HOME_DIR
@ VLC_HOME_DIR
Definition: vlc_configuration.h:307
config_GetType
int config_GetType(const char *psz_name)
Gets a configuration item type.
Definition: core.c:48
vlc_mutex_t
Mutex.
Definition: vlc_threads.h:225
config_GetConfigFile
static char * config_GetConfigFile(vlc_object_t *obj)
Get the user's configuration file.
Definition: file.c:58
vlc_getopt_s::nextchar
char * nextchar
Definition: vlc_getopt.h:77
vlc_getopt_s::last_nonopt
int last_nonopt
Definition: vlc_getopt.h:86
vlc_http_file_resp
static int vlc_http_file_resp(const struct vlc_http_resource *res, const struct vlc_http_msg *resp, void *opaque)
Definition: file.c:78
vlc_getopt_s::arg
char * arg
Definition: vlc_getopt.h:50
RED
#define RED
Definition: help.c:234
msg_Warn
#define msg_Warn(p_this,...)
Definition: vlc_messages.h:104
module_t::psz_help
const char * psz_help
Long help string for "special" modules.
Definition: modules.h:92
module_config_t::owner
void * owner
Origin run-time linker module handle.
Definition: vlc_configuration.h:103
vlc_assert_unreachable
#define vlc_assert_unreachable()
Impossible branch assertion.
Definition: vlc_common.h:253
vlc_fopen
FILE * vlc_fopen(const char *filename, const char *mode)
Opens a FILE pointer.
Definition: filesystem.c:49
config_GetUserDir
char * config_GetUserDir(vlc_userdir_t type)
Definition: specific.c:273
module_t::i_score
int i_score
Score for the capability.
Definition: modules.h:95
vlc_plugins
vlc_plugin_t * vlc_plugins
List of all plug-ins.
Definition: bank.c:102
module_config_t::b_unsaveable
unsigned b_unsaveable
Not stored in configuration.
Definition: vlc_configuration.h:81
module_t
Internal module descriptor.
Definition: modules.h:78
message.h
module_config_t::max
module_value_t max
Maximum value (for scalars only)
Definition: vlc_configuration.h:93
config_ResetAll
void config_ResetAll(void)
Resets the configuration.
Definition: core.c:486
vlc_http_file_read
block_t * vlc_http_file_read(struct vlc_http_resource *res)
Reads data.
Definition: file.c:232
PauseConsole
#define PauseConsole()
Definition: help.c:55
f_value
double f_value
Definition: vout_intf.c:90
newlocale
static locale_t newlocale(int mask, const char *locale, locale_t base)
Definition: vlc_fixups.h:350
vlc_strings.h
module_t::psz_longname
const char * psz_longname
Module descriptive name.
Definition: modules.h:91
VLC_CONFIG_DIR
@ VLC_CONFIG_DIR
Definition: vlc_configuration.h:308
vlc_http_msg_get_token
const char * vlc_http_msg_get_token(const struct vlc_http_msg *msg, const char *field, const char *token)
Looks up a token in a header field.
Definition: message.c:709
vlc_strerror_c
const char * vlc_strerror_c(int errnum)
Definition: error.c:34
vlc_http_file
Definition: file.c:42
getpid
pid_t getpid(void)
plugin_show
static bool plugin_show(const vlc_plugin_t *plugin)
Definition: help.c:566
config
static struct @10 config
vlc_plugin.h
confcmp
static int confcmp(const void *a, const void *b)
Definition: core.c:384
lock
vlc_mutex_t lock
Definition: rand.c:50
vlc_close
int vlc_close(int fd)
Closes a file descriptor.
Definition: filesystem.c:91
config_IsSafe
bool config_IsSafe(const char *name)
Definition: core.c:73
CONFIG_ITEM_INTEGER
#define CONFIG_ITEM_INTEGER
Definition: vlc_plugin.h:121
Help
static void Help(vlc_object_t *, const char *)
Definition: help.c:199
vlc_http_resource
Definition: resource.h:43
config_PutPsz
void config_PutPsz(const char *psz_name, const char *psz_value)
Sets an string configuration item.
Definition: core.c:139
config_GetFloat
float config_GetFloat(const char *psz_name)
Gets an floating point configuration item.
Definition: core.c:105
Version
static void Version(void)
Definition: help.c:691
vlc_http_file::offset
uintmax_t offset
Definition: file.c:63
strdupnull
static char * strdupnull(const char *src)
Definition: file.c:50
var_SetBool
static int var_SetBool(vlc_object_t *p_obj, const char *psz_name, bool b)
Set the value of an boolean variable.
Definition: vlc_variables.h:308
vlc_getopt_long
int vlc_getopt_long(int argc, char *const *argv, const char *shortopts, const struct vlc_option *longopts, int *longind, vlc_getopt_t *restrict state)
vlc_option
Definition: vlc_getopt.h:91
config_PrepareDir
static int config_PrepareDir(vlc_object_t *obj)
Definition: file.c:331
vlc_plugin_t::size
size_t size
Total count of all items.
Definition: modules.h:63
modules.h
CYAN
#define CYAN
Definition: help.c:239
vlc_http_file_req
static int vlc_http_file_req(const struct vlc_http_resource *res, struct vlc_http_msg *req, void *opaque)
Definition: file.c:48
config_ListModules
static ssize_t config_ListModules(const char *cap, char ***restrict values, char ***restrict texts)
Definition: core.c:258
vlc_http_file_create
struct vlc_http_resource * vlc_http_file_create(struct vlc_http_mgr *mgr, const char *uri, const char *ua, const char *ref)
Creates an HTTP file.
Definition: file.c:113
vlc_configuration.h
WHITE
#define WHITE
Definition: help.c:240
strdupnull
static char * strdupnull(const char *src)
Definition: core.c:43
config_dirty
bool config_dirty
Definition: core.c:41
vlc_http_error
void *const vlc_http_error
Error pointer value.
Definition: message.c:57
VLC_FORMAT
#define VLC_FORMAT(x, y)
String format function annotation.
Definition: vlc_common.h:141
vlc_fs.h
CONFIG_ITEM_BOOL
#define CONFIG_ITEM_BOOL
Definition: vlc_plugin.h:123
NONOPTION_P
#define NONOPTION_P
vlc_rwlock_unlock
void vlc_rwlock_unlock(vlc_rwlock_t *lock)
Releases a read/write lock.
Definition: threads.c:420
vlc_plugin_t::items
module_config_t * items
Table of configuration items.
Definition: modules.h:62
DIR_SEP_CHAR
#define DIR_SEP_CHAR
Definition: vlc_common.h:1220
vlc_http_res_get_status
int vlc_http_res_get_status(struct vlc_http_resource *res)
Definition: resource.c:131
vlc_object_t
VLC object common members.
Definition: vlc_objects.h:43
config_PutInt
void config_PutInt(const char *psz_name, int64_t i_value)
Sets an integer configuration item.
Definition: core.c:162
IsConfigFloatType
#define IsConfigFloatType(type)
Definition: configuration.h:49
VLC_ENOMEM
#define VLC_ENOMEM
Not enough memory.
Definition: vlc_common.h:476
module_config_t
Configuration item.
Definition: vlc_configuration.h:76
module_config_t::b_removed
unsigned b_removed
Obsolete.
Definition: vlc_configuration.h:83
vlc_getopt_t
struct vlc_getopt_s vlc_getopt_t
module_config_t::psz_type
const char * psz_type
Configuration subtype.
Definition: vlc_configuration.h:85
module_t::psz_capability
const char * psz_capability
Capability.
Definition: modules.h:94
VLC_SUCCESS
#define VLC_SUCCESS
No error.
Definition: vlc_common.h:472
vlc_plugin_Symbol
void * vlc_plugin_Symbol(struct vlc_logger *log, vlc_plugin_t *plugin, const char *name)
Definition: bank.c:631
config_PutFloat
void config_PutFloat(const char *psz_name, float f_value)
Sets an floating point configuration item.
Definition: core.c:181
strdup
char * strdup(const char *)
module_config_t::min
module_value_t min
Minimum value (for scalars only)
Definition: vlc_configuration.h:92
module_get_name
const char * module_get_name(const module_t *m, bool long_name)
Gets the human-friendly name of a module.
Definition: modules.c:57
psz_value
char psz_value[8]
Definition: vout_intf.c:99
vlc_getopt_s::first_nonopt
int first_nonopt
Definition: vlc_getopt.h:85
LC_NUMERIC_MASK
#define LC_NUMERIC_MASK
Definition: vlc_fixups.h:341
vlc_block.h
vlc_mutex_lock
void vlc_mutex_lock(vlc_mutex_t *mtx)
Acquires a mutex.
Definition: threads.c:158
list
module_config_t ** list
Definition: core.c:400
name
const char name[16]
Definition: httpd.c:1268
module_config_t::list
union module_config_t::@194 list
Possible choices.
print_desc
static void print_desc(const char *str, unsigned margin, bool color)
Definition: help.c:261
vlc_strtoi
static int64_t vlc_strtoi(const char *str)
Definition: file.c:138
ListModules
static void ListModules(vlc_object_t *, bool)
Definition: help.c:646
config_FindConfigChecked
static module_config_t * config_FindConfigChecked(const char *psz_name)
Definition: core.c:79
CONFIG_FILE
#define CONFIG_FILE
Definition: configuration.h:68
module_value_t::i
int64_t i
Definition: vlc_configuration.h:63
N_
#define N_(str)
Definition: vlc_fixups.h:375
module_config_t::value
module_value_t value
Current value.
Definition: vlc_configuration.h:90
vlc_unlink
int vlc_unlink(const char *filename)
Removes a file.
Definition: filesystem.c:183
vlc_http_msg_can_seek
static bool vlc_http_msg_can_seek(const struct vlc_http_msg *resp)
Definition: file.c:169
GRAY
#define GRAY
Definition: help.c:241
module_value_t::f
float f
Definition: vlc_configuration.h:64
config_GetInt
int64_t config_GetInt(const char *psz_name)
Gets an integer configuration item.
Definition: core.c:89
vlc_rename
int vlc_rename(const char *oldpath, const char *newpath)
Moves a file atomically.
Definition: filesystem.c:197
configuration.h
config_lock
vlc_rwlock_t config_lock
Definition: core.c:40
config_lock
vlc_rwlock_t config_lock
Definition: core.c:40
vlc_http_msg_get_mtime
time_t vlc_http_msg_get_mtime(const struct vlc_http_msg *m)
Gets resource date.
Definition: message.c:877
strtoll
long long int strtoll(const char *, char **, int)
YELLOW
#define YELLOW
Definition: help.c:236
CONFIG_ITEM_MODULE
#define CONFIG_ITEM_MODULE
Definition: vlc_plugin.h:127
module_config_t::list_count
uint16_t list_count
Choices count.
Definition: vlc_configuration.h:96
module_config_t::psz_longtext
const char * psz_longtext
Long comment on the configuration option.
Definition: vlc_configuration.h:88
rewind
void rewind(FILE *)
module_config_t::i_type
uint8_t i_type
Configuration type.
Definition: vlc_configuration.h:78
module_config_t::psz
const char ** psz
Table of possible string choices.
Definition: vlc_configuration.h:99
libvlc.h
module_match
static bool module_match(const module_t *m, const char *pattern, bool strict)
Definition: help.c:544
vlc_http_res_read
struct block_t * vlc_http_res_read(struct vlc_http_resource *res)
Reads data.
Definition: resource.c:310
vlc_http_file::resource
struct vlc_http_resource resource
Definition: file.c:62
vlc_http_msg_get_header
const char * vlc_http_msg_get_header(const struct vlc_http_msg *m, const char *name)
Looks up an header field.
Definition: message.c:156
module_list_cap
size_t module_list_cap(module_t *const **restrict list, const char *name)
Definition: bank.c:790
file.h
vlc_rwlock_wrlock
void vlc_rwlock_wrlock(vlc_rwlock_t *lock)
Acquires a read/write lock for writing.
Definition: threads.c:410
vlc_http_msg_get_status
int vlc_http_msg_get_status(const struct vlc_http_msg *m)
Gets response status code.
Definition: message.c:168
module_config_t::i_short
char i_short
Optional short option name.
Definition: vlc_configuration.h:79
config_SortConfig
int config_SortConfig(void)
Index the configuration items by name for faster lookups.
Definition: core.c:407
CONFIG_HINT_CATEGORY
#define CONFIG_HINT_CATEGORY
Definition: vlc_plugin.h:112
config_PrintHelp
bool config_PrintHelp(vlc_object_t *obj)
Checks for help command line options such as –help or –version.
Definition: help.c:95
config_AutoSaveConfigFile
int config_AutoSaveConfigFile(vlc_object_t *p_this)
Definition: file.c:528
VLC_STATIC_RWLOCK
#define VLC_STATIC_RWLOCK
Static initializer for (static) read/write lock.
Definition: vlc_threads.h:542
CONFIG_HINT_USAGE
#define CONFIG_HINT_USAGE
Definition: vlc_plugin.h:113
vlc_actions.h
config_LoadConfigFile
int config_LoadConfigFile(vlc_object_t *p_this)
Definition: file.c:166
config_SaveConfigFile
int config_SaveConfigFile(vlc_object_t *p_this)
Saves the in-memory configuration into a file.
Definition: file.c:347
vlc_usage
static const char vlc_usage[]
Definition: help.c:165
vlc_http_msg_add_time
int vlc_http_msg_add_time(struct vlc_http_msg *m, const char *hname, const time_t *t)
Adds a timestamp header field.
Definition: message.c:811
ShowConsole
#define ShowConsole()
Definition: help.c:54
LICENSE_MSG
#define LICENSE_MSG
Definition: vlc_common.h:1226
vlc_alloc
static void * vlc_alloc(size_t count, size_t size)
Definition: vlc_common.h:1144
config_Write
static int config_Write(FILE *file, const char *desc, const char *type, bool comment, const char *name, const char *fmt,...)
Definition: file.c:306
config_RemoveIntf
void config_RemoveIntf(const char *psz_intf)
Definition: intf.c:81
state
static thread_local struct @76 state
vlc_http_resource_cbs
Definition: resource.h:35
vlc_http_msg_get_size
uintmax_t vlc_http_msg_get_size(const struct vlc_http_msg *m)
Gets HTTP payload length.
Definition: message.c:905
config_Free
void config_Free(module_config_t *tab, size_t confsize)
Destroys an array of configuration items.
Definition: core.c:467
vlc_getopt_s
Definition: vlc_getopt.h:25
vlc_http_msg
Definition: message.c:42
vlc_http_msg_get_file_size
static uintmax_t vlc_http_msg_get_file_size(const struct vlc_http_msg *resp)
Definition: file.c:132
vlc_option::flag
int * flag
Definition: vlc_getopt.h:95
GREEN
#define GREEN
Definition: help.c:235
vlc_mutex_unlock
void vlc_mutex_unlock(vlc_mutex_t *mtx)
Releases a mutex.
Definition: threads.c:209
config_OpenConfigFile
static FILE * config_OpenConfigFile(vlc_object_t *p_obj)
Definition: file.c:72
block_t
Definition: vlc_block.h:117
utf8_fprintf
int utf8_fprintf(FILE *stream, const char *fmt,...)
Formats an UTF-8 string as fprintf(), then print it, with appropriate conversion to local encoding.
Definition: unicode.c:102
config_GetIntChoices
ssize_t config_GetIntChoices(const char *name, int64_t **restrict values, char ***restrict texts)
Definition: core.c:203
vlc_http_file_seek
int vlc_http_file_seek(struct vlc_http_resource *res, uintmax_t offset)
Sets the read offset.
Definition: file.c:204
msg_Err
#define msg_Err(p_this,...)
Definition: vlc_messages.h:102
config_GetPsz
char * config_GetPsz(const char *psz_name)
Gets an string configuration item.
Definition: core.c:123
CONFIG_ITEM
#define CONFIG_ITEM(x)
Definition: vlc_plugin.h:136
getline
ssize_t getline(char **, size_t *, FILE *)
p
#define p(t)
vlc_modules.h
module_config_t::b_safe
unsigned b_safe
Safe for web plugins and playlist files.
Definition: vlc_configuration.h:82