* Execute a script. */
| 359 | * Execute a script. |
| 360 | */ |
| 361 | void |
| 362 | db_run_cmd(db_expr_t addr, bool have_addr, db_expr_t count, char *modif) |
| 363 | { |
| 364 | int t; |
| 365 | |
| 366 | /* |
| 367 | * Right now, we accept exactly one argument. In the future, we |
| 368 | * might want to accept flags and arguments to the script itself. |
| 369 | */ |
| 370 | t = db_read_token(); |
| 371 | if (t != tIDENT) |
| 372 | db_error("?\n"); |
| 373 | |
| 374 | if (db_read_token() != tEOL) |
| 375 | db_error("?\n"); |
| 376 | |
| 377 | db_script_exec(db_tok_string, 1); |
| 378 | } |
| 379 | |
| 380 | /* |
| 381 | * Print or set a named script, with the set portion broken out into its own |
nothing calls this directly
no test coverage detected