Initial release of Maemo 5 port of gnuplot
[gnuplot] / term / driver.h
1 /* $Id: driver.h,v 1.21 2004/08/21 20:57:54 sfeam Exp $ */
2
3 /* GNUPLOT - driver.h */
4
5 /*[
6  * Copyright 1986 - 1993, 1998, 2004   Thomas Williams, Colin Kelley
7  *
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.
13  *
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,
18  * provided you
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
26  *    software.
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.
30  *
31  * This software is provided "as is" without express or implied warranty
32  * to the extent permitted by applicable law.
33 ]*/
34
35
36 #ifndef TERM_DRIVER_H
37 #define TERM_DRIVER_H
38
39 #include "syscfg.h"
40
41 #include <stdio.h>
42
43 #if 0
44 /* Dangerous; putc may already be defined as fputc */
45 /* corey@cac added the next line for efficiency */
46 #define fputc putc
47 #endif
48
49 /* functions provided by term.c */
50
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 */
62
63 extern FILE *gpoutfile;
64 extern struct termentry *term;
65
66 /* for use by all drivers */
67 #ifndef NEXT
68 #define sign(x) ((x) >= 0 ? 1 : -1)
69 #else
70 /* it seems that sign as macro causes some conflict with precompiled headers */
71 static int sign(int x)
72 {
73     return x >= 0 ? 1 : -1;
74 }
75 #endif /* NEXT */
76
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 */
82 #ifndef ABS
83 # define ABS(x) ((x) >= 0 ? (x) : -(x))
84 #endif /* ABS */
85
86 /*  GPMIN/GPMAX are already defined in "plot.h"  */
87
88 #define NICE_LINE               0
89 #define POINT_TYPES             6
90
91 #endif /* TERM_DRIVER_H */