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; }
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; }
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; }
extern void gml_xmp( const gmltag * entry ) { char * p; entry = entry; start_doc_sect(); scr_process_break(); scan_err = false; p = scan_start; if( *p == '.' ) { /* already at tag end */ } else { p++; while( *p == ' ' ) { p++; } if( !strnicmp( "depth=", p, 6 ) ) { p += 6; /***************************************************************/ /* Although unsupported, scan depth='xxx' */ /***************************************************************/ g_warn( wng_unsupp_att, "depth" ); wng_count++; file_mac_info(); while( *p && *p != '.' ) { // ignore all up to tag end p++; } } } if( ProcFlags.xmp_active ) { // nested :XMP tag not supported g_err_tag_nest( "eXMP" ); scan_start = scan_stop + 1; return; } /******************************************************************/ /* test for XMP within :ADDRESS, :FIG , :FN */ /******************************************************************/ if( ProcFlags.address_active ) { g_err_tag_x_in_y( "XMP", "ADDRESS" ); scan_start = scan_stop + 1; return; } else { if( ProcFlags.fig_active ) { g_err_tag_x_in_y( "XMP", "FIG" ); scan_start = scan_stop + 1; return; } else { if( ProcFlags.fn_active ) { g_err_tag_x_in_y( "XMP", "FN" ); scan_start = scan_stop + 1; return; } } } ProcFlags.xmp_active = true; first_xline = true; font_save = g_curr_font; g_curr_font = layout_work.xmp.font; if( nest_cb->c_tag == t_NONE ) { g_cur_left = g_page_left + conv_hor_unit( &layout_work.xmp.left_indent ); } else { g_cur_left += conv_hor_unit( &layout_work.xmp.left_indent ); } g_cur_h_start = g_cur_left; ProcFlags.keep_left_margin = true; // keep special indent init_nest_cb(); nest_cb->p_stack = copy_to_nest_stack(); nest_cb->c_tag = t_XMP; spacing = layout_work.xmp.spacing; set_skip_vars( NULL, &layout_work.xmp.pre_skip, NULL, spacing, g_curr_font ); ProcFlags.group_elements = true; justify_save = ProcFlags.justify; ProcFlags.justify = ju_off; // TBD if( *p == '.' ) p++; // possible tag end if( *p ) { process_text( p, g_curr_font ); // if text follows } scan_start = scan_stop + 1; return; }