summaryrefslogtreecommitdiff
path: root/ted.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-01-25 19:34:30 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-01-25 19:34:30 -0500
commit9f8e74337832533a806ac0c46ee993a927f0c057 (patch)
treebbe437b4c3c68ea5c905ad957bb4307af2031354 /ted.h
parent795262f69900af674156bed2bcd0fdb57dbbb55e (diff)
error log, fix memory leak, moved globals to Ted
Diffstat (limited to 'ted.h')
-rw-r--r--ted.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/ted.h b/ted.h
index 15c13c6..bdc2f60 100644
--- a/ted.h
+++ b/ted.h
@@ -118,20 +118,11 @@ typedef struct Ted {
TextBuffer main_buffer;
double error_time; // time error box was opened (in seconds -- see time_get_seconds)
KeyAction key_actions[KEY_COMBO_COUNT];
+ bool search_cwd; // should the working directory be searched for files? set to true if the executable isn't "installed"
+ char local_data_dir[TED_PATH_MAX];
+ char global_data_dir[TED_PATH_MAX];
+ char home[TED_PATH_MAX];
char cwd[TED_PATH_MAX]; // current working directory
- char error[256];
- char error_shown[256]; // error display in box on screen
+ char error[512];
+ char error_shown[512]; // error display in box on screen
} Ted;
-
-// should the working directory be searched for files? set to true if the executable isn't "installed"
-static bool ted_search_cwd = false;
-static char const ted_global_data_dir[] =
-#if _WIN32
- "C:\\Program Files\\ted";
-#else
- "/usr/share/ted";
-#endif
-
-// filled out in main()
-static char ted_local_data_dir[TED_PATH_MAX];
-static char ted_home[TED_PATH_MAX]; // home directory -- this is what ~ expands to