1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 21:13:05 +01:00

new-argparse: implement argument and option parsing

This commit is contained in:
IntelOrca
2016-01-10 17:54:46 +00:00
parent 14a266c177
commit 9d98147b75
11 changed files with 530 additions and 149 deletions

58
src/core/Console.cpp Normal file
View File

@@ -0,0 +1,58 @@
extern "C"
{
#include "../platform/platform.h"
}
#include "Console.hpp"
namespace Console
{
void Write(char c)
{
fputc(c, stdout);
}
void Write(const utf8 * str)
{
fputs(str, stdout);
}
void WriteSpace(size_t count)
{
for (size_t i = 0; i < count; i++)
{
Write(' ');
}
}
void WriteLine()
{
puts("");
}
void WriteLine(const utf8 * str)
{
puts(str);
}
void WriteError(char c)
{
fputc(c, stderr);
}
void WriteError(const utf8 * str)
{
fputs(str, stderr);
}
void WriteLineError()
{
fputs(platform_get_new_line(), stderr);
}
void WriteLineError(const utf8 * str)
{
fputs(str, stderr);
WriteLineError();
}
}