utils/ctext2pgm-1.5.2/ctext2pgm.h

/* [<][>]
[^][v][top][bottom][index][help] */

FUNCTIONS

This source file includes following functions.
  1. CSID
  2. PR1
  3. PR2
  4. PR3

   1 /* ctext2pgm.h */ 
   2 
   3 /*
   4  * Copyright (C) 1998-1999  Hirotsugu Kakugawa. 
   5  * All rights reserved.
   6  *
   7  * This program is free software; you can redistribute it and/or modify
   8  * it under the terms of the GNU General Public License as published by
   9  * the Free Software Foundation; either version 2, or (at your option)
  10  * any later version.
  11  * 
  12  * This program is distributed in the hope that it will be useful,
  13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15  * GNU General Public License for more details.
  16  * 
  17  * You should have received a copy of the GNU General Public License
  18  * along with this program; if not, write to the Free Software
  19  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  
  20  */
  21 
  22 
  23 /* Name of this program */
  24 #define PROG_NAME  "ctext2pgm"
  25 #define VERSION    "version 1.5.0, 13 June 1999"
  26 
  27 /* Input encodings */
  28 /* (codesets 2 and 3 are not supported for EUC encodings) */
  29 #define ENC_DEFAULT     0
  30 #define ENC_UNKNOWN     -1
  31 #define ENC_CTEXT       0    /* Compound text */
  32 #define ENC_ISO2022_JP  1    /* ISO-2022-JP */
  33 #define ENC_ISO2022_KR  2    /* ISO-2022-KR */
  34 #define ENC_ISO2022_CN  3    /* ISO-2022-CN */
  35 #define ENC_ISO8859_1  11    /* ISO 8859-1, all chars are 1byte */
  36 #define ENC_ISO8859_2  12    /* ISO 8859-2, all chars are 1byte */
  37 #define ENC_ISO8859_3  13    /* ISO 8859-3, all chars are 1byte */
  38 #define ENC_ISO8859_4  14    /* ISO 8859-4, all chars are 1byte */
  39 #define ENC_ISO8859_5  15    /* ISO 8859-5, all chars are 1byte */
  40 #define ENC_ISO8859_6  16    /* ISO 8859-6, all chars are 1byte */
  41 #define ENC_ISO8859_7  17    /* ISO 8859-7, all chars are 1byte */
  42 #define ENC_ISO8859_8  18    /* ISO 8859-8, all chars are 1byte */
  43 #define ENC_ISO8859_9  19    /* ISO 8859-9, all chars are 1byte */
  44 #define ENC_EUC_JP1    21    /* EUC Japan (JISX0201Roman for codeset 0) */ 
  45 #define ENC_EUC_JP2    22    /* EUC Japan with ISO8859-1 for codeset 0 */
  46 #define ENC_EUC_KR     23    /* EUC Korean */
  47 #define ENC_EUC_CH_GB  24    /* EUC Chinese, GB2312 */
  48 #define ENC_EUC_CH_CNS 25    /* EUC Chinese, CNS11643 */
  49 #define ENC_SJIS       30    /* Shift JIS */
  50 
  51 /* Writing directions in a line */
  52 #define WDIR_DEFAULT   0
  53 #define WDIR_L2R       0
  54 #define WDIR_R2L       1
  55 
  56 /* Charset types */
  57 #define TYPEID_UNKNOWN -1
  58 #define TYPEID94        1
  59 #define TYPEID96        2
  60 #define TYPEID94_2      3
  61 
  62 /* Charsets */
  63 #define CS_UNKNOWN        -1
  64 #define CS_ASCII          (TYPEID94*256 + (4*16+2))
  65 #define CS_ISO8859_1      (TYPEID96*256 + (4*16+1))
  66 #define CS_ISO8859_2      (TYPEID96*256 + (4*16+2))
  67 #define CS_ISO8859_3      (TYPEID96*256 + (4*16+3))
  68 #define CS_ISO8859_4      (TYPEID96*256 + (4*16+4))
  69 #define CS_ISO8859_5      (TYPEID96*256 + (4*16+12))
  70 #define CS_ISO8859_6      (TYPEID96*256 + (4*16+7))
  71 #define CS_ISO8859_7      (TYPEID96*256 + (4*16+6))
  72 #define CS_ISO8859_8      (TYPEID96*256 + (4*16+8))
  73 #define CS_ISO8859_9      (TYPEID96*256 + (4*16+13))
  74 #define CS_JISX0201K      (TYPEID94*256 + (4*16+9))
  75 #define CS_JISX0201R      (TYPEID94*256 + (4*16+10))
  76 #define CS_JISX0208       (TYPEID94_2*256 + (4*16+2))
  77 #define CS_JISX0212       (TYPEID94_2*256 + (4*16+4))
  78 #define CS_VISCII         (TYPEID94_2*256 + (5*16+10))
  79 #define CS_TIS620         (TYPEID94_2*256 + (5*16+4))
  80 #define CS_KSC5601        (TYPEID94_2*256 + (4*16+3))
  81 #define CS_GB2312         (TYPEID94_2*256 + (4*16+1))
  82 #define CS_CNS11643_1     (TYPEID94_2*256 + (4*16+7))
  83 #define CS_CNS11643_2     (TYPEID94_2*256 + (4*16+8))
  84 #define CS_CNS11643_3     (TYPEID94_2*256 + (4*16+9))
  85 #define CS_CNS11643_4     (TYPEID94_2*256 + (4*16+10))
  86 #define CS_CNS11643_5     (TYPEID94_2*256 + (4*16+11))
  87 #define CS_CNS11643_6     (TYPEID94_2*256 + (4*16+12))
  88 #define CS_CNS11643_7     (TYPEID94_2*256 + (4*16+13))
  89 #define CS_MULE_BIG5_L1     (TYPEID94_2*256 + (3*16+0))
  90 #define CS_MULE_BIG5_L2     (TYPEID94_2*256 + (3*16+1))
  91 #define CS_MULE_ARAB0       (TYPEID94*256 + (3*16+2))
  92 #define CS_MULE_ARAB1       (TYPEID94*256 + (3*16+3))
  93 #define CS_MULE_ARAB2       (TYPEID94*256 + (3*16+4))
  94 #define CS_MULE_ETHIOPIC    (TYPEID94_2*256 + (3*16+3))
  95 #define CS_MULE_VISCII_L    (TYPEID96*256 + (3*16+1))
  96 #define CS_MULE_VISCII_U    (TYPEID96*256 + (3*16+2))
  97 
  98 #define CSID(t,code)  ((t)*256+(code))
  99 
 100 /* Font families */
 101 #define FAM_DEFAULT   1
 102 #define FAM_FIXED     0
 103 #define FAM_TIMES     1
 104 #define FAM_HELV      2
 105 #define FAM_COUR      3
 106 
 107 /* Font faces */
 108 #define FACE_DEFAULT  0
 109 #define FACE_NORMAL   0
 110 #define FACE_BOLD     1
 111 #define FACE_ITALIC   2
 112 
 113 /* Status of s_font_info.font_id */
 114 #define NOT_OPENED  -1
 115 #define NOT_FOUND   -2
 116 
 117 /* Font info structue */
 118 struct s_font_info {
 119   int    pixel_size;
 120   int    charset_id;
 121   int    family_id;
 122   int    face_id;
 123   char   *font_name;
 124   int    font_id;   /* internal use only --- for opened VFlib font id */
 125 };
 126 
 127 /* Direction stack structue */
 128 #define MAX_DIR_STACK         64
 129 struct s_dir_stack_elem {
 130   int    dir;
 131   struct vf_s_bitmaplist  the_line_buff;
 132   int    h_pos_x;
 133   int    h_pos_y;
 134 };
 135 
 136 
 137 #define PR1(s1)        fprintf(stderr, s1);
 138 #define PR2(s1,s2)     fprintf(stderr, s1, s2);
 139 #define PR3(s1,s2,s3)  fprintf(stderr, s1, s2, s3);
 140 
 141 /* Output formats */
 142 #define OFORM_DEFAULT       0
 143 #define OFORM_PGM_ASCII     0
 144 #define OFORM_PGM_RAW       1
 145 #define OFORM_PBM_ASCII     2
 146 #define OFORM_PBM_RAW       3
 147 #define OFORM_EPS          10
 148 #define OFORM_ASCII_ART    20
 149 #define OFORM_ASCII_ART_V  21
 150 #define OFORM_NONE         99
 151 
 152 /* Line typeset */
 153 #define LINE_DEFAULT       0
 154 #define LINE_FLUSH_LEFT    1
 155 #define LINE_FLUSH_RIGHT   2
 156 #define LINE_CENTER        3
 157 
 158 /* Default values */
 159 #define DEFAULT_VFLIBCAP         "vflibcap-ctext2pgm"
 160 #define DEFAULT_PIXEL_SIZE       16
 161 #define DEFAULT_BASELINESKIP     1.2
 162 #define DEFAULT_MAG              1
 163 #define DEFAULT_MARGIN           0
 164 #define DEFAULT_SHRINK           1
 165 #define DEFAULT_REVERSE          0
 166 #define DEFAULT_LINE_POS         LINE_DEFAULT
 167 #define DEFAULT_EPS_POINT_SIZE   12.0
 168 #define DEFAULT_TAB_SKIP         6
 169 
 170 
 171 /*EOF*/

/* [<][>][^][v][top][bottom][index][help] */