r->any_reader.klass = &pcp_file_reader_class;
r->pool = pool_create ();
pool_register (r->pool, free, r);
r->any_reader.klass = &pcp_file_reader_class;
r->pool = pool_create ();
pool_register (r->pool, free, r);
info->integer_format = INTEGER_LSB_FIRST;
info->float_format = FLOAT_IEEE_DOUBLE_LE;
info->compression = r->compressed ? ANY_COMP_SIMPLE : ANY_COMP_NONE;
info->integer_format = INTEGER_LSB_FIRST;
info->float_format = FLOAT_IEEE_DOUBLE_LE;
info->compression = r->compressed ? ANY_COMP_SIMPLE : ANY_COMP_NONE;
/* Convert file label to UTF-8 and put it into DICT. */
label = recode_and_trim_string (r->pool, dict_encoding, header->file_label);
/* Convert file label to UTF-8 and put it into DICT. */
label = recode_and_trim_string (r->pool, dict_encoding, header->file_label);
- memcpy (value_str_rw (&value, rec->width),
- rec->val_labs[i].value, rec->width);
+ memcpy (value.s, rec->val_labs[i].value, rec->width);
utf8_label = recode_string ("UTF-8", dict_encoding,
rec->val_labs[i].label, -1);
utf8_label = recode_string ("UTF-8", dict_encoding,
rec->val_labs[i].label, -1);
- retval = read_case_string (r, value_str_rw (v, var->width),
- var->width);
+ retval = read_case_string (r, v->s, var->width);
ds_put_format (&text, _("`%s': "), fh_get_file_name (r->fh));
ds_put_vformat (&text, format, args);
ds_put_format (&text, _("`%s': "), fh_get_file_name (r->fh));
ds_put_vformat (&text, format, args);
.category = msg_class_to_category (class),
.severity = msg_class_to_severity (class),
.category = msg_class_to_category (class),
.severity = msg_class_to_severity (class),
- size_t bytes_read = fread (buf, 1, byte_cnt, r->file);
+ size_t bytes_read = fread (buf, 1, n_bytes, r->file);
- return read_bytes_internal (r, false, buf, byte_cnt) == 1;
+ return read_bytes_internal (r, false, buf, n_bytes) == 1;
Returns 0 if an immediate end-of-file is encountered.
Returns -1 if an I/O error or a partial read occurs. */
static int
Returns 0 if an immediate end-of-file is encountered.
Returns -1 if an I/O error or a partial read occurs. */
static int
- return read_bytes_internal (r, true, buf, byte_cnt);
+ return read_bytes_internal (r, true, buf, n_bytes);