aboutsummaryrefslogtreecommitdiff
path: root/libshouldbeinlibc/argp-help.c
Commit message (Collapse)AuthorAgeFilesLines
* 1998-08-12 Roland McGrath <roland@baalperazim.frob.com>Roland McGrath1998-08-121-1700/+0
| | | | | | | * argp-ba.c, argp-eexst.c, argp-ex1.c, argp-ex2.c, argp-ex3.c, argp-ex4.c, argp-fmtstream.c, argp-fmtstream.h argp-fs-xinl.c, argp-help.c, argp-namefrob.h argp-parse.c, argp-pv.c, argp-pvh.c, argp-test.c, argp-xinl.c, argp.h: Removed, now in libcwhereitshouldbe.
* (argp_args_usage):Miles Bader1997-06-181-6/+7
| | | | | Don't modify `fdoc' value since it is used to distinguish filtered strings from unmodifed strings.
* Sync with libc version (there were minor whitespace differences, etc).Miles Bader1997-06-051-5/+5
|
* Undo half-baked change.Miles Bader1997-06-051-4/+0
|
* (_help):Miles Bader1997-06-051-2/+6
| | | | Use uparams.usage_indent instead of the USAGE_INDENT macro.
* (argp_args_usage):Miles Bader1997-05-271-2/+1
| | | | Supply correct argp to filter_doc.
* (__argp_state_help, argp_args_usage, hol_help):Miles Bader1997-05-261-3/+3
| | | | Replace references to STATE->argp with STATE->root_argp.
* (hol_add_cluster):Miles Bader1997-05-231-0/+1
| | | | Initialize CL->depth.
* (_help): Supply STATE to argp_args_usage.Miles Bader1997-05-201-13/+19
| | | | | (argp_args_usage): Add filtering of the args doc string. (comma): Print cluster headers for the first entry too.
* (canon_doc_option): Correct ctype tests.Miles Bader1997-05-091-5/+5
|
* (__argp_state_help):Miles Bader1997-03-061-1/+1
| | | | Use ARGP_ERR_EXIT_STATUS when exiting due to an error.
* (usage_long_opt, usage_argful_short_opt, add_argless_short_opt):Miles Bader1997-02-211-13/+17
| | | | Implement OPTION_NO_USAGE.
* Doc fix.Miles Bader1997-02-211-5/+4
|
* (struct uparams):Miles Bader1997-02-211-48/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New type. (uparams): New variable. (struct uparam_name): New type. (uparam_names): New variable. (fill_in_uparams): New function. (_help): Call fill_in_uparams if necessary. (struct hol_help_state): New type. (hol_help): Add HHSTATE variable & pass to hol_entry_help. Remove LAST_ENTRY & SEP_GROUPS variables. If any suplicate arguments were suppressed, print explanatory note. (print_header, hol_entry_help): Use UPARAMS fields rather than constants. (__argp_failure, __argp_error, __argp_state_help): Make STATE parameter const. (struct pentry_state): Add hhstate field. Remove prev_entry & sep_groups fields. (print_header, comma): Use PEST->hhstate fields. (filter_doc): Replace PEST parameter with STATE. (__argp_failure): Only exit if STATE says it's ok. (hol_entry_help): Add HHSTATE parameter. Remove prev_entry & sep_groups parameters. Suppress duplicate arguments if requested, and note the fact. <stddef.h>: New include.
* (__argp_error, __argp_failure, __argp_state_help):Miles Bader1997-02-201-3/+3
| | | | Use PROGRAM_INVOCATION_SHORT_NAME instead of PROGRAM_INVOCATION_NAME.
* Merge changes from libc 1997-02-17.Miles Bader1997-02-201-10/+10
|
* (hol_help):Miles Bader1997-02-161-99/+217
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add STATE param. (argp_doc): Deal with help filters. Add STATE param. (struct hol_entry): Add argp field. (struct pentry_state): Add state field. (hol_add_cluster): Add ARGP argument. (print_header): Filter STR if necesary. (usage_argful_short_opt): Use space. (__argp_state_help): Call _help instead of __argp_help. (filter_doc): New function. (space): New function. (__argp_help): Now a wrapper that calls _help. (hol_entry_help): Add STATE param. Do user filtering if necessary. (struct hol_cluster): Add argp field. (make_hol): Make this first parameter ARGP instead of OPT. Set each entry's argp field. (argp_hol): Passin ARGP to make_hol, not ARGP->options. Pass ARGP to hol_add_cluster. (_help): Renamed from __argp_help. Add STATE argument, which pass on appropiately.
* (hol_entry_help, __argp_help, argp_args_usage, argp_doc, usage_long_opt, arg,Miles Bader1997-02-141-22/+44
| | | | | | | hol_entry_help): Call gettext in appropriate places. [!_] (_): New macro. [!_ && HAVE_LIBINTL_H] <libintl.h>: New include.
* Update to libc-970214 version.Miles Bader1997-02-141-7/+9
|
* [HAVE_CONFIG_H] <config.h>: New include.Miles Bader1997-02-131-1/+5
|
* Update to libc-970212 versions.Miles Bader1997-02-131-22/+21
|
* (__progname, __progname_full):Miles Bader1997-02-121-5/+3
| | | | | | | | Decls removed. (__argp_failure, __argp_error, __argp_state_help): Use PROGRAM_INVOCATION_NAME instead of __PROGNAME_FULL. (__argp_error): Use STATE->name if it's available.
* (argp_args_usage): Don't trash memory.Miles Bader1997-02-121-2/+4
|
* (make_hol): Initialize clusters field.Miles Bader1997-02-121-9/+12
| | | | (argp_args_usage, __argp_state_help): Make multiple-level args-docs work.
* (argp_args_usage):Miles Bader1997-02-121-28/+97
| | | | | | | | Add LEVELS & ADVANCE arguments, and implement multi-pattern output. (__argp_help): Print multiple argument patterns if there are any. (argp_args_levels): New function.
* (__argp_state_help): Use __argp_help, not argp_help.Miles Bader1997-02-121-2/+2
|
* (argp_doc):Miles Bader1997-02-121-140/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use strchr instead of index. (__argp_error): Renamed from argp_error. (__argp_state_help, __argp_error, __argp_failure): Use __PROGNAME_FULL instead of PROGRAM_INVOCATION_NAME. (until_short): Return correct key. (__progname, __progname_full): New declarations. (__argp_failure): Renamed from argp_failure. [weak_alias] (argp_help, argp_state_help, argp_error, argp_failure): New weak aliases. (__argp_state_help): Renamed from argp_state_help. (hol_entry_cmp): Use __strcasecmp instead of strcasecmp. (hol_append): Use memcpy instead of bcopy. (__argp_help): Renamed from argp_help. (hol_entry_cmp, usage_argful_short_opt, usage_long_opt): Don't use ?: operator. (make_hol): Increment default group for option headers. Make static. (group_cmp): Put group 0 before other groups, not in the middle. (indent_to, arg, struct pentry_state, print_header, comma, hol_entry_help, hol_help, usage_argful_short_opt, usage_long_opt, hol_usage, argp_args_usage, argp_doc, argp_help): Use argp_fmtstream_t & associated functions instead of stdio streams. "argp-namefrob.h": New include. "argp-fmtstream.h": New include. <linewrap.h>: Include removd.
* (hol_entry_short_iterate, hol_entry_long_iterate):Miles Bader1997-02-091-143/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add COOKIE argument, also to signature of FUNC. (oshort): Exclude options for which odoc is true. (struct pentry_state): New type. (until_short): New function, from old nested function func1 in hol_entry_first_short. Only return short key when oshort is true. (hol_entry_first_short): Remove func1 and use until_short instead. (add_argless_short_opt, usage_argful_short_opt, usage_long_opt): New functions (were nested in hol_usage). (hol_usage): Use un-nested functions. (hol_entry_qcmp): New function. (hol_sort): Remove cmp and use hol_entry_qcmp instead. (hol_entry_cmp): Correctly place odoc options. (canon_doc_option): New function. (odoc): New macro. (arg, print_header, comma): New functions (were nested in hol_entry_help) (hol_entry_help): Correctly output odoc options. Use un-nested helper functions, with state block. (argp_state_help): Add ARGP_HELP_LONG_ONLY to FLAGS if STATE has ARGP_LONG_ONLY set.
* (hol_free):Miles Bader1996-10-241-143/+328
| | | | | | | | | | | | | | | | | | | | | | | | | | | Free clusters. (argp_args_usage, argp_doc): Use the new type of argp child vector. (hol_entry_cmp, group_cmp, hol_cluster_cmp, hol_cluster_base, hol_add_cluster): New functions. (hol_entry_help): Add gunk to print cluster headers. (argp_hol): Add, and use the new CLUSTER argument. Use the new type of argp child vector, and make clusters. (hol_append): Deal with clusters. Always use hol_free to free MORE, and just mark it's entries as invalid if we steal them. (make_hol): Accept new CLUSTER argument, and fill in the corresponding entry fields with it. (hol_sort): Use hol_entry_cmp. (hol_entry_help: comma): Only print cluster headers for real clusters. Emit a newline after cluster headers. (argp_help): Pass new CLUSTER argument to argp_hol.
* (argp_help):Miles Bader1996-09-021-9/+19
| | | | | | Print documentation only according to the ARGP_HELP_*_DOC bits in FLAGS. Possibly print bug report address if ARGP_HELP_BUG_ADDR is set. Replace FIRST by ANYTHING (sense inverted).
* (argp_doc): Add the POST, FIRST_ONLY, and PRE_BLANK arguments, & return val.Miles Bader1996-08-271-10/+39
| | | | | (argp_help): Supply new args to argp_doc, and additional call before arg help. Add note about --usage to `Try...' msg.
* (hol_entry_help): Never return without restoring margins.Miles Bader1996-07-261-3/+5
|
* (hol_usage):Miles Bader1996-07-191-1/+1
| | | | Allocate enough space in SHORT_NO_ARG_OPTS for the '\0' terminator.
* (argp_help): Set the lmargin after printing the start of the usage message,Miles Bader1996-07-161-1/+6
| | | | so that it won't get indented.
* (argp_help): "OPTIONS..." -> "OPTION...".Miles Bader1996-07-101-1/+1
|
* (argp_failure): If FMT is 0, don't print `: MSG'.Miles Bader1996-06-191-7/+11
|
* (argp_help, argp_state_help, argp_error, argp_failure): Handle null streams.Miles Bader1996-06-171-26/+37
|
* (argp_help): Add and use NAME argument.Miles Bader1996-06-171-13/+54
| | | | | | | (argp_error): Use STATE->err_stream instead of STDERR. (argp_state_help): Supply NAME argument to argp_help. (argp_failure): New function. (indent_to): Terminate.
* (hol_usage):Miles Bader1996-05-231-11/+33
| | | | | | | | Prefix each option desc with a space. Do manual wrapping of descs with an embedded space. Don't set wrap margin (done elsewhere now). (argp_args_usage): Do manual line wrapping because of embedded spaces. (argp_help): Set wrap & left margins when printing usage.
* (argp_help): Just assign STREAM instead of using 2 vars.Miles Bader1996-05-091-2/+2
|
* (argp_args_usage): add_usage_item -> fprintf.Michael I. Bushnell1996-05-091-3/+3
| | | | | (argp_help): Don't shadow arg; change parm STREAM to be STREAMARG and adjust initialization of STREAM variable to use the renamed parm.
* (hol_entry_help, hol_help, hol_usage, argp_args_usage, argp_doc, argp_help):Miles Bader1996-05-081-88/+84
| | | | | | | | Use stdio streams and line_wrap_ functions instead of line_ functions. (indent_to): New function. (argp_usage_arg): Function removed. <linewrap.h>: New include. <line.h>: Include removed.
* (argp_doc, argp_args_usage, argp_hol): Rename PARENTS field to CHILDREN.Miles Bader1996-03-191-32/+47
| | | | | | | (argp_error): Take an argp_state instead of an argp, and only doing anything if ARGP_NO_ERRS isn't set in it. (argp_state_help): New function. (argp_help): Don't interpret exiting options anymore.
* (hol_entry_help): Don't print extraneous blank lines.Miles Bader1996-03-021-1/+2
|
* (hol_entry_help): Handle null group headers nicely.Miles Bader1996-02-281-3/+3
|
* (struct hol_entry, make_hol, hol_entry_short_iterate, hol_entry_long_iterate,Miles Bader1996-02-051-33/+38
| | | | | | hol_entry_first_short, hol_entry_first_long, hol_find_entry, hol_sort, hol_entry_help, argp_hol, argp_args_usage, argp_doc, argp_help, argp_error): Add `const' where appropriate.
* (hol_entry_help):Miles Bader1996-01-231-25/+49
| | | | | | | | | | | Correctly print group headers, and precede them with a blank line. (struct hol_entry, make_hol, hol_sort, hol_set_group): Rename the `set_class' field to be `group'. (hol_help, hol_entry_help): After a group header has been printed, separate subsequent groups with a blank line. (hol_set_group): Renamed from hol_set_sort_class. (argp_help): Use hol_set_group instead of hol_set_sort_class.
* (make_hol):Miles Bader1995-12-211-7/+17
| | | | | | Use the new GROUP field in struct argp_option to initialize sort_classes. (HEADER_COL): New macro. (hol_entry_help): Deal with group headers.
* (argp_error): New function.Miles Bader1995-10-201-0/+22
|
* (hol_find_entry): Don't increment ENTRY prematurely.Miles Bader1995-10-111-103/+199
| | | | | | | | | | | | | (hol_entry_help): Print the right documentation string for each entry. (argp_help): Renamed from argp_usage. (make_hol): Deal with a null value of OPT. If there are no entries, don't define the ENTRIES or SHORT_OPTIONS fields. (hol_free): Don't free ENTRIES or SHORT_OPTIONS unless there are any. (hol_sort): Don't sort unless there are some entries. (hol_usage): Don't do anything unless there are some entries. (hol_sort): Sort int he correct order. (hol_append): Implement. (argp_help): Add the ARGP_HELP_SHORT_USAGE case.