Back to index

tetex-bin  3.0
Defines
ptexmac.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define M_PI   3.14159265358979323846 /* pi */
#define M_PI_2   1.5707963267948966192E0 /*Hex 2^ 0 * 1.921FB54442D18 */
#define M_PI_4   7.8539816339744830962E-1 /*Hex 2^-1 * 1.921FB54442D18 */
#define maxinteger   0x7FFFFFFF
#define maxdimen   0x3FFFFFFF
#define objinfo(n)   objtab[n].int0
#define pdfroom(n)
#define pdfout(c)
#define pdfoffset()   (pdfgone + pdfptr)
#define pdfinitfont(f)   {tmpf = f; pdfcreatefontobj();}
#define pdfmovechars   getintpar(cfgmovecharscode)
#define MAX_CHAR_CODE   255
#define MOVE_CHARS_OFFSET   160
#define PRINTF_BUF_SIZE   1024
#define MAX_CSTRING_LEN   1024
#define MAX_PSTRING_LEN   1024
#define SMALL_BUF_SIZE   256
#define SMALL_ARRAY_SIZE   256
#define FONTNAME_BUF_SIZE   128 /* a PDF name can be maximum 127 chars long */
#define check_buf(size, buf_size)
#define append_char_to_buf(c, p, buf, buf_size)
#define append_eol(p, buf, buf_size)
#define remove_eol(p, buf)
#define skip(p, c)   if (*p == c) p++
#define alloc_array(T, n, s)
#define is_cfg_comment(c)   (c == 10 || c == '*' || c == '#' || c == ';' || c == '%')
#define define_array(T)
#define xfree(p)   do { if (p != NULL) free(p); p = NULL; } while (0)
#define strend(s)   strchr(s, 0)
#define xtalloc   XTALLOC
#define xretalloc   XRETALLOC
#define ASCENT_CODE   0
#define CAPHEIGHT_CODE   1
#define DESCENT_CODE   2
#define FONTNAME_CODE   3
#define ITALIC_ANGLE_CODE   4
#define STEMV_CODE   5
#define XHEIGHT_CODE   6
#define FONTBBOX1_CODE   7
#define FONTBBOX2_CODE   8
#define FONTBBOX3_CODE   9
#define FONTBBOX4_CODE   10
#define MAX_KEY_CODE   (FONTBBOX1_CODE + 1)
#define FONT_KEYS_NUM   (FONTBBOX4_CODE + 1)
#define F_INCLUDED   0x01
#define F_SUBSETTED   0x02
#define F_TRUETYPE   0x04
#define F_BASEFONT   0x08
#define set_included(fm)   ((fm)->type |= F_INCLUDED)
#define set_subsetted(fm)   ((fm)->type |= F_SUBSETTED)
#define set_truetype(fm)   ((fm)->type |= F_TRUETYPE)
#define set_basefont(fm)   ((fm)->type |= F_BASEFONT)
#define unset_included(fm)   ((fm)->type &= ~F_INCLUDED)
#define unset_subsetted(fm)   ((fm)->type &= ~F_SUBSETTED)
#define unset_truetype(fm)   ((fm)->type &= ~F_TRUETYPE)
#define unset_basefont(fm)   ((fm)->type &= ~F_BASEFONT)
#define unset_fontfile(fm)   xfree((fm)->ff_name)
#define is_included(fm)   ((fm)->type & F_INCLUDED)
#define is_subsetted(fm)   ((fm)->type & F_SUBSETTED)
#define is_truetype(fm)   ((fm)->type & F_TRUETYPE)
#define is_basefont(fm)   ((fm)->type & F_BASEFONT)
#define fm_slant(fm)   (fm)->slant
#define fm_extend(fm)   (fm)->extend
#define fm_fontfile(fm)   (fm)->ff_name
#define is_reencoded(fm)   ((fm)->encoding != NULL)
#define is_fontfile(fm)   (fm_fontfile(fm) != NULL)
#define is_t1fontfile(fm)   (is_fontfile(fm) && !is_truetype(fm))
#define LINK_TFM   0x01
#define LINK_PS   0x02
#define set_tfmlink(fm)   ((fm)->links |= LINK_TFM)
#define set_pslink(fm)   ((fm)->links |= LINK_PS)
#define unset_tfmlink(fm)   ((fm)->links &= ~LINK_TFM)
#define unset_pslink(fm)   ((fm)->links &= ~LINK_PS)
#define has_tfmlink(fm)   ((fm)->links & LINK_TFM)
#define has_pslink(fm)   ((fm)->links & LINK_PS)
#define set_cur_file_name(s)

Define Documentation

