[
Top
]
[
Contents
]
[
Index
]
[
?
]
Table of Contents
1. Introduction
1.1 The Purpose of AutoGen
1.2 A Simple Example
1.3 csh/zsh caveat
1.4 A User's Perspective
2. Definitions File
2.1 The Identification Definition
2.2 Named Definitions
2.2.1 Definition List
2.2.2 Double Quote String
2.2.3 Single Quote String
2.2.4 Shell Output String
2.2.5 An Unquoted String
2.2.6 Scheme Result String
2.2.7 A Here String
2.2.8 Concatenated Strings
2.3 Assigning an Index to a Definition
2.4 Dynamic Text
2.5 Controlling What Gets Processed
2.6 Pre-defined Names
2.7 Commenting Your Definitions
2.8 What it all looks like.
2.9 Finite State Machine Grammar
2.10 Alternate Definition Forms
3. Template File
3.1 Format of the Pseudo Macro
3.2 Naming a value
3.3 Macro Expression Syntax
3.3.1 Apply Code
3.3.2 Basic Expression
3.4 AutoGen Scheme Functions
3.4.1 ‘
ag-function?
’ - test for function
3.4.2 ‘
base-name
’ - base output name
3.4.3 ‘
chdir
’ - Change current directory
3.4.4 ‘
count
’ - definition count
3.4.5 ‘
def-file
’ - definitions file name
3.4.6 ‘
def-file-line
’ - get a definition file+line number
3.4.7 ‘
dne
’ - "Do Not Edit" warning
3.4.8 ‘
error
’ - display message and exit
3.4.9 ‘
exist?
’ - test for value name
3.4.10 ‘
find-file
’ - locate a file in the search path
3.4.11 ‘
first-for?
’ - detect first iteration
3.4.12 ‘
for-by
’ - set iteration step
3.4.13 ‘
for-from
’ - set initial index
3.4.14 ‘
for-index
’ - get current loop index
3.4.15 ‘
for-sep
’ - set loop separation string
3.4.16 ‘
for-to
’ - set ending index
3.4.17 ‘
get
’ - get named value
3.4.18 ‘
get-c-name
’ - get named value, mapped to C name syntax
3.4.19 ‘
get-down-name
’ - get lower cased named value, mapped to C name syntax
3.4.20 ‘
get-up-name
’ - get upper cased named value, mapped to C name syntax
3.4.21 ‘
high-lim
’ - get highest value index
3.4.22 ‘
last-for?
’ - detect last iteration
3.4.23 ‘
len
’ - get count of values
3.4.24 ‘
low-lim
’ - get lowest value index
3.4.25 ‘
make-header-guard
’ - make self-inclusion guard
3.4.26 ‘
match-value?
’ - test for matching value
3.4.27 ‘
out-delete
’ - delete current output file
3.4.28 ‘
out-depth
’ - output file stack depth
3.4.29 ‘
out-emit-suspended
’ - emit the text of suspended output
3.4.30 ‘
out-line
’ - output file line number
3.4.31 ‘
out-move
’ - change name of output file
3.4.32 ‘
out-name
’ - current output file name
3.4.33 ‘
out-pop
’ - close current output file
3.4.34 ‘
out-push-add
’ - append output to file
3.4.35 ‘
out-push-new
’ - purge and create output file
3.4.36 ‘
out-resume
’ - resume suspended output file
3.4.37 ‘
out-suspend
’ - suspend current output file
3.4.38 ‘
out-switch
’ - close and create new output
3.4.39 ‘
set-option
’ - Set a command line option
3.4.40 ‘
set-writable
’ - Make the output file be writable
3.4.41 ‘
stack
’ - make list of AutoGen values
3.4.42 ‘
suffix
’ - get the current suffix
3.4.43 ‘
tpl-file
’ - get the template file name
3.4.44 ‘
tpl-file-line
’ - get the template file+line number
3.4.45 ‘
autogen-version
’ - autogen version number
3.4.46 format file info as, “
#line nn "file"
”
3.5 Common Scheme Functions
3.5.1 ‘
ag-fprintf
’ - format to autogen stream
3.5.2 ‘
agpl
’ - GNU Affero General Public License
3.5.3 ‘
bsd
’ - BSD Public License
3.5.4 ‘
c-string
’ - emit string for ANSI C
3.5.5 ‘
emit
’ - emit the text for each argument
3.5.6 ‘
emit-string-table
’ - output a string table
3.5.7 ‘
error-source-line
’ - display of file & line
3.5.8 ‘
extract
’ - extract text from another file
3.5.9 ‘
format-arg-count
’ - count the args to a format
3.5.10 ‘
fprintf
’ - format to a file
3.5.11 ‘
gperf
’ - perform a perfect hash function
3.5.12 ‘
gperf-code
’ - emit the source of the generated gperf program
3.5.13 ‘
gpl
’ - GNU General Public License
3.5.14 ‘
hide-email
’ - convert eaddr to javascript
3.5.15 ‘
html-escape-encode
’ - encode html special characters
3.5.16 ‘
in?
’ - test for string in list
3.5.17 ‘
join
’ - join string list with separator
3.5.18 ‘
kr-string
’ - emit string for K&R C
3.5.19 ‘
lgpl
’ - GNU Library General Public License
3.5.20 ‘
license
’ - an arbitrary license
3.5.21 ‘
make-gperf
’ - build a perfect hash function program
3.5.22 ‘
makefile-script
’ - create makefile script
3.5.23 ‘
max
’ - maximum value in list
3.5.24 ‘
min
’ - minimum value in list
3.5.25 ‘
prefix
’ - prefix lines with a string
3.5.26 ‘
printf
’ - format to stdout
3.5.27 ‘
raw-shell-str
’ - single quote shell string
3.5.28 ‘
shell
’ - invoke a shell script
3.5.29 ‘
shell-str
’ - double quote shell string
3.5.30 ‘
shellf
’ - format a string, run shell
3.5.31 ‘
sprintf
’ - format a string
3.5.32 ‘
string-capitalize
’ - capitalize a new string
3.5.33 ‘
string-capitalize!
’ - capitalize a string
3.5.34 ‘
string-contains-eqv?
’ - caseless substring
3.5.35 ‘
string-contains?
’ - substring match
3.5.36 ‘
string-downcase
’ - lower case a new string
3.5.37 ‘
string-downcase!
’ - make a string be lower case
3.5.38 ‘
string-end-eqv-match?
’ - caseless regex ending
3.5.39 ‘
string-end-match?
’ - regex match end
3.5.40 ‘
string-ends-eqv?
’ - caseless string ending
3.5.41 ‘
string-ends-with?
’ - string ending
3.5.42 ‘
string-equals?
’ - string matching
3.5.43 ‘
string-eqv-match?
’ - caseless regex match
3.5.44 ‘
string-eqv?
’ - caseless string match
3.5.45 ‘
string-has-eqv-match?
’ - caseless regex contains
3.5.46 ‘
string-has-match?
’ - contained regex match
3.5.47 ‘
string-match?
’ - regex match
3.5.48 ‘
string-start-eqv-match?
’ - caseless regex start
3.5.49 ‘
string-start-match?
’ - regex match start
3.5.50 ‘
string-starts-eqv?
’ - caseless string start
3.5.51 ‘
string-starts-with?
’ - string starting
3.5.52 ‘
string-substitute
’ - multiple global replacements
3.5.53 ‘
string-table-add
’ - Add an entry to a string table
3.5.54 ‘
string-table-add-ref
’ - Add an entry to a string table, get reference
3.5.55 ‘
string-table-new
’ - create a string table
3.5.56 ‘
string-table-size
’ - print the current size of a string table
3.5.57 ‘
string->c-name!
’ - map non-name chars to underscore
3.5.58 ‘
string-tr
’ - convert characters with new result
3.5.59 ‘
string-tr!
’ - convert characters
3.5.60 ‘
string-upcase
’ - upper case a new string
3.5.61 ‘
string-upcase!
’ - make a string be upper case
3.5.62 ‘
sub-shell-str
’ - back quoted (sub-)shell string
3.5.63 ‘
sum
’ - sum of values in list
3.5.64 ‘
version-compare
’ - compare two version numbers
3.6 AutoGen Native Macros
3.6.1 AutoGen Macro Syntax
3.6.2 CASE - Select one of several template blocks
3.6.3 COMMENT - A block of comment to be ignored
3.6.4 DEBUG - Print debug message to trace output
3.6.5 DEFINE - Define a user AutoGen macro
3.6.6 ELIF - Alternate Conditional Template Block
3.6.7 ELSE - Alternate Template Block
3.6.8 ENDDEF - Ends a macro definition.
3.6.9 ENDFOR - Terminates the
FOR
function template block
3.6.10 ENDIF - Terminate the
IF
Template Block
3.6.11 ENDWHILE - Terminate the
WHILE
Template Block
3.6.12 ESAC - Terminate the
CASE
Template Block
3.6.13 EXPR - Evaluate and emit an Expression
3.6.14 FOR - Emit a template block multiple times
3.6.15 IF - Conditionally Emit a Template Block
3.6.16 INCLUDE - Read in and emit a template block
3.6.17 INVOKE - Invoke a User Defined Macro
3.6.18 SELECT - Selection block for CASE function
3.6.19 UNKNOWN - Either a user macro or a value name.
3.6.20 WHILE - Conditionally loop over a Template Block
3.7 Redirecting Output
4. Augmenting AutoGen Features
4.1 Shell Output Commands
4.2 Guile Macros
4.3 Guile Callout Functions
4.4 AutoGen Macros
5. Invoking autogen
5.1 autogen usage help (-?)
5.2 templ-dirs option (-L)
5.3 override-tpl option (-T)
5.4 lib-template option (-l)
5.5 base-name option (-b)
5.6 definitions option
5.7 load-scheme option (-S)
5.8 load-functions option (-F)
5.9 skip-suffix option (-s)
5.10 select-suffix option (-o)
5.11 source-time option
5.12 no-fmemopen option (-m)
5.13 equate option
5.14 writable option
5.15 loop-limit option
5.16 timeout option (-t)
5.17 trace option
5.18 trace-out option
5.19 show-defs option
5.20 define option (-D)
5.21 undefine option (-U)
6. Configuring and Installing
6.1 Configuring AutoGen
6.2 AutoGen as a CGI server
6.3 Signal Names
6.4 Installing AutoGen
7. Automated Option Processing
7.1 AutoOpts Features
7.2 AutoOpts Licensing
7.3 Quick Start
7.4 Option Definitions
7.4.1 Program Description Attributes
7.4.2 Options for Library Code
7.4.2.1 AutoOpt-ed Library for AutoOpt-ed Program
7.4.2.2 AutoOpt-ed Library for Regular Program
7.4.2.3 AutoOpt-ed Program Calls Regular Library
7.4.3 Generating main procedures
7.4.3.1 guile: main and inner_main procedures
7.4.3.2 shell-process: emit Bourne shell results
7.4.3.3 shell-parser: emit Bourne shell script
7.4.3.4 main: user supplied main procedure
7.4.3.5 include: code emitted from included template
7.4.3.6 invoke: code emitted from AutoGen macro
7.4.3.7 for-each: perform function on each argument
7.4.4 Program Information Attributes
7.4.5 Option Attributes
7.4.5.1 Required Attributes
7.4.5.2 Common Option Attributes
7.4.5.3 Program may set option
7.4.5.4 Option cannot be pre-configured
7.4.5.5 Option Equivalence Class
7.4.5.6 Default Option
7.4.5.7 Option Sectioning Comment
7.4.5.8 Translator Notes
7.4.5.9 Immediate Action Attributes
7.4.5.10 Option Conflict Attributes
7.4.6 Option Argument Specification
7.4.6.1 Keyword list
7.4.6.2 Option Argument Optional
7.4.6.3 Default Option Argument Value
7.4.6.4 Arg Type String
7.4.6.5 Arg Type Number
7.4.6.6 Arg Type Boolean
7.4.6.7 Arg Type Keyword
7.4.6.8 Arg Type Set Membership
7.4.6.9 Arg Type Hierarchical
7.4.6.10 Arg Type File Name
7.4.7 Option Argument Handling
7.4.8 Internationalizing Options
7.4.9 Man and Info doc Attributes
7.4.10 Automatically Supported Options
7.4.11 Library of Standard Options
7.5 Programmatic Interface
7.5.1 Data for Option Processing
7.5.2 CLEAR_OPT( <NAME> ) - Clear Option Markings
7.5.3 COUNT_OPT( <NAME> ) - Definition Count
7.5.4 DESC( <NAME> ) - Option Descriptor
7.5.5 DISABLE_OPT_name - Disable an option
7.5.6 ENABLED_OPT( <NAME> ) - Is Option Enabled?
7.5.7 ERRSKIP_OPTERR - Ignore Option Errors
7.5.8 ERRSTOP_OPTERR - Stop on Errors
7.5.9 HAVE_OPT( <NAME> ) - Have this option?
7.5.10 ISSEL_OPT( <NAME> ) - Is Option Selected?
7.5.11 ISUNUSED_OPT( <NAME> ) - Never Specified?
7.5.12 OPTION_CT - Full Count of Options
7.5.13 OPT_ARG( <NAME> ) - Option Argument String
7.5.14 OPT_NO_XLAT_CFG_NAMES - option name xlation
7.5.15 OPT_NO_XLAT_OPT_NAMES - option name xlation
7.5.16 OPT_VALUE_name - Option Argument Value
7.5.17 OPT_XLAT_CFG_NAMES - option name xlation
7.5.18 OPT_XLAT_OPT_NAMES - option name xlation
7.5.19 RESTART_OPT( n ) - Resume Option Processing
7.5.20 SET_OPT_name - Force an option to be set
7.5.21 STACKCT_OPT( <NAME> ) - Stacked Arg Count
7.5.22 STACKLST_OPT( <NAME> ) - Argument Stack
7.5.23 START_OPT - Restart Option Processing
7.5.24 STATE_OPT( <NAME> ) - Option State
7.5.25 USAGE( exit-code ) - Usage invocation macro
7.5.26 VALUE_OPT_name - Option Flag Value
7.5.27 VERSION - Version and Full Version
7.5.28 WHICH_IDX_name - Which Equivalenced Index
7.5.29 WHICH_OPT_name - Which Equivalenced Option
7.5.30 teOptIndex - Option Index and Enumeration
7.5.31 OPTIONS_STRUCT_VERSION - active version
7.5.32 libopts External Procedures
7.5.32.1 ao_string_tokenize
7.5.32.2 configFileLoad
7.5.32.3 optionFileLoad
7.5.32.4 optionFindNextValue
7.5.32.5 optionFindValue
7.5.32.6 optionFree
7.5.32.7 optionGetValue
7.5.32.8 optionLoadLine
7.5.32.9 optionNextValue
7.5.32.10 optionOnlyUsage
7.5.32.11 optionProcess
7.5.32.12 optionRestore
7.5.32.13 optionSaveFile
7.5.32.14 optionSaveState
7.5.32.15 optionUnloadNested
7.5.32.16 optionVersion
7.5.32.17 pathfind
7.5.32.18 strequate
7.5.32.19 streqvcmp
7.5.32.20 streqvmap
7.5.32.21 strneqvcmp
7.5.32.22 strtransform
7.6 Multi-Threading
7.7 Option Descriptor File
7.8 Using AutoOpts
7.8.1 local-only use
7.8.2 binary distro, AutoOpts not installed
7.8.3 binary distro, AutoOpts pre-installed
7.8.4 source distro, AutoOpts pre-installed
7.8.5 source distro, AutoOpts not installed
7.9 Configuring your program
7.9.1 configuration file presets
7.9.2 Saving the presets into a configuration file
7.9.3 Creating a sample configuration file
7.9.4 environment variable presets
7.9.5 Config file only example
7.10 Configuration File Format
7.10.1 assigning a string value to a configurable
7.10.2 integer values
7.10.3 hierarchical values
7.10.4 configuration file sections
7.10.5 comments in the configuration file
7.11 AutoOpts for Shell Scripts
7.11.1 Parsing with an Executable
7.11.2 Parsing with a Portable Script
7.12 Automated Info Docs
7.12.1 “invoking” info docs
7.12.2 library info docs
7.13 Automated Man Pages
7.13.1 command line man pages
7.13.2 library man pages
7.14 Using getopt(3C)
7.15 Internationalizing AutoOpts
7.16 Naming Conflicts
8. Add-on packages for AutoGen
8.1 Automated Finite State Machine
8.2 Combined RPC Marshalling
8.3 Automated Event Management
8.4 Invoking columns
8.4.1 columns usage help (-?)
8.4.2 width option (-W)
8.4.3 columns option (-c)
8.4.4 col-width option (-w)
8.4.5 spread option
8.4.6 fill option
8.4.7 indent option (-I)
8.4.8 first-indent option
8.4.9 tab-width option
8.4.10 sort option (-s)
8.4.11 format option (-f)
8.4.12 separation option (-S)
8.4.13 line-separation option
8.4.14 by-columns option
8.4.15 input option (-i)
8.5 Invoking getdefs
8.5.1 getdefs usage help
8.5.2 defs-to-get option
8.5.3 ordering option
8.5.4 first-index option
8.5.5 input option
8.5.6 subblock option
8.5.7 listattr option
8.5.8 filelist option
8.5.9 assign option
8.5.10 common-assign option
8.5.11 copy option
8.5.12 srcfile option
8.5.13 linenum option
8.5.14 output option
8.5.15 autogen option
8.5.16 template option
8.5.17 agarg option
8.5.18 base-name option
8.6 Invoking xml2ag
8.6.1 xml2ag usage help (-?)
8.6.2 output option (-O)
8.6.3 templ-dirs option (-L)
8.6.4 override-tpl option (-T)
8.6.5 lib-template option (-l)
8.6.6 base-name option (-b)
8.6.7 definitions option
8.6.8 load-scheme option (-S)
8.6.9 load-functions option (-F)
8.6.10 skip-suffix option (-s)
8.6.11 select-suffix option (-o)
8.6.12 source-time option
8.6.13 no-fmemopen option (-m)
8.6.14 equate option
8.6.15 writable option
8.6.16 loop-limit option
8.6.17 timeout option (-t)
8.6.18 trace option
8.6.19 trace-out option
8.6.20 show-defs option
8.6.21 define option (-D)
8.6.22 undefine option (-U)
8.7 Replacement for Stdio Formatting Library
9. Some ideas for the future.
A. Copying This Manual
Concept Index
Function Index
[
Top
]
[
Contents
]
[
Index
]
[
?
]
This document was generated on
June, 9 2008
using
texi2html 1.78
.