home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume4 / quickplot / part2 / global.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  2.9 KB  |  97 lines

  1. /* :set tabstops=4                                                    */
  2. static char *RCSid = "$Header: global.c,v 1.1 86/04/20 16:16:41 sysad Exp $";
  3.  
  4. /*
  5.  * $Log:    global.c,v $
  6.  * Revision 1.1  86/04/20  16:16:41  sysad
  7.  * Initial distribution version
  8.  * 
  9.  * 
  10.  */
  11.  
  12.  
  13. /* It is the intent of the author that this software may be distributed
  14.  * and used freely, without restriction.  If you make improvements or
  15.  * enhancements, I would appreciate a copy.
  16.  *
  17.  * Duane H. Hesser    Teltone Corporation
  18.  * ....uw-beaver!tikal!sysad
  19.  * ....uw-beaver!tikal!dhh
  20.  */
  21.  
  22. #include "defs.h"
  23. #include "io.h"
  24.  
  25. /* This is the output array; it should be big enough for the largest
  26.  * "raster" which will be used (currently the full size of an 11 x 13.2
  27.  * inch line printer page).
  28.  */
  29. char Row[YDOTS][XARRAYSIZE];
  30. #ifndef QUICKPLOT
  31. /* These are the bits which are or'ed into the output array to acivate
  32.  * the appropriate hammers.
  33.  */
  34. char BIT[] = {
  35.     '\001','\002','\004','\010','\020','\040','\100','\0'
  36. };
  37. #else
  38. char plotchar = PLOTCHAR;
  39. int autowrap = 0;            /* does the terminal auto-wrap at eol?    */
  40. #endif
  41.  
  42. /* Initially, we map everything into an 8 inch square for lplot,
  43.  * or into a 132 wide x 66 line "screen" for quickplot.  The 8 inch
  44.  * square for lplot is consistent with scaling for things like
  45.  * "vplot" which plot onto an 8 1/2 x 11 inch page.
  46.  * The values initialized may be changed (within array size limits
  47.  * by program arguments, and will take effect at the first space()
  48.  * call.
  49.  */
  50. double spacex = SPACEX;
  51. double spacey = SPACEY;
  52.  
  53. /* These are the program units which will map into spacex & spacey
  54.  * after the space() call.
  55.  */
  56. double xspace,yspace;
  57.  
  58. /* min and max points mapped into the plotting space by space()        */
  59. double highx_space,highy_space,lowx_space,lowy_space;
  60.  
  61. /* maximum dots each direction; truncate larger values.                */
  62. int maxrow = YDOTS;
  63. int maxcol = XDOTS;
  64. /* maximum x and y values; generally one less than maxrow, maxcol    */
  65. int maxx = MAXX;
  66. int maxy = MAXY;
  67.  
  68. /* current coordinates in program units and dots                    */
  69. short curx,cury,curxdot,curydot;
  70.  
  71. double Scalfac = 1.0;            /* settable overall scale factor    */
  72. double xfac = 1.0;                /* scale factor for x                */
  73. double yfac = 1.0;                /* scale factor for y                */
  74. double argxfac = 1.0;            /* argument scale factor for x        */
  75. double argyfac = 1.0;            /* argument scale factor for y        */
  76. double mapxfac = 1.0;            /* final mapping factor for x         */
  77. double mapyfac = 1.0;            /* final mapping factor for y        */
  78. double Xmargin = 0.0;            /* settable left margin in pixels    */
  79. double Ymargin = 0.0;            /* settable bottom margin in pixels    */
  80.  
  81. int Plotdata = 0;                /* set when raster is ready to send    */
  82. int Eflag = 0;                    /* force erase before each plot        */
  83. int Nflag = 0;                    /* suppress erasing while in effect    */
  84. #ifdef QUICKPLOT
  85. int linemask = PLOTCHAR;        /* solid, dotted, dashed, etc.        */
  86. #else
  87. int linemask = SOLID;            /* solid, dotted, dashed, etc.        */
  88. #endif
  89.  
  90. char *Name;
  91. int debug = 0;
  92.  
  93. #ifndef QUICKPLOT
  94. int Npages = 0;
  95. #endif
  96. int Rotate = 0;
  97.