02110-1301, USA. */
#include <config.h>
-#include "message.h"
+#include <libpspp/message.h>
#include <ctype.h>
#include <math.h>
#include <float.h>
#include <stdlib.h>
#include <time.h>
#include "calendar.h"
-#include "message.h"
+#include <libpspp/message.h>
#include "format.h"
-#include "magic.h"
-#include "misc.h"
-#include "misc.h"
+#include <libpspp/magic.h>
+#include <libpspp/misc.h>
+#include <libpspp/misc.h>
#include "settings.h"
-#include "str.h"
+#include <libpspp/str.h>
#include "variable.h"
#include "gettext.h"
#define _(msgid) gettext (msgid)
-
-#include "debug-print.h"
\f
/* Public functions. */
static int
convert_A (char *dst, const struct fmt_spec *fp, const char *string)
{
- memcpy (dst, string, fp->w);
+ copy_demangle(dst, fp->w, string, fp->w);
return 1;
}
avoids wasting too much time formatting more
decimal places on the first try. */
int result = format_and_round (dst, number, fp, fp->d + 2);
+
if (result >= 0)
return result;
digits of the fraction.
Right-justify the integer part and sign. */
dst[0] = ' ';
- memcpy (dst + 1, buf, fp->w);
+ memcpy (dst + 1, buf, fp->w - 1);
return 1;
}