|
Packit |
1f69a5 |
/* GPattern copy that supports raw (non-utf8) matching
|
|
Packit |
1f69a5 |
* based on: GLIB - Library of useful routines for C programming
|
|
Packit |
1f69a5 |
* Copyright (C) 1995-1997, 1999 Peter Mattis, Red Hat, Inc.
|
|
Packit |
1f69a5 |
*
|
|
Packit |
1f69a5 |
* This library is free software; you can redistribute it and/or
|
|
Packit |
1f69a5 |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit |
1f69a5 |
* License as published by the Free Software Foundation; either
|
|
Packit |
1f69a5 |
* version 2 of the License, or (at your option) any later version.
|
|
Packit |
1f69a5 |
*
|
|
Packit |
1f69a5 |
* This library is distributed in the hope that it will be useful,
|
|
Packit |
1f69a5 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit |
1f69a5 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit |
1f69a5 |
* Lesser General Public License for more details.
|
|
Packit |
1f69a5 |
*
|
|
Packit |
1f69a5 |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit |
1f69a5 |
* License along with this library; if not, write to the
|
|
Packit |
1f69a5 |
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
Packit |
1f69a5 |
* Boston, MA 02110-1301, USA.
|
|
Packit |
1f69a5 |
*/
|
|
Packit |
1f69a5 |
|
|
Packit |
1f69a5 |
#ifndef __PATTERN_SPEC_H__
|
|
Packit |
1f69a5 |
#define __PATTERN_SPEC_H__
|
|
Packit |
1f69a5 |
|
|
Packit |
1f69a5 |
#include <glib.h>
|
|
Packit |
1f69a5 |
|
|
Packit |
1f69a5 |
G_BEGIN_DECLS
|
|
Packit |
1f69a5 |
|
|
Packit |
1f69a5 |
typedef enum
|
|
Packit |
1f69a5 |
{
|
|
Packit |
1f69a5 |
MATCH_MODE_AUTO = 0,
|
|
Packit |
1f69a5 |
MATCH_MODE_UTF8,
|
|
Packit |
1f69a5 |
MATCH_MODE_RAW
|
|
Packit |
1f69a5 |
} MatchMode;
|
|
Packit |
1f69a5 |
|
|
Packit |
1f69a5 |
typedef struct _PatternSpec PatternSpec;
|
|
Packit |
1f69a5 |
|
|
Packit |
1f69a5 |
PatternSpec * pattern_spec_new (const gchar * pattern,
|
|
Packit |
1f69a5 |
MatchMode match_mode);
|
|
Packit |
1f69a5 |
|
|
Packit |
1f69a5 |
void pattern_spec_free (PatternSpec * pspec);
|
|
Packit |
1f69a5 |
|
|
Packit |
1f69a5 |
gboolean pattern_match_string (PatternSpec * pspec,
|
|
Packit |
1f69a5 |
const gchar * string);
|
|
Packit |
1f69a5 |
|
|
Packit |
1f69a5 |
G_END_DECLS
|
|
Packit |
1f69a5 |
|
|
Packit |
1f69a5 |
#endif /* __PATTERN_SPEC_H__ */
|