=================================================================== RCS file: /home/cvs/OpenXM_contrib/gnuplot/term/Attic/gnugraph.trm,v retrieving revision 1.1.1.2 retrieving revision 1.1.1.3 diff -u -p -r1.1.1.2 -r1.1.1.3 --- OpenXM_contrib/gnuplot/term/Attic/gnugraph.trm 2000/01/22 14:16:23 1.1.1.2 +++ OpenXM_contrib/gnuplot/term/Attic/gnugraph.trm 2003/09/15 07:09:36 1.1.1.3 @@ -1,5 +1,5 @@ /* - * $Id: gnugraph.trm,v 1.1.1.2 2000/01/22 14:16:23 maekawa Exp $ + * $Id: gnugraph.trm,v 1.1.1.3 2003/09/15 07:09:36 ohara Exp $ */ /* GNUPLOT -- gnugraph.trm */ @@ -74,10 +74,6 @@ stdout. All other terminals write to gpoutfile. #include "driver.h" -#if defined (HAVE_PLOTCOMPAT_H) -# include -#endif - #ifdef TERM_REGISTER register_term(unixplot) #endif @@ -114,8 +110,10 @@ TERM_PUBLIC void UP_reset __PROTO((void)); #ifndef TERM_PROTO_ONLY #ifdef TERM_BODY - -char up_font[MAX_ID_LEN+1] = "Courier"; /* name of font */ +#define DEFAULT_GNUGRAPHFONT "Courier" + +/* Name of font */ +char up_font[MAX_ID_LEN+1] = DEFAULT_GNUGRAPHFONT; int up_fontsize = 10; /* plot2ps produces a 8.25" x 8.25" square. */ @@ -148,28 +146,28 @@ int up_fontsize = 10; enum JUSTIFY up_justify = LEFT; -#ifdef GNU_PLOTUTILS -# define ROTATE(angle) textangle(90*angle) -#else -# define ROTATE(angle) rotate(0,0,90*angle) -#endif +#define ROTATE(angle) pl_textangle(90*angle) -#ifdef GNU_PLOTUTILS /* We don't include plot.h from plotutils because of * the name clash with ../plot.h. */ -extern int openpl __PROTO((void)); -extern int space __PROTO((int, int, int, int)); -extern int fontname __PROTO((const char *)); -extern int fontsize __PROTO((int)); -extern int erase __PROTO((void)); -extern int linemod __PROTO((const char *)); -extern int move __PROTO((int, int)); -extern int cont __PROTO((int, int)); -extern int alabel __PROTO((int, int, const char *)); -extern int textangle __PROTO((int)); -extern int closepl __PROTO((void)); -#endif +extern int pl_openpl __PROTO((void)); +extern int pl_space __PROTO((int, int, int, int)); +extern int pl_fontname __PROTO((const char *)); +extern int pl_fontsize __PROTO((int)); +extern int pl_erase __PROTO((void)); +extern int pl_linemod __PROTO((const char *)); +extern int pl_move __PROTO((int, int)); +extern int pl_cont __PROTO((int, int)); +extern int pl_alabel __PROTO((int, int, const char *)); +extern int pl_textangle __PROTO((int)); +extern int pl_closepl __PROTO((void)); +/* T.Walter added: */ +extern int pl_parampl __PROTO((const char *parameter, void *value)); +extern int pl_newpl __PROTO((const char *type, FILE *infile, FILE *outfile, FILE *errfile)); +extern int pl_selectpl __PROTO((int handle)); +extern int pl_deletepl __PROTO((int handle)); +extern double pl_ffontsize __PROTO((double size)); TERM_PUBLIC void UP_options() { @@ -198,15 +196,15 @@ TERM_PUBLIC void UP_options() TERM_PUBLIC void UP_init() { - openpl(); - space(0, 0, UP_SCREENX - 1, UP_SCREENY - 1); - fontname(up_font); + pl_openpl(); + pl_space(0, 0, UP_SCREENX - 1, UP_SCREENY - 1); + pl_fontname(up_font); /* #ifdef GNU_PLOTUTILS fontsize((int)((up_fontsize / 72.0 * 8.0) * (UP_SCREENY-1))); #else */ - fontsize(up_fontsize); + pl_fontsize(up_fontsize); /* #endif */ @@ -215,7 +213,7 @@ TERM_PUBLIC void UP_init() TERM_PUBLIC void UP_graphics() { - erase(); + pl_erase(); } @@ -234,21 +232,21 @@ int linetype; if (linetype >= 5) linetype %= 5; - linemod(lt[linetype + 2]); + pl_linemod(lt[linetype + 2]); } TERM_PUBLIC void UP_move(x, y) unsigned int x, y; { - move(x + UP_XOFF, y + UP_YOFF); + pl_move(x + UP_XOFF, y + UP_YOFF); } TERM_PUBLIC void UP_vector(x, y) unsigned int x, y; { - cont(x + UP_XOFF, y + UP_YOFF); + pl_cont(x + UP_XOFF, y + UP_YOFF); } @@ -259,13 +257,13 @@ char str[]; UP_move(x, y); /* Don't adjust x and y! It's done in UP_move. */ switch (up_justify) { case LEFT: - alabel('l', 'c', str); + pl_alabel('l', 'c', str); break; case CENTRE: - alabel('c', 'c', str); + pl_alabel('c', 'c', str); break; case RIGHT: - alabel('r', 'c', str); + pl_alabel('r', 'c', str); break; } @@ -287,7 +285,7 @@ enum JUSTIFY mode; TERM_PUBLIC void UP_reset() { - closepl(); + pl_closepl(); } #endif /* TERM_BODY */