[M3devel] FW: time/date/version functions in Quake?

Jay jayk123 at hotmail.com
Wed Jan 2 11:18:33 CET 2008


The one I got from m3devel had most newlines removed such as to be hard to read, AND got /slightly/ truncated (just the signature).
Let's try this.
 
I will change the global to datetime() shortly.
I was thinking of GetDateTimeStamp() but others probably don't like my verbosity and it is not consistent with the terse lowercasing "Romans".
 
 - Jay


From: jayk123 at hotmail.comTo: m3devel at elegosoft.comCC: wagner at elegosoft.comSubject: time/date/version functions in Quake?Date: Tue, 1 Jan 2008 20:17:51 +0000


 Hi. This is per Olaf.    Quake code in       m3-sys\cm3\src\version.quake     wants/needs the time/date like so:    C:\dev2\cm3.2\m3-sys\m3quake>\cm3\bin\cm3.exe -version    Critical Mass Modula-3 version d5.5.1      last updated: 2007-12-30      compiled: 2008-01-01 19:59:32    <===      configuration: \cm3\bin\cm3.cfg  In UTC (universal coordinated time, also known as "greenwich mean time (GMT)")Currently this is via an application specific global variable in m3quake called "CM3_VERSION_NOW"."Currently", as in, I just did it, it is committed. (I'm impatient and impulsive and love coding, take me or leave me...) C:\dev2\cm3.2\m3-sys\m3quake>findstr /s NOW  * src\QMachine.m3:            "CM3_VERSION_NOW", It's only used on Windows, because I haven't yet tested elsewhere.Olaf wants to consider something more general, as I understand.Some little extra feature in Quake, new built in function(s)/variable(s) (probably function(s)).Maybe something like Unix date (er, probably less general than that)or strftime, or something.I'm skeptical that resolution to the second is useful here, seems overly precise.Please discuss/decide/spec. :)(I don't care much. I'd be content just to change the variable to a function and decide on a name that isn't ALL CAPS,though those were my own doing in the first place, as well as learning the best idiom for those few lines of code,such as hopefully to avoid the six+ extra heap allocs for the TEXTs before concating them, like something involvinga small fixed sized buffer on the stack maybe? :) ) (Not clear how much "safety" a "competent programmer"needs and if it is all worth it...obviously has its place, but...)Oh, and to be a bit obnoxious -- maybe the higher level version.quake should be pushed into Modula-3 code????I mean..something like..some stamp that is applied to all binaries?You know, like on Windows, there are these nice version resources.Putting them in every file automatically would be nice, unless overridden by the use -- typical override wouldbe provision of all Win32 resources, and hopefully that'd include a version resource. I /know/ I am confusing issues -- universal injection of such data, vs. implementation in Quake vs. Modula-3.Any conventions/mechanisms for other platforms?The Mac has/had version resources, but these days that'd probably involve creating 10 more files and directories per executable.I can research it though easily enough..On Windows it would be an extra dependency, on a resource compiler, but they are ubuiquitous.They come with all commercial toolsets and many free ones. - Jay
_________________________________________________________________
The best games are on Xbox 360.  Click here for a special offer on an Xbox 360 Console.
http://www.xbox.com/en-US/hardware/wheretobuy/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20080102/907ad37f/attachment-0001.html>


More information about the M3devel mailing list