📄 caparse.c
字号:
else\ {\ g_set_pointer = (cp_c & BIT7) \ ? (xl_st.gr_ptr)\ : (xl_st.gl_ptr);\ }\ if (g_set_pointer->gset_valid == FALSE)\ {\ compute_font_for_g_set ( g_set_pointer - (&xl_st.g_table[0]));\ }VOID test_ssf(){M$TEST_SSF()}/********************************************************************pr_text This will move the character code to the curchar GLYPH in XLATOR_STATE and call the composer function to print the input character. NOTE: it is assumed the character is printable, and is not of special significance, e.g., a form feed, del,sub....*********************************************************************/VOID pr_text() {#ifdef DUMP { oprintf("%c", cp_c); /* print the input character */ }#endif M$TEST_SSF(); /* Test for single shift flag */ /* * Fill in the character code of the current character */ xl_st.curchar.char_data = g_set_pointer->gset_map[cp_c7] ; /* * Fill in the rest of the fields of the current character */ xl_st.curchar.font_data = g_set_pointer->gset_fontdata ; /* Check the active position of the outgoing character */ M$CHECK_AP ( -(xl_st.curchar.font_data.above_baseline_offset+1), xl_st.curchar.font_data.below_baseline_offset ); /* If justifying, add current char to justify buffer */ if (xl_st.justify_mode) { add_to_jfy_buf (&xl_st.curchar); } /* If not justifying, AND the right margin flag is set, * do not output the character; otherwise, dispose of it. */ else { if (xl_st.rmf) { return; } process_char (&xl_st.curchar); } /* * Adjust the translator's active horizontal position to reflect * the width of the char just printed */ xl_st.curchar.ap.xval += xl_st.curchar.char_data.char_width; }/********************************************************************pr_fast_text*********************************************************************/VOID pr_fast_text() { /* * Fill in the character code of the current character */ xl_st.curchar.char_data = g_set_pointer->gset_map[cp_c7] ; M$RIGHT_MARGIN_CHECK() ; /* If justifying, add current char to justify buffer */ if (xl_st.justify_mode) { add_to_jfy_buf (&xl_st.curchar); } /* If not justifying, AND the right margin flag is set, * do not output the character; otherwise, dispose of it. */ else { if (xl_st.rmf) { return; } process_char (&xl_st.curchar); } /* * Adjust the translator's active horizontal position to reflect * the width of the char just printed */ xl_st.curchar.ap.xval += xl_st.curchar.char_data.char_width; }/*********************************************************************** Cancel function *********************************************************************/VOID pr_can() {#ifdef DUMP { cp_exit_cur_mode(); oprintf("CAN \n"); }#endif cp_exit_cur_mode(); }/*********************************************************************** Substitute Dump Utility function *********************************************************************/VOID pr_sub() { WORD temp1, temp2;#ifdef DUMP { cp_exit_cur_mode(); oprintf("SUB \n"); }#endif cp_exit_cur_mode(); cp_c = VIR_CHAR_BLOB; cp_c7 = cp_c & CP_7BIT_MASK; M$TEST_SSF(); /* Test for single shift flag */ /* * Fill in the character code of the current character */ xl_st.curchar.char_data = g_set_pointer->gset_map[cp_c7] ; /* * Fill in the rest of the fields of the current character */ xl_st.curchar.font_data = g_set_pointer->gset_fontdata ; /* Check the active position of the outgoing character */ /* Check the active position of the outgoing character */ M$CHECK_AP ( -(xl_st.curchar.font_data.above_baseline_offset+1), xl_st.curchar.font_data.below_baseline_offset ); /* If justifying, add current char to justify buffer */ if (xl_st.justify_mode) { add_to_jfy_buf (&xl_st.curchar); } /* If not justifying, AND the right margin flag is set, * do not output the character; otherwise, dispose of it. */ else { if (xl_st.rmf) { return; } process_vchar (&xl_st.curchar); } /* * Adjust the translator's active horizontal position to reflect * the width of the char just printed */ xl_st.curchar.ap.xval += xl_st.curchar.char_data.char_width; }/*********************************************************************** SXL Substitute *********************************************************************/VOID pr_sxl_sub() {#ifdef DUMP { oprintf("SXL SUB \n"); }#endif cp_c = FIRST_SIXEL_CODE; /* Select the blank sixel char */ cp_c7 = cp_c & CP_7BIT_MASK; if (cp_ctptr->encoding == EXPANDED_TABLE) { (*cp_tok_tbl[((WORD*)cp_ctptr->ch_array[0])[cp_c]])(); } else { cp_token = cp_search_2tab(cp_ctptr->ch_array[2]); /* srch 2nd level gl */ (*cp_tok_tbl[cp_token])(); /* call action requested */ } }/*********************************************************************** Print a Space*********************************************************************/VOID pr_space () { WORD temp1, temp2;#ifdef DUMP { oprintf("SP \n"); }#endif M$TEST_SSF(); /* Test for single shift flag */ /* If c is a space code x020, then it should be printed as a space. * * But the translation tables could have made temp1 be: * * x020 if the GL set is stored in the left half of the * PS font * * x0a0 if the GL set is stored in the right half of the * PS font * * x01d if the GL set does not exist in the proper style * * The first and last case are no problems, the second case is an issue * as the bitmap for the space is stored at x020 in the PS font. * We must therefore undo the conversion. * * If c is an x0a0, then it should be printed: * * as is x0a0, if a 96 character set is stored in GR * * as a blob x01d if a 94/95 character set is stored in GR. * * The conversion table could have made temp1 be an x020, * if the GR set is stored in the left half of the PS font. * In this case we must force temp1 to be a blob * * This is in compliance with the VSRM (referenced by the PSRM) section * 3.6.3, for the case when a character set of 94 characters is mapped * through GR. * * Modified 07/16/87 by ARAJ, to comply with memo from Tim LASKO * superseding the SRM. Now mapping a 96 char set in GL is valid */ /* * Fill in the character code of the current character */ xl_st.curchar.char_data = g_set_pointer->gset_map[cp_c7] ; /* * Fill in the rest of the fields of the current character */ xl_st.curchar.font_data = g_set_pointer->gset_fontdata ; /* Check the active position of the outgoing character */ M$CHECK_AP ( -(xl_st.curchar.font_data.above_baseline_offset+1), xl_st.curchar.font_data.below_baseline_offset ); /* If justifying, add current char to justify buffer */ if (xl_st.justify_mode) { add_to_jfy_buf (&xl_st.curchar); } /* If not justifying, AND the right margin flag is set, * do not output the character; otherwise, dispose of it. */ else { if (xl_st.rmf) { return; } process_char (&xl_st.curchar); } /* * Adjust the translator's active horizontal position to reflect * the width of the char just printed */ xl_st.curchar.ap.xval += xl_st.curchar.char_data.char_width; }/********************************************************************pr_fast_space*********************************************************************/VOID pr_fast_space() { /* * Fill in the character code of the current character */ xl_st.curchar.char_data = g_set_pointer->gset_map[cp_c7] ; M$RIGHT_MARGIN_CHECK() ; /* If justifying, add current char to justify buffer */ if (xl_st.justify_mode) { add_to_jfy_buf (&xl_st.curchar); } /* If not justifying, AND the right margin flag is set, * do not output the character; otherwise, dispose of it. */ else { if (xl_st.rmf) { return; } process_char (&xl_st.curchar); } /* * Adjust the translator's active horizontal position to reflect * the width of the char just printed */ xl_st.curchar.ap.xval += xl_st.curchar.char_data.char_width; }/*********************************************************************** Print Delete*********************************************************************/VOID pr_del() { WORD temp1, temp2;#ifdef DUMP { oprintf("DELETE \n"); }#endif M$TEST_SSF(); /* Test for single shift flag */ /* If the first 7 bits of the incoming character are 0x7f (i.e., the DEL * code), return (i.e., do nothing) unless it is mapped through the * graphics right table and that table implements a character set of 96 * characters. This is in compliance with the VSRM (referenced by the * PSRM) section 3.6.4, for the case when a character set of 94 characters * is mapped through GR. * * Modified 07/16/87 by ARAJ, to comply with memo from Tim LASKO, * superseding the SRM, 7f is valid if a 96 char set is mapped in GL */ if ( (cp_c7 == DEL) && (!g_set_pointer->repertory) ) /* -> 94 character set */ { return; /* i.e., NOP */ } /* * Fill in the character code of the current character */ xl_st.curchar.char_data = g_set_pointer->gset_map[cp_c7] ; /* * Fill in the rest of the fields of the current character */ xl_st.curchar.font_data = g_set_pointer->gset_fontdata ; /* Check the active position of the outgoing character */ M$CHECK_AP ( -(xl_st.curchar.font_data.above_baseline_offset+1), xl_st.curchar.font_data.below_baseline_offset ); /* If justifying, add current char to justify buffer */ if (xl_st.justify_mode) { add_to_jfy_buf (&xl_st.curchar); } /* If not justifying, AND the right margin flag is set, * do not output the character; otherwise, dispose of it. */ else { if (xl_st.rmf) { return; } process_char (&xl_st.curchar); }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -