/*
 * TEX Device Driver  ver 2.29
 *
 * prtctl.h : Definition for prtctl.cfg
 *
 */
#define	NO_NUM			0
#define	BINARY_LTOH		1
#define	BINARY_HTOL		2
#define	DECIMAL_3		3
#define	DECIMAL_4		4
#define	DECIMAL_5		5
#define	DECIMAL_V		6

#define	TOTAL_BYTE		0x80
#define	ISO_NUMBER		0x40
#define	DIVIDE_ALL		0x30
#define	MULT_CONST		0x08

#define	TOP_IS_LOW		0x80
#define	TOP_IS_HIGH		0x00
#define	LEFT_IS_LOW		0xc0
#define	LEFT_IS_HIGH	0x40

#define	TYPE_BIT		0xc0
#define	FLAG_LBP		0x40

#define	NON_MOVING		0x20
#define	HEX_MODE		0x10

#define	LINK_BLOCK		0x80

#ifdef	LIPS3
#  ifdef ESCPAGE
#define	TMP_PRINTER		6
#  else
#define	TMP_PRINTER		5
#  endif
#else
#  ifdef ESCPAGE
#define	TMP_PRINTER		5
#  else
#define	TMP_PRINTER		4
#  endif
#endif

#ifdef	FAX
#define	MAX_PRINTER	(TMP_PRINTER+1)
#else
#define	MAX_PRINTER	TMP_PRINTER
#endif

#define	prt_ctr_file	"prtctl.cfg"

/*
 *	Format for a printer control with sending a number
 *
 *  len, link, pos, type, data .....		4+len bytes
 *
 *  len:  the length of data to be sent to printer
 *  link: link to next block (test LINK_BLOCK)
 *  pos:  the begining position of the data of number (top means 0)
 *	type: NO_NUM or BYNARY_LTOH or BYNARY_HTOL or DECIMAL_3 etc.
 *  data: the control sequence to be sent, its length equals len
 *		  some parts are replaced by the number formated according to type
 */

 /*
  * 	Data format file	(See prtctl.asm)
  *
  *  x, x, x, x, x, x, x, x, x, x, x, x, x, x, x, x   : 16 bytes device name
  *  'Q'
  *  0xff, ad_dot_cr, ?, ?, ?
  *  HW_MIN, HW_MAX
  *  ...
  *  dot_cr, brm_cr, dotg, dots, line_feed, form_feed, after_dot
  *  ...
  */

 /*
   *	HW_MIN は、１行を印字するとき、HW_MIN のバイト境界ごとにみて、この
   *	ブロック（縦 VERT_BYTES*8、横 HW_MIN*8 ドット）に空白があれば、
   *    横方向移動のコードを送る。但し、それ以降が行末まで空白なら、なにも
   *	送らない。（１ワード）
   *
   *	HW_MAX、横方向の移動や、ビットイメージを送るときの、横幅のバイト単位
   *    での最大値。すなわち、HW_MAX*8 ドットの横幅。（１ワード）
   *
   *	VERT_BYTES は１行を印字する際の縦のドット数／８（１バイト）
   *	よって，２４ピンプリンタの時は、３となる
   *
   *    ad_dot_cr は、各１バイトで、先頭からの dot_cr の位置を表す
   *
   *    dot_cr が最初である必要がある。それ以降、隙間無しに
   *	dot_cr, brm_cr,... がなくてはいけない。
   *
   *
   *		The followings are as in the above (with 4 bytes header)
   *
   * dot_cr:	ビットイメージの印字へ移る為の初期化。多分、改行幅の調整
   * nrm_cr:	上で変えたもの、多分、改行幅を元に戻す。
   * dotg  :	ビットイメージの印字のコントロール（横のドット数も送る）
   * dots  :	ドット単位で右に移動する（移動数も送る）
   *			dots の len が 0 は、このようなコントロールが出来ないことを
   *			意味する。
   * line_feed: 印字改行コード
   * form_feed: 印字改ページコード
   * after_bit: ビットーイメージのブロックデータを送った後のコントロールコード
   * bit_row_header: header codes preceding every row of bits
   */
