acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
aaa_dostime.h
Go to the documentation of this file.
1#pragma once
2#ifndef DOSTIME_H
3#define DOSTIME_H
4
5/*
6 dostime.h - routines for converting UNIX time to MS-DOS time.
7
8 Various Copyrights:
9
10 First written by Mark Adler, Richard B. Wales, Jean-loup Gailly,
11 Kai Uwe Rommel, Onno van der Linden and Igor Mandrichenko (1990-1997).
12 Tweaked further by Bryan Burns (1999).
13 Redesigned with full error checks by Alexis Wilke (2015).
14
15 This program is free software; you can redistribute it and/or
16 modify it under the terms of the GNU General Public License
17 as published by the Free Software Foundation; either version 2
18 of the License, or (at your option) any later version.
19
20 This program is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU General Public License for more details.
24
25 You should have received a copy of the GNU General Public License
26 along with this program; if not, write to the Free Software
27 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28*/
29
39
40#include <time.h>
41#include <inttypes.h>
42
43
44
45typedef uint32_t dos_time_t;
46
47CLASS_DECL_ACME dos_time_t minimum_dos_time();
48CLASS_DECL_ACME dos_time_t maximum_dos_time();
49CLASS_DECL_ACME posix_time dos_time_unix_time(dos_time_t dostime);
50CLASS_DECL_ACME dos_time_t dos_time(::i32 year, ::i32 month, ::i32 day, ::i32 hour, ::i32 minute, ::i32 second);
51CLASS_DECL_ACME dos_time_t unix_time_dos_time(posix_time unix_time);
52
53
54// Local Variables:
55// mode: cpp
56// indent-tabs-mode: nil
57// c-basic-offset: 4
58// tab-width: 4
59// End:
60
61// vim: ts=2 sw=2 et
62#endif
CLASS_DECL_ACME dos_time_t maximum_dos_time()
Return the maximum possible value .
Definition aaa_dostime.cpp:105
CLASS_DECL_ACME dos_time_t minimum_dos_time()
Return the minimum possible value.
Definition aaa_dostime.cpp:81
CLASS_DECL_ACME posix_time dos_time_unix_time(dos_time_t dostime)
Convert a DOS time to a Unix time.
Definition aaa_dostime.cpp:131
CLASS_DECL_ACME dos_time_t unix_time_dos_time(posix_time unix_time)
Convert a Unix date to a DOS date.
Definition aaa_dostime.cpp:219
Definition day.h:8
Definition aaaa_hour.h:7
Definition aaaa_minute.h:9
Definition aaa_second.h:9
Definition posix_time.h:8