From 52eb07dc5bca882473c5f14db299578ff144a1e4 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 15 Nov 2008 23:54:09 +0000 Subject: Sparse "About" requester - version number, compile date and URL only. svn path=/trunk/netsurf/; revision=5697 --- amiga/version.rexx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'amiga/version.rexx') 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 . */ -/* 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 || '";' -- cgit v1.2.3