Refactor Init method across all frontends to include argc and argv for improved argument handling consistency.

This commit is contained in:
2026-01-12 10:35:24 -08:00
parent 6eb240a0c4
commit 8634eb78f0
10 changed files with 21 additions and 17 deletions

View File

@@ -112,7 +112,7 @@ RunStressHighlighter(unsigned seconds)
int
main(int argc, const char *argv[])
main(int argc, char *argv[])
{
std::setlocale(LC_ALL, "");
@@ -136,7 +136,7 @@ main(int argc, const char *argv[])
int opt;
int long_index = 0;
unsigned stress_seconds = 0;
while ((opt = getopt_long(argc, const_cast<char *const *>(argv), "gthV", long_opts, &long_index)) != -1) {
while ((opt = getopt_long(argc, argv, "gthV", long_opts, &long_index)) != -1) {
switch (opt) {
case 'g':
req_gui = true;
@@ -303,7 +303,7 @@ main(int argc, const char *argv[])
}
#endif
if (!fe->Init(editor)) {
if (!fe->Init(argc, argv, editor)) {
std::cerr << "kte: failed to initialize frontend" << std::endl;
return 1;
}