The program literal an argument spells: a leading literal, or the first * element of a collection when that element is one. A program held in a * variable (`[binary, "--version"]`) is no literal: the arguments after it * are not the program. */
| 635 | * variable (`[binary, "--version"]`) is no literal: the arguments after it |
| 636 | * are not the program. */ |
| 637 | static bool spawn_expr_literal(const char *expr, char *out, size_t n) { |
| 638 | char element[CBM_SZ_256]; |
| 639 | for (int depth = 0; depth < 3; depth++) { |
| 640 | expr = spawn_skip_label(spawn_skip_space(expr)); |
| 641 | if (spawn_leading_literal(expr, out, n)) { |
| 642 | return true; |
| 643 | } |
| 644 | if (!spawn_first_element(expr, element, sizeof(element))) { |
| 645 | return false; |
| 646 | } |
| 647 | expr = element; |
| 648 | } |
| 649 | return false; |
| 650 | } |
| 651 | |
| 652 | /* A literal from the argument at `index`. Tcl words are literals unquoted; |
| 653 | * elsewhere an unquoted argument counts only when the extractor itself read |
no test coverage detected