.de1 NOP . it 1 an-trap . if \\n[.$] \,\\$*\/ .. .ie t \ .ds B-Font [CB] .ds I-Font [CI] .ds R-Font [CR] .el \ .ds B-Font B .ds I-Font I .ds R-Font R .TH getdefs 1 "2018-01-06" "GNU AutoGen (1.5)" "User Commands" .\" .\" DO NOT EDIT THIS FILE (in-mem file) .\" .\" It has been AutoGen-ed .\" From the definitions ./opts.def .\" and the template file agman-cmd .SH NAME \f\*[B-Font]getdefs\fP \- AutoGen Definition Extraction Tool .SH SYNOPSIS \f\*[B-Font]getdefs\fP [\f\*[I-Font]option\-name\f[] \f\*[I-Font]value\f[]] .sp \n(Ppu .ne 2 All arguments are named options. .sp \n(Ppu .ne 2 If no \fBinput\fP argument is provided or is set to simply "-", and if \fBstdin\fP is not a \fBtty\fP, then the list of input files will be read from \fBstdin\fP. .SH "DESCRIPTION" This program extracts AutoGen definitions from a list of source files. Definitions are delimited by \fB/*= \n\fP and \fB=*/\n\fP. .SH "OPTIONS" .SS "Specify which definitions are of interest and what to say about them" .TP .NOP defs\-to\-get=\f\*[I-Font]reg\-ex\f[] Regexp to look for after the "/*=". .sp 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 \fB/*=\fP. .TP .NOP subblock=\f\*[I-Font]sub\-def\f[] subblock definition names. This option may appear an unlimited number of times. .sp This option is used to create shorthand entries for nested definitions. For example, with: .sp .IR "using subblock thus" \fB--subblock=arg=argname,type,null\fP .sp .IR "and defining an \fBarg\fP thus" \fBarg: this, char *\fP .sp .IR "will then expand to:" \fBarg = { argname = this; type = "char *"; @\fP;} .br 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: .br \fBarg = { argname = mumble; null = "yes"; @\fP;}. .TP .NOP listattr=\f\*[I-Font]def\f[] attribute with list of values. This option may appear an unlimited number of times. .sp This option is used to create shorthand entries for definitions that generally appear several times. That is, they tend to be a list of values. For example, with: .br \fBlistattr=foo\fP defined, the text: .br \fBfoo: this, is, a, multi-list\fP will then expand to: .br \fBfoo = 'this', 'is', 'a', 'multi-list';\fP .br 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. .SS "specify how to number the definitions" .TP .NOP ordering [=\f\*[I-Font]file\-name\f[]], \f\*[B-Font]\-\-no\-ordering\f[] Alphabetize or use named file. The \fIno\-ordering\fP form will disable the option. This option is enabled by default. .sp By default, ordering is alphabetical by the entry name. Use, \fBno-ordering\fP if order is unimportant. Use \fBordering\fP with no argument to order without case sensitivity. Use \fBordering=\fP if chronological order is important. getdefs will maintain the text content of \fBfile-name\fP. \fBfile-name\fP need not exist. .TP .NOP first\-index=\f\*[I-Font]first\-index\f[] The first index to apply to groups. This option takes an integer number as its argument. The default \f\*[I-Font]first\-index\f[] for this option is: .ti +4 0 .sp 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. .SS "Definition insertion options" .TP .NOP filelist [=\f\*[I-Font]file\f[]] Insert source file names into defs. .sp Inserts the name of each input file into the output definitions. If no argument is supplied, the format will be: .nf infile = '%s'; .fi If an argument is supplied, that string will be used for the entry name instead of \fBinfile\fP. .TP .NOP assign=\f\*[I-Font]ag\-def\f[] Global assignments. This option may appear an unlimited number of times. .sp The argument to each copy of this option will be inserted into the output definitions, with only a semicolon attached. .TP .NOP common\-assign=\f\*[I-Font]ag\-def\f[] Assignments common to all blocks. This option may appear an unlimited number of times. .sp The argument to each copy of this option will be inserted into each output definition, with only a semicolon attached. .TP .NOP copy=\f\*[I-Font]file\f[] File(s) to copy into definitions. This option may appear an unlimited number of times. .sp The content of each file named by these options will be inserted into the output definitions. .TP .NOP srcfile [=\f\*[I-Font]file\f[]] Insert source file name into each def. .sp 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: .nf srcfile = '%s'; .fi If an argument is supplied, that string will be used for the entry name instead of \fBsrcfile\fP. .TP .NOP linenum [=\f\*[I-Font]def\-name\f[]] Insert source line number into each def. .sp 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: .nf linenum = '%s'; .fi If an argument is supplied, that string will be used for the entry name instead of \fBlinenum\fP. .SS "specify which files to search for markers" .TP .NOP input=\f\*[I-Font]src\-file\f[] Input file to search for defs. This option may appear an unlimited number of times. This option is the default option. .sp All files that are to be searched for definitions must be named on the command line or read from \fBstdin\fP. If there is only one \fBinput\fP option and it is the string, "-", then the input file list is read from \fBstdin\fP. If a command line argument is not an option name and does not contain an assignment operator (\fB=\fP), then it defaults to being an input file name. At least one input file must be specified. .SS "Definition output disposition options:" .TP .NOP output=\f\*[I-Font]file\f[] Output file to open. This option is a member of the autogen class of options. .sp If you are not sending the output to an AutoGen process, you may name an output file instead. .TP .NOP autogen [=\f\*[I-Font]ag\-cmd\f[]], \f\*[B-Font]\-\-no\-autogen\f[] Invoke AutoGen with defs. The \fIno\-autogen\fP form will disable the option. This option is enabled by default. This option is a member of the autogen class of options. .sp This is the default output mode. Specifying \fBno-autogen\fP is equivalent to \fBoutput=-\fP. 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. .TP .NOP template=\f\*[I-Font]file\f[] Template Name. .sp Specifies the template name to be used for generating the final output. .TP .NOP agarg=\f\*[I-Font]ag\-opt\f[] 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. .sp This is a pass-through argument. It allows you to specify any arbitrary argument to be passed to AutoGen. .TP .NOP base\-name=\f\*[I-Font]name\f[] Base name for output file(s). This option must not appear in combination with any of the following options: output. .sp 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 \fBtemplate\fP option. If that is not provided either, then it is set to the base name of the current directory. .TP .NOP help Display usage information and exit. .TP .NOP more-help Pass the extended usage information through a pager. .TP .NOP save-opts [=\f\*[I-Font]cfgfile\f[]] Save the option state to \fIcfgfile\fP. The default is the \fIlast\fP configuration file listed in the \fBOPTION PRESETS\fP section, below. The command will exit after updating the config file. .TP .NOP load-opts=\f\*[I-Font]cfgfile\f[], \f\*[I-Font]no-load-opts\f[] Load options from \fIcfgfile\fP. The \fIno-load-opts\fP form will disable the loading of earlier config/rc/ini files. \fI\-\-no-load-opts\fP is handled early, out of order. .TP .NOP version [{\f\*[I-Font]v|c|n\f[]}] Output version of program and exit. The default mode is `v', a simple version. The `c' mode will print copyright information and `n' will print the full copyright notice. .PP .SH "OPTION PRESETS" Any option that is not marked as \fInot presettable\fP may be preset by loading values from configuration ("RC" or ".INI") file(s). The \fIhomerc\fP file is "\fI/dev/null\fP", unless that is a directory. In that case, the file "\fI.getdefsrc\fP" is searched for within that directory. .SH "FILES" See \fBOPTION PRESETS\fP for configuration files. .SH "EXIT STATUS" One of the following exit values will be returned: .TP .NOP 0 " (EXIT_SUCCESS)" Successful program execution. .TP .NOP 1 " (EXIT_FAILURE)" The operation failed or the command syntax was not valid. .TP .NOP 66 " (EX_NOINPUT)" A specified configuration file could not be loaded. .TP .NOP 70 " (EX_SOFTWARE)" libopts had an internal operational error. Please report it to autogen-users@lists.sourceforge.net. Thank you. .PP .SH "SEE ALSO" This program is documented more fully in the Getdefs section of the Add\-On chapter in the \fBAutoGen\fP Info system documentation. .SH "AUTHORS" Bruce Korb .SH "COPYRIGHT" Copyright (C) 1999-2014 Bruce Korb all rights reserved. This program is released under the terms of the GNU General Public License, version 3 or later. .SH "BUGS" Please send bug reports to: autogen-users@lists.sourceforge.net .SH "NOTES" This manual page was \fIAutoGen\fP-erated from the \fBgetdefs\fP option definitions.