Reform string library.
[pspp-builds.git] / src / language / expressions / optimize.c
index b280b6d737485527d92e5fde4b6d48af97d63e99..c5ba6224dfd0f07c00db74c0bf8e00415fa9d15f 100644 (file)
 #include <ctype.h>
 #include <errno.h>
 #include <stdlib.h>
-#include "alloc.h"
-#include "calendar.h"
-#include "data-in.h"
-#include "message.h"
+#include <libpspp/alloc.h>
+#include <data/calendar.h>
+#include <data/data-in.h>
+#include <libpspp/message.h>
 #include "evaluate.h"
 #include "helpers.h"
-#include "misc.h"
-#include "pool.h"
+#include <libpspp/misc.h>
+#include <libpspp/pool.h>
 #include "public.h"
-#include "str.h"
-#include "variable.h"
+#include <libpspp/str.h>
+#include <data/variable.h>
 
 static union any_node *evaluate_tree (struct composite_node *,
                                       struct expression *);
@@ -141,9 +141,9 @@ static double get_number_arg (struct composite_node *, size_t arg_idx);
 static double *get_number_args (struct composite_node *,
                                  size_t arg_idx, size_t arg_cnt,
                                  struct expression *);
-static struct fixed_string get_string_arg (struct composite_node *,
+static struct substring get_string_arg (struct composite_node *,
                                            size_t arg_idx);
-static struct fixed_string *get_string_args (struct composite_node *,
+static struct substring *get_string_args (struct composite_node *,
                                              size_t arg_idx, size_t arg_cnt,
                                              struct expression *);
 static const struct fmt_spec *get_format_arg (struct composite_node *,
@@ -187,7 +187,7 @@ get_number_args (struct composite_node *c, size_t arg_idx, size_t arg_cnt,
   return d;
 }
 
-static struct fixed_string
+static struct substring
 get_string_arg (struct composite_node *c, size_t arg_idx) 
 {
   assert (arg_idx < c->arg_cnt);
@@ -195,11 +195,11 @@ get_string_arg (struct composite_node *c, size_t arg_idx)
   return c->args[arg_idx]->string.s;
 }
 
-static struct fixed_string *
+static struct substring *
 get_string_args (struct composite_node *c, size_t arg_idx, size_t arg_cnt,
                  struct expression *e) 
 {
-  struct fixed_string *s;
+  struct substring *s;
   size_t i;
 
   s = pool_alloc (e->expr_pool, sizeof *s * arg_cnt);
@@ -236,7 +236,7 @@ emit_number (struct expression *e, double n)
 }
 
 static void
-emit_string (struct expression *e, struct fixed_string s) 
+emit_string (struct expression *e, struct substring s) 
 {
   allocate_aux (e, OP_string)->string = s;
 }