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:
58
src/core/Console.cpp
Normal file
58
src/core/Console.cpp
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user