コード例 #1
0
static  void    gml_ehp_esf_common( gml_tag egtag )
{
    char    *   p;
    tag_cb  *   wk;

    if( !g_err_gml_etag( egtag ) ) {
        wk = nest_cb;
        nest_cb = nest_cb->prev;
        add_tag_cb_to_pool( wk );
        g_curr_font = nest_cb->font;

        // recompute space at SOL if inline end tag - TBD
        if( (post_space !=0) && (input_cbs->fmflags & II_sol) ) {
            post_space = wgml_fonts[g_curr_font].spc_width;
        }

        scan_err = false;
        p = scan_start;
        if( *p == '.' ) p++;            // over '.'
        if( *p ) {
            process_text( p, g_curr_font );
        }
        if( !ProcFlags.concat && (input_cbs->fmflags & II_eol) ) {
            scr_process_break();        // ensure line is output
        }
    }
    scan_start = scan_stop;
}
コード例 #2
0
ファイル: ghpxsf.c プロジェクト: ABratovic/open-watcom-v2
static  void    gml_ehp_esf_common( const gmltag * entry, e_tags t )
{
    char    *   p;
    tag_cb  *   wk;

    entry = entry;
    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
        } else {
            g_err_tag_nest( str_tags[nest_cb->c_tag + 1] ); // exxx expected
        }
    } else {
        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 );
        }
        if( !ProcFlags.concat && (input_cbs->fmflags & II_eol) ) {
            scr_process_break();        // ensure line is output
        }
    }
    scan_start = scan_stop + 1;
}
コード例 #3
0
static void end_lp( void )
{
    tag_cb  *   wk;

    if( nest_cb->c_tag == t_LP ) {      // terminate current :LP
        wk = nest_cb;
        nest_cb = nest_cb->prev;
        add_tag_cb_to_pool( wk );
    }
}
コード例 #4
0
ファイル: gdocsect.c プロジェクト: MikeyG/open-watcom-v2
void    gml_etitlep( gml_tag gtag )
{
    tag_cb  *   wk;

    gtag = gtag;
    gml_doc_xxx( doc_sect_etitlep );
    rs_loc = 0;
    titlep_lineno = 0;

    if( nest_cb != NULL ) { // guard against no FRONTM, empty TITLEP section
        wk = nest_cb;
        nest_cb = nest_cb->prev;
        add_tag_cb_to_pool( wk );
    }
}
コード例 #5
0
ファイル: gxmp.c プロジェクト: ABratovic/open-watcom-v2
void    gml_exmp( const gmltag * entry )
{
    tag_cb  *   wk;

    entry = entry;
    scr_process_break();
    if( !ProcFlags.xmp_active ) {       // no preceding :XMP tag
        g_err_tag_prec( "XMP" );
        scan_start = scan_stop + 1;
        return;
    }
    g_curr_font = font_save;
    ProcFlags.xmp_active = false;
    ProcFlags.justify = justify_save;
    wk = nest_cb;
    nest_cb = nest_cb->prev;
    add_tag_cb_to_pool( wk );

    /*  place the accumulated xlines on the proper page */

    ProcFlags.group_elements = false;
    if( t_doc_el_group.first != NULL ) {
        t_doc_el_group.depth += (t_doc_el_group.first->blank_lines +
                                t_doc_el_group.first->subs_skip);
    }

    if( (t_doc_el_group.depth + t_page.cur_depth) > t_page.max_depth ) {
        /*  the block won't fit on this page */

        if( t_doc_el_group.depth  <= t_page.max_depth ) {
            /*  the block will be on the next page */

            do_page_out();
            reset_t_page();
        }
    }

    while( t_doc_el_group.first != NULL ) {
        insert_col_main( t_doc_el_group.first );
        t_doc_el_group.first = t_doc_el_group.first->next;
    }

    t_doc_el_group.depth    = 0;
    t_doc_el_group.last     = NULL;
    scan_start = scan_stop + 1;
    return;
}
コード例 #6
0
extern void gml_etitlep( const gmltag * entry )
{
    tag_cb  *   wk;

    scr_process_break();
    gml_doc_xxx( doc_sect_etitlep );
    rs_loc = 0;
    titlep_lineno = 0;

    if( nest_cb != NULL ) { // guard against no FRONTM, empty TITLEP section
        g_indent = save_indent;
        g_indentr = save_indentr;
        set_h_start();
        wk = nest_cb;
        nest_cb = nest_cb->prev;
        add_tag_cb_to_pool( wk );
    }
}
コード例 #7
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;
}
コード例 #8
0
ファイル: gxl.c プロジェクト: Ukusbobra/open-watcom-v2
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;
}