Reworked settings so as to use one large struct instead of lots of static
[pspp-builds.git] / src / output / output.c
index 842e1c15c63bc383219c4a5de027883b2c086aff..ab91ed6f5f0929d4d8d3d1ae455aa14886ea835b 100644 (file)
@@ -25,7 +25,6 @@
 
 #include <data/file-name.h>
 #include <data/settings.h>
-#include <libpspp/alloc.h>
 #include <libpspp/misc.h>
 #include <libpspp/str.h>
 #include <output/htmlP.h>
@@ -33,6 +32,7 @@
 
 #include "error.h"
 #include "intprops.h"
+#include "xalloc.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -210,12 +210,12 @@ find_defn_value (const char *key)
       return ds_cstr (&d->value);
   if (!strcmp (key, "viewwidth"))
     {
-      sprintf (buf, "%d", get_viewwidth ());
+      sprintf (buf, "%d", settings_get_viewwidth ());
       return buf;
     }
   else if (!strcmp (key, "viewlength"))
     {
-      sprintf (buf, "%d", get_viewlength ());
+      sprintf (buf, "%d", settings_get_viewlength ());
       return buf;
     }
   else
@@ -462,7 +462,7 @@ outp_done (void)
 void
 outp_list_classes (void)
 {
-  int width = get_viewwidth();
+  int width = settings_get_viewwidth ();
   struct outp_driver_class_list *c;
 
   printf (_("Driver classes:\n\t"));
@@ -472,7 +472,7 @@ outp_list_classes (void)
       if ((int) strlen (c->class->name) + 1 > width)
        {
          printf ("\n\t");
-         width = get_viewwidth() - 8;
+         width = settings_get_viewwidth () - 8;
        }
       else
        putc (' ', stdout);