From cd34b3c96b864496396aa7167cf5fc1ce020a769 Mon Sep 17 00:00:00 2001 From: Fernando Date: Tue, 26 Jul 2022 16:45:55 -0300 Subject: [PATCH] View history --- .gitignore | 3 ++- Build/PTM.exe | Bin 601088 -> 601088 bytes Build/test.ptml | 2 +- PTM/common.h | 4 ++++ PTM/t_command.cpp | 7 ++----- PTM/t_config.cpp | 10 ++++------ PTM/t_program_editor.cpp | 2 -- 7 files changed, 13 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 8a884c0e..a96875d5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ obj Docs/Generated old Debug -debug.txt \ No newline at end of file +PTM.dbg +PTM.cfg \ No newline at end of file diff --git a/Build/PTM.exe b/Build/PTM.exe index ead6df47e48bfb039b14baa7b42c517d336c5be1..b8b0adcb525187ca6603b6f1307a82aac256bbba 100644 GIT binary patch delta 4401 zcmZwLdstM}769-$`^?NfgQLS^K;FzKC??UkD-@NLr5V0TWe^k-AESYD*XEp4`E}W%Fy6_a0%J%9IRcxI(V0SCGIaWx0jZ<~4vJyCJCB3^V;)hP$ zoma8_C>H?(Q@B*({+yU%K=0#%bXEP0k#o&bi|%QQ56RmVKtvu5(1syyG(LJyP@CGSVFhZcZ+a zoSF&;GPoEq`y|)kLsl$>-}|_0WbQKYw`&}}YQ?_m+$C;PMf{pgYkJILwUhI6=OV;y z0-5GH)LA)0WwR}qp(;_?o`C#cG+rVJAf-HM{D)W(Olo*?{4w#SnH(luyLd2^yux98 zWE3gZkowP{A%>4#e1AoT%JI4S&vEwPIQs?${urlqZI8RX<=Hn)E|&|Z(c?I9bHMd% zjUL|~w)U&=wYDeF-u~>HM$FhIl+RE(_M9GIhVNaDUv3Y$*0w}IWQck=zxw6?n78pR zsPE)VVtpieNW(crXEbpU;=4q=HIcY;q`wq~+)I{`^d;g`_mcLpT%$PaQBrCowngHn zkCPxCr~mU4#K2+fUPW&6@IxLk-`mnSaMxO2ef!Tj=?nprxC4qV=XB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F z01W`kSTP);25=r3!`N?#-Vk5htcbPqz3RmgVAwvzTkO>7K8Q- zjgwmLP^~9?aEXoq-5ENW%|S1X53BsPZfXQVHEH4Pr(5mUR#ZW=O4)require_string(arg[0]); - if (!path.empty()) { - File::WriteLines(path, get_debug_info()); - } + ARGC(0); + File::WriteLines(PTM_DEBUG_FILE, get_debug_info()); } void t_command::compare_numbers(t_params& arg) { ARGC(2); diff --git a/PTM/t_config.cpp b/PTM/t_config.cpp index c2871f7c..58fbd674 100644 --- a/PTM/t_config.cpp +++ b/PTM/t_config.cpp @@ -1,10 +1,8 @@ #include "t_config.h" -#define CONFIG_FILE "config.ini" - void t_config::load() { - if (!File::Exists(CONFIG_FILE)) return; - for (auto& rawline : File::ReadLines(CONFIG_FILE, "\r\n")) { + if (!File::Exists(PTM_CONFIG_FILE)) return; + for (auto& rawline : File::ReadLines(PTM_CONFIG_FILE, "\r\n")) { string line = String::Trim(rawline); if (line.empty() || String::StartsWith(line, '#')) continue; auto cfg = String::Split(line, '=', true); @@ -20,8 +18,8 @@ void t_config::load() { } } void t_config::check_for_autorunnable_file() { - if (File::Exists("exec")) { - autorun = "exec"; + if (File::Exists(PTM_AUTOEXEC_FILE)) { + autorun = PTM_AUTOEXEC_FILE; return; } /* diff --git a/PTM/t_program_editor.cpp b/PTM/t_program_editor.cpp index 1ff079db..d7190f7e 100644 --- a/PTM/t_program_editor.cpp +++ b/PTM/t_program_editor.cpp @@ -510,10 +510,8 @@ void t_program_editor::show_help() { hide_cursor(); t_panel pnl(buf, color.fg, color.bdr_bg); pnl.title = "Help"; - pnl.bottom_text = "2022.0 (pre-alpha)"; pnl.maximize(); pnl.center_title(); - pnl.center_bottom_text(); while (true) { pnl.draw_frame();