easyParse(argc, argv);
try {
- init_package(to_utf8(from_local8bit(argv[0])),
+ init_package(os::utf8_argv(0),
cl_system_support, cl_user_support,
top_build_dir_is_one_level_up);
} catch (ExceptionMessage const & message) {
if (argv[argi][0] == '-') {
lyxerr << to_utf8(
bformat(_("Wrong command line option `%1$s'. Exiting."),
- from_utf8(argv[argi]))) << endl;
+ from_utf8(os::utf8_argv(argi)))) << endl;
return EXIT_FAILURE;
}
}
// Remaining arguments are assumed to be files to load.
for (int argi = argc - 1; argi >= 1; --argi)
- pimpl_->files_to_load_.push_back(to_utf8(from_local8bit(argv[argi])));
+ pimpl_->files_to_load_.push_back(os::utf8_argv(argi));
if (first_start) {
pimpl_->files_to_load_.push_back(
continue;
string const arg =
- (i + 1 < argc) ? to_utf8(from_local8bit(argv[i + 1])) : string();
+ (i + 1 < argc) ? os::utf8_argv(i + 1) : string();
string const arg2 =
- (i + 2 < argc) ? to_utf8(from_local8bit(argv[i + 2])) : string();
+ (i + 2 < argc) ? os::utf8_argv(i + 2) : string();
string batch;
int const remove = 1 + it->second(arg, arg2, batch);
// Now, remove used arguments by shifting
// the following ones remove places down.
if (remove > 0) {
+ os::remove_internal_args(i, remove);
argc -= remove;
for (int j = i; j < argc; ++j)
argv[j] = argv[j + remove];
}
-Messages & getMessages(string const & language)
+Messages const & getMessages(string const & language)
{
LASSERT(singleton_, /**/);
return singleton_->messages(language);
}
-Messages & getGuiMessages()
+Messages const & getGuiMessages()
{
LASSERT(singleton_, /**/);
return singleton_->pimpl_->messages_["GUI"];