Ejemplo n.º 1
0
void    gml_li( const gmltag * entry )
{
    if( nest_cb->c_tag == t_LP ) {      // terminate :LP if active
        end_lp();
    }

    switch( nest_cb->c_tag ) {
    case t_OL :
        gml_li_ol( entry );
        break;
    case t_SL :
        gml_li_sl( entry );
        break;
    case t_UL :
        gml_li_ul( entry );
        break;
#if 0
    case t_DL :
        gml_li_dl( entry );             // error message here?
        break;
    case t_GL :
        gml_li_gl( entry );             // error message here?
        break;
#endif
    default:
        break;
    }
    return;
}
Ejemplo n.º 2
0
static void gml_xl_lp_common( e_tags t )
{
    char        *   p;

    end_lp();                           // terminate :LP if active

    init_nest_cb();
    nest_cb->p_stack = copy_to_nest_stack();

    nest_cb->c_tag = t;

    scan_err = false;
    p = scan_start;
    if( *p == '.' ) p++;                    // possible tag end
    if( t != t_LP ) {                       // text only allowed for :LP
        if( t != t_DL && t != t_GL ) {      // DL/GL don't require LI/LP
            ProcFlags.need_li_lp = true;    // :LI or :LP  next
        }
        start_doc_sect();                   // if not already done
        if( g_line_indent == 0 ) {
            ProcFlags.para_starting = false;    // clear for this tag's first break
        }
        scr_process_break();
        if( *p ) {
            process_text( p, g_curr_font );
        }
    }

    return;
}
Ejemplo n.º 3
0
void    gml_exl_common( const gmltag * entry, e_tags t )
{
    char    *   p;
    tag_cb  *   wk;

    if( nest_cb->c_tag == t_LP ) {      // terminate :LP if active
        end_lp();
    }

    if( nest_cb->c_tag != t ) {         // unexpected exxx tag
        if( nest_cb->c_tag == t_NONE ) {
            g_err_tag_no( str_tags[t + 1] );// no exxx expected, no tag active
        } else {
            g_err_tag_nest( str_tags[nest_cb->c_tag + 1] ); // exxx expected
        }
    } else {
        g_cur_left = nest_cb->lm;
        g_page_right = nest_cb->rm;

        wk = nest_cb;
        nest_cb = nest_cb->prev;
        add_tag_cb_to_pool( wk );
        g_curr_font = nest_cb->font;

        g_cur_h_start = g_cur_left;
        scan_err = false;
        p = scan_start;
        if( *p == '.' ) p++;            // over '.'
        if( *p ) {
            gml_pc( NULL );
        } else {
            ProcFlags.skips_valid = false;  // force use of post_skip with following text element
        }
    }

    ProcFlags.need_li_lp = false;       // :LI or :LP no longer needed
    scan_start = scan_stop + 1;
}
Ejemplo n.º 4
0
void    gml_exl_common( const gmltag * entry, e_tags t )
{
    char    *   p;
    tag_cb  *   wk;

    entry = entry;
    if( nest_cb->c_tag == t_LP ) {      // terminate :LP if active
        end_lp();
    }

    if( nest_cb->c_tag != t ) {         // unexpected exxx tag
        if( nest_cb->c_tag == t_NONE ) {
            g_err_tag_no( str_tags[t + 1] );// no exxx expected, no tag active
        } else {
            g_err_tag_nest( str_tags[nest_cb->c_tag + 1] ); // exxx expected
        }
    } else {
        g_cur_left = nest_cb->lm;
        g_cur_h_start = nest_cb->lm;
        g_page_right = nest_cb->rm;

        wk = nest_cb;
        nest_cb = nest_cb->prev;
        add_tag_cb_to_pool( wk );
        g_curr_font = nest_cb->font;
        scan_err = false;
        p = scan_start;
        if( *p == '.' ) p++;            // over '.'
        if( *p ) {
            process_text( p, g_curr_font );
        }
    }

    ProcFlags.need_li_lp = false;        // :LI or :LP no longer needed
    scan_start = scan_stop + 1;
}