diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2021-04-25 17:14:54 +0200 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2021-04-25 17:49:21 +0200 |
commit | c028d9b280d61308610fa9acdf3bc1894cd985fa (patch) | |
tree | 88f1adafb1e9c9eac146920171485524d95b8846 | |
parent | b61279a1bc101757d2581890cb59764084f51132 (diff) | |
download | libexpat-git-xmlwf-simplify-synopsis.tar.gz |
xmlwf: Simplify synopsisxmlwf-simplify-synopsis
-rw-r--r-- | expat/Changes | 1 | ||||
-rw-r--r-- | expat/doc/xmlwf.xml | 30 | ||||
-rw-r--r-- | expat/xmlwf/xmlwf.c | 9 | ||||
-rwxr-xr-x | expat/xmlwf/xmlwf_helpgen.py | 7 | ||||
-rwxr-xr-x | expat/xmlwf/xmlwf_helpgen.sh | 3 |
5 files changed, 25 insertions, 25 deletions
diff --git a/expat/Changes b/expat/Changes index f286e982..e09c2e37 100644 --- a/expat/Changes +++ b/expat/Changes @@ -7,6 +7,7 @@ Release X.X.X XXX XXXXX XX XXXX #457 Unexpose symbol _INTERNAL_trim_to_complete_utf8_characters #458 #459 CMake: Support absolute paths for both CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR + #468 xmlwf: Simplify synopsis (in help output, and in the man page) Release 2.3.0 Thu March 25 2021 Bug fixes: diff --git a/expat/doc/xmlwf.xml b/expat/doc/xmlwf.xml index 61ef50a8..fbe0ec87 100644 --- a/expat/doc/xmlwf.xml +++ b/expat/doc/xmlwf.xml @@ -44,26 +44,16 @@ <refsynopsisdiv> <cmdsynopsis> <command>&dhpackage;</command> - <arg><option>-s</option></arg> - <arg><option>-n</option></arg> - <arg><option>-p</option></arg> - <arg><option>-x</option></arg> - - <arg><option>-e <replaceable>encoding</replaceable></option></arg> - <arg><option>-w</option></arg> - - <arg><option>-d <replaceable>output-dir</replaceable></option></arg> - <arg><option>-c</option></arg> - <arg><option>-m</option></arg> - - <arg><option>-r</option></arg> - <arg><option>-t</option></arg> - <arg><option>-N</option></arg> - - <arg><option>-k</option></arg> - <arg><option>-v</option></arg> - - <arg>file ...</arg> + <arg><replaceable>OPTIONS</replaceable></arg> + <arg><replaceable>FILE</replaceable> ...</arg> + </cmdsynopsis> + <cmdsynopsis> + <command>&dhpackage;</command> + <option>-h</option> + </cmdsynopsis> + <cmdsynopsis> + <command>&dhpackage;</command> + <option>-v</option> </cmdsynopsis> </refsynopsisdiv> diff --git a/expat/xmlwf/xmlwf.c b/expat/xmlwf/xmlwf.c index 26bcb0cd..a860450a 100644 --- a/expat/xmlwf/xmlwf.c +++ b/expat/xmlwf/xmlwf.c @@ -867,9 +867,10 @@ usage(const XML_Char *prog, int rc) { * xmlwf/xmlwf_helpgen.sh in here. */ /* clang-format off */ - T("usage: %s [-s] [-n] [-p] [-x] [-e ENCODING] [-w] [-r] [-k] [-d DIRECTORY]\n") - T(" [-c | -m | -t] [-N]\n") - T(" [FILE [FILE ...]]\n") + T("usage:\n") + T(" %s [OPTIONS] [FILE ...]\n") + T(" %s -h\n") + T(" %s -v\n") T("\n") T("xmlwf - Determines if an XML document is well-formed\n") T("\n") @@ -907,7 +908,7 @@ usage(const XML_Char *prog, int rc) { T("xmlwf of libexpat is software libre, licensed under the MIT license.\n") T("Please report bugs at https://github.com/libexpat/libexpat/issues. Thank you!\n") , /* clang-format on */ - prog); + prog, prog, prog); exit(rc); } diff --git a/expat/xmlwf/xmlwf_helpgen.py b/expat/xmlwf/xmlwf_helpgen.py index 60a86511..d20f598a 100755 --- a/expat/xmlwf/xmlwf_helpgen.py +++ b/expat/xmlwf/xmlwf_helpgen.py @@ -42,7 +42,14 @@ xmlwf of libexpat is software libre, licensed under the MIT license. Please report bugs at https://github.com/libexpat/libexpat/issues. Thank you! """ +usage = """ + %(prog)s [OPTIONS] [FILE ...] + %(prog)s -h + %(prog)s -v +""" + parser = argparse.ArgumentParser(prog='xmlwf', add_help=False, + usage=usage, description='xmlwf - Determines if an XML document is well-formed', formatter_class=argparse.RawTextHelpFormatter, epilog=epilog) diff --git a/expat/xmlwf/xmlwf_helpgen.sh b/expat/xmlwf/xmlwf_helpgen.sh index 6b0fbf92..b98f273f 100755 --- a/expat/xmlwf/xmlwf_helpgen.sh +++ b/expat/xmlwf/xmlwf_helpgen.sh @@ -29,7 +29,8 @@ # USE OR OTHER DEALINGS IN THE SOFTWARE. ./xmlwf/xmlwf_helpgen.py | sed \ - -e 's,usage: xmlwf,usage: %s,' \ + -e 's,usage: ,usage:,' \ + -e 's, xmlwf, %s,' \ -e 's, \[-h | -v\],,' \ -e 's,^, T(",' \ -e 's,$,\\n"),' |