#include <libpspp/message.h>
#include <libpspp/pool.h>
+#include <relocatable.h>
#include "minmax.h"
#include "xalloc.h"
#include "xsize.h"
{
memset (ds_put_uninit (st, cnt), ch, cnt);
}
+
+
+/* If relocation has been enabled, replace ST,
+ with its relocated version */
+void
+ds_relocate (struct string *st)
+{
+ const char *orig = ds_cstr (st);
+ const char *rel = relocate (orig);
+
+ if ( orig != rel)
+ {
+ ds_clear (st);
+ ds_put_cstr (st, rel);
+ free ((char *) rel);
+ }
+}