summaryrefslogtreecommitdiff
path: root/src/state.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/state.h')
-rw-r--r--src/state.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/state.h b/src/state.h
index 7522673..316ad60 100644
--- a/src/state.h
+++ b/src/state.h
@@ -1,6 +1,6 @@
/*
* LiberTI - TI-like calculator designed for LibreCalc
- * Copyright (C) 2016 Delwink, LLC
+ * Copyright (C) 2016-2017 Delwink, LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -24,63 +24,63 @@
#define MAX_HISTORY 35
enum action_state
- {
- STATE_NORMAL,
- STATE_2ND,
- STATE_ALPHA,
- NUM_ACTION_STATES
- };
+{
+ STATE_NORMAL,
+ STATE_2ND,
+ STATE_ALPHA,
+ NUM_ACTION_STATES
+};
struct history
{
- struct tib_expr entry;
- struct tib_expr answer_string;
+ struct tib_expr entry;
+ struct tib_expr answer_string;
- TIB *answer;
+ TIB *answer;
};
struct state
{
- struct history history[MAX_HISTORY];
- struct tib_expr entry;
+ struct history history[MAX_HISTORY];
+ struct tib_expr entry;
- enum action_state action_state;
- int entry_cursor;
- unsigned int history_len;
+ enum action_state action_state;
+ int entry_cursor;
+ unsigned int history_len;
- bool blink_state;
- bool insert_mode;
+ bool blink_state;
+ bool insert_mode;
};
int
-load_state (struct state *dest, const char *path);
+load_state(struct state *dest, const char *path);
int
-save_state (const struct state *state, const char *path);
+save_state(const struct state *state, const char *path);
void
-state_destroy (struct state *state);
+state_destroy(struct state *state);
void
-entry_move_cursor (struct state *state, int distance);
+entry_move_cursor(struct state *state, int distance);
int
-entry_write (struct state *state, int c);
+entry_write(struct state *state, int c);
int
-entry_recall (struct state *state);
+entry_recall(struct state *state);
void
-change_action_state (struct state *state, enum action_state action_state);
+change_action_state(struct state *state, enum action_state action_state);
int
-state_calc_entry (struct state *state);
+state_calc_entry(struct state *state);
int
-state_add_history (struct state *state, const struct tib_expr *in,
- const TIB *answer);
+state_add_history(struct state *state, const struct tib_expr *in,
+ const TIB *answer);
void
-state_clear_history (struct state *state);
+state_clear_history(struct state *state);
#endif