projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gui: Delete now-incorrect advice to translators.
[pspp]
/
tests
/
dissect-sysfile.c
diff --git
a/tests/dissect-sysfile.c
b/tests/dissect-sysfile.c
index 6aff26502e9c8aaff4ba1158e771ba531f1ef4a3..7ae92bfc57c575939b8865ac1c5b09f2c2422a7c 100644
(file)
--- a/
tests/dissect-sysfile.c
+++ b/
tests/dissect-sysfile.c
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009, 2010
, 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
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
@@
-36,7
+36,7
@@
#include "gettext.h"
#define _(msgid) gettext (msgid)
#include "gettext.h"
#define _(msgid) gettext (msgid)
-#define
VAR_NAME
_LEN 64
+#define
ID_MAX
_LEN 64
struct sfm_reader
{
struct sfm_reader
{
@@
-127,7
+127,7
@@
main (int argc, char *argv[])
r.file_name = argv[i];
r.file = fopen (r.file_name, "rb");
if (r.file == NULL)
r.file_name = argv[i];
r.file = fopen (r.file_name, "rb");
if (r.file == NULL)
- error (EXIT_FAILURE, errno, "error opening
\"%s\"
", r.file_name);
+ error (EXIT_FAILURE, errno, "error opening
`%s'
", r.file_name);
r.n_variable_records = 0;
r.n_variables = 0;
r.n_var_widths = 0;
r.n_variable_records = 0;
r.n_variables = 0;
r.n_var_widths = 0;
@@
-689,8
+689,8
@@
read_mrsets (struct sfm_reader *r, size_t size, size_t count)
if (!text_match (text, ' '))
{
if (!text_match (text, ' '))
{
- sys_warn (r, _("Missing space following
'E
' at offset %zu "
- "in MRSETS record"), text_pos (text));
+ sys_warn (r, _("Missing space following
`%c
' at offset %zu "
+ "in MRSETS record"),
'E',
text_pos (text));
break;
}
break;
}
@@
-698,14
+698,14
@@
read_mrsets (struct sfm_reader *r, size_t size, size_t count)
if (!strcmp (number, "11"))
label_from_var_label = true;
else if (strcmp (number, "1"))
if (!strcmp (number, "11"))
label_from_var_label = true;
else if (strcmp (number, "1"))
- sys_warn (r, _("Unexpected label source value
\"%s\"
"
- "following
'
E' at offset %zu in MRSETS record"),
+ sys_warn (r, _("Unexpected label source value
`%s'
"
+ "following
`
E' at offset %zu in MRSETS record"),
number, text_pos (text));
}
else
{
number, text_pos (text));
}
else
{
- sys_warn (r, "missing
'C', 'D', or '
E' at offset %zu "
+ sys_warn (r, "missing
`C', `D', or `
E' at offset %zu "
"in mrsets record", text_pos (text));
break;
}
"in mrsets record", text_pos (text));
break;
}
@@
-925,7
+925,7
@@
read_long_string_value_labels (struct sfm_reader *r, size_t size, size_t count)
while (ftello (r->file) - start < size * count)
{
long long posn = ftello (r->file);
while (ftello (r->file) - start < size * count)
{
long long posn = ftello (r->file);
- char var_name[
VAR_NAME
_LEN + 1];
+ char var_name[
ID_MAX
_LEN + 1];
int var_name_len;
int n_values;
int width;
int var_name_len;
int n_values;
int width;
@@
-933,10
+933,10
@@
read_long_string_value_labels (struct sfm_reader *r, size_t size, size_t count)
/* Read variable name. */
var_name_len = read_int (r);
/* Read variable name. */
var_name_len = read_int (r);
- if (var_name_len >
VAR_NAME
_LEN)
+ if (var_name_len >
ID_MAX
_LEN)
sys_error (r, _("Variable name length in long string value label "
"record (%d) exceeds %d-byte limit."),
sys_error (r, _("Variable name length in long string value label "
"record (%d) exceeds %d-byte limit."),
- var_name_len,
VAR_NAME
_LEN);
+ var_name_len,
ID_MAX
_LEN);
read_string (r, var_name, var_name_len + 1);
/* Read width, number of values. */
read_string (r, var_name, var_name_len + 1);
/* Read width, number of values. */
@@
-1080,6
+1080,7
@@
read_compressed_data (struct sfm_reader *r)
printf ("\n%08llx: compressed data:\n", (long long int) ftello (r->file));
opcode_idx = N_OPCODES;
printf ("\n%08llx: compressed data:\n", (long long int) ftello (r->file));
opcode_idx = N_OPCODES;
+ opcode_ofs = 0;
case_num = 0;
for (case_num = 0; ; case_num++)
{
case_num = 0;
for (case_num = 0; ; case_num++)
{
@@
-1201,7
+1202,7
@@
text_tokenize (struct text_record *text, int delimiter)
&& text->buffer[text->pos] != delimiter
&& text->buffer[text->pos] != '\0')
text->pos++;
&& text->buffer[text->pos] != delimiter
&& text->buffer[text->pos] != '\0')
text->pos++;
- if (
text->pos == text->size
)
+ if (
start == text->pos
)
return NULL;
text->buffer[text->pos++] = '\0';
return &text->buffer[start];
return NULL;
text->buffer[text->pos++] = '\0';
return &text->buffer[start];