| 467 | } sh_t; |
| 468 | |
| 469 | static void sh_set(sh_t *s, const char *name, const sh_val_t *v, bool local) { |
| 470 | if (!sh_grow((void **)&s->undo, &s->cap_undo, s->nundo, sizeof(*s->undo))) { |
| 471 | return; |
| 472 | } |
| 473 | s->undo[s->nundo++] = (sh_undo_t){name, cbm_ht_get(s->env, name), local}; |
| 474 | cbm_ht_set(s->env, name, (void *)v); |
| 475 | } |
| 476 | |
| 477 | static sh_mark_t sh_mark(const sh_t *s) { |
| 478 | return (sh_mark_t){s->nundo, s->cwd, s->ndirs}; |
no test coverage detected