X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=init.c;h=2889e5ea068b2cbf210b75404019020696c41ede;hp=c86f23efcc8cfb014796864c7080ab9f3ede2f0d;hb=ec80e2f8441235f2482ac2d72cf07c77e84f603a;hpb=964d019c57a55168e7219ab15b6a2596ff24683a diff --git a/init.c b/init.c index c86f23e..2889e5e 100644 --- a/init.c +++ b/init.c @@ -2521,26 +2521,33 @@ void mutt_init (int skip_sys_rc, string_list_t * commands) #if 0 { - void *parser = ParseAlloc(malloc); + void *parser = rcparseAlloc(malloc); + struct rcstate state; segment s1 = {" ", 1}; segment s2 = {"toto", 4 }; segment s3 = {"titi", 4 }; segment s4 = {"\"", 1 }; + segment s5 = {"index_format", 12 }; mutt_endwin(NULL); - ParseTrace(stderr, "> "); - Parse(parser, RCTK_ALT_ORDER, s1); - Parse(parser, RCTK_SPACE, s1); - Parse(parser, RCTK_ATOM, s2); - Parse(parser, RCTK_SPACE, s1); - Parse(parser, RCTK_DQUOTE, s4); - Parse(parser, RCTK_ATOM, s3); - Parse(parser, RCTK_SPACE, s1); - Parse(parser, RCTK_ATOM, s3); - Parse(parser, RCTK_DQUOTE, s4); - Parse(parser, RCTK_NL, s1); - Parse(parser, 0, s1); + p_clear(&state, 1); + + rcparseTrace(stderr, "> "); + rcparse(parser, RCTK_ALTERNATIVE_ORDER, s1, &state); + rcparse(parser, RCTK_SPACE, s1, &state); + rcparse(parser, RCTK_ATOM, s2, &state); + rcparse(parser, RCTK_SPACE, s1, &state); + rcparse(parser, RCTK_DQUOTE, s4, &state); + rcparse(parser, RCTK_ATOM, s3, &state); + rcparse(parser, RCTK_SPACE, s1, &state); + rcparse(parser, RCTK_ATOM, s3, &state); + rcparse(parser, RCTK_DQUOTE, s4, &state); + rcparse(parser, RCTK_SPACE, s1, &state); + rcparse(parser, RCTK_DOLLAR, s1, &state); + rcparse(parser, RCTK_ATOM, s5, &state); + rcparse(parser, RCTK_NL, s1, &state); + rcparse(parser, 0, s1, &state); exit(0); }