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