diff options
author | Cecil Sheng <cecil.sheng@hpe.com> | 2015-09-08 06:49:47 +0000 |
---|---|---|
committer | ydong10 <ydong10@Edk2> | 2015-09-08 06:49:47 +0000 |
commit | db3b92b40e17f4bf9393eea4a10f79d5165aeead (patch) | |
tree | 741811113e836416e6ea7501f509ba7ed8918ceb /MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.c | |
parent | 2ba88dc554f074946189ec178b82ae2a9974247a (diff) | |
download | edk2-db3b92b40e17f4bf9393eea4a10f79d5165aeead.tar.gz edk2-db3b92b40e17f4bf9393eea4a10f79d5165aeead.tar.bz2 edk2-db3b92b40e17f4bf9393eea4a10f79d5165aeead.zip |
MdeModulePkg: Regular expression protocol
Add driver to produce EFI_REGULAR_EXPRESSION_PROTOCOL. Based on
Oniguruma v5.9.6 (BSD 2-clause license), which provides full Unicode
support, and POSIX ERE and Perl regex syntaxes.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18411 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.c')
-rw-r--r-- | MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.c b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.c new file mode 100644 index 0000000000..98822f3648 --- /dev/null +++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.c @@ -0,0 +1,32 @@ +/** @file
+
+ Module to rewrite stdlib references within Oniguruma
+
+ Copyright (c) 2014-2015, Hewlett-Packard Development Company, L.P.<BR>
+
+ This program and the accompanying materials are licensed and made available
+ under the terms and conditions of the BSD License that accompanies this
+ distribution. The full text of the license may be found at
+ http://opensource.org/licenses/bsd-license.php.
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
+ WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+**/
+#include "OnigurumaUefiPort.h"
+
+int sprintf(char *str, char const *fmt, ...)
+{
+ VA_LIST Marker;
+ int NumberOfPrinted;
+
+ VA_START (Marker, fmt);
+ NumberOfPrinted = (int)AsciiVSPrint (str, 1000000, fmt, Marker);
+ VA_END (Marker);
+
+ return NumberOfPrinted;
+}
+
+int OnigStrCmp (char* Str1, char* Str2)
+{
+ return (int)AsciiStrCmp (Str1, Str2);
+}
|