OSDN Git Service

167257bf47787b840339ad23d89b120e073fda41
[putex/putex.git] / src / dvipdfmx-pu / src / dpxconf.h
1 /*  
2     
3     This is DVIPDFMx, an eXtended version of DVIPDFM by Mark A. Wicks.
4
5     Copyright (C) 2002-2012 by Jin-Hwan Cho and Shunsaku Hirata,
6     the dvipdfmx project team.
7     
8     Copyright (C) 1998, 1999 by Mark A. Wicks <mwicks@kettering.edu>
9
10     This program is free software; you can redistribute it and/or modify
11     it under the terms of the GNU General Public License as published by
12     the Free Software Foundation; either version 2 of the License, or
13     (at your option) any later version.
14     
15     This program is distributed in the hope that it will be useful,
16     but WITHOUT ANY WARRANTY; without even the implied warranty of
17     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18     GNU General Public License for more details.
19     
20     You should have received a copy of the GNU General Public License
21     along with this program; if not, write to the Free Software
22     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
23 */
24
25 #ifndef _DPXCONF_H_
26 #define _DPXCONF_H_
27
28 #ifdef  HAVE_LIBPAPER
29 #include <paper.h>
30 #else
31 struct paper {
32   const char* name;
33   double pswidth, psheight;
34 };
35
36 #ifndef DEFAULT_PAPER_NAME
37 #define DEFAULT_PAPER_NAME "a4"
38 #endif
39
40 extern const struct paper  paperspecs[];
41 extern const struct paper *paperinfo (const char *ppformat);
42
43 #define paperinit()
44 #define paperdone()
45 #define paperpswidth(p)    (((p) && (p)->name) ? p->pswidth  : 0.0)
46 #define paperpsheight(p)   (((p) && (p)->name) ? p->psheight : 0.0)
47 #define papername(p)       (((p) && (p)->name) ? p->name : NULL)
48 #define paperfirst()       &(paperspecs[0])
49 #define papernext(p)       ((((p)+1) && ((p)+1)->name) ? (p+1) : NULL)
50
51 #define defaultpapername() DEFAULT_PAPER_NAME
52 #define systempapername()  DEFAULT_PAPER_NAME
53
54 #define defaultpapersizefile() NULL
55 #define systempapersizefile()  NULL
56 #endif /* HAVE_LIBPAPER */
57
58 #if 0
59 extern void dumppaperinfo (void);
60 #endif
61
62 #endif /* _DPXCONF_H_ */