Update all #include directives to the currently preferred style.
[pspp-builds.git] / src / data / caseproto.c
index 68df141ba9f9638f72914b1822789764ac712d33..d62af283de2945cc2139f980d8c4dea5a0a431b2 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2009 Free Software Foundation, Inc.
+   Copyright (C) 2009, 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 <config.h>
 
-#include <data/caseproto.h>
-#include <data/val-type.h>
-#include <data/value.h>
-#include <libpspp/array.h>
-#include <libpspp/assertion.h>
-#include <libpspp/pool.h>
+#include "data/caseproto.h"
 
-#include "minmax.h"
+#include "data/val-type.h"
+#include "data/value.h"
+#include "libpspp/array.h"
+#include "libpspp/assertion.h"
+#include "libpspp/pool.h"
+
+#include "gl/minmax.h"
 
 static struct caseproto *caseproto_unshare (struct caseproto *);
 static bool try_init_long_strings (const struct caseproto *,
@@ -59,26 +60,6 @@ caseproto_create (void)
   return proto;
 }
 
-
-struct caseproto *
-caseproto_clone (const struct caseproto *in)
-{
-  struct caseproto *proto = xmalloc (caseproto_size (in->n_widths));
-  proto->ref_cnt = 1;
-
-  proto->n_widths = in->n_widths;
-  proto->allocated_widths = in->allocated_widths;
-  
-  memcpy (proto->widths, in->widths, proto->n_widths *  sizeof *proto->widths);
-
-  proto->n_long_strings = in->n_long_strings;
-  proto->long_strings = NULL;
-  if ( proto->n_long_strings > 0)
-    caseproto_refresh_long_string_cache__ (proto);
-
-  return proto;
-}
-
 static void
 do_unref (void *proto_)
 {
@@ -340,7 +321,7 @@ caseproto_free__ (struct caseproto *proto)
 void
 caseproto_refresh_long_string_cache__ (const struct caseproto *proto_)
 {
-  struct caseproto *proto = (struct caseproto *) proto_;
+  struct caseproto *proto = CONST_CAST (struct caseproto *, proto_);
   size_t n, i;
 
   assert (proto->long_strings == NULL);