Re: GPatternSpec
- From: Scott Wimer <scottw dev cgibuilder com>
- To: Gtk+ Developers <gtk-devel-list redhat com>
- Subject: Re: GPatternSpec
- Date: Mon, 26 Apr 1999 12:15:31 -0700 (PDT)
Tim,
I'm thinking that this could be supplanted by the Gregex code that
I finished recently. I've still got to autoconf it, but it seems
to work so far. Here's the URL:
http://dev.cgibuilder.com/scottw/code/g_regex/
Regards,
scottwimer
On Mon, 26 Apr 1999, Tim Janik wrote:
> hi all,
>
> i've renamed the GtkPatternSpec API/implementation for GLib now,
> and wondered whetehr there are any objections to incorporare this
> into the 1.2 tree. the code is obviously fairly well tested already,
> it works nice for gtk's key bindings and rc-file lookups.
> to stay backwards compatible, we only need to alias the
> GtkMatchType enum values ala GTK_MATCH_ALL = G_MATCH_ALL and
> keep GtkPatternSpec in sync with GPatternSpec (GtkPatternSpec
> contains the additional fields user_data and seq_id).
> since the code will go into 1.3 anyways, and i don't expect it
> to change even after that, i don't see a good reason for not
> putting it into 1.2.3.
>
> i've appended the renamed API below.
>
>
> ---
> ciaoTJ
>
> /* --- GLib pattern matching --- */
>
> /* GPatternSpec match types */
> typedef enum
> {
> G_MATCH_ALL, /* "*A?A*" */
> G_MATCH_ALL_TAIL, /* "*A?AA" */
> G_MATCH_HEAD, /* "AAAA*" */
> G_MATCH_TAIL, /* "*AAAA" */
> G_MATCH_EXACT, /* "AAAAA" */
> G_MATCH_LAST
> } GMatchType;
>
> /* Pattern matching
> */
> typedef struct _GPatternSpec GPatternSpec;
>
> struct _GPatternSpec
> {
> GMatchType match_type;
> guint pattern_length;
> gchar *pattern;
> gchar *pattern_reversed;
> };
>
> void g_pattern_spec_init (GPatternSpec *pspec,
> const gchar *pattern);
> void g_pattern_spec_free_segs (GPatternSpec *pspec);
> gboolean g_pattern_match (GPatternSpec *pspec,
> guint string_length,
> const gchar *string,
> const gchar *string_reversed);
> gboolean g_pattern_match_string (GPatternSpec *pspec,
> const gchar *string);
> gboolean g_pattern_match_simple (const gchar *pattern,
> const gchar *string);
>
>
> --
> To unsubscribe: mail gtk-devel-list-request@redhat.com with
> "unsubscribe" as the Subject.
>
>
--
Scott Wimer
play ---> scottw@cgibuilder.com http://www.cgibuilder.com/
work ---> scottw@corp.earthlink.net http://www.earthlink.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]