Age | Commit message (Collapse) | Author | Files |
|
|
|
|
|
* build-aux/getopt.m4 (CPP): New macro
|
|
|
|
|
|
* build-aux/getopt.m4: Only define lastoptlab if necessary
|
|
* build-aux/getopt.m4 (LASTOPT): New macro. Stops further
option processing.
|
|
* build-aux/getopt.m4: Include grecs/opt.h
|
|
|
|
|
|
* build-aux/getopt.m4 (OPTION): Pushdef __GETOPT_SELECTOR here
(__GATHER_OPTIONS): define __GETOPT_SELECTOR, instead of
pushdeffing it.
|
|
|
|
* build-aux/getopt.m4 (__GATHER_OPTIONS): Properly quote SHORT_OPTS.
In the course of construction it may happen to end in sequence "dnl",
so care should be taken to quote it.
|
|
When used, the variable program_version is defined as a string
containing canonical project name and version. Optionally, the
variable name can be overridden by supplying the desired name as
the option value (e.g. program_version=myver).
* build-aux/getopt.m4 (_getopt_if_option_null): New macro.
(STDFUNC): Handle program_version.
|
|
This should simplify using grecs in programs that implement a subcommand
notion (a la git or svn, e.g. myprod doit -n *).
* build-aux/getopt.m4 (STDFUNC): Initialize the subcmd member of
struct grecs_proginfo.
(OPTIONS_COMMAND_BEGIN): New macro.
* src/grecsopt.h (grecs_proginfo) <subcmd>: New member.
* src/opthelp.c (grecs_print_help): if defined, print the subcommand
and its aliases.
|
|
* build-aux/getopt.m4: Don't clear opterr.
|
|
* build-aux/getopt.m4: Move function declarations to the library.
Introduce new options: nopermute, nousage, noversion.
* src/grecsopt.h: New file.
* src/opthelp.c: New file.
* src/Make-shared.am: Add new files.
* src/Make-static.am: Likewise.
* src/Make.am: Likewise.
|
|
* build-aux/getopt.m4 (args_doc,doc): If empty, don't use N_.
(print_help): If args_doc is empty, don't use gettext.
|
|
|
|
* src/path-parser.c: New file.
* src/format.c (grecs_format_node): Attempt to print value only
if the node is grecs_node_stmt.
* src/grecs.h (grecs_path_parser): New proto.
(grecs_node_from_path_locus): New proto.
* src/lookup.c (grecs_node_from_path_locus): New function.
* src/Make.am (GRECS_SRC): Add path-parser.c.
* build-aux/getopt.m4: Implement print_help_hook.
|
|
* .gitignore: Add gitid.h
* Makefile.am: Build gitid.h.
* am/grecs.m4: Remove GRECS_VEROK_AT.
* build-aux/getopt.m4 (print_version_hook): New variable.
(print_version): Call print_version_hook, if defined.
* src/Make.am (INCLUDES): Update.
* src/grecs.h (grecs_version_info) <id>: New member.
* src/version.c (grecs_version): Initialize id.
* tests/Makefile.am: Remove GRECS_VEROK_AT.
* tests/testsuite.at: Likewise.
|
|
* build-aux/getopt.m4: Fixup cmdline_tree, if needed.
|
|
* am/grecs.m4 (GRECS_SETUP): New flags: getopt and git2chg.
* src/format.c (grecs_format_locus): Ignore NULL loci.
(grecs_format_node_ident): Rename to grecs_format_node_path.
Change semantics of the second argument.
(grecs_format_value): Change signature (take flags).
Correctly quote string values.
* src/grecs.h: Protect the contents with #ifndef _GRECS_H.
(GRECS_AGGR): New flag (for future use).
(grecs_node) <prev>: New member.
(grecs_format_value): Change signature.
(grecs_format_node_ident): Rename to grecs_format_node_path.
(GRECS_NODE_FLAG_PATH,GRECS_NODE_FLAG_VALUE)
(GRECS_NODE_FLAG_QUOTE,GRECS_NODE_FLAG_QUOTE_HEX)
(GRECS_NODE_FLAG_DEFAULT): New flags.
(grecs_node_from_path): New proto.
* src/lookup.c (grecs_node_from_path): New function.
* src/tree.c (grecs_node_bind): Keep track of node->prev.
|