int main(int argc ,
         char *argv[] );


int read_options(char *argv[] ,
                 TRANSFORM *t ,
                 STYLE *s ,
                 POLYGON **label_list );


char *malloc_fail(int s );


char *calloc_fail(int s ,
                  int n );


POINT_LIST *new_point(POINT_LIST **spare_points ,
                      real x ,
                      real y ,
                      real z );


char *strip_quotes(char *str );


POLYGON *list_to_poly(POINT_LIST *points ,
                      char *text ,
                      POINT_LIST **last_point ,
                      int is_poly );


int has_content(char *p );


int add_poly(POLYGON **poly_list ,
             POINT_LIST *point_list ,
             POINT_LIST **spare_points ,
             char *text ,
             int is_poly );


char *find_binary_format_text(char *str ,
                              int len ,
                              FILE *in ,
                              int record );


int read_polys(STYLE *s ,
               POLYGON **poly_list ,
               POLYGON **label_list ,
               FILE *in );


int compare_poly(POLYGON **poly1 ,
                 POLYGON **poly2 );


int show_poly_vec_world(int n_polys ,
                        POLYGON **poly_vec );


int show_poly_list_world(POLYGON *poly_list );


int show_poly_world(POLYGON *poly );


int show_poly_vec_view(int n_polys ,
                       POLYGON **poly_vec );


int show_poly_list_view(POLYGON *poly_list );


int show_poly_view(POLYGON *poly );


int show_single_point(SINGLE_POINT *p );


POLYGON **list_to_vec(POLYGON *poly_list ,
                      int n_polys );


int show_min_max(MIN_MAX *m );


int find_min_max_world(POLYGON *poly_list ,
                       MIN_MAX *m );


int add_bounds_label(MIN_MAX *m ,
                     POLYGON **label_list );


int find_min_max_view(POLYGON *poly_list ,
                      MIN_MAX *m );


int add_axis(POLYGON **poly_list ,
             MIN_MAX *m ,
             STYLE *s );


int calc_view_scale(TRANSFORM *t ,
                    MIN_MAX *m ,
                    STYLE *s);



int transform_poly_list(POLYGON *p ,
                        TRANSFORM *t );


int transform_poly(POLYGON *p ,
                   TRANSFORM *t );


int transform_point(POINT *p ,
                    TRANSFORM *t );


int output_prologue(TRANSFORM *t ,
                    STYLE *s );


int output_epilogue(STYLE *s );


int output_poly_vec(int n_polys ,
                    POLYGON **poly_vec ,
                    STYLE *s );


int output_poly_list(POLYGON *poly ,
                     STYLE *s );


int output_poly(POLYGON *poly ,
                STYLE *s );



int output_label_list(POLYGON *label_list ,
                      TRANSFORM *t ,
                      STYLE *s );


int print_ps_string(char *str );


/*
 * output_orient - a little-bitty labelled axis in the bottom-right-hand corner
 */
int output_orient(TRANSFORM *t ,
                  STYLE *s );


int output_back_axis(POLYGON *poly_list ,
                     STYLE *s );



int output_front_axis(POLYGON *poly_list ,
                      STYLE *s );



/*
 * return 1 if prefix is an unambigous prefix of the option 'word'
 */

int prefix(char *prefix ,
           char *word );


int print_options(void);


int error(void *s,
          void *p);


int bad_style(STYLE *s );


/* From Xsupport.c */

	       
int xopenpl(STYLE *s );


int check_Npoints(void);


int xstartpoly(void);


int xstoppoly(int  hide   ,
               float brightness );


int xcontpoly(float x1 ,
               float y1 );


int xstartline(void);


int xstopline(void);


int xcontline(float x1 ,
               float y1 );


int xlabel(char *s   ,
            float xi ,
            float yi );


int xclosepl(void);


int event_handler(int still_drawing );

