aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/goto-commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/goto-commands.c')
-rw-r--r--src/goto-commands.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/goto-commands.c b/src/goto-commands.c
index e4cd868..a8a9689 100644
--- a/src/goto-commands.c
+++ b/src/goto-commands.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012-2023 Robin Haberkorn
+ * Copyright (C) 2012-2024 Robin Haberkorn
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -53,7 +53,7 @@ teco_state_label_initial(teco_machine_main_t *ctx, GError **error)
* I'm unsure whether !-signs should be allowed within comments.
*/
static teco_state_t *
-teco_state_label_input(teco_machine_main_t *ctx, gchar chr, GError **error)
+teco_state_label_input(teco_machine_main_t *ctx, gunichar chr, GError **error)
{
if (chr == '!') {
/*
@@ -61,8 +61,8 @@ teco_state_label_input(teco_machine_main_t *ctx, gchar chr, GError **error)
* on rubout.
* Otherwise, the label will be removed (PC == -1).
*/
- gint existing_pc = teco_goto_table_set(&ctx->goto_table, ctx->goto_label.data,
- ctx->goto_label.len, ctx->macro_pc);
+ gssize existing_pc = teco_goto_table_set(&ctx->goto_table, ctx->goto_label.data,
+ ctx->goto_label.len, ctx->macro_pc);
if (ctx->parent.must_undo)
teco_goto_table_undo_set(&ctx->goto_table, ctx->goto_label.data, ctx->goto_label.len, existing_pc);
@@ -85,7 +85,7 @@ teco_state_label_input(teco_machine_main_t *ctx, gchar chr, GError **error)
if (ctx->parent.must_undo)
undo__teco_string_truncate(&ctx->goto_label, ctx->goto_label.len);
- teco_string_append_c(&ctx->goto_label, chr);
+ teco_string_append_wc(&ctx->goto_label, chr);
return &teco_state_label;
}
@@ -119,7 +119,7 @@ teco_state_goto_done(teco_machine_main_t *ctx, const teco_string_t *str, GError
}
if (value == 0) {
- gint pc = teco_goto_table_find(&ctx->goto_table, label.data, label.len);
+ gssize pc = teco_goto_table_find(&ctx->goto_table, label.data, label.len);
if (pc >= 0) {
ctx->macro_pc = pc;
@@ -138,7 +138,7 @@ teco_state_goto_done(teco_machine_main_t *ctx, const teco_string_t *str, GError
}
/* in cmdline.c */
-gboolean teco_state_goto_process_edit_cmd(teco_machine_main_t *ctx, teco_machine_t *parent_ctx, gchar chr, GError **error);
+gboolean teco_state_goto_process_edit_cmd(teco_machine_main_t *ctx, teco_machine_t *parent_ctx, gunichar chr, GError **error);
/*$ O
* Olabel$ -- Go to label