📄 catmgt.c
字号:
} ca_init_pfs(&(restore_st->svst_pfs)); /* Call the internal parser routines to recompute * the current font and other variables, so hai is valid */ compute_proportional_mode(); compute_spacing(&dummy, &dummy); invalidate_font(); /* NOTE: probably redundant */ /* The tabs are generated algorithmically if the count is set * to "-1", by calling htabs_init and vtabs_init. This allows the * constant table to not have to worry about the default margins * and other similar issues. */ xl_st.htabct = restore_st->svst_htabct; if (xl_st.htabct == -1) { htabs_init(); } else { for (i = 0; i < restore_st->svst_htabct; i++) { xl_st.htabs[i] = restore_st->svst_htabs[i]; } } xl_st.vtabct = restore_st->svst_vtabct; if (xl_st.vtabct == -1) { vtabs_init(); } else { for (i = 0; i < restore_st->svst_vtabct; i++) { xl_st.vtabs[i] = restore_st->svst_vtabs[i]; } } xl_st.paper_tray = restore_st->svst_paper_tray; xl_st.num_copies = restore_st->svst_num_copies; /* * Get to top left corner */ hpos_abs(xl_st.h_fmt_bound.min); vpos_abs(xl_st.v_fmt_bound.min); /* Set the memory in the machine to the factory default. * The second parameter is ignored for factory default, using 0. * Call the process routines to update the PDLI. */ PROCESS_RESERVE_MEM(MEM_FACTORY_DEF, 0); process_set_origin(xl_st.origin); process_tray_select(xl_st.paper_tray); process_orientation(xl_st.orientation); process_set_copy(xl_st.num_copies); }/***** pr_ris() ******************************************************* * * * pr_ris() - Reset to initial state. Resets all state variables * * to the intial values. * ************************************************************************/VOID pr_ris() {#ifdef DUMP oprintf("RIS \n"); #endif ca_restore_default(); /* Return to NVM */ }/***** decstr() ******************************************************* * * * decstr() - Soft Terminal Reset. Resets all state variables to * * the intial values. If Pn = 0, this is the same as RIS. If * * Pn = 1, reset from NVM. Ignore all other parameter values. * ************************************************************************/VOID dec_str() {#ifdef DUMP oprintf("DECSTR \n"); #endif switch (cp_pbuf[0]) { case 0: default: ca_restore_default(); /* Invalid parameters are processed as 0 */ /* Return to NVM */ break; case 1: ca_set_given_state(&pdl_scl_st[2]); /* set to conformance level 3 */ break; } }/*************************************************************************** Request Device Status Report**************************************************************************/VOID pr_dsr() {#ifdef DUMP oprintf("DSR \n"); pprint(); /* Print the parameter list */#endif }/*************************************************************************** Cursor Position Request**************************************************************************/VOID pr_cpr() {#ifdef DUMP oprintf("CPR \n"); #endif }/*************************************************************************** Device Attributes***************************************************************************/VOID pr_da() { WORD i; /* loop counter */#ifdef DUMP oprintf("DA \n"); #endif pdli_com_put_string((PUB)&terminal_id[0], FALSE); pdli_com_start(); for (i = 0; i < TERMINAL_ID_SIZE; i++) { pdli_com_put_byte(terminal_id[i]); } pdli_com_stop(); }/****************************************************************************** Device Attributes (secondary)*****************************************************************************/VOID pr_da2() {#ifdef DUMP oprintf("DA2 \n"); #endif }/***************************************************************************** Bell Action Routine***************************************************************************/VOID pr_bel() {#ifdef DUMP oprintf("BELL \n"); #endif }/*************************************************************************** Loading Factory NVR Memory****************************************************************************/VOID dec_fnvr() {#ifdef DUMP oprintf("DECFNVR \n"); #endif }/**************************************************************************** Load Answerback ******************************************************************************/VOID pr_ansb() {#ifdef DUMP oprintf("ANSB \n"); pprint();#endif }/**************************************************************************** Load Answerback Numeric******************************************************************************/VOID pr_ansb_num() {#ifdef DUMP oprintf("ANSB-NUM \n"); pprint();#endif }/**************************************************************************** Load Answerback Capitals ******************************************************************************/VOID pr_ansb_cap() {#ifdef DUMP oprintf("ANSB-CAP \n"); pprint();#endif }/**************************************************************************** Load Answerback Lower Case ******************************************************************************/VOID pr_ansb_lc() {#ifdef DUMP oprintf("ANSB-LC \n"); pprint();#endif }/***************************************************************************** Store the ANSB and Copy the Buffer*******************************************************************************/VOID pr_ansb_store() {#ifdef DUMP oprintf("ANSB STORE \n"); #endif }/**************************************************************************** Business Color Matching Mode******************************************************************************/VOID dec_bcmm() {#ifdef DUMP oprintf("DECBCMM \n"); pprint();#endif }/**************************************************************************** Set Presentation Direction******************************************************************************/VOID pr_spd() {#ifdef DUMP oprintf("SPD \n"); pprint();#endif }/**************************************************************************** Printing Density Selection ******************************************************************************/VOID dec_den() {#ifdef DUMP oprintf("DECDEN \n"); pprint();#endif }/**************************************************************************** Set Number of Copies ******************************************************************************/VOID dec_snc() { UWORD num_copies;#ifdef DUMP oprintf("DECSNC \n"); pprint();#endif num_copies = cp_pbuf[0]; /* get parameter from parameter list */ if (num_copies == 0) /* If zero set to Default of one */ { num_copies = DEFAULT_COPIES; } else if (num_copies > MAX_COPIES) /* If greater than max, set to max */ { num_copies = MAX_COPIES; } process_set_copy(num_copies); }/**************************************************************************** Set Sheet Size******************************************************************************/VOID dec_sss() { SHEET_SIZE decsss; LONG length, width;#ifdef DUMP oprintf("DECSSS \n"); pprint();#endif process_condshowpg(); /* dispose of page if has been printed on */ decsss.tray_num = cp_pbuf[0]; /* get tray num from parameter buf */ decsss.slot_num = cp_pbuf[1]; /* get slot num from parameter buf */ width = cp_pbuf[2]; /* get length of sheet selected */ length = cp_pbuf[3]; /* get width of sheet selected */ /* Get orientation of sheet, landscape or portrait; currently not * implemented on the LN04 */ decsss.sheet_orient = (UBYTE)(cp_pbuf[4]); /* * Convert the length and width to centipoints */ decsss.sheet_width = width * (LONG)xl_st.sizeunit; decsss.sheet_length = length * (LONG)xl_st.sizeunit; PROCESS_SET_SSIZE(&decsss); }/**************************************************************************** Set Conformance Level The supported parameter values are 0 reset to default (level 3) 71 reset to level 1 72 reset to level 2 73 reset to level 3 Any other value is ignored ******************************************************************************/ VOID dec_scl() {#ifdef DUMP oprintf("DECSCL \n"); pprint();#endif if (cp_pbuf[0] == 0) /* If cp_pbuf[0] = 0 then use default of SCL 3 */ { ca_set_given_state(&pdl_scl_st[2]); } if ((cp_pbuf[0] >=71) && (cp_pbuf[0] <=73)) /* accept only values between 71 and 73 */ /* and range them so we can use an array starting at 0 */ { ca_set_given_state(&pdl_scl_st[(cp_pbuf[0] - 71)]); } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -