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

📄 xlm_codegen.h

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 H
📖 第 1 页 / 共 3 页
字号:
                            break; \          } /******************************************************************M$SET_OPEN(m$open,m$x)        5.6.1  Generalities       5.6.2  Input       ap       5.6.3  Output       5.6.4  Called Routines       1.  close_all       2.  open_decvec       3.  open_show       4.  open_sixel       5.  open_font       5.6.5  Internal Variables And Storage******************************************************************/#define M$SET_OPEN(m$open,m$x) \ \desired_st.open = m$open; \switch (desired_st.open) \     { \     case ALLCLOSED:  break; \     case DECVECOPEN: M$OPEN_DECVEC();  break; \     case SHOWOPEN:   M$OPEN_SHOW(m$x);  break; \     case SIXELOPEN:  M$OPEN_SIXEL();  break; \     case FONTOPEN:   M$OPEN_FONT();  break; \     case SPACINGOPEN: M$OPEN_SPACING();  break; \                      break; \     } /******************************************************************M$SET_BUFF_SIZE(m$sixel_buf_size)        5.11.1  Generalities       5.11.2  Input       5.11.3  Output       5.11.4  Called Routines       1.  close_all       2.  output_buff_size       3.  update_buff_size       5.11.5  Internal Variables And Storage       None******************************************************************/#define M$SET_BUFF_SIZE(m$sixel_buf_size) \ \oprintf (str_sixel_data_info_change, m$sixel_buf_size, m$sixel_buf_size << 3); \cur_ps_st -> sixel_buf_size = m$sixel_buf_size; /******************************************************************M$SET_THICKNESS(m$thichness)         5.10.1  Generalities       This sends the command to change thickness of line drawing.       5.10.2  Input       ps_state.line_thickness       5.10.3  Output       5.10.4  Called Routines       1.  close_all       2.  output_thickness       5.10.5  Internal Variables And Storage       None******************************************************************/#define M$SET_THICKNESS(m$thickness) \ \oprintf (str_setlinewidth, m$thickness); \cur_ps_st -> line_thickness = m$thickness; /******************************************************************M$SET_SCALE(m$xval,m$yval)         5.10.1  Generalities       This sends the scale command.       5.10.2  Input       ps_state.scale       5.10.3  Output       prints (desired_st.scale.x/ps_state.scale.x,                desired_st.scale.y/ps_state.scale.y, " scale")       5.10.4  Called Routines       1.  close_all       2.  output_scale       3.  update_scale       5.10.5  Internal Variables And Storage       None******************************************************************/#define M$SET_SCALE(m$xval,m$yval) \ \ \/* output_scale */ \ \        scalex = (((float)(m$xval)) / (float)cur_ps_st -> scale_factor.xval); \        scaley = (((float)(m$yval)) / (float)cur_ps_st -> scale_factor.yval); \ \sprintf (str_buffer,"%.3f %.3f%s",scalex,scaley,str_float_scale); \ps_str (str_buffer); \ \/* update_scale */ \cur_ps_st -> scale_factor.xval = m$xval; \cur_ps_st -> scale_factor.yval = m$yval; /******************************************************************M$SET_ORIENT(m$orientation)        5.9.1  Generalities       This set either portrait or landscape mode       Portrait:     x     Landscape:   ^       PS:   ^                   +--->               x|            y|                  y|                    +--->         +--->                   v                      y             x       5.9.2  Input       1.  orientation type       2.  ps_state.orient       5.9.3  Output       1.  print ("90 rotate")       2.  print ("-90 rotate")       3.  print ("+1 -1 scale)       5.9.4  Called Routines       1.  close_all       2.  set_scale       3.  oprintf       5.9.5  Internal Variables And Storage******************************************************************/#define M$SET_ORIENT(m$orientation) \ \       /* SET THE ORIENTATION */ \  \            /* POSTSCRIPT TO ??? */ \            if (cur_ps_st -> orientation == ORIENT_PS) \                 { \                 /* IF PORTRAIT ELSE LANDSCAPE */ \                 if (m$orientation == ORIENT_PORT) \                    oprintf (str_ps_port,cg_st.cgst_sheet_len); \                 else ps_str (str_ps_land); \                 } \            else \                 { \                 /* PORTRAIT TO LANDSCAPE? */ \                 if ((cur_ps_st -> orientation == ORIENT_PORT) && \                     (m$orientation == ORIENT_LAND)) \                     oprintf (str_port_land, -cur_ps_st -> origin.xval, \                          cur_ps_st -> sheet_len - cur_ps_st -> origin.yval); \                 else \                 /* LANDSCAPE TO PORTRAIT? */ \                 if ((cur_ps_st -> orientation == ORIENT_LAND) && \                     (m$orientation == ORIENT_PORT)) \                     { \                     oprintf (str_translate, \                          -cur_ps_st -> origin.xval, -cur_ps_st -> origin.yval); \                     oprintf (str_land_port, cg_st.cgst_sheet_len); \                     } \                 } \            /* WHATEVER TO POSTSCRIPT - should never happen */ \ \      /* update oreientation and sheet length */ \      cur_ps_st -> sheet_len = cg_st.cgst_sheet_len; \      cur_ps_st -> orientation = m$orientation; \      cur_ps_st -> origin.xval = 0; \      cur_ps_st -> origin.yval = 0; /******************************************************************M$SET_ORIGIN(m$xval,m$yval)        5.8.1  Generalities       Do a translate command.  For sixel origin the origin is  ap.   For       non  sixel  origin  the  origin  is  xlstate.origin.  But, in both       cases, origin will be placed in desired origin.       5.8.2  Input       1.  ps_state.origin       2.  desired origin       5.8.3  Output       1.  (desired.origin.x - ps_state.origin.x)       2.  (desired.origin.y - ps_state.origin.y)       3.  (str_translate)       5.8.4  Called Routines       1.  close_all       2.  output_origin       3.  update_origin       5.8.5  Internal Variables And Storage******************************************************************/#define M$SET_ORIGIN(m$xval,m$yval) \ \oprintf (str_translate, (m$xval) - cur_ps_st -> origin.xval, \        (m$yval) - cur_ps_st -> origin.yval); \cur_ps_st -> origin.xval = m$xval; \cur_ps_st -> origin.yval = m$yval; /******************************************************************M$SET_AP(m$ahp,m$avp)******************************************************************/#define M$SET_AP(m$ahp,m$avp) \ \oprintf (str_moveto,m$ahp, m$avp); \M$UPDATE_AP_A(m$ahp, m$avp); /******************************************************************M$CHECK_STATE_CHANGE()       5.3.1  Generalities           "Do the Job" in check_state_change.   Affects  the  use  of  a           global  "possible state change" flag which could be set by any           escape sequence action  routines  which  know  that  they  are           changing the state.       5.3.2  Input       1.  ps_state       5.3.3  Output       5.3.4  Called Routines       1.  set_origin       2.  set_orient       3.  set_ap       4.  set_font       5.  set_spacing       6.  set_buff_size       7.  set_thickness       8.  set_scale       9.  set_open       5.3.5  Internal Variables And Storage******************************************************************//*--------------------------------------------------------------------*//* Note - The order in which the tests for state change is important! *//*        The following list shows the sequence that each test must   *//*        done in:                                                    *//*              PAIRED_FONT_NUMBER      1st <-+- These 2 must occur   *//*              HORIZONTAL_SPACING      2nd <-!  in togther!          *//*              SCALE                   3rd                           *//*              ORIENTATION & SHEET LEN 4th                           *//*              ORIGIN                  5th                           *//*              AP                      6th                           *//*              ATTRS                   7th                           *//*              SIXEL_BUF_SIZE          anywhere                      *//*              LINE_THICKNESS          anywhere after the SCALE      *//*              OPEN                    last at all times             *//*--------------------------------------------------------------------*/#define M$CHECK_STATE_CHANGE_ALL() \ \if (\    (vax_font_table_box_number [desired_st.curchar.char_data.char_font]\                        != cur_ps_st -> curchar.char_data.char_font) || \    (desired_st.curchar.font_data.horizontal_spacing \                        != cur_ps_st -> curchar.font_data.horizontal_spacing) || \    (desired_st.scale_factor.xval != cur_ps_st -> scale_factor.xval) || \    (desired_st.scale_factor.yval != cur_ps_st -> scale_factor.yval) || \    (desired_st.orientation       != cur_ps_st -> orientation)       || \    (desired_st.sheet_len         != cur_ps_st -> sheet_len)         || \    (desired_st.origin.xval       != cur_ps_st -> origin.xval)       || \    (desired_st.origin.yval       != cur_ps_st -> origin.yval)       || \    (desired_st.curchar.ap.xval       != cur_ps_st -> curchar.ap.xval)       || \    (desired_st.curchar.ap.yval       != cur_ps_st -> curchar.ap.yval)       || \    (desired_st.curchar.attr_data.attr_baseline_offset       != cur_ps_st -> curchar.attr_data.attr_baseline_offset)       || \    (desired_st.curchar.font_data.algorithmic_attributes     != cur_ps_st -> curchar.font_data.algorithmic_attributes)     || \    (desired_st.sixel_buf_size    != cur_ps_st -> sixel_buf_size)    || \    (desired_st.line_thickness    != cur_ps_st -> line_thickness)    || \    (desired_st.open              != cur_ps_st -> open)) #define M$CHECK_STATE_CHANGE_FONT(m$paired_font_number, m$horizontal_spacing) \ \    if  ((vax_font_table_box_number [m$paired_font_number]\                        != cur_ps_st -> curchar.char_data.char_font) ||\         (m$horizontal_spacing!=cur_ps_st->curchar.font_data.horizontal_spacing))\         { \         set_font_and_spacing(m$paired_font_number, m$horizontal_spacing); \         } \#define M$CHECK_STATE_CHANGE_SCALE(m$xval,m$yval) \ \/* 3 - SCALE */ \ \if ((m$xval != cur_ps_st -> scale_factor.xval) || \    (m$yval != cur_ps_st -> scale_factor.yval)) \     { \     M$SET_SCALE(m$xval,m$yval); \     } #define M$CHECK_STATE_CHANGE_ORIENT(m$orientation,m$sheet_len) \ \/* 4 - ORIENTATION */ \ \if (m$orientation != cur_ps_st -> orientation) \     { \     M$SET_ORIENT(m$orientation); \     } \else if ((m$sheet_len   != cur_ps_st -> sheet_len) && \         (ORIENT_LAND   != cur_ps_st -> orientation)) \     { \     oprintf (str_translate, 0, cur_ps_st -> sheet_len - m$sheet_len); \     cur_ps_st -> sheet_len = m$sheet_len; \     }#define M$CHECK_STATE_CHANGE_ORIGIN(m$xval,m$yval) \ \/* 5 - ORIGIN */ \ \if ((m$xval != cur_ps_st -> origin.xval) || \    (m$yval != cur_ps_st -> origin.yval)) \     { \     M$SET_ORIGIN(m$xval,m$yval); \     M$UPDATE_AP_A(-1,-1); \     } #define M$CHECK_STATE_CHANGE_AP(m$ahp,m$avp) \ \/* 6 - AP */ \ \if ((m$ahp != cur_ps_st -> curchar.ap.xval) || \    (m$avp != cur_ps_st -> curchar.ap.yval)) \     { \     M$SET_AP(m$ahp,m$avp); \     } #define M$CHECK_STATE_CHANGE_ATTRS(m$attrs,m$ulavp) \ \/* 7 - ATTRS */ \ \if ((m$attrs != cur_ps_st -> curchar.font_data.algorithmic_attributes) || \    (m$ulavp != cur_ps_st -> curchar.attr_data.attr_baseline_offset)) \   { \     cur_ps_st -> curchar.font_data.algorithmic_attributes = m$attrs; \     cur_ps_st -> curchar.attr_data.attr_baseline_offset = m$ulavp; \   }#define M$CHECK_STATE_CHANGE_BUFF(m$sixel_buf_size) \ \/* 8 - SIXEL_BUF_SIZE (This can go anywhere, order is not important here) */ \ \if (m$sixel_buf_size != cur_ps_st -> sixel_buf_size) \     { \     M$SET_BUFF_SIZE(m$sixel_buf_size); \     } #define M$CHECK_STATE_CHANGE_THICK(m$line_thickness) \ \/* 9 - LINE_THICKNESS (This can go anywhere after scale) */ \ \if (m$line_thickness != cur_ps_st -> line_thickness) \     { \     M$SET_THICKNESS(m$line_thickness); \     } #define M$CHECK_STATE_CHANGE_OPEN(m$open,m$x) \ \/* 10 - OPEN (Must be done last!) */ \ \if (m$open != cur_ps_st -> open) \     { \     M$SET_OPEN(m$open,m$x); \     } 

⌨️ 快捷键说明

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