ansi_terminal/ansi_decls.h

123 lines
5.1 KiB
C

#ifndef ANSI_DECLS_H
#define ANSI_DECLS_H
#include "sm.h"
/* Actions */
static void do_ignore(struct sm_context *ctx, sm_event_id code);
static void do_print(struct sm_context *ctx, sm_event_id code);
static void do_execute(struct sm_context *ctx, sm_event_id code);
static void do_clear(struct sm_context *ctx, sm_event_id code);
static void do_collect(struct sm_context *ctx, sm_event_id code);
static void do_param(struct sm_context *ctx, sm_event_id code);
static void do_esc_dispatch(struct sm_context *ctx, sm_event_id code);
static void do_csi_dispatch(struct sm_context *ctx, sm_event_id code);
static void do_hook(struct sm_context *ctx, sm_event_id code);
static void do_put(struct sm_context *ctx, sm_event_id code);
static void do_unhook(struct sm_context *ctx, sm_event_id code);
static void do_osc_start(struct sm_context *ctx, sm_event_id code);
static void do_osc_put(struct sm_context *ctx, sm_event_id code);
static void do_osc_end(struct sm_context *ctx, sm_event_id code);
/* Predicates */
static int global_execute_pred(sm_event_id code);
static int global_to_escape_pred(sm_event_id code);
static int global_to_string_pred(sm_event_id code);
static int global_to_dcs_pred(sm_event_id code);
static int global_to_osc_pred(sm_event_id code);
static int ground_execute_pred(sm_event_id code);
static int ground_print_pred(sm_event_id code);
static int sos_pm_apc_string_ignore_pred(sm_event_id code);
static int sos_pm_apc_string_to_ground_pred(sm_event_id code);
static int escape_execute_pred(sm_event_id code);
static int escape_ignore_pred(sm_event_id code);
static int escape_to_ground_pred(sm_event_id code);
static int escape_to_escape_intermediate_pred(sm_event_id code);
static int escape_to_string_pred(sm_event_id code);
static int escape_to_dcs_entry_pred(sm_event_id code);
static int escape_to_osc_string_pred(sm_event_id code);
static int escape_to_csi_entry_pred(sm_event_id code);
static int escape_intermediate_execute_pred(sm_event_id code);
static int escape_intermediate_collect_pred(sm_event_id code);
static int escape_intermediate_ignore_pred(sm_event_id code);
static int escape_intermediate_to_ground_pred(sm_event_id code);
static int csi_entry_execute_pred(sm_event_id code);
static int csi_entry_ignore_pred(sm_event_id code);
static int csi_entry_to_ground_pred(sm_event_id code);
static int csi_entry_to_param_pred(sm_event_id code);
static int csi_entry_to_param_collect_pred(sm_event_id code);
static int csi_entry_to_intermediate_pred(sm_event_id code);
static int csi_entry_to_ignore_pred(sm_event_id code);
static int csi_param_execute_pred(sm_event_id code);
static int csi_param_param_pred(sm_event_id code);
static int csi_param_ignore_pred(sm_event_id code);
static int csi_param_to_ground_pred(sm_event_id code);
static int csi_param_to_intermediate_pred(sm_event_id code);
static int csi_param_to_ignore_pred(sm_event_id code);
static int csi_intermediate_execute_pred(sm_event_id code);
static int csi_intermediate_collect_pred(sm_event_id code);
static int csi_intermediate_ignore_pred(sm_event_id code);
static int csi_intermediate_to_ground_pred(sm_event_id code);
static int csi_intermediate_to_ignore_pred(sm_event_id code);
static int csi_ignore_execute_pred(sm_event_id code);
static int csi_ignore_ignore_pred(sm_event_id code);
static int csi_ignore_to_ground_pred(sm_event_id code);
static int dcs_entry_ignore_pred(sm_event_id code);
static int dcs_entry_to_intermediate_pred(sm_event_id code);
static int dcs_entry_to_ignore_pred(sm_event_id code);
static int dcs_entry_to_param_pred(sm_event_id code);
static int dcs_entry_to_param_collect_pred(sm_event_id code);
static int dcs_entry_to_passthrough_pred(sm_event_id code);
static int dcs_param_ignore_pred(sm_event_id code);
static int dcs_param_param_pred(sm_event_id code);
static int dcs_param_to_ignore_pred(sm_event_id code);
static int dcs_param_to_intermediate_pred(sm_event_id code);
static int dcs_param_to_passthrough_pred(sm_event_id code);
static int dcs_intermediate_ignore_pred(sm_event_id code);
static int dcs_intermediate_collect_pred(sm_event_id code);
static int dcs_intermediate_to_passthrough_pred(sm_event_id code);
static int dcs_intermediate_to_ignore_pred(sm_event_id code);
static int dcs_passthrough_ignore_pred(sm_event_id code);
static int dcs_passthrough_put_pred(sm_event_id code);
static int dcs_passthrough_to_ground_pred(sm_event_id code);
static int dcs_ignore_ignore_pred(sm_event_id code);
static int dcs_ignore_to_ground_pred(sm_event_id code);
static int osc_string_ignore_pred(sm_event_id code);
static int osc_string_put_pred(sm_event_id code);
static int osc_string_to_ground_pred(sm_event_id code);
/* States */
static struct sm_state ground;
static struct sm_state escape;
static struct sm_state escape_intermediate;
static struct sm_state csi_entry;
static struct sm_state csi_param;
static struct sm_state csi_intermediate;
static struct sm_state csi_ignore;
static struct sm_state dcs_entry;
static struct sm_state dcs_param;
static struct sm_state dcs_intermediate;
static struct sm_state dcs_passthrough;
static struct sm_state dcs_ignore;
static struct sm_state osc_string;
static struct sm_state sos_pm_apc_string;
#endif