From: Adam Dickmeiss Date: Fri, 3 May 2002 17:59:17 +0000 (+0000) Subject: more data1 cleanup X-Git-Tag: ZEBRA.1.3.0~65 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=ec84578232c3de8ad75cc35638bed1bbe14fb7f7;p=idzebra-moved-to-github.git more data1 cleanup --- diff --git a/recctrl/regxread.c b/recctrl/regxread.c index 9f612e5..9e3c71e 100644 --- a/recctrl/regxread.c +++ b/recctrl/regxread.c @@ -2,7 +2,7 @@ * Copyright (C) 1994-2002, Index Data * All rights reserved. * - * $Id: regxread.c,v 1.40 2002-05-03 13:50:25 adam Exp $ + * $Id: regxread.c,v 1.41 2002-05-03 17:59:17 adam Exp $ */ #include #include @@ -1031,20 +1031,12 @@ static int cmd_tcl_begin (ClientData clientData, Tcl_Interp *interp, if (!strcmp(argv[1], "record") && argc == 3) { char *absynName = argv[2]; - data1_absyn *absyn; data1_node *res; #if REGX_DEBUG logf (LOG_LOG, "begin record %s", absynName); #endif - absyn = data1_get_absyn (spec->dh, absynName); - - res = data1_mk_node (spec->dh, spec->m); - res->which = DATA1N_root; - res->u.root.type = - data1_insert_string(spec->dh, res, spec->m, absynName); - res->u.root.absyn = absyn; - res->root = res; + res = data1_mk_root (spec->dh, spec->m, absynName); spec->d1_stack[spec->d1_level] = res; spec->d1_stack[++(spec->d1_level)] = NULL; @@ -1279,22 +1271,16 @@ static void execCode (struct lexSpec *spec, struct regxCode *code) if (spec->d1_level == 0) { static char absynName[64]; - data1_absyn *absyn; data1_node *res; if (cmd_len > 63) cmd_len = 63; memcpy (absynName, cmd_str, cmd_len); absynName[cmd_len] = '\0'; - #if REGX_DEBUG logf (LOG_LOG, "begin record %s", absynName); #endif - absyn = data1_get_absyn (spec->dh, absynName); - - res = data1_mk_node (spec->dh, spec->m, DATA1N_root, 0); - res->u.root.type = absynName; - res->u.root.absyn = absyn; + res = data1_mk_root (spec->dh, spec->m, absynName); spec->d1_stack[spec->d1_level] = res; spec->d1_stack[++(spec->d1_level)] = NULL;