mirror of
https://github.com/gbdev/rgbds.git
synced 2026-03-25 14:23:04 +00:00
Factor out version-printing to usage.cpp (#1870)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "helpers.hpp"
|
||||
#include "platform.hpp"
|
||||
#include "style.hpp"
|
||||
#include "version.hpp"
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#define WIN32_LEAN_AND_MEAN // Include less from `windows.h`
|
||||
@@ -17,6 +18,10 @@
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
void Usage::printVersion(bool error) const {
|
||||
fprintf(error ? stderr : stdout, "%s %s\n", name.c_str(), get_package_version_string());
|
||||
}
|
||||
|
||||
void Usage::printAndExit(int code) const {
|
||||
FILE *file;
|
||||
bool isTerminal;
|
||||
|
||||
Reference in New Issue
Block a user