Added a basic output viewer.
[pspp-builds.git] / src / output / output.c
index 243e7cd3f2805db1bd7c9d978540d778bc79a031..9527c46f210e5994624964c4f7cdc2cc9318463f 100644 (file)
@@ -82,7 +82,6 @@ char *outp_subtitle;
 static int disabled_devices;
 
 static void destroy_driver (struct outp_driver *);
-static void configure_driver_line (struct substring);
 static void configure_driver (const struct substring, const struct substring,
                               const struct substring, const struct substring);
 
@@ -318,7 +317,7 @@ outp_read_devices (void)
              struct outp_names *n = search_names (cp, ep);
              if (n)
                {
-                 configure_driver_line (ds_ss (&line));
+                 outp_configure_driver_line (ds_ss (&line));
                  delete_name (n);
                }
            }
@@ -562,7 +561,7 @@ get_option_token (struct substring *s, const char *driver_name,
                 case '7':
                   out = c - '0';
                   while (ss_first (*s) >= '0' && ss_first (*s) <= '7')
-                    out = c * 8 + (ss_get_char (s) - '0');
+                    out = out * 8 + (ss_get_char (s) - '0');
                   break;
                 case 'x':
                 case 'X':
@@ -733,8 +732,8 @@ configure_driver (struct substring driver_name, struct substring class_name,
    DRIVERNAME:CLASSNAME:DEVICETYPE:OPTIONS
    Adds a driver to outp_driver_list pursuant to the specification
    provided.  */
-static void
-configure_driver_line (struct substring line_)
+void
+outp_configure_driver_line (struct substring line_)
 {
   struct string line = DS_EMPTY_INITIALIZER;
   struct substring tokens[4];
@@ -1096,10 +1095,10 @@ outp_drivers (struct outp_driver *d)
   return d;
 }
 
-/* Enables (if ENABLE is nonzero) or disables (if ENABLE is zero) the
+/* Enables (if ENABLE is true) or disables (if ENABLE is false) the
    device(s) given in mask DEVICE. */
 void
-outp_enable_device (int enable, int device)
+outp_enable_device (bool enable, int device)
 {
   if (enable)
     disabled_devices &= ~device;