projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MATRIX
[pspp]
/
src
/
language
/
data-io
/
print.c
diff --git
a/src/language/data-io/print.c
b/src/language/data-io/print.c
index 3b5541a3c3e68a62584f2a6ddb8373c2748f8b41..c0fc3d84f115bfbeebcb761ad880ab2ab16b1f33 100644
(file)
--- a/
src/language/data-io/print.c
+++ b/
src/language/data-io/print.c
@@
-40,6
+40,7
@@
#include "libpspp/misc.h"
#include "libpspp/pool.h"
#include "libpspp/u8-line.h"
#include "libpspp/misc.h"
#include "libpspp/pool.h"
#include "libpspp/u8-line.h"
+#include "output/driver.h"
#include "output/pivot-table.h"
#include "output/table.h"
#include "output/output-item.h"
#include "output/pivot-table.h"
#include "output/table.h"
#include "output/output-item.h"
@@
-174,7
+175,7
@@
internal_cmd_print (struct lexer *lexer, struct dataset *ds,
{
lex_match (lexer, T_EQUALS);
lex_match (lexer, T_LPAREN);
{
lex_match (lexer, T_EQUALS);
lex_match (lexer, T_LPAREN);
- if (!lex_force_int
(lexer
))
+ if (!lex_force_int
_range (lexer, "RECORDS", 0, INT_MAX
))
goto error;
trns->record_cnt = lex_integer (lexer);
lex_get (lexer);
goto error;
trns->record_cnt = lex_integer (lexer);
lex_get (lexer);
@@
-562,9
+563,7
@@
print_text_flush_records (struct print_trns *trns, struct u8_line *line,
*u8_line_reserve (line, 0, 1, 1) = leader;
if (trns->writer == NULL)
*u8_line_reserve (line, 0, 1, 1) = leader;
if (trns->writer == NULL)
- output_item_submit (text_item_create (TEXT_ITEM_LOG,
- ds_cstr (&line->s) + 1,
- NULL));
+ output_log ("%s", ds_cstr (&line->s) + 1);
else
{
size_t len = ds_length (&line->s);
else
{
size_t len = ds_length (&line->s);
@@
-576,14
+575,7
@@
print_text_flush_records (struct print_trns *trns, struct u8_line *line,
len--;
}
len--;
}
- if (is_encoding_utf8 (trns->encoding))
- dfm_put_record (trns->writer, s, len);
- else
- {
- char *recoded = recode_string (trns->encoding, UTF8, s, len);
- dfm_put_record (trns->writer, recoded, strlen (recoded));
- free (recoded);
- }
+ dfm_put_record_utf8 (trns->writer, s, len);
}
}
}
}
}
}