1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
/* $Id: null.c,v 1.3 2007/05/08 09:09:37 rice Exp $
PLplot Null device driver.
*/
#include "plDevs.h"
#ifdef PLD_null
#include "plplotP.h"
#include "drivers.h"
/* Device info */
const char* plD_DEVICE_INFO_null = "null:Null device:-1:null:42:null";
/* pmr: defined in drivers.h */
/*void plD_dispatch_init_null ( PLDispatchTable *pdt );*/
void plD_init_null (PLStream *);
void plD_line_null (PLStream *, short, short, short, short);
void plD_polyline_null (PLStream *, short *, short *, PLINT);
void plD_eop_null (PLStream *);
void plD_bop_null (PLStream *);
void plD_tidy_null (PLStream *);
void plD_state_null (PLStream *, PLINT);
void plD_esc_null (PLStream *, PLINT, void *);
void plD_dispatch_init_null( PLDispatchTable *pdt )
{
#ifndef ENABLE_DYNDRIVERS
pdt->pl_MenuStr = "Null device";
pdt->pl_DevName = "null";
#endif
pdt->pl_type = plDevType_Null;
pdt->pl_seq = 42;
pdt->pl_init = (plD_init_fp) plD_init_null;
pdt->pl_line = (plD_line_fp) plD_line_null;
pdt->pl_polyline = (plD_polyline_fp) plD_polyline_null;
pdt->pl_eop = (plD_eop_fp) plD_eop_null;
pdt->pl_bop = (plD_bop_fp) plD_bop_null;
pdt->pl_tidy = (plD_tidy_fp) plD_tidy_null;
pdt->pl_state = (plD_state_fp) plD_state_null;
pdt->pl_esc = (plD_esc_fp) plD_esc_null;
}
/*--------------------------------------------------------------------------*\
* plD_init_null()
*
* Initialize device (terminal).
\*--------------------------------------------------------------------------*/
void
plD_init_null(PLStream *pls)
{
int xmin = 0;
int xmax = PIXELS_X - 1;
int ymin = 0;
int ymax = PIXELS_Y - 1;
PLFLT pxlx = (double) PIXELS_X / (double) LPAGE_X;
PLFLT pxly = (double) PIXELS_Y / (double) LPAGE_Y;
(void) pls; /* pmr: make it used */
/* Set up device parameters */
plP_setpxl(pxlx, pxly);
plP_setphy(xmin, xmax, ymin, ymax);
}
/*--------------------------------------------------------------------------*\
* The remaining driver functions are all null.
\*--------------------------------------------------------------------------*/
void
plD_line_null(PLStream *pls, short x1a, short y1a, short x2a, short y2a)
{
(void) pls; /* pmr: make it used */
(void) x1a;
(void) y1a;
(void) x2a;
(void) y2a;
}
void
plD_polyline_null(PLStream *pls, short *xa, short *ya, PLINT npts)
{
(void) pls; /* pmr: make it used */
(void) xa;
(void) ya;
(void) npts;
}
void
plD_eop_null(PLStream *pls)
{
(void) pls; /* pmr: make it used */
}
void
plD_bop_null(PLStream *pls)
{
(void) pls; /* pmr: make it used */
}
void
plD_tidy_null(PLStream *pls)
{
(void) pls; /* pmr: make it used */
}
void
plD_state_null(PLStream *pls, PLINT op)
{
(void) pls; /* pmr: make it used */
(void) op;
}
void
plD_esc_null(PLStream *pls, PLINT op, void *ptr)
{
(void) pls; /* pmr: make it used */
(void) op;
(void) ptr;
}
#else
int
pldummy_null(void)
{
return 0;
}
#endif /* PLD_nulldev */
|