summary refs log tree commit diff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/cccl.h21
-rw-r--r--include/platform/getch.h13
-rw-r--r--include/types.h2
3 files changed, 25 insertions, 11 deletions
diff --git a/include/cccl.h b/include/cccl.h
index 6652453..9e41730 100644
--- a/include/cccl.h
+++ b/include/cccl.h
@@ -5,8 +5,6 @@
 
 #include <stdbool.h>
 
-#include "cvector.h"
-
 
 typedef struct cccl_varpair
 {
@@ -28,15 +26,16 @@ typedef struct cccl_pointer
 
 typedef struct cccl
 {
-    cccl_varpair   *variables;  /* Array with variables      */
-    cccl_procpair  *procedures; /* Array with procedures     */
-    i16            *stack;      /* User stack                */
-    s8             *br_stack;   /* Stack for brackets        */
-    i32            *ep_stack;   /* Call stack                */
-    i32             ep;         /* Pointer to current symbol */
-    s8             *code;       /* Code being executed       */
-    s8             *filename;   /* File being executed       */
-    i32             size;       /* File size                 */
+    cccl_varpair    *variables;  /* Array with variables      */
+    cccl_procpair   *procedures; /* Array with procedures     */
+    i16             *stack;      /* User stack                */
+    s8              *br_stack;   /* Stack for brackets        */
+    cccl_varpair   **lv_stack;   /* Local variable stack      */
+    cccl_pointer    *ep_stack;   /* Call stack                */
+    i32              ep;         /* Pointer to current symbol */
+    s8              *code;       /* Code being executed       */
+    s8              *filename;   /* File being executed       */
+    i32              size;       /* File size                 */
 } cccl;
 
 void cccl_init(s8 *filename);
diff --git a/include/platform/getch.h b/include/platform/getch.h
new file mode 100644
index 0000000..490b536
--- /dev/null
+++ b/include/platform/getch.h
@@ -0,0 +1,13 @@
+#ifndef __GETCH_H__
+#define __GETCH_H__
+
+#ifdef _WIN32
+#include <conio.h>
+#define getch _getche
+#else
+int getch(void);
+#endif /* _WIN32 */
+
+void getch_init(void);
+
+#endif /* __GETCH_H__ */
diff --git a/include/types.h b/include/types.h
index 9c92d57..4bf1da9 100644
--- a/include/types.h
+++ b/include/types.h
@@ -9,9 +9,11 @@ typedef char     s8;
 typedef uint8_t  u8;
 typedef uint16_t u16;
 typedef uint32_t u32;
+typedef uint64_t i64;
 
 typedef int8_t   i8;
 typedef int16_t  i16;
 typedef int32_t  i32;
+typedef uint64_t i64;
 
 #endif /* __TYPES_H__ */