home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / XAP / XFIG / TRANSFIG.2 / TRANSFIG / transfig / fig2dev / fig2dev.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-06  |  2.0 KB  |  72 lines

  1. /*
  2.  * TransFig: Facility for Translating Fig code
  3.  * Copyright (c) 1985 Supoj Sutantavibul
  4.  * Copyright (c) 1991 Micah Beck
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation. The authors make no representations about the suitability 
  11.  * of this software for any purpose.  It is provided "as is" without express 
  12.  * or implied warranty.
  13.  *
  14.  * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  15.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  16.  * EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  17.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  18.  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  19.  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  20.  * PERFORMANCE OF THIS SOFTWARE.
  21.  *
  22.  */
  23.  
  24. #ifdef SYSV
  25. #include <string.h>
  26. #else
  27. #include <strings.h>
  28. #ifndef strchr
  29. extern char *strchr();
  30. #endif
  31. #ifndef NeXT
  32. #define    strchr    index
  33. #define    strrchr    rindex
  34. #endif
  35. #endif
  36.  
  37. #define round(x)    ((int) ((x) + ((x >= 0)? 0.5: -0.5)))
  38.  
  39. /* 
  40.  * Device driver interface structure
  41.  */
  42. struct driver {
  43.      void (*option)();    /* interpret driver-specific options */
  44.       void (*start)();    /* output file header */
  45.     void (*arc)();        /* object generators */
  46.     void (*ellipse)();
  47.     void (*line)();
  48.     void (*spline)();
  49.     void (*text)();
  50.     void (*end)();        /* output file trailer */
  51.       int text_include;    /* include text length in bounding box */
  52. #define INCLUDE_TEXT 1
  53. #define EXCLUDE_TEXT 0
  54. };
  55.  
  56. extern char Err_badarg[];
  57. extern char Err_incomp[];
  58. extern char Err_mem[];
  59.  
  60. extern char *PSfontnames[];
  61.  
  62. extern int  PSisomap[];
  63.  
  64. extern char    *prog, *from;
  65. extern int    font_size;
  66. extern double    mag;
  67. extern FILE    *tfp;
  68.  
  69. extern int llx, lly, urx, ury, coord_system;
  70.  
  71. extern void gendev_null();
  72.