⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cafont_sel.c

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 C
📖 第 1 页 / 共 2 页
字号:
	case 3:  string_length = FONT_ID_SIZE;		 break;	default: ABORT_MACRO(94);   /* Invalid DCS string */		 cp_setctptr(&ast_dcsignore); /* set state to DCS IGNORE */		 return;	    /* make sure we ignore rest of sequence */		 break;       }    if (cp_font_name_cnt < string_length)        {	ABORT_MACRO(92);    /* Invalid ID for DECDTFF */	cp_setctptr(&ast_dcsignore); /* set state to DCS IGNORE */	return;	    /* Do not process the ID string */       }    /* Now that error checking on string is complete,     * proceed ...     */    empty_jfy_buf ();    /* It is not necessary to ensure that the string is terminated as     * font_delete_font_files works with specific string lengths only.     */    FNT_DELETE_FONT_FILES (string_length, &cp_font_name_buf[0]);    invalidate_font();   }/****************************************************************************    Shift In/ Locking Shift 0 function******************************************************************************/VOID pr_si()   {#ifdef DUMP   {    oprintf("SI \n");   }#endif    xl_st.gl_ptr = &xl_st.g_table [0];	   }/****************************************************************************    Shift Out/ Locking Shift 1 function******************************************************************************/VOID pr_so()   {#ifdef DUMP   {    oprintf("SO \n");   }#endif    xl_st.gl_ptr = &xl_st.g_table [1];	   }/****************************************************************************    Single Shift 2 Dump Utility function******************************************************************************/VOID pr_ss2()   {#ifdef DUMP   {    cp_exit_cur_mode();    oprintf("SS2 \n");   }#endif    xl_st.ssf = 2;	    cp_exit_cur_mode();   }/****************************************************************************    Single Shift 3 Dump Utility function******************************************************************************/VOID pr_ss3()   {#ifdef DUMP   {    cp_exit_cur_mode();    oprintf("SS3 \n");   }#endif    xl_st.ssf = 3;	    cp_exit_cur_mode();   }/****************************************************************************    Locking Shift 2 Dump Utility function******************************************************************************/VOID pr_ls2()   {#ifdef DUMP   {    oprintf("LS2 \n");   }#endif    xl_st.gl_ptr = &xl_st.g_table [2];	   }/****************************************************************************    Locking Shift 3 Dump Utility function******************************************************************************/VOID pr_ls3()   {#ifdef DUMP   {    oprintf("LS3 \n");   }#endif    xl_st.gl_ptr = &xl_st.g_table [3];   }/****************************************************************************    Locking Shift 1 Right Dump Utility function******************************************************************************/VOID pr_ls1r()   {#ifdef DUMP   {    oprintf("LS1R \n");   }#endif    xl_st.gr_ptr = &xl_st.g_table [1];   }/****************************************************************************    Locking Shift 2 Right Dump Utility function******************************************************************************/VOID pr_ls2r()   {#ifdef DUMP   {    oprintf("LS2R \n");   }#endif    xl_st.gr_ptr = &xl_st.g_table [2];   }/****************************************************************************    Locking Shift 3 Right Dump Utility function******************************************************************************/VOID pr_ls3r()   {#ifdef DUMP   {    oprintf("LS3R \n");   }#endif    xl_st.gr_ptr = &xl_st.g_table [3];	   }/****************************************************************************    Select Charact Set Dump Utility function******************************************************************************/VOID pr_scs(){    WORD	j;			/* g_table index */    WORD	new_character_set_id;	/* generated here in 16 bit                                                      integer form */#ifdef DUMP    {    cp_exit_cur_mode();    oprintf("SCS \n");    }#endif/*dump_g_table ();*/    /* Parse out which g_table [j] is being addressed and the    new_character_set_size (94 or 96 glyphs) from the parameter sequence.     Compute new_character_set_id */     j = cp_ibuf[0] & 3;        if (cp_ibuf[0] & 4)      {      new_character_set_id = 1<<13;      xl_st .g_table[j] .repertory = C96;      }    else      {      new_character_set_id = 0;      xl_st .g_table[j] .repertory = C94;      }        if (cp_icnt == 2)      new_character_set_id += (1<<11) + ( (cp_ibuf[1] & 15) <<7 );        new_character_set_id += cp_c;   /*  the final character */          xl_st .g_table[j] .char_set_id = new_character_set_id;      if (new_character_set_id == USER_PREFERENCE)        {        new_character_set_id = xl_st .user_pref_cset;        xl_st .g_table [j] .repertory = xl_st .user_pref_repertory;        }    invalidate_font_for_g_set(j); /* this also does invalidate_vai(); */    cp_exit_cur_mode();} /* end of pr_scs *//****************************************************************************    Assign User Preference Set functions        ******************************************************************************/VOID dec_aupss_enter()   {#ifdef DUMP   {    oprintf("DECAUPSS-ENTER \n");   }#endif    /* Set up maximum allowed length of font name,     * for use by cp_font_name routine      */    amt_allocated = MAXCSETID;   }/*****  dec_aupss_term()  ********************************************** * Process a new Use Preference Character Set				* ************************************************************************/VOID dec_aupss_term(){WORD	i;	/* for-table indices */WORD	new_user_preference_id;	/* generated here in 16 bit integer form */WORD	new_user_preference_repertory;#ifdef DUMP    {    oprintf("DECAUPSS-TERM \n");    pprint();    }#endif/* Initialize the 16 bit integer user preference id to ensure that   no unnecessary bits are set.	*/new_user_preference_id = 0;/* Fill in the DECAUPSS control sequence data intermediate and    final characters. *//*    Compute new_user_preference_id */if (cp_font_name_cnt == 1)     {new_user_preference_id = cp_font_name_buf[0];	    /* Only one char means no intermed; just use the final */    }else if (cp_font_name_cnt == 2)    {     new_user_preference_id = (1 << 11) /* Intermed in used flag */       + 	((cp_font_name_buf[0] & 0x0f) << 7) + (cp_font_name_buf[1]);	    /* buf[0] is Intermed, buf[1] is Final */    }   if (dcs_intro.ps1 != 0)		/* If 96-char vs. 94-char set */   {    new_user_preference_id += 1<<13;    new_user_preference_repertory = C96;   }    else    {					/* else 94-char vs. 96-char set */    new_user_preference_id += 0<<13;    new_user_preference_repertory = C94;   }   xl_st .user_pref_cset = new_user_preference_id;   xl_st .user_pref_repertory = new_user_preference_repertory;/* For each G set which is designated as 'user preference' determine anew   the setting of its font table entry flags and then re-compute its font.*/for (i = 0; i < G_TABLE_SIZE; i++)  {   if (xl_st .g_table [i] .char_set_id == USER_PREFERENCE)      {       xl_st .g_table [i] .repertory = xl_st .user_pref_repertory;      }  }  invalidate_font();}    /* end of dec_aupss_term *//*************************************************************************    Request User Preference Supplemental Character Set************************************************************************/VOID dec_rqupss(){#ifdef DUMP    {    oprintf("DECRQUPSS \n");    }#endif}/*************************************************************************    Announce Subset Code Extension Format  - Level 1 Dump Utility************************************************************************/VOID pr_ascef1(){#ifdef DUMP    {    oprintf("ASCEF1 \n");    }#endif	/* Load ASCII into G0. */	cp_ibuf[0] = '(';	cp_c = 'B';	pr_scs ();	/* Load G0 into GL. */	xl_st .gl_ptr = &xl_st .g_table [0];	/* Load ISO Latin 1 into G1. */	cp_ibuf[0] = '-';	cp_c = 'A';	pr_scs  ();	/* Load G1 into GR. */	xl_st .gr_ptr = &xl_st .g_table [1];}/*************************************************************************    Announce Subset Code Extension Format  - Level 2 Dump Utility************************************************************************/VOID pr_ascef2(){#ifdef DUMP    {    oprintf("ASCEF2 \n");    }#endif    pr_ascef1();	/* as far as LN04/etc. are concerned, ascef1 is the		           the same as ascef2 */}/*************************************************************************    Announce Subset Code Extension Format  - Level 3 Dump Utility************************************************************************/VOID pr_ascef3(){#ifdef DUMP    {    oprintf("ASCEF3 \n");    }#endif	/* Load ASCII into G0. */	cp_ibuf[0] = '(';	cp_c = 'B';	pr_scs  ();	/* Load G0 into GL. */	xl_st .gl_ptr = &xl_st .g_table [0];}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -