michael@0: /* michael@0: ******************************************************************************* michael@0: * Copyright (C) 2003-2006, International Business Machines michael@0: * Corporation and others. All Rights Reserved. michael@0: ******************************************************************************* michael@0: * file name: regexc.cpp michael@0: * description: The purpose of this function is to separate the codepage michael@0: * conversion from the rest of the uregex_ API. This can removes any michael@0: * dependency on codepage conversion, which reduces the overhead of michael@0: */ michael@0: michael@0: #include "unicode/uregex.h" michael@0: #include "unicode/unistr.h" michael@0: michael@0: U_NAMESPACE_USE michael@0: michael@0: //---------------------------------------------------------------------------------------- michael@0: // michael@0: // uregex_openC michael@0: // michael@0: //---------------------------------------------------------------------------------------- michael@0: #if !UCONFIG_NO_CONVERSION && !UCONFIG_NO_REGULAR_EXPRESSIONS michael@0: michael@0: U_CAPI URegularExpression * U_EXPORT2 michael@0: uregex_openC( const char *pattern, michael@0: uint32_t flags, michael@0: UParseError *pe, michael@0: UErrorCode *status) { michael@0: if (U_FAILURE(*status)) { michael@0: return NULL; michael@0: } michael@0: if (pattern == NULL) { michael@0: *status = U_ILLEGAL_ARGUMENT_ERROR; michael@0: return NULL; michael@0: } michael@0: michael@0: UnicodeString patString(pattern); michael@0: return uregex_open(patString.getBuffer(), patString.length(), flags, pe, status); michael@0: } michael@0: #endif