1 # Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
2 # This program and the accompanying materials
3 # are licensed and made available under the terms and conditions of the BSD License
4 # which accompanies this distribution. The full text of the license may be found at
5 # http://opensource.org/licenses/bsd-license.php
7 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
8 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 #This file is used to parse a strings file and create or add to a string database file.
18 import Common
.EdkLogger
as EdkLogger
19 from Common
.BuildToolError
import *
20 from UniClassObject
import *
21 from StringIO
import StringIO
22 from struct
import pack
27 EFI_HII_SIBT_END
= '0x00'
28 EFI_HII_SIBT_STRING_SCSU
= '0x10'
29 EFI_HII_SIBT_STRING_SCSU_FONT
= '0x11'
30 EFI_HII_SIBT_STRINGS_SCSU
= '0x12'
31 EFI_HII_SIBT_STRINGS_SCSU_FONT
= '0x13'
32 EFI_HII_SIBT_STRING_UCS2
= '0x14'
33 EFI_HII_SIBT_STRING_UCS2_FONT
= '0x15'
34 EFI_HII_SIBT_STRINGS_UCS2
= '0x16'
35 EFI_HII_SIBT_STRINGS_UCS2_FONT
= '0x17'
36 EFI_HII_SIBT_DUPLICATE
= '0x20'
37 EFI_HII_SIBT_SKIP2
= '0x21'
38 EFI_HII_SIBT_SKIP1
= '0x22'
39 EFI_HII_SIBT_EXT1
= '0x30'
40 EFI_HII_SIBT_EXT2
= '0x31'
41 EFI_HII_SIBT_EXT4
= '0x32'
42 EFI_HII_SIBT_FONT
= '0x40'
44 EFI_HII_PACKAGE_STRINGS
= '0x04'
45 EFI_HII_PACKAGE_FORM
= '0x02'
47 StringPackageType
= EFI_HII_PACKAGE_STRINGS
48 StringPackageForm
= EFI_HII_PACKAGE_FORM
49 StringBlockType
= EFI_HII_SIBT_STRING_UCS2
50 StringSkipType
= EFI_HII_SIBT_SKIP2
55 DEFINE_STR
= '#define'
56 COMMENT_DEFINE_STR
= COMMENT
+ DEFINE_STR
57 NOT_REFERENCED
= 'not referenced'
58 COMMENT_NOT_REFERENCED
= ' ' + COMMENT
+ NOT_REFERENCED
59 CHAR_ARRAY_DEFIN
= 'unsigned char'
60 COMMON_FILE_NAME
= 'Strings'
64 STRING_TOKEN
= re
.compile('STRING_TOKEN *\(([A-Z0-9_]+) *\)', re
.MULTILINE | re
.UNICODE
)
65 COMPATIBLE_STRING_TOKEN
= re
.compile('STRING_TOKEN *\(([A-Za-z0-9_]+) *\)', re
.MULTILINE | re
.UNICODE
)
67 EFI_HII_ARRAY_SIZE_LENGTH
= 4
68 EFI_HII_PACKAGE_HEADER_LENGTH
= 4
69 EFI_HII_HDR_SIZE_LENGTH
= 4
70 EFI_HII_STRING_OFFSET_LENGTH
= 4
72 EFI_STRING_ID_LENGTH
= 2
73 EFI_HII_LANGUAGE_WINDOW
= 0
74 EFI_HII_LANGUAGE_WINDOW_LENGTH
= 2
75 EFI_HII_LANGUAGE_WINDOW_NUMBER
= 16
76 EFI_HII_STRING_PACKAGE_HDR_LENGTH
= EFI_HII_PACKAGE_HEADER_LENGTH
+ EFI_HII_HDR_SIZE_LENGTH
+ EFI_HII_STRING_OFFSET_LENGTH
+ EFI_HII_LANGUAGE_WINDOW_LENGTH
* EFI_HII_LANGUAGE_WINDOW_NUMBER
+ EFI_STRING_ID_LENGTH
78 H_C_FILE_HEADER
= ['//', \
79 '// DO NOT EDIT -- auto-generated file', \
81 '// This file is generated by the StrGather utility', \
83 LANGUAGE_NAME_STRING_NAME
= '$LANGUAGE_NAME'
84 PRINTABLE_LANGUAGE_NAME_STRING_NAME
= '$PRINTABLE_LANGUAGE_NAME'
86 ## Convert a dec number to a hex string
88 # Convert a dec number to a formatted hex string in length digit
89 # The digit is set to default 8
90 # The hex string starts with "0x"
91 # DecToHexStr(1000) is '0x000003E8'
92 # DecToHexStr(1000, 6) is '0x0003E8'
94 # @param Dec: The number in dec format
95 # @param Digit: The needed digit of hex string
97 # @retval: The formatted hex string
99 def DecToHexStr(Dec
, Digit
= 8):
100 return eval("'0x%0" + str(Digit
) + "X' % int(Dec)")
102 ## Convert a dec number to a hex list
104 # Convert a dec number to a formatted hex list in size digit
105 # The digit is set to default 8
106 # DecToHexList(1000) is ['0xE8', '0x03', '0x00', '0x00']
107 # DecToHexList(1000, 6) is ['0xE8', '0x03', '0x00']
109 # @param Dec: The number in dec format
110 # @param Digit: The needed digit of hex list
112 # @retval: A list for formatted hex string
114 def DecToHexList(Dec
, Digit
= 8):
115 Hex
= eval("'%0" + str(Digit
) + "X' % int(Dec)" )
117 for Bit
in range(Digit
- 2, -1, -2):
118 List
.append(HexHeader
+ Hex
[Bit
:Bit
+ 2])
121 ## Convert a acsii string to a hex list
123 # Convert a acsii string to a formatted hex list
124 # AscToHexList('en-US') is ['0x65', '0x6E', '0x2D', '0x55', '0x53']
126 # @param Ascii: The acsii string
128 # @retval: A list for formatted hex string
130 def AscToHexList(Ascii
):
133 List
.append('0x%2X' % ord(Item
))
137 ## Create header of .h file
139 # Create a header of .h file
141 # @param BaseName: The basename of strings
143 # @retval Str: A string for .h file header
145 def CreateHFileHeader(BaseName
):
147 for Item
in H_C_FILE_HEADER
:
148 Str
= WriteLine(Str
, Item
)
149 Str
= WriteLine(Str
, '#ifndef _' + BaseName
.upper() + '_STRINGS_DEFINE_H_')
150 Str
= WriteLine(Str
, '#define _' + BaseName
.upper() + '_STRINGS_DEFINE_H_')
153 ## Create content of .h file
155 # Create content of .h file
157 # @param BaseName: The basename of strings
158 # @param UniObjectClass A UniObjectClass instance
159 # @param IsCompatibleMode Compatible mode
160 # @param UniGenCFlag UniString is generated into AutoGen C file when it is set to True
162 # @retval Str: A string of .h file content
164 def CreateHFileContent(BaseName
, UniObjectClass
, IsCompatibleMode
, UniGenCFlag
):
167 Line
= COMMENT_DEFINE_STR
+ ' ' + LANGUAGE_NAME_STRING_NAME
+ ' ' * (ValueStartPtr
- len(DEFINE_STR
+ LANGUAGE_NAME_STRING_NAME
)) + DecToHexStr(0, 4) + COMMENT_NOT_REFERENCED
168 Str
= WriteLine(Str
, Line
)
169 Line
= COMMENT_DEFINE_STR
+ ' ' + PRINTABLE_LANGUAGE_NAME_STRING_NAME
+ ' ' * (ValueStartPtr
- len(DEFINE_STR
+ PRINTABLE_LANGUAGE_NAME_STRING_NAME
)) + DecToHexStr(1, 4) + COMMENT_NOT_REFERENCED
170 Str
= WriteLine(Str
, Line
)
173 #Group the referred/Unused STRING token together.
174 for Index
in range(2, len(UniObjectClass
.OrderedStringList
[UniObjectClass
.LanguageDef
[0][0]])):
175 StringItem
= UniObjectClass
.OrderedStringList
[UniObjectClass
.LanguageDef
[0][0]][Index
]
176 Name
= StringItem
.StringName
177 Token
= StringItem
.Token
178 Referenced
= StringItem
.Referenced
181 if Referenced
== True:
182 if (ValueStartPtr
- len(DEFINE_STR
+ Name
)) <= 0:
183 Line
= DEFINE_STR
+ ' ' + Name
+ ' ' + DecToHexStr(Token
, 4)
185 Line
= DEFINE_STR
+ ' ' + Name
+ ' ' * (ValueStartPtr
- len(DEFINE_STR
+ Name
)) + DecToHexStr(Token
, 4)
186 Str
= WriteLine(Str
, Line
)
188 if (ValueStartPtr
- len(DEFINE_STR
+ Name
)) <= 0:
189 Line
= COMMENT_DEFINE_STR
+ ' ' + Name
+ ' ' + DecToHexStr(Token
, 4) + COMMENT_NOT_REFERENCED
191 Line
= COMMENT_DEFINE_STR
+ ' ' + Name
+ ' ' * (ValueStartPtr
- len(DEFINE_STR
+ Name
)) + DecToHexStr(Token
, 4) + COMMENT_NOT_REFERENCED
192 UnusedStr
= WriteLine(UnusedStr
, Line
)
194 Str
= ''.join([Str
,UnusedStr
])
196 Str
= WriteLine(Str
, '')
197 if IsCompatibleMode
or UniGenCFlag
:
198 Str
= WriteLine(Str
, 'extern unsigned char ' + BaseName
+ 'Strings[];')
201 ## Create a complete .h file
203 # Create a complet .h file with file header and file content
205 # @param BaseName: The basename of strings
206 # @param UniObjectClass A UniObjectClass instance
207 # @param IsCompatibleMode Compatible mode
208 # @param UniGenCFlag UniString is generated into AutoGen C file when it is set to True
210 # @retval Str: A string of complete .h file
212 def CreateHFile(BaseName
, UniObjectClass
, IsCompatibleMode
, UniGenCFlag
):
213 HFile
= WriteLine('', CreateHFileContent(BaseName
, UniObjectClass
, IsCompatibleMode
, UniGenCFlag
))
217 ## Create header of .c file
219 # Create a header of .c file
221 # @retval Str: A string for .c file header
223 def CreateCFileHeader():
225 for Item
in H_C_FILE_HEADER
:
226 Str
= WriteLine(Str
, Item
)
230 ## Create a buffer to store all items in an array
232 # @param BinBuffer Buffer to contain Binary data.
233 # @param Array: The array need to be formatted
235 def CreateBinBuffer(BinBuffer
, Array
):
237 BinBuffer
.write(pack("B", int(Item
,16)))
239 ## Create a formatted string all items in an array
241 # Use ',' to join each item in an array, and break an new line when reaching the width (default is 16)
243 # @param Array: The array need to be formatted
244 # @param Width: The line length, the default value is set to 16
246 # @retval ArrayItem: A string for all formatted array items
248 def CreateArrayItem(Array
, Width
= 16):
255 if Index
< MaxLength
:
256 Line
= Line
+ Item
+ ', '
259 ArrayItem
= WriteLine(ArrayItem
, Line
)
260 Line
= ' ' + Item
+ ', '
262 ArrayItem
= Write(ArrayItem
, Line
.rstrip())
266 ## CreateCFileStringValue
268 # Create a line with string value
270 # @param Value: Value of the string
272 # @retval Str: A formatted string with string value
275 def CreateCFileStringValue(Value
):
276 Value
= [StringBlockType
] + Value
277 Str
= WriteLine('', CreateArrayItem(Value
))
281 ## GetFilteredLanguage
283 # apply get best language rules to the UNI language code list
285 # @param UniLanguageList: language code definition list in *.UNI file
286 # @param LanguageFilterList: language code filter list of RFC4646 format in DSC file
288 # @retval UniLanguageListFiltered: the filtered language code
290 def GetFilteredLanguage(UniLanguageList
, LanguageFilterList
):
291 UniLanguageListFiltered
= []
292 # if filter list is empty, then consider there is no filter
293 if LanguageFilterList
== []:
294 UniLanguageListFiltered
= UniLanguageList
295 return UniLanguageListFiltered
296 for Language
in LanguageFilterList
:
297 # first check for exact match
298 if Language
in UniLanguageList
:
299 if Language
not in UniLanguageListFiltered
:
300 UniLanguageListFiltered
+= [Language
]
301 # find the first one with the same/equivalent primary tag
303 if Language
.find('-') != -1:
304 PrimaryTag
= Language
[0:Language
.find('-')].lower()
306 PrimaryTag
= Language
308 if len(PrimaryTag
) == 3:
309 PrimaryTag
= LangConvTable
.get(PrimaryTag
)
311 for UniLanguage
in UniLanguageList
:
312 if UniLanguage
.find('-') != -1:
313 UniLanguagePrimaryTag
= UniLanguage
[0:UniLanguage
.find('-')].lower()
315 UniLanguagePrimaryTag
= UniLanguage
317 if len(UniLanguagePrimaryTag
) == 3:
318 UniLanguagePrimaryTag
= LangConvTable
.get(UniLanguagePrimaryTag
)
320 if PrimaryTag
== UniLanguagePrimaryTag
:
321 if UniLanguage
not in UniLanguageListFiltered
:
322 UniLanguageListFiltered
+= [UniLanguage
]
325 # Here is rule 3 for "get best language"
326 # If tag is not listed in the Unicode file, the default ("en") tag should be used for that language
327 # for better processing, find the one that best suit for it.
329 if DefaultTag
not in UniLanguageListFiltered
:
330 # check whether language code with primary code equivalent with DefaultTag already in the list, if so, use that
331 for UniLanguage
in UniLanguageList
:
332 if UniLanguage
.startswith('en-') or UniLanguage
.startswith('eng-'):
333 if UniLanguage
not in UniLanguageListFiltered
:
334 UniLanguageListFiltered
+= [UniLanguage
]
337 UniLanguageListFiltered
+= [DefaultTag
]
338 return UniLanguageListFiltered
341 ## Create content of .c file
343 # Create content of .c file
345 # @param BaseName: The basename of strings
346 # @param UniObjectClass A UniObjectClass instance
347 # @param IsCompatibleMode Compatible mode
348 # @param UniBinBuffer UniBinBuffer to contain UniBinary data.
349 # @param FilterInfo Platform language filter information
351 # @retval Str: A string of .c file content
353 def CreateCFileContent(BaseName
, UniObjectClass
, IsCompatibleMode
, UniBinBuffer
, FilterInfo
):
357 TotalLength
= EFI_HII_ARRAY_SIZE_LENGTH
361 EDK2Module
= FilterInfo
[0]
363 LanguageFilterList
= FilterInfo
[1]
365 # EDK module is using ISO639-2 format filter, convert to the RFC4646 format
366 LanguageFilterList
= [LangConvTable
.get(F
.lower()) for F
in FilterInfo
[1]]
369 for IndexI
in range(len(UniObjectClass
.LanguageDef
)):
370 UniLanguageList
+= [UniObjectClass
.LanguageDef
[IndexI
][0]]
372 UniLanguageListFiltered
= GetFilteredLanguage(UniLanguageList
, LanguageFilterList
)
376 # Create lines for each language's strings
378 for IndexI
in range(len(UniObjectClass
.LanguageDef
)):
379 Language
= UniObjectClass
.LanguageDef
[IndexI
][0]
380 if Language
not in UniLanguageListFiltered
:
383 StringBuffer
= StringIO()
386 NumberOfUseOtherLangDef
= 0
388 for IndexJ
in range(1, len(UniObjectClass
.OrderedStringList
[UniObjectClass
.LanguageDef
[IndexI
][0]])):
389 Item
= UniObjectClass
.OrderedStringListByToken
[Language
][IndexJ
]
391 Name
= Item
.StringName
392 Value
= Item
.StringValueByteList
393 Referenced
= Item
.Referenced
395 UseOtherLangDef
= Item
.UseOtherLangDef
397 if UseOtherLangDef
!= '' and Referenced
:
398 NumberOfUseOtherLangDef
= NumberOfUseOtherLangDef
+ 1
401 if NumberOfUseOtherLangDef
> 0:
402 StrStringValue
= WriteLine(StrStringValue
, CreateArrayItem([StringSkipType
] + DecToHexList(NumberOfUseOtherLangDef
, 4)))
403 CreateBinBuffer (StringBuffer
, ([StringSkipType
] + DecToHexList(NumberOfUseOtherLangDef
, 4)))
404 NumberOfUseOtherLangDef
= 0
405 ArrayLength
= ArrayLength
+ 3
406 if Referenced
and Item
.Token
> 0:
408 StrStringValue
= WriteLine(StrStringValue
, "// %s: %s:%s" % (DecToHexStr(Index
, 4), Name
, DecToHexStr(Token
, 4)))
409 StrStringValue
= Write(StrStringValue
, CreateCFileStringValue(Value
))
410 CreateBinBuffer (StringBuffer
, [StringBlockType
] + Value
)
411 ArrayLength
= ArrayLength
+ Item
.Length
+ 1 # 1 is for the length of string type
414 # EFI_HII_PACKAGE_HEADER
416 Offset
= EFI_HII_STRING_PACKAGE_HDR_LENGTH
+ len(Language
) + 1
417 ArrayLength
= Offset
+ ArrayLength
+ 1
420 # Create PACKAGE HEADER
422 Str
= WriteLine(Str
, '// PACKAGE HEADER\n')
423 TotalLength
= TotalLength
+ ArrayLength
425 List
= DecToHexList(ArrayLength
, 6) + \
426 [StringPackageType
] + \
427 DecToHexList(Offset
) + \
428 DecToHexList(Offset
) + \
429 DecToHexList(EFI_HII_LANGUAGE_WINDOW
, EFI_HII_LANGUAGE_WINDOW_LENGTH
* 2) * EFI_HII_LANGUAGE_WINDOW_NUMBER
+ \
430 DecToHexList(EFI_STRING_ID
, 4) + \
431 AscToHexList(Language
) + \
433 Str
= WriteLine(Str
, CreateArrayItem(List
, 16) + '\n')
436 # Create PACKAGE DATA
438 Str
= WriteLine(Str
, '// PACKAGE DATA\n')
439 Str
= Write(Str
, StrStringValue
)
442 # Add an EFI_HII_SIBT_END at last
444 Str
= WriteLine(Str
, ' ' + EFI_HII_SIBT_END
+ ",")
447 # Create binary UNI string
450 CreateBinBuffer (UniBinBuffer
, List
)
451 UniBinBuffer
.write (StringBuffer
.getvalue())
452 UniBinBuffer
.write (pack("B", int(EFI_HII_SIBT_END
,16)))
456 # Create line for string variable name
457 # "unsigned char $(BaseName)Strings[] = {"
459 AllStr
= WriteLine('', CHAR_ARRAY_DEFIN
+ ' ' + BaseName
+ COMMON_FILE_NAME
+ '[] = {\n' )
463 # Create FRAMEWORK_EFI_HII_PACK_HEADER in compatible mode
465 AllStr
= WriteLine(AllStr
, '// FRAMEWORK PACKAGE HEADER Length')
466 AllStr
= WriteLine(AllStr
, CreateArrayItem(DecToHexList(TotalLength
+ 2)) + '\n')
467 AllStr
= WriteLine(AllStr
, '// FRAMEWORK PACKAGE HEADER Type')
468 AllStr
= WriteLine(AllStr
, CreateArrayItem(DecToHexList(2, 4)) + '\n')
471 # Create whole array length in UEFI mode
473 AllStr
= WriteLine(AllStr
, '// STRGATHER_OUTPUT_HEADER')
474 AllStr
= WriteLine(AllStr
, CreateArrayItem(DecToHexList(TotalLength
)) + '\n')
479 AllStr
= Write(AllStr
, Str
)
483 ## Create end of .c file
485 # Create end of .c file
487 # @retval Str: A string of .h file end
489 def CreateCFileEnd():
490 Str
= Write('', '};')
495 # Create a complete .c file
497 # @param BaseName: The basename of strings
498 # @param UniObjectClass A UniObjectClass instance
499 # @param IsCompatibleMode Compatible Mode
500 # @param FilterInfo Platform language filter information
502 # @retval CFile: A string of complete .c file
504 def CreateCFile(BaseName
, UniObjectClass
, IsCompatibleMode
, FilterInfo
):
506 #CFile = WriteLine(CFile, CreateCFileHeader())
507 CFile
= WriteLine(CFile
, CreateCFileContent(BaseName
, UniObjectClass
, IsCompatibleMode
, None, FilterInfo
))
508 CFile
= WriteLine(CFile
, CreateCFileEnd())
513 # Get a list for all files
515 # @param IncludeList: A list of all path to be searched
516 # @param SkipList: A list of all types of file could be skipped
518 # @retval FileList: A list of all files found
520 def GetFileList(SourceFileList
, IncludeList
, SkipList
):
521 if IncludeList
== None:
522 EdkLogger
.error("UnicodeStringGather", AUTOGEN_ERROR
, "Include path for unicode file is not defined")
528 for File
in SourceFileList
:
529 for Dir
in IncludeList
:
530 if not os
.path
.exists(Dir
):
532 File
= os
.path
.join(Dir
, File
.Path
)
536 if os
.path
.isfile(File
) != True:
539 # Ignore file listed in skip list
542 for Skip
in SkipList
:
543 if os
.path
.splitext(File
)[1].upper() == Skip
.upper():
544 EdkLogger
.verbose("Skipped %s for string token uses search" % File
)
549 FileList
.append(File
)
557 # Search whether all string defined in UniObjectClass are referenced
558 # All string used should be set to Referenced
560 # @param UniObjectClass: Input UniObjectClass
561 # @param FileList: Search path list
562 # @param IsCompatibleMode Compatible Mode
564 # @retval UniObjectClass: UniObjectClass after searched
566 def SearchString(UniObjectClass
, FileList
, IsCompatibleMode
):
568 return UniObjectClass
570 for File
in FileList
:
571 if os
.path
.isfile(File
):
572 Lines
= open(File
, 'r')
574 if not IsCompatibleMode
:
575 StringTokenList
= STRING_TOKEN
.findall(Line
)
577 StringTokenList
= COMPATIBLE_STRING_TOKEN
.findall(Line
)
578 for StrName
in StringTokenList
:
579 EdkLogger
.debug(EdkLogger
.DEBUG_5
, "Found string identifier: " + StrName
)
580 UniObjectClass
.SetStringReferenced(StrName
)
582 UniObjectClass
.ReToken()
584 return UniObjectClass
588 # This function is used for UEFI2.1 spec
591 def GetStringFiles(UniFilList
, SourceFileList
, IncludeList
, IncludePathList
, SkipList
, BaseName
, IsCompatibleMode
= False, ShellMode
= False, UniGenCFlag
= True, UniGenBinBuffer
= None, FilterInfo
= [True, []]):
592 if len(UniFilList
) > 0:
595 # support ISO 639-2 codes in .UNI files of EDK Shell
597 Uni
= UniFileClassObject(sorted (UniFilList
), True, IncludePathList
)
599 Uni
= UniFileClassObject(sorted (UniFilList
), IsCompatibleMode
, IncludePathList
)
601 EdkLogger
.error("UnicodeStringGather", AUTOGEN_ERROR
, 'No unicode files given')
603 FileList
= GetFileList(SourceFileList
, IncludeList
, SkipList
)
605 Uni
= SearchString(Uni
, sorted (FileList
), IsCompatibleMode
)
607 HFile
= CreateHFile(BaseName
, Uni
, IsCompatibleMode
, UniGenCFlag
)
609 if IsCompatibleMode
or UniGenCFlag
:
610 CFile
= CreateCFile(BaseName
, Uni
, IsCompatibleMode
, FilterInfo
)
612 CreateCFileContent(BaseName
, Uni
, IsCompatibleMode
, UniGenBinBuffer
, FilterInfo
)
619 def Write(Target
, Item
):
620 return ''.join([Target
,Item
])
623 # Write an item with a break line
625 def WriteLine(Target
, Item
):
626 return ''.join([Target
,Item
,'\n'])
628 # This acts like the main() function for the script, unless it is 'import'ed into another
630 if __name__
== '__main__':
631 EdkLogger
.info('start')
634 r
'C:\\Edk\\Strings2.uni',
635 r
'C:\\Edk\\Strings.uni'
639 for Root
, Dirs
, Files
in os
.walk('C:\\Edk'):
641 SrcFileList
.append(File
)
647 SkipList
= ['.inf', '.uni']
648 BaseName
= 'DriverSample'
649 (h
, c
) = GetStringFiles(UniFileList
, SrcFileList
, IncludeList
, SkipList
, BaseName
, True)
650 hfile
= open('unistring.h', 'w')
651 cfile
= open('unistring.c', 'w')
655 EdkLogger
.info('end')