aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/spawn.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/spawn.c')
-rw-r--r--src/spawn.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/spawn.c b/src/spawn.c
index 6289830..644bf31 100644
--- a/src/spawn.c
+++ b/src/spawn.c
@@ -125,10 +125,9 @@ teco_parse_shell_command_line(const gchar *cmdline, GError **error)
#ifdef G_OS_WIN32
if (!(teco_ed & TECO_ED_SHELLEMU)) {
- teco_qreg_t *reg = teco_qreg_table_find(&teco_qreg_table_globals, "$COMSPEC", 8);
- g_assert(reg != NULL);
teco_string_t comspec;
- if (!reg->vtable->get_string(reg, &comspec.data, &comspec.len, NULL, error))
+ if (!teco_qreg_table_get_string(&teco_qreg_table_globals, "$COMSPEC",
+ &comspec.data, &comspec.len, error))
return NULL;
if (teco_string_contains(comspec, '\0')) {
teco_string_clear(&comspec);
@@ -145,10 +144,9 @@ teco_parse_shell_command_line(const gchar *cmdline, GError **error)
}
#elif defined(G_OS_UNIX)
if (!(teco_ed & TECO_ED_SHELLEMU)) {
- teco_qreg_t *reg = teco_qreg_table_find(&teco_qreg_table_globals, "$SHELL", 6);
- g_assert(reg != NULL);
teco_string_t shell;
- if (!reg->vtable->get_string(reg, &shell.data, &shell.len, NULL, error))
+ if (!teco_qreg_table_get_string(&teco_qreg_table_globals, "$SHELL",
+ &shell.data, &shell.len, error))
return NULL;
if (teco_string_contains(shell, '\0')) {
teco_string_clear(&shell);