summaryrefslogtreecommitdiff
path: root/amiga/version.rexx
diff options
context:
space:
mode:
Diffstat (limited to 'amiga/version.rexx')
-rw-r--r--amiga/version.rexx17
1 files changed, 12 insertions, 5 deletions
diff --git a/amiga/version.rexx b/amiga/version.rexx
index b649d7b53..58ccb982a 100644
--- a/amiga/version.rexx
+++ b/amiga/version.rexx
@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* This file generates an AmigaOS compliant version string in version.h */
+/* This file generates an AmigaOS compliant version string in version.c */
address command 'svn info >t:ns_svn'
@@ -38,8 +38,15 @@ if open('tmp','desktop/version.c','R') then do
end
majorver = compress(word(var,5),";")
-date = translate(date('E'),'.','/')
-
-say '/* This file was automatically generated from version.rexx */'
-say 'static __attribute__((used)) char verstag[] = "\0$VER: NetSurf' majorver || '.' || svnrev '(' || date || ')\0";'
+/* ARexx only returns two digits for year, but AmigaOS version string dates are
+ * supposed to have four digits for the year, so the below specifies the prefix
+ * (century-1 really). This will need to be increased in 2100 and every hundred
+ * years thereafter, if this script is still in use :-) */
+century = 20
+date = translate(left(date('E'),6) || century || right(date('E'),2),'.','/')
+
+say '/* This file was automatically generated by version.rexx */'
+say 'static const __attribute__((used)) char *verstag = "\0$VER: NetSurf' majorver || '.' || svnrev '(' || date || ')\0";'
+say 'const char * const versvn = "SVN' svnrev || '";'
+say 'const char * const verdate = "' || date || '";'