aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ring.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ring.c')
-rw-r--r--src/ring.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ring.c b/src/ring.c
index 926ee72..a608a43 100644
--- a/src/ring.c
+++ b/src/ring.c
@@ -534,7 +534,7 @@ teco_state_edit_file_initial(teco_machine_main_t *ctx, GError **error)
}
gboolean
-teco_state_edit_file_process(teco_machine_main_t *ctx, const teco_string_t *str,
+teco_state_edit_file_process(teco_machine_main_t *ctx, teco_string_t str,
gsize new_chars, GError **error)
{
g_assert(new_chars > 0);
@@ -550,18 +550,18 @@ teco_state_edit_file_process(teco_machine_main_t *ctx, const teco_string_t *str,
}
static teco_state_t *
-teco_state_edit_file_done(teco_machine_main_t *ctx, const teco_string_t *str, GError **error)
+teco_state_edit_file_done(teco_machine_main_t *ctx, teco_string_t str, GError **error)
{
if (ctx->flags.mode > TECO_MODE_NORMAL)
return &teco_state_start;
if (!ctx->flags.allow_filename) {
- /* process_cb() already throws error if str->len > 0 */
- g_assert(str->len == 0);
+ /* process_cb() already throws error if str.len > 0 */
+ g_assert(str.len == 0);
return &teco_state_start;
}
- g_autofree gchar *filename = teco_file_expand_path(str->data);
+ g_autofree gchar *filename = teco_file_expand_path(str.data);
if (teco_globber_is_pattern(filename)) {
g_auto(teco_globber_t) globber;
teco_globber_init(&globber, filename, G_FILE_TEST_IS_REGULAR);
@@ -644,7 +644,7 @@ TECO_DEFINE_STATE_EXPECTGLOB(teco_state_edit_file,
);
static teco_state_t *
-teco_state_save_file_done(teco_machine_main_t *ctx, const teco_string_t *str, GError **error)
+teco_state_save_file_done(teco_machine_main_t *ctx, teco_string_t str, GError **error)
{
if (ctx->flags.mode > TECO_MODE_NORMAL)
return &teco_state_start;
@@ -652,7 +652,7 @@ teco_state_save_file_done(teco_machine_main_t *ctx, const teco_string_t *str, GE
if (!teco_expressions_eval(FALSE, error))
return NULL;
- g_autofree gchar *filename = teco_file_expand_path(str->data);
+ g_autofree gchar *filename = teco_file_expand_path(str.data);
/*
* This is like implying teco_ring_get_id(teco_ring_current)
@@ -720,14 +720,14 @@ TECO_DEFINE_STATE_EXPECTFILE(teco_state_save_file,
);
static teco_state_t *
-teco_state_read_file_done(teco_machine_main_t *ctx, const teco_string_t *str, GError **error)
+teco_state_read_file_done(teco_machine_main_t *ctx, teco_string_t str, GError **error)
{
if (ctx->flags.mode > TECO_MODE_NORMAL)
return &teco_state_start;
sptr_t pos = teco_interface_ssm(SCI_GETCURRENTPOS, 0, 0);
- g_autofree gchar *filename = teco_file_expand_path(str->data);
+ g_autofree gchar *filename = teco_file_expand_path(str.data);
/* FIXME: Add wrapper to interface.h? */
if (!teco_view_load(teco_interface_current_view, filename, FALSE, error))
return NULL;