MdeModulePkg RegularExpressionDxe: Update Oniguruma to 6.9.0

https://bugzilla.tianocore.org/show_bug.cgi?id=1200
Update Oniguruma to the latest version v6.9.0.
Oniguruma https://github.com/kkos/oniguruma
Verify VS2017, GCC5 build.
Verify RegularExpressionProtocol GetInfo() and Match() function.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dongao Guo <dongao.guo@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Cinnamon Shia <cinnamon.shia@hpe.com>
This commit is contained in:
Dongao Guo
2018-09-06 16:04:58 +08:00
committed by Liming Gao
parent a364928195
commit b602265d55
35 changed files with 59037 additions and 19135 deletions

View File

@@ -2,11 +2,9 @@
regposerr.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
* Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* Copyright (c) 2002-2018 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
* All rights reserved.
*
* (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -29,7 +27,14 @@
* SUCH DAMAGE.
*/
/*#include "config.h"*/
/* Can't include regint.h etc.. for conflict of regex_t.
Define ONIGURUMA_EXPORT here for onigposix.h.
*/
#ifndef ONIGURUMA_EXPORT
#define ONIGURUMA_EXPORT
#endif
//#include "config.h"
#include "onigposix.h"
#if 0
@@ -46,6 +51,14 @@
# define ARG_UNUSED
#endif
#if defined(_WIN32) && !defined(__GNUC__)
#define xsnprintf sprintf_s
#define xstrncpy(dest,src,size) strncpy_s(dest,size,src,_TRUNCATE)
#else
#define xsnprintf snprintf
#define xstrncpy strncpy
#endif
static char* ESTRING[] = {
NULL,
"failed to match", /* REG_NOMATCH */
@@ -65,8 +78,7 @@ static char* ESTRING[] = {
/* Extended errors */
"internal error", /* REG_EONIG_INTERNAL */
"invalid wide char value", /* REG_EONIG_BADWC */
"invalid argument", /* REG_EONIG_BADARG */
"multi-thread error" /* REG_EONIG_THREAD */
"invalid argument" /* REG_EONIG_BADARG */
};
//#include <stdio.h>