diff --git a/programs/other/tte/Makefile b/programs/other/tte/Makefile new file mode 100755 index 0000000000..f0f7056d3c --- /dev/null +++ b/programs/other/tte/Makefile @@ -0,0 +1,3 @@ +KTCC = $(abspath /media/maxim/E22406D62406AE1B/KOLIBRI/TCC2/) +tte: + wine $(KTCC)/kos32-tcc.exe tte.c getline.c -lck -o tte diff --git a/programs/other/tte/tte.c b/programs/other/tte/tte.c index 35d31c5ea4..77d89f9e3a 100644 --- a/programs/other/tte/tte.c +++ b/programs/other/tte/tte.c @@ -459,8 +459,6 @@ void enableRawMode() { /// die("Failed to set raw mode"); } - - /// by Siemargl rewritten, still Ctrl+ combination works only in english locale, so need analyze scancode int editorReadKey() { int key = con_getch2(); @@ -1798,7 +1796,11 @@ int main(int argc, char* argv[]) { initEditor(); int arg_response = handleArgs(argc, argv); if (arg_response == 1) { - editorOpen(argv[1]); + char* filename = argv[1]; + // tolower + for (int i = 0; i < strlen(filename); i++) filename[i] = tolower(filename[i]); + + editorOpen(filename); char* title = argv[1]; strcat(title, " - TinyTextEditor"); con_set_title(title); @@ -1812,7 +1814,6 @@ int main(int argc, char* argv[]) { editorRefreshScreen(); editorProcessKeypress(); } - con_exit(1); return 0; }