~ubuntu-branches/ubuntu/utopic/texlive-bin/utopic

« back to all changes in this revision

Viewing changes to texk/dvipdfmx/dvipdfmx-20120420/src/dpxconf.c

  • Committer: Package Import Robot
  • Author(s): Norbert Preining
  • Date: 2012-05-07 10:47:49 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20120507104749-p00ot5sajjbkp1hp
Tags: 2011.20120507-1
* new upstream checkout: uptex 1.10
* drop patches for config file inclusion in (x)dvipdfmx, included upstream
* add man page for etex
* include pmpost patches and build it
* adapt/unfuzzify patches for current sources
* disable mtx building, we have prepmx package in Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*  $Header: /home/cvsroot/dvipdfmx/src/dpxconf.c,v 1.4 2009/05/10 16:39:53 matthias Exp $
 
2
    
 
3
    This is DVIPDFMx, an eXtended version of DVIPDFM by Mark A. Wicks.
 
4
 
 
5
    Copyright (C) 2002-2003 by Jin-Hwan Cho and Shunsaku Hirata,
 
6
    the DVIPDFMx project team <dvipdfmx@project.ktug.or.kr>
 
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
#if HAVE_CONFIG_H
 
26
#include "config.h"
 
27
#endif
 
28
 
 
29
#include "system.h"
 
30
#include "error.h"
 
31
#include "mem.h"
 
32
 
 
33
#include "dpxconf.h"
 
34
 
 
35
#ifndef  HAVE_LIBPAPER
 
36
const struct paper paperspecs[] = {
 
37
  {"letter",  612.00,  792.00},
 
38
  {"legal" ,  612.00, 1008.00},
 
39
  {"ledger", 1224.00,  792.00},
 
40
  {"tabloid", 792.00, 1224.00},
 
41
  {"a6",      297.638,  419.528},
 
42
  {"a5",      419.528,  595.276},
 
43
  {"a4",      595.276,  841.890},
 
44
  {"a3",      841.890, 1190.550},
 
45
  /*
 
46
   * The B series paper formats were first introduced in Japanese
 
47
   * patch (jpatch). The size of b6, ..., b5var paper is JIS paper
 
48
   * size for this reason. Please modify the following line or use
 
49
   * libpaper if you need ISO paper sizes.
 
50
   */
 
51
#if defined(USE_ISO_PAPERSIZE) || defined(ISO_PAPERSIZE)
 
52
  {"b6",      354.331,  498.898},
 
53
  {"b5",      498.898,  708.661},
 
54
  {"b4",      708.661, 1000.630},
 
55
  {"b3",     1000.630, 1417.320},
 
56
#else
 
57
  {"b6",      364.25,  515.91},
 
58
  {"b5",      515.91,  728.50},
 
59
  {"b4",      728.50, 1031.81},
 
60
  {"b3",     1031.81, 1457.00},
 
61
  {"b5var",   515.91,  651.97},
 
62
#endif /* USE_ISO_PAPERSIZE */
 
63
  /* Alias for JIS and ISO */
 
64
  {"jisb6",   364.25,  515.91},
 
65
  {"jisb5",   515.91,  728.50},
 
66
  {"jisb4",   728.50, 1031.81},
 
67
  {"jisb3",  1031.81, 1457.00},
 
68
  {"isob6",   354.331,  498.898},
 
69
  {"isob5",   498.898,  708.661},
 
70
  {"isob4",   708.661, 1000.630},
 
71
  {"isob3",  1000.630, 1417.320},
 
72
  /* -- */
 
73
  {NULL, 0, 0},
 
74
};
 
75
 
 
76
const struct paper *
 
77
paperinfo (const char *ppformat)
 
78
{
 
79
  const struct paper *ppinfo;
 
80
 
 
81
  if (!ppformat)
 
82
    return  NULL;
 
83
 
 
84
  ppinfo = paperfirst();
 
85
  while (ppinfo && papername(ppinfo)) {
 
86
    if (!strcmp(ppformat, ppinfo->name))
 
87
      /* ppinfo->name == papername(ppinfo), but gcc doesn't like the latter */
 
88
      break;
 
89
    ppinfo = papernext(ppinfo);
 
90
  }
 
91
  
 
92
  return ((ppinfo && papername(ppinfo)) ? ppinfo : NULL);
 
93
}
 
94
 
 
95
#endif /* HAVE_LIBPAPER */
 
96
 
 
97
#if 0
 
98
void
 
99
dumppaperinfo (void)
 
100
{
 
101
  const struct paper *ppinfo;
 
102
  ppinfo = paperfirst();
 
103
  while (ppinfo && papername(ppinfo)) {
 
104
    double  wd, ht;
 
105
    wd = paperpswidth (ppinfo);
 
106
    ht = paperpsheight(ppinfo);
 
107
    fprintf(stdout, "%s: %.2f %.2f (%.2fmm %.2fmm)\n",
 
108
            papername(ppinfo), wd, ht, 25.4 * wd / 72.0, 25.4 * ht / 72.0); 
 
109
    ppinfo = papernext(ppinfo);
 
110
  }  
 
111
}
 
112
#endif