1 |
|
|
/*************************************************************************** |
2 |
|
|
* Copyright (c) 2024 Microsoft Corporation |
3 |
|
|
* Copyright (c) 2026-present Eclipse ThreadX contributors |
4 |
|
|
* |
5 |
|
|
* This program and the accompanying materials are made available under the |
6 |
|
|
* terms of the MIT License which is available at |
7 |
|
|
* https://opensource.org/licenses/MIT. |
8 |
|
|
* |
9 |
|
|
* SPDX-License-Identifier: MIT |
10 |
|
|
**************************************************************************/ |
11 |
|
|
|
12 |
|
|
|
13 |
|
|
/**************************************************************************/ |
14 |
|
|
/**************************************************************************/ |
15 |
|
|
/** */ |
16 |
|
|
/** FileX Component */ |
17 |
|
|
/** */ |
18 |
|
|
/** System */ |
19 |
|
|
/** */ |
20 |
|
|
/**************************************************************************/ |
21 |
|
|
/**************************************************************************/ |
22 |
|
|
|
23 |
|
|
#define FX_SOURCE_CODE |
24 |
|
|
|
25 |
|
|
|
26 |
|
|
/* Include necessary system files. */ |
27 |
|
|
|
28 |
|
|
#include "fx_api.h" |
29 |
|
|
#include "fx_system.h" |
30 |
|
|
|
31 |
|
|
|
32 |
|
|
/**************************************************************************/ |
33 |
|
|
/* */ |
34 |
|
|
/* FUNCTION RELEASE */ |
35 |
|
|
/* */ |
36 |
|
|
/* _fxe_system_date_get PORTABLE C */ |
37 |
|
|
/* 6.1 */ |
38 |
|
|
/* AUTHOR */ |
39 |
|
|
/* */ |
40 |
|
|
/* William E. Lamie, Microsoft Corporation */ |
41 |
|
|
/* */ |
42 |
|
|
/* DESCRIPTION */ |
43 |
|
|
/* */ |
44 |
|
|
/* This function checks for errors in the get system date call. */ |
45 |
|
|
/* */ |
46 |
|
|
/* INPUT */ |
47 |
|
|
/* */ |
48 |
|
|
/* year Pointer to year */ |
49 |
|
|
/* month Pointer to month */ |
50 |
|
|
/* day Pointer to day */ |
51 |
|
|
/* */ |
52 |
|
|
/* OUTPUT */ |
53 |
|
|
/* */ |
54 |
|
|
/* FX_PTR_ERROR Invalid destination pointer */ |
55 |
|
|
/* status Actual completion status */ |
56 |
|
|
/* */ |
57 |
|
|
/* CALLS */ |
58 |
|
|
/* */ |
59 |
|
|
/* _fx_system_date_get Actual get system date call */ |
60 |
|
|
/* */ |
61 |
|
|
/* CALLED BY */ |
62 |
|
|
/* */ |
63 |
|
|
/* Application Code */ |
64 |
|
|
/* */ |
65 |
|
|
/**************************************************************************/ |
66 |
|
4 |
UINT _fxe_system_date_get(UINT *year, UINT *month, UINT *day) |
67 |
|
|
{ |
68 |
|
|
|
69 |
|
|
UINT status; |
70 |
|
|
|
71 |
|
|
|
72 |
|
|
/* Check for an invalid pointer. */ |
73 |
✓✓✓✓ ✓✓ |
4 |
if ((year == FX_NULL) || (month == FX_NULL) || (day == FX_NULL)) |
74 |
|
|
{ |
75 |
|
3 |
return(FX_PTR_ERROR); |
76 |
|
|
} |
77 |
|
|
|
78 |
|
|
/* Call actual service to get the system date. */ |
79 |
|
1 |
status = _fx_system_date_get(year, month, day); |
80 |
|
|
|
81 |
|
|
/* Return status. */ |
82 |
|
1 |
return(status); |
83 |
|
|
} |
84 |
|
|
|