Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sergi
Tor
Commits
577ea20b
Commit
577ea20b
authored
5 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Document configuration and abbreviation types.
parent
34f3fcef
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/config/confparse.h
+20
-3
20 additions, 3 deletions
src/app/config/confparse.h
with
20 additions
and
3 deletions
src/app/config/confparse.h
+
20
−
3
View file @
577ea20b
...
...
@@ -17,21 +17,38 @@
#include
"lib/conf/confmacros.h"
#include
"lib/testsupport/testsupport.h"
/** An abbreviation for a configuration option allowed on the command line. */
/**
* An abbreviation or alias for a configuration option.
**/
typedef
struct
config_abbrev_t
{
/** The option name as abbreviated. Not case-sensitive. */
const
char
*
abbreviated
;
/** The full name of the option. Not case-sensitive. */
const
char
*
full
;
/** True if this abbreviation should only be allowed on the command line. */
int
commandline_only
;
/** True if we should warn whenever this abbreviation is used. */
int
warn
;
}
config_abbrev_t
;
/**
* A note that a configuration option is deprecated, with an explanation why.
*/
typedef
struct
config_deprecation_t
{
/** The option that is deprecated. */
const
char
*
name
;
/** A user-facing string explaining why the option is deprecated. */
const
char
*
why_deprecated
;
}
config_deprecation_t
;
/* Handy macro for declaring "In the config file or on the command line,
* you can abbreviate <b>tok</b>s as <b>tok</b>". */
/**
* Handy macro for declaring "In the config file or on the command line, you
* can abbreviate <b>tok</b>s as <b>tok</b>". Used inside an array of
* config_abbrev_t.
*
* For example, to declare "NumCpu" as an abbreviation for "NumCPUs",
* you can say PLURAL(NumCpu).
**/
#define PLURAL(tok) { #tok, #tok "s", 0, 0 }
/** Type of a callback to validate whether a given configuration is
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment