treewide: Replace <name>_cnt by n_<name>s and <name>_cap by allocated_<name>.
[pspp] / src / language / expressions / private.h
index 5deb8b369eb2cafbf97c8f3efcc3d1ea1a182a0a..3cf7a2c73213f581019f43beaa6ebe17b3bfe0a1 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 2011 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <assert.h>
 #include <stddef.h>
-#include <data/format.h>
-#include <libpspp/str.h>
 
-#include "public.h"
+#include "data/format.h"
 #include "operations.h"
+#include "public.h"
+#include "libpspp/str.h"
 
 enum operation_flags
   {
@@ -72,7 +72,7 @@ struct operation
     const char *prototype;
     enum operation_flags flags;
     atom_type returns;
-    int arg_cnt;
+    int n_args;
     atom_type args[EXPR_ARG_MAX];
     int array_min_elems;
     int array_granularity;
@@ -123,9 +123,9 @@ struct format_node
 struct composite_node
   {
     operation_type type;   /* One of OP_*. */
-    size_t arg_cnt;             /* Number of arguments. */
-    union any_node **args;     /* Arguments. */
-    size_t min_valid;           /* Min valid array args to get valid result. */
+    size_t n_args;         /* Number of arguments. */
+    union any_node **args; /* Arguments. */
+    size_t min_valid;      /* Min valid array args to get valid result. */
   };
 
 /* Any node. */
@@ -161,7 +161,7 @@ struct expression
 
     union operation_data *ops;  /* Expression data. */
     operation_type *op_types;   /* ops[] element types (for debugging). */
-    size_t op_cnt, op_cap;      /* Number of ops, amount of allocated space. */
+    size_t n_ops, allocated_ops; /* Number of ops, amount of allocated space. */
 
     double *number_stack;       /* Evaluation stack: numerics, Booleans. */
     struct substring *string_stack; /* Evaluation stack: strings. */
@@ -187,10 +187,7 @@ union any_node *expr_allocate_number (struct expression *e, double);
 union any_node *expr_allocate_boolean (struct expression *e, double);
 union any_node *expr_allocate_integer (struct expression *e, int);
 union any_node *expr_allocate_pos_int (struct expression *e, int);
-union any_node *expr_allocate_string_buffer (struct expression *e,
-                                             const char *string, size_t length);
-union any_node *expr_allocate_string (struct expression *e,
-                                      struct substring);
+union any_node *expr_allocate_string (struct expression *e, struct substring);
 union any_node *expr_allocate_variable (struct expression *e,
                                         const struct variable *);
 union any_node *expr_allocate_format (struct expression *e,