]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/CCode/Source/String/PrintLibInternal.h
More moves for Tool Packages
[mirror_edk2.git] / Tools / CCode / Source / String / PrintLibInternal.h
1 /*++
2
3 Copyright (c) 2004-2006 Intel Corporation. All rights reserved
4 This program and the accompanying materials are licensed and made available
5 under the terms and conditions of the BSD License which accompanies this
6 distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12
13 Module Name:
14
15 PrintLibInternal.h
16
17 Abstract:
18
19 Print Library.
20
21 --*/
22
23
24
25 //
26 // Print primitives
27 //
28 //#define LEFT_JUSTIFY 0x01
29 #define PREFIX_SIGN 0x02
30 #define PREFIX_BLANK 0x04
31 //#define COMMA_TYPE 0x08
32 #define LONG_TYPE 0x10
33 //#define PREFIX_ZERO 0x20
34 #define OUTPUT_UNICODE 0x40
35 #define RADIX_HEX 0x80
36 #define FORMAT_UNICODE 0x100
37 #define PAD_TO_WIDTH 0x200
38 #define ARGUMENT_UNICODE 0x400
39 #define PRECISION 0x800
40 #define ARGUMENT_REVERSED 0x1000
41
42 ///
43 /// Define the maximum number of characters that are required to encode
44 /// a decimal, hexidecimal, GUID, or TIME value with a Nll terminator.
45 /// Maximum Length Decimal String = 28 "-9,223,372,036,854,775,808"
46 /// Maximum Length Hexidecimal String = 17 "FFFFFFFFFFFFFFFF"
47 /// Maximum Length GUID = 37 "00000000-0000-0000-0000-000000000000"
48 /// Maximum Length TIME = 18 "12/12/2006 12:12"
49 ///
50 #define MAXIMUM_VALUE_CHARACTERS 38
51
52 //
53 //
54 //
55 typedef struct {
56 UINT16 Year;
57 UINT8 Month;
58 UINT8 Day;
59 UINT8 Hour;
60 UINT8 Minute;
61 UINT8 Second;
62 UINT8 Pad1;
63 UINT32 Nanosecond;
64 INT16 TimeZone;
65 UINT8 Daylight;
66 UINT8 Pad2;
67 } TIME;
68
69 UINTN
70 BasePrintLibSPrint (
71 OUT CHAR8 *Buffer,
72 IN UINTN BufferSize,
73 IN UINTN Flags,
74 IN CONST CHAR8 *FormatString,
75 ...
76 );
77
78 CHAR8 *
79 BasePrintLibFillBuffer (
80 CHAR8 *Buffer,
81 INTN Length,
82 UINTN Character,
83 INTN Increment
84 );
85
86 UINTN
87 EFIAPI
88 BasePrintLibValueToString (
89 IN OUT CHAR8 *Buffer,
90 IN INT64 Value,
91 IN UINTN Radix
92 );
93
94 UINTN
95 BasePrintLibConvertValueToString (
96 IN OUT CHAR8 *Buffer,
97 IN UINTN Flags,
98 IN INT64 Value,
99 IN UINTN Width,
100 IN UINTN Increment
101 );