do_cvar = curl_uri_get_cvar[i];
if(status != 0)
{
- print("error: status is ", ftos(status), "\n");
+ print(sprintf(_("error: status is %d\n"), status));
+ if(do_cvar)
+ strunzone(do_cvar);
return;
}
if(do_exec)
localcmd(data);
if(do_cvar)
+ {
cvar_set(do_cvar, data);
+ strunzone(do_cvar);
+ }
if(!do_exec && !do_cvar)
print(data);
}
if(argv(0) == "help" || argc == 0)
{
- print("Usage: menu_cmd theCommand..., where possible theCommands are:\n");
- print(" sync - reloads all cvars on the current menu page\n");
- print(" directmenu ITEM - select a menu item as main item\n");
+ print(_("Usage: menu_cmd command..., where possible commands are:\n"));
+ print(_(" sync - reloads all cvars on the current menu page\n"));
+ print(_(" directmenu ITEM - select a menu item as main item\n"));
GameCommand_Generic("help");
return;
}
if(argv(0) == "sync")
{
- loadAllCvars(main);
- updateCompression();
+ m_sync();
return;
}
return;
}
+ if(argv(0) == "languageselect")
+ {
+ m_goto_language_selector();
+ return;
+ }
+
if(argv(0) == "videosettings")
{
m_goto_video_settings();
return;
}
- if(argv(0) == "setresolution")
- {
- updateConwidths();
- return;
- }
-
- if(argv(0) == "setcompression")
- {
- updateCompression();
- return;
- }
-
if(argv(0) == "curl")
{
float do_exec;
if(argv(i) == "--cvar" && i+2 < argc)
{
++i;
- do_cvar = argv(i);
+ do_cvar = strzone(argv(i));
continue;
}
if(argv(i) == "--exec")
curl_uri_get_pos = mod(curl_uri_get_pos + 1, URI_GET_CURL_END - URI_GET_CURL + 1);
}
else
- print("error creating curl handle\n");
+ print(_("error creating curl handle\n"));
buf_del(buf);
return;
}
-#if 0
- if(argv(0) == "tokentest")
- {
- string s;
- float i, n;
-
- print("SANE tokenizer:\n");
- s = cvar_string("tokentest");
- n = tokenize_console_force_builtin(s);
- for(i = -n; i < n; ++i)
- {
- print("token ", ftos(i), ": '", argv(i), "' = ");
- print(ftos(argv_start_index(i)), " to ", ftos(argv_end_index(i)), "\n");
- }
- print(".\n");
-
- print("INSANE tokenizer:\n");
- s = cvar_string("tokentest");
- n = tokenize(s);
- for(i = -n; i < n; ++i)
- {
- print("token ", ftos(i), ": '", argv(i), "' = ");
- print(ftos(argv_start_index(i)), " to ", ftos(argv_end_index(i)), "\n");
- }
- print(".\n");
-
- print("EMULATED tokenizer:\n");
- s = cvar_string("tokentest");
- n = tokenize_console_force_emulation(s);
- for(i = -n; i < n; ++i)
- {
- print("token ", ftos(i), ": '", argv(i), "' = ");
- print(ftos(argv_start_index(i)), " to ", ftos(argv_end_index(i)), "\n");
- }
- print(".\n");
- return;
- }
-#endif
-
- print("Invalid theCommand. For a list of supported theCommands, try menu_cmd help.\n");
+ print(_("Invalid command. For a list of supported commands, try menu_cmd help.\n"));
}