/* this order means we can use x-(just*strlen(text)*t->h_char)/2 if
* term cannot justify
*/
enumJUSTIFY {
LEFT, CENTRE, RIGHT
};
/* we use a similar trick for vertical justification of multi-line labels */
#defineJUST_TOP 0
#defineJUST_CENTRE 1
#defineJUST_BOT 2
#if !(defined(ATARI)&&defined(__GNUC__)&&defined(_MATH_H)) && !(defined(MTOS)&&defined(__GNUC__)&&defined(_MATH_H)) /* FF's math.h has the type already */
structcmplx {
doublereal, imag;
};
#endif
structvalue {
enumDATA_TYPEStype;
union {
intint_val;
structcmplxcmplx_val;
} v;
};
structlexical_unit { /* produced by scanner */
TBOOLEANis_token; /* true if token, false if a value */
structvaluel_val;
intstart_index; /* index of first char in token */
intlength; /* length of token in chars */
};
structudft_entry { /* user-defined function table entry */
structudft_entry*next_udf; /* pointer to next udf in linked list */
char*udf_name; /* name of this function entry */
structat_type*at; /* pointer to action table to execute */
char*definition; /* definition of function as typed */
structvaluedummy_values[MAX_NUM_VAR]; /* current value of dummy variables */
};
structudvt_entry { /* user-defined value table entry */
structudvt_entry*next_udv; /* pointer to next value in linked list */
char*udv_name; /* name of this value entry */
TBOOLEANudv_undef; /* true if not defined yet */
structvalueudv_value; /* value it has */
};
unionargument { /* p-code argument */
intj_arg; /* offset for jump */
structvaluev_arg; /* constant value */
structudvt_entry*udv_arg; /* pointer to dummy variable */
structudft_entry*udf_arg; /* pointer to udf to execute */
};
/* This type definition has to come after union argument has been declared. */
int (*waitforinput) __PROTO((void)); /* used for mouse input */
void (*put_tmptext) __PROTO((int, constchar [])); /* draws temporary text; int determines where: 0=statusline, 1,2: at corners of zoom box, with \r separating text above and below the point */
void (*set_ruler) __PROTO((int, int)); /* set ruler location; x<0 switches ruler off */
void (*set_cursor) __PROTO((int, int, int)); /* set cursor style and corner of rubber band */
void (*set_clipboard) __PROTO((constchar[])); /* write text into cut&paste buffer (clipboard) */
#endif
#ifdefPM3D
int (*make_palette) __PROTO((t_sm_palette*palette));
/* 1. if palette==NULL, then return nice/suitable
maximal number of colours supported by this terminal.
Returns 0 if it can make colours without palette (like
postscript).
2. if palette!=NULL, then allocate its own palette
return value is undefined
3. available: some negative values of max_colors for whatever
can be useful
*/
void (*previous_palette) __PROTO((void));
/* release the palette that the above routine allocated and get
back the palette that was active before.
Some terminals, like displays, may draw parts of the figure
using their own palette. Those terminals that possess only
one palette for the whole plot don't need this routine.
*/
void (*set_color) __PROTO((doublegray));
/* gray is from [0;1], terminal uses its palette or another way
to transform in into gray or r,g,b
This routine (for each terminal separately) remembers or not
this colour so that it can apply it for the subsequent drawings