mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-04 22:29:15 +00:00

This includes all the Win32-specific code dealing with the retrieval of the UTF-16 version of the command line and subsequent parsing into an array of UTF-8 strings. The latter code is unchanged except for the function names and one local variable originally named `is_excaped` instead of `is_escaped`. (Note to self: ask gfgtdf if he was aware of the existence of CommandLineToArgvW() back when he wrote the Win32 command line retrieval logic.)
27 lines
844 B
C++
27 lines
844 B
C++
/*
|
|
Part of the Battle for Wesnoth Project https://www.wesnoth.org/
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY.
|
|
|
|
See the COPYING file for more details.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
/**
|
|
* Reads argv into a vector of STL strings.
|
|
*
|
|
* @note Both parameters are ignored on Windows in order to obtain guaranteed
|
|
* Unicode-safe versions through the Win32 API. Do NOT try to pass values
|
|
* other than the ones you got from main() here.
|
|
*/
|
|
std::vector<std::string> read_argv(int argc, char** argv);
|