#define alloc_array (   T,
  n,
  s 
)
Value:
do {                           \
    if (T##_array == NULL) {                                   \
        T##_limit = (s);                                    \
        if ((n) > T##_limit)                                \
            T##_limit = (n);                                \
        T##_array = xtalloc(T##_limit, T##_entry);          \
        T##_ptr = T##_array;                                \
    }                                                       \
    else if (T##_ptr - T##_array + (n) > T##_limit) {       \
        last_ptr_index = T##_ptr - T##_array;               \
        T##_limit *= 2;                                     \
        if (T##_ptr - T##_array + (n) > T##_limit)          \
            T##_limit = T##_ptr - T##_array + (n);          \
        T##_array = xretalloc(T##_array, T##_limit, T##_entry); \
        T##_ptr = T##_array + last_ptr_index;               \
    }                                                       \
} while (0)

Definition at line 110 of file ptexmac.h.

#define append_char_to_buf (   c,
  p,
  buf,
  buf_size 
)
Value:
do {       \
    if (c == 9)                                            \
        c = 32;                                            \
    if (c == 13 || c == EOF)                               \
        c = 10;                                            \
    if (c != ' ' || (p > buf && p[-1] != 32)) {            \
        check_buf(p - buf + 1, (buf_size));                \
        *p++ = c;                                          \
    }                                                      \
} while (0)

Definition at line 80 of file ptexmac.h.

#define append_eol (   p,
  buf,
  buf_size 
)
Value:
do {                  \
    check_buf(p - buf + 2, (buf_size));                    \
    if (p - buf > 1 && p[-1] != 10)                        \
        *p++ = 10;                                         \
    if (p - buf > 2 && p[-2] == 32) {                      \
        p[-2] = 10;                                        \
        p--;                                               \
    }                                                      \
    *p = 0;                                                \
} while (0)

Definition at line 91 of file ptexmac.h.

#define ASCENT_CODE   0

Definition at line 140 of file ptexmac.h.

#define CAPHEIGHT_CODE   1

Definition at line 141 of file ptexmac.h.

#define check_buf (   size,
  buf_size 
)
Value:
if ((size) > (buf_size))                               \
        pdftex_fail("buffer overflow", (buf_size))

Definition at line 76 of file ptexmac.h.

#define define_array (   T)
Value:
T##_entry      *T##_ptr, *T##_array = NULL;    \
size_t          T##_limit

Definition at line 131 of file ptexmac.h.

#define DESCENT_CODE   2

Definition at line 142 of file ptexmac.h.

#define F_BASEFONT   0x08

Definition at line 157 of file ptexmac.h.

#define F_INCLUDED   0x01

Definition at line 154 of file ptexmac.h.

#define F_SUBSETTED   0x02

Definition at line 155 of file ptexmac.h.

#define F_TRUETYPE   0x04

Definition at line 156 of file ptexmac.h.

#define fm_extend (   fm)    (fm)->extend

Definition at line 177 of file ptexmac.h.

#define fm_fontfile (   fm)    (fm)->ff_name

Definition at line 178 of file ptexmac.h.

#define fm_slant (   fm)    (fm)->slant

Definition at line 176 of file ptexmac.h.

#define FONT_KEYS_NUM   (FONTBBOX4_CODE + 1)

Definition at line 152 of file ptexmac.h.

#define FONTBBOX1_CODE   7

Definition at line 147 of file ptexmac.h.

#define FONTBBOX2_CODE   8

Definition at line 148 of file ptexmac.h.

#define FONTBBOX3_CODE   9

Definition at line 149 of file ptexmac.h.

#define FONTBBOX4_CODE   10

Definition at line 150 of file ptexmac.h.

#define FONTNAME_BUF_SIZE   128 /* a PDF name can be maximum 127 chars long */

Definition at line 74 of file ptexmac.h.

#define FONTNAME_CODE   3

Definition at line 143 of file ptexmac.h.

#define has_pslink (   fm)    ((fm)->links & LINK_PS)

Definition at line 191 of file ptexmac.h.

#define has_tfmlink (   fm)    ((fm)->links & LINK_TFM)

Definition at line 190 of file ptexmac.h.

#define is_basefont (   fm)    ((fm)->type & F_BASEFONT)

Definition at line 174 of file ptexmac.h.

#define is_cfg_comment (   c)    (c == 10 || c == '*' || c == '#' || c == ';' || c == '%')

Definition at line 128 of file ptexmac.h.

#define is_fontfile (   fm)    (fm_fontfile(fm) != NULL)

Definition at line 181 of file ptexmac.h.

#define is_included (   fm)    ((fm)->type & F_INCLUDED)

Definition at line 171 of file ptexmac.h.

#define is_reencoded (   fm)    ((fm)->encoding != NULL)

Definition at line 180 of file ptexmac.h.

#define is_subsetted (   fm)    ((fm)->type & F_SUBSETTED)

Definition at line 172 of file ptexmac.h.

#define is_t1fontfile (   fm)    (is_fontfile(fm) && !is_truetype(fm))

Definition at line 182 of file ptexmac.h.

#define is_truetype (   fm)    ((fm)->type & F_TRUETYPE)

Definition at line 173 of file ptexmac.h.

#define ITALIC_ANGLE_CODE   4

Definition at line 144 of file ptexmac.h.

#define LINK_PS   0x02

Definition at line 185 of file ptexmac.h.

#define LINK_TFM   0x01

Definition at line 184 of file ptexmac.h.

#define M_PI   3.14159265358979323846 /* pi */

Definition at line 28 of file ptexmac.h.

#define M_PI_2   1.5707963267948966192E0 /*Hex 2^ 0 * 1.921FB54442D18 */

Definition at line 29 of file ptexmac.h.

#define M_PI_4   7.8539816339744830962E-1 /*Hex 2^-1 * 1.921FB54442D18 */

Definition at line 30 of file ptexmac.h.

#define MAX_CHAR_CODE   255

Definition at line 66 of file ptexmac.h.

#define MAX_CSTRING_LEN   1024

Definition at line 70 of file ptexmac.h.

#define MAX_KEY_CODE   (FONTBBOX1_CODE + 1)

Definition at line 151 of file ptexmac.h.

#define MAX_PSTRING_LEN   1024

Definition at line 71 of file ptexmac.h.

#define maxdimen   0x3FFFFFFF

Definition at line 44 of file ptexmac.h.

#define maxinteger   0x7FFFFFFF

Definition at line 43 of file ptexmac.h.

#define MOVE_CHARS_OFFSET   160

Definition at line 67 of file ptexmac.h.

#define objinfo (   n)    objtab[n].int0

Definition at line 46 of file ptexmac.h.

#define pdfinitfont (   f)    {tmpf = f; pdfcreatefontobj();}

Definition at line 62 of file ptexmac.h.

#define pdfmovechars   getintpar(cfgmovecharscode)

Definition at line 64 of file ptexmac.h.

#define pdfoffset ( )    (pdfgone + pdfptr)

Definition at line 61 of file ptexmac.h.

#define pdfout (   c)
Value:
do {             \
    if (pdfptr > pdfbufsize)        \
        pdfflush();                 \
    pdfbuf[pdfptr++] = c;           \
} while (0)

Definition at line 55 of file ptexmac.h.

#define pdfroom (   n)
Value:
do {                                 \
    if (pdfbufsize < n)                                 \
        pdftex_fail("PDF output buffer overflowed");    \
    if (pdfptr + n > pdfbufsize)                        \
        pdfflush();                                     \
} while (0)

Definition at line 48 of file ptexmac.h.

#define PRINTF_BUF_SIZE   1024

Definition at line 69 of file ptexmac.h.

#define remove_eol (   p,
  buf 
)
Value:
do {                            \
    p = strend(buf) - 1;                                   \
    if (*p == 10)                                          \
        *p = 0;                                            \
} while (0)

Definition at line 102 of file ptexmac.h.

#define set_basefont (   fm)    ((fm)->type |= F_BASEFONT)

Definition at line 162 of file ptexmac.h.

#define set_cur_file_name (   s)
Value:
cur_file_name = s;      \
    packfilename(maketexstring(cur_file_name), getnullstr(), getnullstr())

Definition at line 194 of file ptexmac.h.

#define set_included (   fm)    ((fm)->type |= F_INCLUDED)

Definition at line 159 of file ptexmac.h.

#define set_pslink (   fm)    ((fm)->links |= LINK_PS)

Definition at line 187 of file ptexmac.h.

#define set_subsetted (   fm)    ((fm)->type |= F_SUBSETTED)

Definition at line 160 of file ptexmac.h.

#define set_tfmlink (   fm)    ((fm)->links |= LINK_TFM)

Definition at line 186 of file ptexmac.h.

#define set_truetype (   fm)    ((fm)->type |= F_TRUETYPE)

Definition at line 161 of file ptexmac.h.

#define skip (   p,
  c 
)    if (*p == c) p++

Definition at line 108 of file ptexmac.h.

#define SMALL_ARRAY_SIZE   256

Definition at line 73 of file ptexmac.h.

#define SMALL_BUF_SIZE   256

Definition at line 72 of file ptexmac.h.

#define STEMV_CODE   5

Definition at line 145 of file ptexmac.h.

#define strend (   s)    strchr(s, 0)

Definition at line 136 of file ptexmac.h.

#define unset_basefont (   fm)    ((fm)->type &= ~F_BASEFONT)

Definition at line 167 of file ptexmac.h.

#define unset_fontfile (   fm)    xfree((fm)->ff_name)

Definition at line 169 of file ptexmac.h.

#define unset_included (   fm)    ((fm)->type &= ~F_INCLUDED)

Definition at line 164 of file ptexmac.h.

#define unset_pslink (   fm)    ((fm)->links &= ~LINK_PS)

Definition at line 189 of file ptexmac.h.

#define unset_subsetted (   fm)    ((fm)->type &= ~F_SUBSETTED)

Definition at line 165 of file ptexmac.h.

#define unset_tfmlink (   fm)    ((fm)->links &= ~LINK_TFM)

Definition at line 188 of file ptexmac.h.

#define unset_truetype (   fm)    ((fm)->type &= ~F_TRUETYPE)

Definition at line 166 of file ptexmac.h.

#define xfree (   p)    do { if (p != NULL) free(p); p = NULL; } while (0)

Definition at line 135 of file ptexmac.h.

#define XHEIGHT_CODE   6

Definition at line 146 of file ptexmac.h.

#define xretalloc   XRETALLOC

Definition at line 138 of file ptexmac.h.

#define xtalloc   XTALLOC

Definition at line 137 of file ptexmac.h.