www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/12/05/08:30:08

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: serialdate to HEX
Date: 5 Dec 2002 13:16:55 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 30
Message-ID: <asnjk7$1bf$1@nets3.rz.RWTH-Aachen.DE>
References: <3 DOT 0 DOT 6 DOT 16 DOT 20021127151001 DOT 4b673a36 AT pop3 DOT 01019freenet DOT de> <3 DOT 0 DOT 6 DOT 16 DOT 20021130172954 DOT 25c72d7c AT pop3 DOT 01019freenet DOT de>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1039094215 1391 137.226.32.75 (5 Dec 2002 13:16:55 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 5 Dec 2002 13:16:55 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Michelle Konzack <dos DOT mailinglists AT freenet DOT de> wrote:

[... please note this is all still in the DJGPP mailing list ---
posting here in German is accepted, but not recommended...]

> Hallo Hans Bernhard, 

> Am 12:36 30/11/02 GMT hat Hans-Bernhard Broeker geschrieben:

>>> But the serialdate under Linux is to large... in Decimal. 
>>
>>It might help if you could explain what you mean by "serialdate".

> Naja, das serielle Datum ist eben fortlaufend ab dem 1.1.1970 
> in sekunden...

E.g. just a plain time_t. Fine.

> Bei Dos-Kompatiblen 'maildir' dachte ich eben an 5e86d29a.000

For this particular case, just printing out time_t's as unsigned 32bit
integers in hex, i.e.

	sprintf(filename, "%08.8x.%03.3x", (unsigned int) time_t, serial)

should do it.  time_t is 32 bits in DJGPP and most current Unix
systems, so the hex representation fits exactly into 8 hex digits.
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019