test/test_odrstack.c
void test1(void)
{
    ODR odr = odr_createmem(ODR_ENCODE);
    YAZ_PQF_Parser parser = yaz_pqf_create();
    Z_RPNQuery *rpn_query;
    char qstr[10000];
    int i;
    int ret;

    YAZ_CHECK(odr);
    YAZ_CHECK(parser);

    *qstr = '\0';
    for (i = 0; i<100; i++)
        strcat(qstr, "@and 1 ");
    strcat(qstr, "1");

    rpn_query = yaz_pqf_parse (parser, odr, qstr);
    YAZ_CHECK(rpn_query);

    ret = z_RPNQuery(odr, &rpn_query, 0, 0);
    YAZ_CHECK(ret);

    yaz_pqf_destroy(parser);
    odr_destroy(odr);
}
/** \brief build a 100 level query */
\brief build a 100 level query
\ brief build a 100 level query
void test1(void)
{
    ODR odr = odr_createmem(ODR_ENCODE);
    YAZ_PQF_Parser parser = yaz_pqf_create();
    Z_RPNQuery *rpn_query;
    char qstr[10000];
    int i;
    int ret;
    YAZ_CHECK(odr);
    YAZ_CHECK(parser);
    *qstr = '\0';
    for (i = 0; i<100; i++)
        strcat(qstr, "@and 1 ");
    strcat(qstr, "1");
    rpn_query = yaz_pqf_parse (parser, odr, qstr);
    YAZ_CHECK(rpn_query);
    ret = z_RPNQuery(odr, &rpn_query, 0, 0);
    YAZ_CHECK(ret);
    yaz_pqf_destroy(parser);
    odr_destroy(odr);
}
void test1 ( void ) { ODR odr = odr_createmem ( ODR_ENCODE ) ; YAZ_PQF_Parser parser = yaz_pqf_create ( ) ; Z_RPNQuery * rpn_query ; char qstr [ 10000 ] ; int i ; int ret ; YAZ_CHECK ( odr ) ; YAZ_CHECK ( parser ) ; * qstr = ' \0 ' ; for ( i = 0 ; i < 100 ; i ++ ) strcat ( qstr , " " ) ; strcat ( qstr , " " ) ; rpn_query = yaz_pqf_parse ( parser , odr , qstr ) ; YAZ_CHECK ( rpn_query ) ; ret = z_RPNQuery ( odr , & rpn_query , 0 , 0 ) ; YAZ_CHECK ( ret ) ; yaz_pqf_destroy ( parser ) ; odr_destroy ( odr ) ; }
\brief build a 100 level query
\ brief build a 100 level query