projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adopt use of gnulib for portability.
[pspp]
/
src
/
file-handle.q
diff --git
a/src/file-handle.q
b/src/file-handle.q
index 688fbb89b509b1af790611cb52853525d5ba9fcd..6ea731ef13311ec2217ddebc37fcf9502eb450b7 100644
(file)
--- a/
src/file-handle.q
+++ b/
src/file-handle.q
@@
-26,12
+26,15
@@
#include "filename.h"
#include "command.h"
#include "lexer.h"
#include "filename.h"
#include "command.h"
#include "lexer.h"
-#include "getl
ine
.h"
+#include "getl.h"
#include "error.h"
#include "magic.h"
#include "var.h"
#include "linked-list.h"
#include "error.h"
#include "magic.h"
#include "var.h"
#include "linked-list.h"
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
/* (headers) */
/* File handle. */
/* (headers) */
/* File handle. */
@@
-116,7
+119,7
@@
cmd_file_handle (void)
if (!lex_force_id ())
return CMD_FAILURE;
if (!lex_force_id ())
return CMD_FAILURE;
- st
_trim_copy (handle_name, tokid, sizeof handle_name
);
+ st
r_copy_trunc (handle_name, sizeof handle_name, tokid
);
handle = get_handle_with_name (handle_name);
if (handle != NULL)
handle = get_handle_with_name (handle_name);
if (handle != NULL)
@@
-169,7
+172,7
@@
cmd_file_handle (void)
else if (cmd.n_lrecl[0] < 1)
{
msg (SE, _("Record length (%ld) must be at least one byte. "
else if (cmd.n_lrecl[0] < 1)
{
msg (SE, _("Record length (%ld) must be at least one byte. "
- "1-character records will be assumed."), cmd.n_lrecl);
+ "1-character records will be assumed."), cmd.n_lrecl
[0]
);
handle->length = 1;
}
else
handle->length = 1;
}
else
@@
-235,7
+238,7
@@
mode_name (const char *mode)
}
}
-/* Tries to open
FILE
with the given TYPE and MODE.
+/* Tries to open
handle H
with the given TYPE and MODE.
TYPE is the sort of file, e.g. "system file". Only one given
type of access is allowed on a given file handle at once.
TYPE is the sort of file, e.g. "system file". Only one given
type of access is allowed on a given file handle at once.
@@
-391,8
+394,7
@@
handle_get_mode (const struct file_handle *handle)
return handle->mode;
}
return handle->mode;
}
-/* Returns the width of a logical record on HANDLE. Applicable
- only to MODE_BINARY files. */
+/* Returns the width of a logical record on HANDLE. */
size_t
handle_get_record_width (const struct file_handle *handle)
{
size_t
handle_get_record_width (const struct file_handle *handle)
{