| 303 | |
| 304 | |
| 305 | int |
| 306 | main (int argc, char **argv) |
| 307 | { |
| 308 | initialize_main (&argc, &argv); |
| 309 | set_program_name (argv[0]); |
| 310 | setlocale (LC_ALL, ""); |
| 311 | bindtextdomain (PACKAGE, LOCALEDIR); |
| 312 | textdomain (PACKAGE); |
| 313 | |
| 314 | initialize_exit_failure (EXPR_FAILURE); |
| 315 | atexit (close_stdout); |
| 316 | |
| 317 | parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE_NAME, VERSION, |
| 318 | usage, AUTHORS, (char const *) NULL); |
| 319 | |
| 320 | /* The above handles --help and --version. |
| 321 | Since there is no other invocation of getopt, handle '--' here. */ |
| 322 | if (1 < argc && streq (argv[1], "--")) |
| 323 | { |
| 324 | --argc; |
| 325 | ++argv; |
| 326 | } |
| 327 | |
| 328 | if (argc <= 1) |
| 329 | { |
| 330 | error (0, 0, _("missing operand")); |
| 331 | usage (EXPR_INVALID); |
| 332 | } |
| 333 | |
| 334 | args = argv + 1; |
| 335 | |
| 336 | VALUE *v = eval (true); |
| 337 | if (!nomoreargs ()) |
| 338 | error (EXPR_INVALID, 0, _("syntax error: unexpected argument %s"), |
| 339 | quotearg_n_style (0, locale_quoting_style, *args)); |
| 340 | |
| 341 | printv (v); |
| 342 | |
| 343 | main_exit (null (v)); |
| 344 | } |
| 345 | |
| 346 | /* Return a VALUE for I. */ |
| 347 |
nothing calls this directly
no test coverage detected