aboutsummaryrefslogtreecommitdiff
path: root/build-aux/getopt.m4
AgeCommit message (Collapse)AuthorFiles
2022-01-12Update copyright yearsSergey Poznyakoff1
2021-01-06Update copyright yearsSergey Poznyakoff1
2019-06-24getopt.m4: add macro to insert a CPP directive in all diversionsSergey Poznyakoff1
* build-aux/getopt.m4 (CPP): New macro
2018-12-07Revise getopt.m4Sergey Poznyakoff1
2018-03-15Minor fixSergey Poznyakoff1
2016-08-05Minor fixSergey Poznyakoff1
* build-aux/getopt.m4: Only define lastoptlab if necessary
2016-08-05New operator to stop option processingSergey Poznyakoff1
* build-aux/getopt.m4 (LASTOPT): New macro. Stops further option processing.
2016-07-04Remove leftover includesSergey Poznyakoff1
* build-aux/getopt.m4: Include grecs/opt.h
2016-07-04Update copyright yearsSergey Poznyakoff1
2015-12-17Update copyright yearsSergey Poznyakoff1
2015-01-22Fix bugs in getopt.m4Sergey Poznyakoff1
* build-aux/getopt.m4 (OPTION): Pushdef __GETOPT_SELECTOR here (__GATHER_OPTIONS): define __GETOPT_SELECTOR, instead of pushdeffing it.
2015-01-21Use separate namespace for internal symbols in getopt.m4Sergey Poznyakoff1
2014-03-05Bugfix in getopt.m4Sergey Poznyakoff1
* 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.
2013-12-18New option program_version (OPTION_BEGIN macro).Sergey Poznyakoff1
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.
2013-04-25Add support for subcommand names.Sergey Poznyakoff1
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.
2012-09-27Bugfix.Sergey Poznyakoff1
* build-aux/getopt.m4: Don't clear opterr.
2012-09-26Improve getopt interface.Sergey Poznyakoff1
* 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.
2012-01-29Don't pass empty string to gettext.Sergey Poznyakoff1
* build-aux/getopt.m4 (args_doc,doc): If empty, don't use N_. (print_help): If args_doc is empty, don't use gettext.
2012-01-03Happy GNU YearSergey Poznyakoff1
2011-05-19Implement "path-style" (Xres-style) config parser.Sergey Poznyakoff1
* 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.
2011-05-08Various fixes.Sergey Poznyakoff1
* .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.
2011-05-07Minor fix.Sergey Poznyakoff1
* build-aux/getopt.m4: Fixup cmdline_tree, if needed.
2011-05-03Various impovements.Sergey Poznyakoff1
* 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.

Return to:

Send suggestions and report system problems to the System administrator.