Rewrite expression code.
[pspp-builds.git] / src / output.h
index 00e5b23db6ac9bc8dedc118b2b1084999278c4b0..d79554ffb7237f7b9ced096f62855e2a82b32509 100644 (file)
@@ -21,6 +21,9 @@
 #define output_h 1
 
 #include "str.h"
+#include "config.h"
+
+#include "chart.h"
 
 /* A rectangle. */
 struct rect
@@ -29,28 +32,6 @@ struct rect
     int x2, y2;                        /* Lower right, not part of the rectangle. */
   };
 
-#if __GNUC__ > 1 && defined(__OPTIMIZE__)
-extern inline int width (rect r) __attribute__ ((const));
-extern inline int height (rect r) __attribute__ ((const));
-
-extern inline int
-width (rect r)
-{
-  return r.x2 - r.x1 + 1;
-}
-
-extern inline int 
-height (rect r)
-{
-  return r.y2 - r.y1 + 1;
-}
-#else /* !__GNUC__ */
-#define width(R)                               \
-       ((R).x2 - (R).x1 + 1)
-#define height(R)                              \
-       ((R).y2 - (R).y1 + 1)
-#endif /* !__GNUC__ */
-
 /* Color descriptor. */
 struct color
   {
@@ -123,7 +104,7 @@ struct outp_text
   {
     /* Public. */
     int options;               /* What is specified. */
-    struct len_string s;       /* String. */
+    struct fixed_string s;     /* String. */
     int h, v;                  /* Horizontal, vertical size. */
     int x, y;                  /* Position. */
 
@@ -131,7 +112,7 @@ struct outp_text
     int w, l;                  /* Width, length. */
   };
 
-struct som_table;
+struct som_entity;
 struct outp_driver;
 
 /* Defines a class of output driver. */
@@ -157,8 +138,8 @@ struct outp_class
     int (*open_page) (struct outp_driver *);
     int (*close_page) (struct outp_driver *);
 
-    /* special != 0: Used to submit tables for output. */
-    void (*submit) (struct outp_driver *, struct som_table *);
+    /* special != 0: Used to submit entities for output. */
+    void (*submit) (struct outp_driver *, struct som_entity *);
     
     /* special != 0: Methods below need not be defined. */
     
@@ -188,6 +169,10 @@ struct outp_class
     int (*text_get_size) (struct outp_driver *, int *em_width);
     void (*text_metrics) (struct outp_driver *, struct outp_text *);
     void (*text_draw) (struct outp_driver *, struct outp_text *);
+
+    void (*initialise_chart)(struct outp_class *, struct chart *);
+    void (*finialise_chart)(struct outp_class *, struct chart *);
+
   };
 
 /* Device types. */
@@ -250,9 +235,6 @@ struct outp_driver_class_list
     struct outp_driver_class_list *next;
   };
 
-/* List of known output driver classes. */
-extern struct outp_driver_class_list *outp_class_list;
-
 /* List of configured output drivers. */
 extern struct outp_driver *outp_driver_list;