ref: 086f02c1d99ce512f3694360d949bc13e1e32361
parent: 8ed6c32ae704f6cca341f0673121e35992a51057
author: Antonio Niño Díaz <[email protected]>
date: Sat Jul 22 06:27:49 EDT 2017
Add EQUs with the version numbers of RGBDS Document new EQUs. Add missing EQUs to list of keywords in documentation. Signed-off-by: Antonio Niño Díaz <[email protected]>
--- a/src/asm/rgbasm.5
+++ b/src/asm/rgbasm.5
@@ -549,6 +549,9 @@
.It Ic EQU Ta Ic __UTC_HOUR__ Ta Ta Current hour, 0-23
.It Ic EQU Ta Ic __UTC_MINUTE__ Ta Ta Current minute, 0-59
.It Ic EQU Ta Ic __UTC_SECOND__ Ta Ta Current second, 0-59
+.It Ic EQU Ta Ic __RGBDS_MAJOR__ Ta Ta Major version number of RGBDS.
+.It Ic EQU Ta Ic __RGBDS_MINOR__ Ta Ta Minor version number of RGBDS.
+.It Ic EQU Ta Ic __RGBDS_PATCH__ Ta Ta Patch version number of RGBDS.
.El
.Pp
.Sh DEFINING DATA
@@ -956,6 +959,15 @@
.It Sx __ISO_8601_UTC__
.It Sx __LINE__
.It Sx __TIME__
+.It Sx __RGBDS_MAJOR__
+.It Sx __RGBDS_MINOR__
+.It Sx __RGBDS_PATCH__
+.It Sx __UTC_YEAR__
+.It Sx __UTC_MONTH__
+.It Sx __UTC_DAY__
+.It Sx __UTC_HOUR__
+.It Sx __UTC_MINUTE__
+.It Sx __UTC_SECOND__
.It Sx _NARG
.It Sx _PI
.It Sx _RS
--- a/src/asm/symbol.c
+++ b/src/asm/symbol.c
@@ -13,6 +13,7 @@
#include "asm/mymath.h"
#include "asm/output.h"
#include "extern/err.h"
+#include "extern/version.h"
struct sSymbol *tHashedSymbols[HASHSIZE];
struct sSymbol *pScope = NULL;
@@ -848,6 +849,9 @@
sym_AddString("__UTC_HOUR__", SavedHOUR);
sym_AddString("__UTC_MINUTE__", SavedMINUTE);
sym_AddString("__UTC_SECOND__", SavedSECOND);
+ sym_AddEqu("__RGBDS_MAJOR__", PACKAGE_VERSION_MAJOR);
+ sym_AddEqu("__RGBDS_MINOR__", PACKAGE_VERSION_MINOR);
+ sym_AddEqu("__RGBDS_PATCH__", PACKAGE_VERSION_PATCH);
sym_AddSet("_RS", 0);
sym_AddEqu("_NARG", 0);