aboutsummaryrefslogtreecommitdiff
path: root/build-aux/getopt.m4
diff options
context:
space:
mode:
Diffstat (limited to 'build-aux/getopt.m4')
-rw-r--r--build-aux/getopt.m424
1 files changed, 12 insertions, 12 deletions
diff --git a/build-aux/getopt.m4 b/build-aux/getopt.m4
index 86bac99..1b278bc 100644
--- a/build-aux/getopt.m4
+++ b/build-aux/getopt.m4
@@ -1,4 +1,4 @@
1dnl This file is part of grecs 1dnl This file is part of argot
2dnl Copyright (C) 2007-2016 Sergey Poznyakoff 2dnl Copyright (C) 2007-2016 Sergey Poznyakoff
3dnl 3dnl
4dnl Grecs is free software; you can redistribute it and/or modify 4dnl Grecs is free software; you can redistribute it and/or modify
@@ -254,11 +254,11 @@ popdef([<__GETOPT_SELECTOR>])>])
254 254
255dnl OPTNODE(name, value) 255dnl OPTNODE(name, value)
256define([<OPTNODE>],[<do { 256define([<OPTNODE>],[<do {
257 struct grecs_node *node = grecs_node_from_path($1, $2); 257 struct argot_node *node = argot_node_from_path($1, $2);
258 if (!cmdline_tree) 258 if (!cmdline_tree)
259 cmdline_tree = node; 259 cmdline_tree = node;
260 else 260 else
261 grecs_node_bind(cmdline_tree, node, 0); 261 argot_node_bind(cmdline_tree, node, 0);
262} while(0) 262} while(0)
263>]) 263>])
264 264
@@ -306,7 +306,7 @@ __GETOPT_LASTOPT
306>],[<$3 = optind;>]) 306>],[<$3 = optind;>])
307 if (cmdline_tree) 307 if (cmdline_tree)
308 { 308 {
309 struct grecs_node *rn = grecs_node_create(grecs_node_root, NULL); 309 struct argot_node *rn = argot_node_create(argot_node_root, NULL);
310 rn->down = cmdline_tree; 310 rn->down = cmdline_tree;
311 cmdline_tree = rn; 311 cmdline_tree = rn;
312 } 312 }
@@ -323,7 +323,7 @@ static char *subcommands[] = {
323 _getopt_sc_array($3) 323 _getopt_sc_array($3)
324 NULL 324 NULL
325};>]) 325};>])
326static struct grecs_proginfo proginfo = { 326static struct argot_proginfo proginfo = {
327 $2, /* progname */ 327 $2, /* progname */
328 ifelse([<$3>],,NULL,subcommands), /* subcommands */ 328 ifelse([<$3>],,NULL,subcommands), /* subcommands */
329 ifelse([<$4>],,"",N_("$4")), /* docstring */ 329 ifelse([<$4>],,"",N_("$4")), /* docstring */
@@ -344,7 +344,7 @@ _getopt_if_option_set([<copyright_holder>],dnl
344 PACKAGE_URL, /* url */ 344 PACKAGE_URL, /* url */
345 NULL /* epilogue */ 345 NULL /* epilogue */
346}; 346};
347static struct grecs_node *cmdline_tree; 347static struct argot_node *cmdline_tree;
348 348
349_getopt_if_option_set([<program_version>],dnl 349_getopt_if_option_set([<program_version>],dnl
350[<const char *_getopt_if_option_null(program_version,program_version,[<_getopt_get_option(program_version)>]) = $2 " (" PACKAGE_NAME ") " PACKAGE_VERSION; 350[<const char *_getopt_if_option_null(program_version,program_version,[<_getopt_get_option(program_version)>]) = $2 " (" PACKAGE_NAME ") " PACKAGE_VERSION;
@@ -374,20 +374,20 @@ _getopt_if_option_set([<gnu>],[<
374 GROUP([<Other options>]) 374 GROUP([<Other options>])
375 OPTION([<help>],h,,[<Give this help list>]) 375 OPTION([<help>],h,,[<Give this help list>])
376 BEGIN 376 BEGIN
377 grecs_print_help(&proginfo); 377 argot_print_help(&proginfo);
378 exit(0); 378 exit(0);
379 END 379 END
380_getopt_if_option_set([<nousage>],,[< 380_getopt_if_option_set([<nousage>],,[<
381 OPTION([<usage>],,,[<Give a short usage message>]) 381 OPTION([<usage>],,,[<Give a short usage message>])
382 BEGIN 382 BEGIN
383 grecs_print_usage(&proginfo); 383 argot_print_usage(&proginfo);
384 exit(0); 384 exit(0);
385 END>]) 385 END>])
386_getopt_if_option_set([<noversion>],,[< 386_getopt_if_option_set([<noversion>],,[<
387 OPTION([<version>],V,,[<Print program version>]) 387 OPTION([<version>],V,,[<Print program version>])
388 BEGIN 388 BEGIN
389 /* Give version */ 389 /* Give version */
390 grecs_print_version(&proginfo, stdout); 390 argot_print_version(&proginfo, stdout);
391 exit(0); 391 exit(0);
392 END>])>]) 392 END>])>])
393divert 393divert
@@ -400,8 +400,8 @@ _getopt_if_option_set([<nostdincl>],,[<
400#endif 400#endif
401#include <unistd.h> 401#include <unistd.h>
402>]) 402>])
403#include <grecs.h> 403#include <argot.h>
404#include <grecs/opt.h> 404#include <argot/opt.h>
405/* Option codes */ 405/* Option codes */
406enum { 406enum {
407 _OPTION_INIT=255, 407 _OPTION_INIT=255,
@@ -414,7 +414,7 @@ static struct option long_options[] = {
414 {0, 0, 0, 0} 414 {0, 0, 0, 0}
415}; 415};
416#endif 416#endif
417static struct grecs_opthelp opthelp[] = { 417static struct argot_opthelp opthelp[] = {
418 undivert(3) 418 undivert(3)
419}; 419};
420undivert(5) 420undivert(5)

Return to:

Send suggestions and report system problems to the System administrator.