]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - VtoyTool/BabyISO/biso_dump.h
1.1.07 release
[Ventoy.git] / VtoyTool / BabyISO / biso_dump.h
1 /******************************************************************************
2 * biso_dump.h
3 *
4 * Copyright (c) 2020, longpanda <admin@ventoy.net>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21 #ifndef __BISO_DUMP_H__
22 #define __BISO_DUMP_H__
23
24 #define BISO_DUMP_INT(Name, Value) BISO_DUMP("%-24s : %u\n", Name, Value)
25 #define BISO_DUMP_STR(Name, Value, szBuf) \
26 BISO_DUMP("%-24s : %s\n", Name, BISO_UTIL_CopyStr(Value, sizeof(Value), szBuf))
27
28 #define BISO_DUMP_CHAR(str, len) \
29 {\
30 UINT uiLoop;\
31 for (uiLoop = 0; uiLoop < (UINT)len; uiLoop++)\
32 {\
33 BISO_DUMP("%c", str[uiLoop]);\
34 }\
35 BISO_DUMP("\n");\
36 }
37
38
39 #define BISO_DUMP_BYTE(Buf, Len) \
40 { \
41 UINT i; \
42 for (i = 0; i < Len; i++) \
43 { \
44 BISO_DUMP("%02x ", Buf[i]); \
45 } \
46 BISO_DUMP("\n"); \
47 }
48
49 /* 显示日期 */
50 #define BISO_DUMP_DAY(Name, Value) \
51 {\
52 ULONG _ulRet;\
53 BISO_DATE_S _stDate;\
54 _ulRet = BISO_9660_ParseDate84261((Value), &_stDate);\
55 if (BISO_SUCCESS == _ulRet)\
56 {\
57 BISO_DUMP("%-24s : %04u-%02u-%02u %02u:%02u:%02u.%03u ",\
58 (Name), _stDate.usYear, _stDate.ucMonth, _stDate.ucDay,\
59 _stDate.ucHour, _stDate.ucMin, _stDate.ucSecond,\
60 _stDate.usMillSec);\
61 if (_stDate.cZone > 0)\
62 {\
63 BISO_DUMP("GMT+%d\n", _stDate.cZone);\
64 }\
65 else\
66 {\
67 BISO_DUMP("GMT%d\n", _stDate.cZone);\
68 }\
69 }\
70 else\
71 {\
72 BISO_DUMP("%-24s : ---\n", (Name));\
73 }\
74 }
75
76 VOID BISO_DUMP_ShowFileTree
77 (
78 IN UINT uiDepth,
79 IN CONST BISO_DIR_TREE_S *pstDirTree
80 );
81
82 #endif /* __BISO_DUMP_H__ */
83