English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 14 August 2023, 13:50   #1
dalton
tulou
 
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 88
embedded version string weirdness

Hi,

I tried putting a version string inside my program according to this spec https://wiki.amigaos.net/wiki/Version_Strings

But the date comes out wrong when I use the "version" tool to check.

I put this string in my c program:
Code:
"$VER: Hello World 1.0 (14.08.2023)"
I have verified with a hex-editor that this exact string is stored in the program (with zero-termination).
The output of "version full" is
Code:
Hello World 1.0 (03/09/18)
How come the date is wrong?

Cheers
dalton is offline  
Old 14 August 2023, 14:45   #2
a/b
Registered User
 
Join Date: Jun 2016
Location: europe
Posts: 1,043
Year must be YY and not YYYY (it will add 1900 internally).

edit: YY works up to year (19)99, after that it's fubar as well (for example, 00 or 23 don't work either) because it ends up being 19xx. Probably have to update KS to 3.2 or something that supports Y2K. Or use 100 for year 2000 (and 123 for 2023).

Last edited by a/b; 14 August 2023 at 14:58.
a/b is offline  
Old 14 August 2023, 18:42   #3
dalton
tulou
 
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 88
Ah, the Y2K bug. I can confirm that putting in 123 works, but how will KS 3.2 respond to that?
dalton is offline  
Old 14 August 2023, 21:47   #4
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,369
All version above 3.1 will handle 2-digit or 4-digit dates correctly, and the 123 workaround too.
Daedalus is offline  
Old 15 August 2023, 08:09   #5
Olaf Barthel
Registered User
 
Join Date: Aug 2010
Location: Germany
Posts: 532
Quote:
Originally Posted by dalton View Post
Ah, the Y2K bug. I can confirm that putting in 123 works, but how will KS 3.2 respond to that?
The problem you encountered is caused by the limitations of the "Version" command, as it was before AmigaOS 3.5 came around. The AmigaOS 3.5 (V44), 4.0, 3.1.4, 3.2, etc. version of the "Version" command handle these date strings correctly.

The operating system itself does not process $VER: string date information. Where the $VER: string is being processed, e.g. by HDToolbox, only the version and revision information is read but not the date.

Last edited by Olaf Barthel; 17 August 2023 at 11:52.
Olaf Barthel is offline  
Old 17 August 2023, 13:48   #6
dalton
tulou
 
dalton's Avatar
 
Join Date: Jun 2006
Location: Gothenburg / Sweden
Posts: 88
Good to know, thanks people!
dalton is offline  
Old 17 August 2023, 14:52   #7
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,006
There was an update to the 3.1 (V40) Version command formerly hosted on the AmIga Inc website. Cloanto still hosts it today: https://www.amigaforever.com/classic/download/

While you are at it you should also update SetPatch, otherwise the OS does not properly detect the absence of an FPU.
thomas is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedded video in posts malko support.Other 7 14 October 2018 14:18
E-UAE on Mac - App Bundle with embedded ADF kire_online support.OtherUAE 50 29 August 2012 01:15
Embedded Raspberry Pi? wXR Hardware mods 2 29 July 2012 17:39
640x400 : Missing from the embedded resolutions NewDeli request.UAE Wishlist 7 16 October 2009 11:49
Amiga OS on embedded linux device? gizmomelb Coders. General 2 22 September 2006 20:53

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 19:12.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.12474 seconds with 13 queries