1 /* $Id: driver.h,v 1.21 2004/08/21 20:57:54 sfeam Exp $ */
3 /* GNUPLOT - driver.h */
6 * Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley
8 * Permission to use, copy, and distribute this software and its
9 * documentation for any purpose with or without fee is hereby granted,
10 * provided that the above copyright notice appear in all copies and
11 * that both that copyright notice and this permission notice appear
12 * in supporting documentation.
14 * Permission to modify the software is granted, but not the right to
15 * distribute the complete modified source code. Modifications are to
16 * be distributed as patches to the released version. Permission to
17 * distribute binaries produced by compiling modified sources is granted,
19 * 1. distribute the corresponding source modifications from the
20 * released version in the form of a patch file along with the binaries,
21 * 2. add special version identification to distinguish your version
22 * in addition to the base release version number,
23 * 3. provide your name and address as the primary contact for the
24 * support of your modified version, and
25 * 4. retain our contact information in regard to use of the base
27 * Permission to distribute the released version of the source code along
28 * with corresponding source modifications in the form of a patch file is
29 * granted with same provisions 2 through 4 for binary distributions.
31 * This software is provided "as is" without express or implied warranty
32 * to the extent permitted by applicable law.
44 /* Dangerous; putc may already be defined as fputc */
45 /* corey@cac added the next line for efficiency */
49 /* functions provided by term.c */
51 static void do_point __PROTO((unsigned int x, unsigned int y, int number));
52 static void line_and_point __PROTO((unsigned int x, unsigned int y, int number));
53 static int null_text_angle __PROTO((int ang));
54 static int null_justify_text __PROTO((enum JUSTIFY just));
55 static int null_scale __PROTO((double x, double y));
56 /* static int do_scale __PROTO((double x, double y)); */ /* unused */
57 static void options_null __PROTO((void));
58 static void UNKNOWN_null __PROTO((void));
59 /* static int set_font_null __PROTO((const char *s)); */ /* unused */
60 #define set_font_null NULL
61 /* static void null_set_pointsize __PROTO((double size)); */ /* unused */
63 extern FILE *gpoutfile;
64 extern struct termentry *term;
66 /* for use by all drivers */
68 #define sign(x) ((x) >= 0 ? 1 : -1)
70 /* it seems that sign as macro causes some conflict with precompiled headers */
71 static int sign(int x)
73 return x >= 0 ? 1 : -1;
77 /* abs as macro is now uppercase, there are conflicts with a few C compilers
78 that have abs as macro, even though ANSI defines abs as function
79 (int abs(int)). Most calls to ABS in term/ could be changed to abs if
80 they use only int arguments and others to fabs, but for the time being,
81 all calls are done via the macro */
83 # define ABS(x) ((x) >= 0 ? (x) : -(x))
86 /* GPMIN/GPMAX are already defined in "plot.h" */
91 #endif /* TERM_DRIVER_H */