Sync BaseTool trunk (version r2599) into EDKII BaseTools.
Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Heshen Chen <chen.heshen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14591 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
@ -38,6 +38,9 @@ LF = u'\u000A'
|
||||
NULL = u'\u0000'
|
||||
TAB = u'\t'
|
||||
BACK_SPLASH = u'\\'
|
||||
DOBULE_QUOTED_SPLASH = u'\\"'
|
||||
SIGLE_QUOTED_SPLASH = u"\\'"
|
||||
TAB_BACK_SLASH = u"\\/"
|
||||
|
||||
gIncludePattern = re.compile("^#include +[\"<]+([^\"< >]+)[>\"]+$", re.MULTILINE | re.UNICODE)
|
||||
|
||||
@ -334,11 +337,11 @@ class UniFileClassObject(object):
|
||||
Line = Line.replace(u'/language', u'#language')
|
||||
Line = Line.replace(u'/include', u'#include')
|
||||
|
||||
Line = Line.replace(u'\\\\', u'\u0006')
|
||||
Line = Line.replace(UNICODE_WIDE_CHAR, WIDE_CHAR)
|
||||
Line = Line.replace(UNICODE_NARROW_CHAR, NARROW_CHAR)
|
||||
Line = Line.replace(UNICODE_NON_BREAKING_CHAR, NON_BREAKING_CHAR)
|
||||
|
||||
Line = Line.replace(u'\\\\', u'\u0006')
|
||||
Line = Line.replace(u'\\r\\n', CR + LF)
|
||||
Line = Line.replace(u'\\n', CR + LF)
|
||||
Line = Line.replace(u'\\r', CR)
|
||||
@ -346,7 +349,10 @@ class UniFileClassObject(object):
|
||||
Line = Line.replace(u'''\"''', u'''"''')
|
||||
Line = Line.replace(u'\t', u' ')
|
||||
Line = Line.replace(u'\u0006', u'\\')
|
||||
|
||||
Line = Line.replace(DOBULE_QUOTED_SPLASH, u'"')
|
||||
Line = Line.replace(SIGLE_QUOTED_SPLASH, u"'")
|
||||
Line = Line.replace(TAB_BACK_SLASH, u"/")
|
||||
|
||||
# if Line.find(u'\\x'):
|
||||
# hex = Line[Line.find(u'\\x') + 2 : Line.find(u'\\x') + 6]
|
||||
# hex = "u'\\u" + hex + "'"
|
||||
|
Reference in New Issue
Block a user