void gml_index( gml_tag gtag ) { gtag = gtag; if( ProcFlags.doc_sect_nxt == doc_sect_egdoc ) { xx_line_err( err_eof_expected, tok_start ); return; } if( ProcFlags.doc_sect_nxt == doc_sect_index ) {// duplicate :INDEX tag scan_start = scan_stop; // ignore this call return; // wgml4 OS/2 crashes with page fault } if( !((ProcFlags.doc_sect == doc_sect_backm) || (ProcFlags.doc_sect_nxt == doc_sect_backm)) ) { xx_line_err( err_doc_sec_expected_1, tok_start ); return; } if( !GlobalFlags.index ) { // index option not active g_err( wng_index_opt ); // give hint to activate index scan_start = scan_stop; return; } gml_doc_xxx( doc_sect_index ); gen_index(); // output the formatted index }
extern void gml_index( const gmltag * entry ) { if( ProcFlags.doc_sect_nxt == doc_sect_egdoc ) { xx_line_err( err_eof_expected, tok_start ); return; } if( ProcFlags.doc_sect_nxt == doc_sect_index ) {// duplicate :INDEX tag scan_start = scan_stop + 1; // ignore this call return; // wgml4 OS/2 crashes with page fault } if( !((ProcFlags.doc_sect == doc_sect_backm) || (ProcFlags.doc_sect_nxt == doc_sect_backm)) ) { xx_line_err( err_doc_sec_expected_1, tok_start ); return; } if( !GlobalFlags.index ) { // index option not active return; } scr_process_break(); gml_doc_xxx( doc_sect_index ); /* When gen_index() is finalized, the resets may need to be moved */ g_indent = 0; g_indentr = 0; set_h_start(); /// I suspect start_doc_sect() will be needed here! gen_index(); // output the formatted index }
void gml_titlep( gml_tag gtag ) { gtag = gtag; if( ProcFlags.doc_sect_nxt == doc_sect_egdoc ) { xx_line_err( err_eof_expected, tok_start ); return; } if( !ProcFlags.frontm_seen ) { xx_line_err( err_doc_sec_expected_1, tok_start ); return; } gml_doc_xxx( doc_sect_titlep ); g_spacing_ln = layout_work.titlep.spacing; add_symvar( &global_dict, "$stitle", "", no_subscript, 0 );// set nullstring add_symvar( &global_dict, "$title", "", no_subscript, 0 );// set nullstring rs_loc = titlep_tag; if( input_cbs->fmflags & II_file ) { // save line number titlep_lineno = input_cbs->s.f->lineno; } else if( input_cbs->fmflags & II_tag_mac ) { titlep_lineno = input_cbs->s.m->lineno; } else { titlep_lineno = 0; // not clear what to do here } }
extern void gml_titlep( const gmltag * entry ) { if( ProcFlags.doc_sect_nxt == doc_sect_egdoc ) { xx_line_err( err_eof_expected, tok_start ); return; } if( !ProcFlags.frontm_seen ) { xx_line_err( err_doc_sec_expected_1, tok_start ); return; } scr_process_break(); gml_doc_xxx( doc_sect_titlep ); add_symvar( &global_dict, "$stitle", "", no_subscript, 0 );// set nullstring add_symvar( &global_dict, "$title", "", no_subscript, 0 );// set nullstring rs_loc = titlep_tag; if( input_cbs->fmflags & II_file ) { // save line number titlep_lineno = input_cbs->s.f->lineno; } else if( input_cbs->fmflags & II_tag_mac ) { titlep_lineno = input_cbs->s.m->lineno; } else { titlep_lineno = 0; // not clear what to do here } save_indent = g_indent; save_indentr = g_indentr; g_indent = 0; g_indentr = 0; set_h_start(); }
extern void gml_abstract( const gmltag * entry ) { if( ProcFlags.doc_sect_nxt == doc_sect_egdoc ) { xx_line_err( err_eof_expected, tok_start ); return; } if( !ProcFlags.frontm_seen ) { xx_line_err( err_doc_sec_expected_1, tok_start ); return; } if( blank_lines > 0 ) { set_skip_vars( NULL, NULL, NULL, 0, 0 ); // set g_blank_lines } scr_process_break(); gml_doc_xxx( doc_sect_abstract ); g_cur_left = g_page_left; g_cur_h_start = g_page_left; if( layout_work.hx.hx_sect[hds_abstract].header ) { start_doc_sect(); // a header is enough } g_indent = 0; g_indentr = 0; set_h_start(); }
extern void gml_frontm( const gmltag * entry ) { scr_process_break(); gml_doc_xxx( doc_sect_frontm ); if( !ProcFlags.fb_document_done ) { // the very first section/page do_layout_end_processing(); } ProcFlags.frontm_seen = true; }
void gml_frontm( gml_tag gtag ) { gtag = gtag; gml_doc_xxx( doc_sect_frontm ); g_spacing_ln = layout_work.defaults.spacing; if( !ProcFlags.fb_document_done ) { // the very first section/page do_layout_end_processing(); } ProcFlags.frontm_seen = true; }
void gml_egdoc( gml_tag gtag ) { gtag = gtag; if( g_blank_lines_ln > 0 ) { set_skip_vars( NULL, NULL, NULL, 0, 0 ); // set g_blank_lines } scr_process_break(); // outputs last element in file if( !ProcFlags.start_section ) { start_doc_sect(); // if not already done } gml_doc_xxx( doc_sect_egdoc ); }
void gml_backm( gml_tag gtag ) { gtag = gtag; if( g_blank_lines_ln > 0 ) { set_skip_vars( NULL, NULL, NULL, 0, 0 ); // set g_blank_lines } scr_process_break(); gml_doc_xxx( doc_sect_backm ); ProcFlags.frontm_seen = false; // no longer in FRONTM section if( !ProcFlags.fb_document_done ) { // the very first section/page do_layout_end_processing(); } }
void gml_gdoc( gml_tag gtag ) { char * p; gtag = gtag; scan_err = false; p = scan_start; if( *p ) p++; while( *p == ' ' ) { // over WS to attribute p++; } if( *p && ! (strnicmp( "sec ", p, 4 ) && // look for "sec " or "sec=" strnicmp( "sec=", p, 4 )) ) { char quote; char * valstart; p += 3; while( *p == ' ' ) { p++; } if( *p == '=' ) { p++; while( *p == ' ' ) { p++; } } if( *p == '"' || *p == '\'' ) { quote = *p; ++p; } else { quote = ' '; } valstart = p; while( *p && *p != quote ) { ++p; } *p = '\0'; add_symvar( &global_dict, "$sec", valstart, no_subscript, 0 ); } else { add_symvar( &global_dict, "$sec", "", no_subscript, 0 );// set nullstring } gml_doc_xxx( doc_sect_gdoc ); if( !ProcFlags.fb_document_done ) { // the very first section/page do_layout_end_processing(); } return; }
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 ); } }
extern void gml_appendix( const gmltag * entry ) { if( blank_lines > 0 ) { set_skip_vars( NULL, NULL, NULL, 0, 0 ); // set g_blank_lines } scr_process_break(); gml_doc_xxx( doc_sect_appendix ); ProcFlags.frontm_seen = false; // no longer in FRONTM section if( !ProcFlags.fb_document_done ) { // the very first section/page do_layout_end_processing(); } g_indent = 0; g_indentr = 0; set_h_start(); }
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 ); } }
void gml_preface( gml_tag gtag ) { gtag = gtag; if( ProcFlags.doc_sect_nxt == doc_sect_egdoc ) { xx_line_err( err_eof_expected, tok_start ); return; } if( !ProcFlags.frontm_seen ) { xx_line_err( err_doc_sec_expected_1, tok_start ); return; } if( g_blank_lines_ln > 0 ) { set_skip_vars( NULL, NULL, NULL, 0, 0 ); // set g_blank_lines } scr_process_break(); gml_doc_xxx( doc_sect_preface ); g_spacing_ln = layout_work.preface.spacing; }
void gml_body( gml_tag gtag ) { gtag = gtag; if( g_blank_lines_ln > 0 ) { set_skip_vars( NULL, NULL, NULL, 0, 0 ); // set g_blank_lines } scr_process_break(); gml_doc_xxx( doc_sect_body ); ProcFlags.just_override = true; // justify for first line ?? TBD g_cur_left = g_page_left; g_cur_h_start = g_page_left + conv_hor_unit( &layout_work.p.line_indent ); ProcFlags.frontm_seen = false; // no longer in FRONTM section if( !ProcFlags.fb_document_done ) { // the very first section/page do_layout_end_processing(); } }
extern void gml_backm( const gmltag * entry ) { if( !ProcFlags.fb_document_done ) { // the very first section/page do_layout_end_processing(); } if( blank_lines > 0 ) { set_skip_vars( NULL, NULL, NULL, 0, 0 ); // set g_blank_lines } scr_process_break(); gml_doc_xxx( doc_sect_backm ); ProcFlags.frontm_seen = false; // no longer in FRONTM section g_cur_left = g_page_left; g_cur_h_start = g_page_left; if( layout_work.hx.hx_sect[hds_backm].header ) { start_doc_sect(); // a header is enough } g_indent = 0; g_indentr = 0; }
extern void gml_body( const gmltag * entry ) { if( blank_lines > 0 ) { set_skip_vars( NULL, NULL, NULL, 0, 0 ); // set g_blank_lines } scr_process_break(); gml_doc_xxx( doc_sect_body ); ProcFlags.just_override = true; // justify for first line ?? TBD g_cur_left = g_page_left; g_cur_h_start = g_page_left + conv_hor_unit( &layout_work.p.line_indent, g_curr_font ); ProcFlags.frontm_seen = false; // no longer in FRONTM section if( !ProcFlags.fb_document_done ) { // the very first section/page do_layout_end_processing(); } if( layout_work.hx.hx_sect[hds_body].header ) { start_doc_sect(); // a header is enough } g_indent = 0; g_indentr = 0; set_h_start(); }
void gml_toc( gml_tag gtag ) { gtag = gtag; gml_doc_xxx( doc_sect_toc ); g_spacing_ln = layout_work.toc.spacing; }
extern void gml_egdoc( const gmltag * entry ) { fwd_ref * curr; if( blank_lines > 0 ) { set_skip_vars( NULL, NULL, NULL, 0, 0 ); // set g_blank_lines } scr_process_break(); // outputs last element in file if( GlobalFlags.lastpass ) { // output on last pass only if( passes == 1 ) { // first and only pass if( figlist_toc & gs_toc ) { // only if TOC was found gen_toc(); } if( figlist_toc & gs_figlist ) { // only if FIGLIST was found gen_figlist(); } curr = fig_fwd_refs; while( curr != NULL ) { // output figure forward/undefined references if( find_refid( fig_ref_dict, curr->id ) != NULL ) { fwd_id_warn( curr->id, "figure" ); } else { undef_id_warn( curr->id, "Figure" ); } curr = curr->next; } curr = hd_fwd_refs; while( curr != NULL ) { // output header forward/undefined references if( find_refid( hd_ref_dict, curr->id ) != NULL ) { fwd_id_warn( curr->id, "heading" ); } else { undef_id_warn( curr->id, "Heading" ); } curr = curr->next; } curr = fn_fwd_refs; while( curr != NULL ) { // output footnote forward/undefined references if( find_refid( fn_ref_dict, curr->id ) != NULL ) { fwd_id_warn( curr->id, "footnote" ); } else { undef_id_warn( curr->id, "Footnote" ); } curr = curr->next; } if( figlist_toc ) { xx_simple_warn( wng_pass_1 ); // more than one pass needed } } else { // last pass of at least 2 curr = fig_fwd_refs; while( curr != NULL ) { // output figure undefined/page change references fwd_id_warn( curr->id, "figure" ); curr = curr->next; } curr = hd_fwd_refs; while( curr != NULL ) { // output header undefined/page changereferences fwd_id_warn( curr->id, "heading" ); curr = curr->next; } if( ProcFlags.new_pagenr ) { xx_simple_warn( wng_pass_many );// at least one more pass needed } } if( !GlobalFlags.index ) { // index option not active xx_simple_warn( wng_index_opt );// give hint to activate index } } gml_doc_xxx( doc_sect_egdoc ); }
void gml_figlist( gml_tag gtag ) { gtag = gtag; gml_doc_xxx( doc_sect_figlist ); g_spacing_ln = layout_work.figlist.spacing; }