mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
Merge pull request #188 from version-string
Add command to print version string Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#include "asm/main.h"
|
||||
#include "extern/err.h"
|
||||
#include "extern/reallocarray.h"
|
||||
#include "extern/version.h"
|
||||
|
||||
int yyparse(void);
|
||||
void setuplex(void);
|
||||
@@ -278,7 +279,7 @@ static void
|
||||
usage(void)
|
||||
{
|
||||
printf(
|
||||
"Usage: rgbasm [-hvE] [-b chars] [-Dname[=value]] [-g chars] [-i path]\n"
|
||||
"Usage: rgbasm [-EhVvw] [-b chars] [-Dname[=value]] [-g chars] [-i path]\n"
|
||||
" [-M dependfile] [-o outfile] [-p pad_value] file.asm\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -324,7 +325,7 @@ main(int argc, char *argv[])
|
||||
|
||||
newopt = CurrentOptions;
|
||||
|
||||
while ((ch = getopt(argc, argv, "b:D:g:hi:M:o:p:vEw")) != -1) {
|
||||
while ((ch = getopt(argc, argv, "b:D:g:hi:M:o:p:EVvw")) != -1) {
|
||||
switch (ch) {
|
||||
case 'b':
|
||||
if (strlen(optarg) == 2) {
|
||||
@@ -338,6 +339,9 @@ main(int argc, char *argv[])
|
||||
case 'D':
|
||||
opt_AddDefine(optarg);
|
||||
break;
|
||||
case 'E':
|
||||
newopt.exportall = true;
|
||||
break;
|
||||
case 'g':
|
||||
if (strlen(optarg) == 4) {
|
||||
newopt.gbgfx[0] = optarg[1];
|
||||
@@ -373,17 +377,18 @@ main(int argc, char *argv[])
|
||||
"between 0 and 0xFF");
|
||||
}
|
||||
break;
|
||||
case 'V':
|
||||
printf("rgbasm %s\n", get_package_version_string());
|
||||
exit(0);
|
||||
case 'v':
|
||||
newopt.verbose = true;
|
||||
break;
|
||||
case 'E':
|
||||
newopt.exportall = true;
|
||||
break;
|
||||
case 'w':
|
||||
newopt.warnings = false;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
}
|
||||
argc -= optind;
|
||||
|
||||
Reference in New Issue
Block a user