tuxji opened a new pull request #545:
URL: https://github.com/apache/daffodil/pull/545
Remove dependency on argp and use getopt instead. Build with clang
instead of gcc. Lower minimum required Mini-XML version from 3.2 to
3.0. Add missing LICENSE and NOTICE files to daffodil-runtime2 jar.
main.yml: Build with clang and llvm-ar instead of cc and ar.
BUILD.md: Lower Mini-XML version to 3.0. Remove argp and gcc
instructions. Add clang instructions.
README.md: Lower Mini-XML version to 3.0.
LICENSE: Add to daffdil-runtime2 jar.
NOTICE: Add to daffdil-runtime2 jar.
Makefile: Improve comments explaining how to use targets.
daffodil_argp.[ch]: Rename to daffodil_getopt.[ch].
daffodil_getopt.c: Remove all argp structs and handlers. Simplify to
just a single function calling getopt and returning a pointer to Error
if any error happens. Note there is no portable way to parse
"daffodil [options] command [more options] arguments" with getopt. We
will code the simplest way (hope that getopt will move all non-option
arguments to the end) and users will have to put all options before
all arguments if their getopt doesn't support that behavior ("daffodil
[options] [more options] command arguments").
daffodil_getopt.h: Include "errors.h" and make parse_daffodil_cli
return a pointer to Error so we can use continue_or_exit(error) for
all errors/messages.
daffodil_main.c: Remove fflush_continue_or_exit (no really good reason
to flush a stream right before closing it). Call continue_or_exit
after parse_daffodil_cli to handle any CLi error. Simplify rest of
code in main function.
errors.c: Move eof_or_error, get_diagnostics, add_diagnostics up so
they come first in file. Add error_message switch cases to define all
CLI messages. Add print_maybe_stop switch cases to print all CLI
messages, making sure to call printf & exit instead of error for CLI
help & version messages.
errors.h: Add CLI messages to ErrorCode and "int c" member to
ErrorCode anonymous union. Rename ERR_INFOSET_READ/WRITE to
CLI_INVALID_INFOSET since it's a CLI message too. Declare
daffodil_program_version (we were using argp_program_version before
which is no longer available) and move eof_or_error up before
get_diagnostics.
NestedUnion.c, ex_nums.c: Regenerate with code generator.
CodeGenerator.scala: Remove "-largp" since we no longer need it.
CodeGeneratorState.scala: Replace argp_program_version with
daffodil_program_version since we no longer use "argp.h".
DAFFODIL-2500 DAFFODIL-2505 DAFFODIL-2508
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]