home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / s / stex2-18.zip / SeeTeX / Xtex / dvi-simple.h < prev    next >
C/C++ Source or Header  |  1991-02-19  |  3KB  |  112 lines

  1. /*
  2.  * Copyright 1989 Dirk Grunwald
  3.  * 
  4.  * Permission to use, copy, modify, distribute, and sell this software
  5.  * and its documentation for any purpose is hereby granted without fee,
  6.  * provided that the above copyright notice appear in all copies and that
  7.  * both that copyright notice and this permission notice appear in
  8.  * supporting documentation, and that the name of Dirk Grunwald or M.I.T.
  9.  * not be used in advertising or publicity pertaining to distribution of
  10.  * the software without specific, written prior permission.  Dirk
  11.  * Grunwald and M.I.T. makes no representations about the suitability of
  12.  * this software for any purpose.  It is provided "as is" without express
  13.  * or implied warranty.
  14.  * 
  15.  * DIRK GRUNWALD AND M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
  16.  * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
  17.  * FITNESS, IN NO EVENT SHALL M.I.T.  BE LIABLE FOR ANY SPECIAL, INDIRECT
  18.  * OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
  19.  * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  20.  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
  21.  * OR PERFORMANCE OF THIS SOFTWARE.
  22.  * 
  23.  * Author:
  24.  *     Dr. Dirk Grunwald
  25.  *     Dept. of Computer Science
  26.  *     Campus Box 430
  27.  *     Univ. of Colorado, Boulder
  28.  *     Boulder, CO 80309
  29.  * 
  30.  *     grunwald@colorado.edu
  31.  *     
  32.  */ 
  33.  
  34. #include "libtex/types.h"
  35. #include "libtex/dviclass.h"
  36. #include "libtex/dvicodes.h"
  37. #include "libtex/tfm.h"
  38. #include "libtex/fio.h"
  39. #include "libtex/postamble.h"
  40.  
  41. /*****************************************************************************
  42.  *    Things we read from the DVI file
  43.  */
  44.  
  45. extern struct PostAmbleInfo ThePostAmbleInfo;
  46.  
  47. typedef struct {
  48.     struct PostAmbleFont paf;
  49.     int *widths;
  50.     i32 pspace;        /* boundary between `small & `large spaces
  51.                    (for positive horizontal motion) */
  52.     i32 nspace;        /* -4 * pspace, for negative motion */
  53.     i32 vspace;        /* 5 * pspace, for vertical motion */
  54. } DviFontInfo;
  55.  
  56. #define MAX_POSTAMBLE_FONTS 256
  57. extern int RegisteredFonts;
  58. extern DviFontInfo TheFontInfo[ MAX_POSTAMBLE_FONTS ];
  59.  
  60. /*****************************************************************************
  61. /*
  62.  *    Defaults and configuration for dvi-simple
  63.  */
  64.  
  65. #define DEFAULT_DPI    300
  66. #define DEFAULT_HHMARGIN    DEFAULT_DPI
  67. #define DEFAULT_VVMARGIN    DEFAULT_DPI
  68. #define DEFAULT_MAX_DRIFT    3
  69.  
  70. #define DEFAULT_BLACKNESS 3
  71.  
  72. #define DVI_COUNT    10    /* count0 .. count9 */
  73.  
  74. #define POINTS_PER_INCH (72.27)
  75. extern double dvi_per_inch;
  76. #define SP_PER_INCH ( dvi_per_inch )
  77. #define INCH_TO_SP(_inches_) ( (_inches_) * (SP_PER_INCH) )
  78.  
  79. typedef enum { sPt, sPc, sIn, sBp, sCm, sMm, sDd, sCc, sSp } ScaleUnits;
  80. extern char *ScaleUnitsString[];
  81. extern double ScaleUnitsDen[];
  82. extern double ScaleUnitsNum[];
  83. extern double ScaleUnitsInSp[10];
  84.  
  85. extern long    *DviCount[DVI_COUNT];
  86. extern long    *DviPageOffsets;
  87.  
  88. extern int    DviHHMargin;
  89. extern int    DviVVMargin;
  90. extern int    DviDpi;
  91. extern int    DviTallestPage;
  92. extern int    DviWidestPage;
  93. extern int    DviTotalPages;
  94. extern int    DviCurrentPage;
  95. extern int    DviMaxDrift;
  96. extern char     *DviPrintEngine;
  97. extern int      DviBlackness;
  98. extern int    DviUserMag;
  99.  
  100. extern FILE    *DviFile;
  101. extern char    *DVIFileName;
  102.  
  103. #ifdef __STDC__
  104.   extern int    DviInit( char *, int );
  105.   extern void    DviFini();
  106.   extern char * DviFetchPage( int );
  107. #else
  108.   extern int    DviInit();
  109.   extern void    DviFini();
  110.   extern char * DviFetchPage();
  111. #endif
  112.