This is the “input file (if not stdin)” option. This option takes a string argument file.
This program normally runs as a filter, reading from standard input, columnizing and writing to standard out. This option redirects input to a file.
8.5.6 presetting/configuring columns
Any option that is not marked as not presettable may be preset by loading values from configuration ("rc" or "ini") files, and values from environment variables named COLUMNS and COLUMNS_<OPTION_NAME>. <OPTION_NAME> must be one of the options listed above in upper case and segmented with underscores. The COLUMNS variable will be tokenized and parsed like the command line. The remaining variables are tested for existence and their values are treated like option arguments.
libopts will search in 2 places for configuration files:
• $PWD
• $HOME
The environment variables PWD, and HOME are expanded and replaced when columns runs.
For any of these that are plain files, they are simply processed. For any that are directories, then a file named .columnsrc is searched for within that directory and processed.
Configuration files may be in a wide variety of formats. The basic format is an option name followed by a value (argument) on the same line. Values may be separated from the option name with a colon, equal sign or simply white space. Values may be continued across multiple lines by escaping the newline with a backslash.
Multiple programs may also share the same initialization file. Common options are collected at the top, followed by program specific segments. The segments are separated by lines like:
[COLUMNS]
or by
<?program columns>
Do not mix these styles within one configuration file.
Compound values and carefully constructed string values may also be specified using XML syntax:
<option-name>
<sub-opt>...<...>...</sub-opt>
</option-name>
yielding an option-name.sub-opt string value of
"...<...>..."
AutoOpts does not track suboptions. You simply note that it is a hierarchicly valued option. AutoOpts does provide a means for searching the associated name/value pair list (see: optionFindValue).
The command line options relating to configuration and/or usage help are:
version (-v)
Print the program version to standard out, optionally with licensing information, then exit 0. The optional argument specifies how much licensing detail to provide. The default is to print just the version. The licensing infomation may be selected with an option argument.
Only the first letter of the argument is examined:
‘version’ Only print the version. This is the default.
‘copyright’
Name the copyright usage licensing terms.
‘verbose’ Print the full copyright usage licensing terms.
8.5.7 columns 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.
‘66 (EX_NOINPUT)’
A specified configuration file could not be loaded.
‘70 (EX_SOFTWARE)’
libopts had an internal operational error. Please report it to [email protected]. Thank you.
8.5.8 columns See Also
This program is documented more fully in the Columns section of the Add-On chapter in the AutoGen Info system documentation.
8.6 Invoking getdefs
If no input argument is provided or is set to simply "-", and if stdin is not a tty, then the list of input files will be read from stdin. This program extracts AutoGen definitions from a list of source files. Definitions are delimited by /*=<entry-type> <entry-name>\n and =*/\n. From that, this program creates a definition of the following form:
#line nnn "source-file-name"
entry_type = {
name = entry_name;
...
};
1. The ellipsis ... is filled in by text found between the two delimiters. Each line of text is stripped of anything before the first asterisk, then leading asterisks, then any leading or trailing white space.
2. If what is left starts with what looks like a name followed by a colon, then it is inter-preted as a name followed by a value.
3. If the first character of the value is either a single or double quote, then you are responsible for quoting the text as it gets inserted into the output definitions. So, if you want whitespace at the beginnings of the lines of text, you must do something like this:
* mumble:
* " this is some\n"
* " indented text."
4. If the <entry-name> is followed by a comma, the word ifdef (or ifndef) and a name if_name, then the above entry will be under ifdef control.
/*=group entry_name, ifdef FOO
* attr: attribute value
=*/
Will produce the following:
#ifdef FOO
#line nnn "source-file-name"
group = {
name = entry_name;
attr = ’attribute value’;
};
#endif
5. If you use of the subblock option, you can specify a nested value, See[getdefs subblock], page 201. That is, this text:
* arg: int, this, what-it-is
with the --subblock=arg=type,name,doc option would yield:
arg = { type = int; name = this; doc = what-it-is; };
This section was generated by AutoGen, using the agtexi-cmd template and the option descriptions for the getdefs program. This software is released under the GNU General Public License, version 3 or later.