getdefs(1)
β¨ NAME β¨
getdefs β the AutoGen Definition Extraction Tool, no cap. This is the getdefs(1) page, hanging out in the User Commands section of your manual, and honestly? She's useful. π«Ά
π SYNOPSIS π
getdefs [option-name value]
okay so first thing bestie: all arguments are named options. Every single one. No sneaky positional stuff going on here. π
And here's the plot twist π β if you don't give it an input argument at all, or you set it to just "-", and stdin is not a tty, then the list of input files will be read from stdin. It's giving "don't worry, I'll take it from the pipe." π¦
πΈ DESCRIPTION πΈ
This program extracts AutoGen definitions from a list of source files. So how does it know where a definition begins and ends? The definitions are delimited by /*=<entry-type> <entry-name>0fP and =*/0fP. That's the marker, that's the vibe check, periodt. β¨
π OPTIONS π
π Specify which definitions are of interest and what to say about them π
defs-to-get=reg-exβ Regexp to look for after the"/*=".
If you want definitions only from a particular category, or even with names matching particular patterns, then specify this regular expression for the text that must follow the /*=.
subblock=sub-defβ subblock definition names. This option may appear an unlimited number of times.
This one is for creating shorthand entries for nested definitions. Like, for example, with:
using subblock thus --subblock=arg=argname,type,null
and defining an arg thus arg: this, char *
will then expand to: arg = { argname = this; type = "char *"; @;}
The "this, char *" string is separated at the commas, with the white space removed. You may use characters other than commas by starting the value string with a punctuation character other than a single or double quote character. You may also omit intermediate values by placing the commas next to each other with no intervening white space. For example, "+mumble++yes+" will expand to: arg = { argname = mumble; null = "yes"; @;}. β yes bestie, it really does. π
listattr=defβ attribute with list of values. This option may appear an unlimited number of times.
This one creates shorthand entries for definitions that generally appear several times. That is, they tend to be a list of values. For example, with listattr=foo defined, the text: foo: this, is, a, multi-list will then expand to: foo = 'this', 'is', 'a', 'multi-list';
The texts are separated by the commas, with the white space removed. You may use characters other than commas by starting the value string with a punctuation character other than a single or double quote character.
π’ specify how to number the definitions π’
ordering [=file-name],--no-orderingβ Alphabetize or use named file. Theno-orderingform will disable the option. This option is enabled by default.
By default, ordering is alphabetical by the entry name. Use no-ordering if order is unimportant. Use ordering with no argument to order without case sensitivity. Use ordering=<file-name> if chronological order is important β getdefs will maintain the text content of file-name, and file-name need not exist. Iconic behavior honestly. π
first-index=first-indexβ The first index to apply to groups. This option takes an integer number as its argument. The defaultfirst-indexfor this option is:
0
By default, the first occurrence of a named definition will have an index of zero. Sometimes, that needs to be a reserved value. Provide this option to specify a different starting point. π
π₯ Definition insertion options π₯
filelist [=file]β Insert source file names into defs.
Inserts the name of each input file into the output definitions. If no argument is supplied, the format will be:
infile = '%s';
If an argument is supplied, that string will be used for the entry name instead of infile.
assign=ag-defβ Global assignments. This option may appear an unlimited number of times.
The argument to each copy of this option will be inserted into the output definitions, with only a semicolon attached.
common-assign=ag-defβ Assignments common to all blocks. This option may appear an unlimited number of times.
The argument to each copy of this option will be inserted into each output definition, with only a semicolon attached.
copy=fileβ File(s) to copy into definitions. This option may appear an unlimited number of times.
The content of each file named by these options will be inserted into the output definitions.
srcfile [=file]β Insert source file name into each def.
Inserts the name of the input file where a definition was found into the output definition. If no argument is supplied, the format will be:
srcfile = '%s';
If an argument is supplied, that string will be used for the entry name instead of srcfile.
linenum [=def-name]β Insert source line number into each def.
Inserts the line number in the input file where a definition was found into the output definition. If no argument is supplied, the format will be:
linenum = '%s';
If an argument is supplied, that string will be used for the entry name instead of linenum.
π specify which files to search for markers π
input=src-fileβ Input file to search for defs. This option may appear an unlimited number of times. This option is the default option.
All files that are to be searched for definitions must be named on the command line or read from stdin. If there is only one input option and it is the string, "-", then the input file list is read from stdin. If a command line argument is not an option name and does not contain an assignment operator (=), then it defaults to being an input file name. At least one input file must be specified. That last bit is not optional bestie, it's the whole point. π€
π€ Definition output disposition options: π€
output=fileβ Output file to open. This option is a member of theautogenclass of options.
If you are not sending the output to an AutoGen process, you may name an output file instead.
autogen [=ag-cmd],--no-autogenβ Invoke AutoGen with defs. Theno-autogenform will disable the option. This option is enabled by default. This option is a member of theautogenclass of options.
This is the default output mode. Specifying no-autogen is equivalent to output=-. If you supply an argument to this option, that program will be started as if it were AutoGen and its standard in will be set to the output definitions of this program.
template=fileβ Template Name.
Specifies the template name to be used for generating the final output.
agarg=ag-optβ AutoGen Argument. This option may appear an unlimited number of times. This option must not appear in combination with any of the following options:output.
This is a pass-through argument. It allows you to specify any arbitrary argument to be passed to AutoGen.
base-name=nameβ Base name for output file(s). This option must not appear in combination with any of the following options:output.
When output is going to AutoGen, a base name must either be supplied or derived. If this option is not supplied, then it is taken from the template option. If that is not provided either, then it is set to the base name of the current directory.
helpβ Display usage information and exit.more-helpβ Pass the extended usage information through a pager.save-opts [=cfgfile]β Save the option state to cfgfile. The default is the last configuration file listed in the OPTION PRESETS section, below. The command will exit after updating the config file.load-opts=cfgfile,no-load-optsβ Load options from cfgfile. Theno-load-optsform will disable the loading of earlier config/rc/ini files.--no-load-optsis handled early, out of order.version [{v|c|n}]β Output version of program and exit. The default mode isv, a simple version. Thecmode will print copyright information andnwill print the full copyright notice.
βοΈ OPTION PRESETS βοΈ
Any option that is not marked as not presettable may be preset by loading values from configuration ("RC" or ".INI") file(s). The homerc file is "/dev/null", unless that is a directory. In that case, the file ".getdefsrc" is searched for within that directory. Cute little hide-and-seek energy. π§
π FILES π
See OPTION PRESETS for configuration files. That's it, that's the whole list, slay. π
π¦ EXIT STATUS π¦
One of the following exit values will be returned:
0(EXIT_SUCCESS) β Successful program execution. π1(EXIT_FAILURE) β The operation failed or the command syntax was not valid.2(EXIT_INVALID_INPUT) β An input file was specified that is not a file3(EXIT_NO_MEM) β Insufficient memory for operation66(EX_NOINPUT) β A specified configuration file could not be loaded.70(EX_SOFTWARE) βliboptshad an internal operational error. Please report it toautogen-users@lists.sourceforge.net. Thank you. π«Ά
π SEE ALSO π
This program is documented more fully in the Getdefs section of the Add-On chapter in the AutoGen Info system documentation.
βοΈ AUTHORS βοΈ
Bruce Korb β the moment, the icon, the legend. π
Β©οΈ COPYRIGHT Β©οΈ
Copyright (C) 1999-2018 Bruce Korb all rights reserved. This program is released under the terms of the GNU General Public License, version 3 or later.
π BUGS π
Please send bug reports to: autogen-users@lists.sourceforge.net β they're nice, I promise, don't be shy. π
π NOTES π
This manual page was AutoGen-erated from the getdefs option definitions. Meta? A little. Iconic? Absolutely. π
and that's the whole page bestie!! π this little love letter came to you from GNU AutoGen (1.5), dated 2018-08-26 β go forth and extract those definitions, mwah ππβ¨
π¦ where this page comes from
- debian trixie: autogen 1:5.18.16-7 Β· GPL-3.0-or-later
- nixpkgs unstable: autogen 5.18.16
- ubuntu questing: autogen 1:5.18.16-7build1
- ubuntu resolute: autogen 1:5.18.16-7build2 Β· GPL-3.0-or-later
- ubuntu stonking: autogen 1:5.18.16-9 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms