| 1 |
/* |
| 2 |
Copyright 1996-2014 Han The Thanh, <[email protected]> |
| 3 |
|
| 4 |
This file is part of pdfTeX. |
| 5 |
|
| 6 |
pdfTeX is free software; you can redistribute it and/or modify |
| 7 |
it under the terms of the GNU General Public License as published by |
| 8 |
the Free Software Foundation; either version 2 of the License, or |
| 9 |
(at your option) any later version. |
| 10 |
|
| 11 |
pdfTeX is distributed in the hope that it will be useful, |
| 12 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
GNU General Public License for more details. |
| 15 |
|
| 16 |
You should have received a copy of the GNU General Public License along |
| 17 |
with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 |
*/ |
| 19 |
|
| 20 |
/* Additions to texmfmp.h for pdfTeX */ |
| 21 |
|
| 22 |
/* mark a char in font */ |
| 23 |
#define pdfmarkchar(f, c) pdfcharused[f][c/8] |= (1<<(c%8)) |
| 24 |
|
| 25 |
/* test whether a char in font is marked */ |
| 26 |
#define pdfcharmarked(f, c) (boolean)(pdfcharused[f][c/8] & (1<<(c%8))) |
| 27 |
|
| 28 |
/* writepdf() always writes by fwrite() */ |
| 29 |
#define writepdf(a, b) \ |
| 30 |
(void) fwrite ((char *) &pdfbuf[a], sizeof (pdfbuf[a]), \ |
| 31 |
(int) ((b) - (a) + 1), pdffile) |
| 32 |
|
| 33 |
#define getlpcode(f, c) \ |
| 34 |
(pdffontlpbase[f] == 0 ? 0 : pdfmem[pdffontlpbase[f] + c]) |
| 35 |
|
| 36 |
#define getrpcode(f, c) \ |
| 37 |
(pdffontrpbase[f] == 0 ? 0 : pdfmem[pdffontrpbase[f] + c]) |
| 38 |
|
| 39 |
#define getefcode(f, c) \ |
| 40 |
(pdffontefbase[f] == 0 ? 1000 : pdfmem[pdffontefbase[f] + c]) |
| 41 |
|
| 42 |
#define getknbscode(f, c) \ |
| 43 |
(pdffontknbsbase[f] == 0 ? 0 : pdfmem[pdffontknbsbase[f] + c]) |
| 44 |
|
| 45 |
#define getstbscode(f, c) \ |
| 46 |
(pdffontstbsbase[f] == 0 ? 0 : pdfmem[pdffontstbsbase[f] + c]) |
| 47 |
|
| 48 |
#define getshbscode(f, c) \ |
| 49 |
(pdffontshbsbase[f] == 0 ? 0 : pdfmem[pdffontshbsbase[f] + c]) |
| 50 |
|
| 51 |
#define getknbccode(f, c) \ |
| 52 |
(pdffontknbcbase[f] == 0 ? 0 : pdfmem[pdffontknbcbase[f] + c]) |
| 53 |
|
| 54 |
#define getknaccode(f, c) \ |
| 55 |
(pdffontknacbase[f] == 0 ? 0 : pdfmem[pdffontknacbase[f] + c]) |
| 56 |
|
| 57 |
#define texbopenin(f) \ |
| 58 |
open_input (&(f), kpse_tex_format, FOPEN_RBIN_MODE) |
| 59 |
#define vfbopenin(f) \ |
| 60 |
open_input (&(f), kpse_vf_format, FOPEN_RBIN_MODE) |
| 61 |
|
| 62 |
#define pdfassert assert |
| 63 |
|
| 64 |
#include <pdftexdir/ptexlib.h> |