1 ///////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2000-2014 Ericsson Telecom AB
3 // All rights reserved. This program and the accompanying materials
4 // are made available under the terms of the Eclipse Public License v1.0
5 // which accompanies this distribution, and is available at
6 // http://www.eclipse.org/legal/epl-v10.html
7 ///////////////////////////////////////////////////////////////////////////////
8 #ifndef _common_pattern_HH
9 #define _common_pattern_HH
12 /** If a C compiler other than GCC is used the macro below will substitute all
13 * GCC-specific non-standard attributes with an empty string. */
15 #define __attribute__(arg)
19 /** This is the interface for pattern. This function converts a TTCN-3
20 * charstring pattern to a POSIX Extended Regular Expression (ERE).
21 * If error occurs, returns a NULL-pointer. It uses the
22 * TTCN_pattern_error() and TTCN_pattern_warning() functions to
23 * report errors/warnings. */
24 extern char* TTCN_pattern_to_regexp(const char* p_pattern);
26 extern char* TTCN_pattern_to_regexp_uni(const char* p_pattern,
29 /* defined elsewhere (can be different in compiler/runtime) */
31 extern void TTCN_pattern_error(const char *fmt_str, ...)
32 __attribute__ ((__format__ (__printf__, 1, 2)));
33 extern void TTCN_pattern_warning(const char *fmt_str, ...)
34 __attribute__ ((__format__ (__printf__, 1, 2)));
36 #endif /* _common_pattern_HH */