Re: [Snowball-discuss] {'p','r','o','b','l','e','m'}

From: Richard Boulton (richard@tartarus.org)
Date: Fri Mar 01 2002 - 17:27:44 GMT


On Fri, 2002-03-01 at 16:32, Martin Porter wrote:
> I've hit a slight snag in converting strings "abc" to structures
> {'a','b','c'}, in the ANSI C generated from Snowball, which is exemplified
> by this little program:

Can't you do:

static const symbol string_N[] = {'a','b','c','d', 0};

static struct among B[] =

{ { 4, string_N, 12, 12, 0},
...
}

I think you're right that you need to declare the arrays, but I don't
think you need to have actual initialiser code.

PS: I think you need to change struct among so that "s" is declared as a
"const char *", rather than just a "char *". I get warnings, otherwise.

-- 
Richard

_______________________________________________ Snowball-discuss mailing list Snowball-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/snowball-discuss



This archive was generated by hypermail 2.1.3 : Thu Sep 20 2007 - 12:02:41 BST