about summary refs log tree commit diff stats
path: root/state.h
diff options
context:
space:
mode:
authorDaniel <steew0x8@protonmail.com>2021-11-06 17:58:47 +0100
committerDaniel <steew0x8@protonmail.com>2021-11-06 17:58:47 +0100
commitfe6314692dbdbf69db8b3e8a3979c1f1d21d621c (patch)
tree91d91e912e7b9e8de7f9fb6b56c1f0fc2c4dcebe /state.h
parentbedbeb372f1d3a36b10d8737a9199c1fe4827e4f (diff)
downloadrpncalc-fe6314692dbdbf69db8b3e8a3979c1f1d21d621c.tar.gz
replaced if else chain, TODO: bsearch
Diffstat (limited to 'state.h')
-rw-r--r--state.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/state.h b/state.h
index 54b2981..56e0f6d 100644
--- a/state.h
+++ b/state.h
@@ -22,12 +22,9 @@ typedef struct {
   FILE *defout;
   char last_op;
   char *prompt;
-  stack stack;
-
+  stack stk;
   /* btree elements */
-  
-  char **sorted_names; /* sorted function names */
-  stack *((*exec)(stack)); /* sorted function calls, same order as above */
+  command *sorted; /* sorted by function name */
 } state;
 
 #endif