projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[pspp]
/
src
/
file-type.c
diff --git
a/src/file-type.c
b/src/file-type.c
index 87bd874f102dddec1b84a5757bc48500225dfe98..ff97f8dbbfbfd868c7adcd72c10672fb3a32bf1b 100644
(file)
--- a/
src/file-type.c
+++ b/
src/file-type.c
@@
-33,6
+33,9
@@
#include "var.h"
#include "vfm.h"
#include "var.h"
#include "vfm.h"
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
/* Defines the three types of complex files read by FILE TYPE. */
enum
{
/* Defines the three types of complex files read by FILE TYPE. */
enum
{
@@
-71,8
+74,7
@@
struct record_type
int ft, lt; /* First, last transformation index. */
}; /* record_type */
int ft, lt; /* First, last transformation index. */
}; /* record_type */
-/* Represents a FILE TYPE input program. Does not contain a
- trns_header because it's never submitted as a transformation. */
+/* Represents a FILE TYPE input program. */
struct file_type_pgm
{
int type; /* One of the FTY_* constants. */
struct file_type_pgm
{
int type; /* One of the FTY_* constants. */
@@
-94,6
+96,8
@@
struct file_type_pgm
static int parse_col_spec (struct col_spec *, const char *);
static void create_col_var (struct col_spec *c);
static int parse_col_spec (struct col_spec *, const char *);
static void create_col_var (struct col_spec *c);
+int cmd_file_type (void);
+
/* Parses FILE TYPE command. */
int
cmd_file_type (void)
/* Parses FILE TYPE command. */
int
cmd_file_type (void)
@@
-440,7
+444,7
@@
cmd_record_type (void)
if (rct->nv >= mv)
{
mv += 16;
if (rct->nv >= mv)
{
mv += 16;
- rct->v = x
realloc (rct->v, mv *
sizeof *rct->v);
+ rct->v = x
nrealloc (rct->v, mv,
sizeof *rct->v);
}
if (formats[fty->record.fmt].cat & FCAT_STRING)
}
if (formats[fty->record.fmt].cat & FCAT_STRING)
@@
-448,8
+452,8
@@
cmd_record_type (void)
if (!lex_force_string ())
goto error;
rct->v[rct->nv].c = xmalloc (fty->record.nc + 1);
if (!lex_force_string ())
goto error;
rct->v[rct->nv].c = xmalloc (fty->record.nc + 1);
-
st_bare_pad_copy (rct->v[rct->nv].c, ds_c_str (&tokstr)
,
-
fty->record.nc + 1
);
+
buf_copy_str_rpad (rct->v[rct->nv].c, fty->record.nc + 1
,
+
ds_c_str (&tokstr)
);
}
else
{
}
else
{
@@
-569,6
+573,7
@@
cmd_record_type (void)
\f
/* END FILE TYPE. */
\f
/* END FILE TYPE. */
+int cmd_end_file_type (void);
int
cmd_end_file_type (void)
{
int
cmd_end_file_type (void)
{