summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regversion.c
diff options
context:
space:
mode:
authorCecil Sheng <cecil.sheng@hpe.com>2015-09-08 07:10:03 +0000
committerydong10 <ydong10@Edk2>2015-09-08 07:10:03 +0000
commit14b0e5781bd61e905e4d0c988fc4efbbbc8f1ba0 (patch)
tree4594fbbb6b88548c7db24cd0045728b438faa235 /MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regversion.c
parentd8062f1573f7aaab450dc1735c2b6c9d07f52e5e (diff)
downloadedk2-platforms-14b0e5781bd61e905e4d0c988fc4efbbbc8f1ba0.tar.xz
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@18413 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regversion.c')
-rw-r--r--MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regversion.c56
1 files changed, 56 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regversion.c b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regversion.c
new file mode 100644
index 0000000000..087c6ad899
--- /dev/null
+++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regversion.c
@@ -0,0 +1,56 @@
+/**********************************************************************
+ regversion.c - Oniguruma (regular expression library)
+**********************************************************************/
+/*-
+ * Copyright (c) 2002-2008 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+//#include "config.h"
+#include "oniguruma.h"
+//#include <stdio.h>
+
+extern const char*
+onig_version(void)
+{
+ static char s[12];
+
+ sprintf(s, "%d.%d.%d",
+ ONIGURUMA_VERSION_MAJOR,
+ ONIGURUMA_VERSION_MINOR,
+ ONIGURUMA_VERSION_TEENY);
+ return s;
+}
+
+extern const char*
+onig_copyright(void)
+{
+ static char s[58];
+
+ sprintf(s, "Oniguruma %d.%d.%d : Copyright (C) 2002-2008 K.Kosako",
+ ONIGURUMA_VERSION_MAJOR,
+ ONIGURUMA_VERSION_MINOR,
+ ONIGURUMA_VERSION_TEENY);
+ return s;
+}