output: Change command names from uppercase to title case.
[pspp] / src / output / spv / spv-light-decoder.c
index 8426b251dc231378f0ca3db32fa6e560279f27c7..520cb2b0a066698fe6263acb2f0894a84888306b 100644 (file)
@@ -302,6 +302,7 @@ decode_spvlb_value (const struct pivot_table *table,
       out->type = PIVOT_VALUE_NUMERIC;
       out->numeric.x = in->type_01.x;
       error = spv_decode_fmt_spec (in->type_01.format, &out->numeric.format);
+      out->numeric.honor_small = (in->type_01.format >> 16) == 40;
       if (error)
         return error;
       break;
@@ -807,19 +808,21 @@ decode_current_layer (uint64_t current_layer, struct pivot_table *table)
   table->current_layer = xnmalloc (axis->n_dimensions,
                                    sizeof *table->current_layer);
 
+  uint64_t remainder = current_layer;
   for (size_t i = 0; i < axis->n_dimensions; i++)
     {
       const struct pivot_dimension *d = axis->dimensions[i];
       if (d->n_leaves)
         {
-          table->current_layer[i] = current_layer % d->n_leaves;
-          current_layer /= d->n_leaves;
+          table->current_layer[i] = remainder % d->n_leaves;
+          remainder /= d->n_leaves;
         }
       else
         table->current_layer[i] = 0;
     }
-  if (current_layer > 0)
+  if (remainder > 0)
     return xasprintf ("out of range layer data index %"PRIu64, current_layer);
+
   return NULL;
 }