Added return value to data_out.
+Sun Nov 27 06:43:46 WST 2005 John Darrington <john@darington.wattle.id.au>
+
+ * data-out.c format.h: Added return value to data_out function.
+
+ * value-labels.c: Fixed bug in val_labs_remove.
+
Sat Nov 5 18:37:26 2005 Ben Pfaff <blp@gnu.org>
* Makefile.am: Remove devind.c, devind.h from list of source
/* Converts binary value V into printable form in the exactly
FP->W character in buffer S according to format specification
FP. No null terminator is appended to the buffer. */
-void
+bool
data_out (char *s, const struct fmt_spec *fp, const union value *v)
{
int cat = formats[fp->type].cat;
{
memset (s, ' ', fp->w);
s[fp->w - fp->d - 1] = '.';
- return;
+ return true;
}
/* Handle decimal shift. */
/* Error handling. */
if (!ok)
strncpy (s, "ERROR", fp->w);
+
+ return ok;
}
/* Converts V into S in F format with width W and D decimal places,
int parse_string_as_format (const char *s, int len, const struct fmt_spec *fp,
int fc, union value *v);
int translate_fmt (int spss);
-void data_out (char *s, const struct fmt_spec *fp, const union value *v);
+bool data_out (char *s, const struct fmt_spec *fp, const union value *v);
char *fmt_to_string (const struct fmt_spec *);
void num_to_string (double v, char *s, int w, int d);
struct fmt_spec make_input_format (int type, int w, int d);
if (vls->labels != NULL)
{
struct int_val_lab *ivl = create_int_val_lab (vls, value, "");
- int deleted = hsh_delete (vls->labels, &ivl);
+ int deleted = hsh_delete (vls->labels, ivl);
free (ivl);
return deleted;
}