You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
#include <config.h>
#include "dfm-write.h"
#include "filename.h"
#include "str.h"
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
/* Data file writer. */
struct dfm_writer
{
w->file.file = NULL;
w->bounce = NULL;
- w->file.filename = xstrdup (handle_get_filename (w->fh));
+ w->file.filename = xstrdup (fh_get_filename (w->fh));
w->file.mode = "wb";
w->file.file = NULL;
w->file.sequence_no = NULL;
{
msg (ME, _("An error occurred while opening \"%s\" for writing "
"as a data file: %s."),
- handle_get_filename (w->fh), strerror (errno));
+ fh_get_filename (w->fh), strerror (errno));
goto error;
}
{
assert (w != NULL);
- if (handle_get_mode (w->fh) == MODE_BINARY
- && len < handle_get_record_width (w->fh))
+ if (fh_get_mode (w->fh) == MODE_BINARY
+ && len < fh_get_record_width (w->fh))
{
- size_t rec_width = handle_get_record_width (w->fh);
+ size_t rec_width = fh_get_record_width (w->fh);
if (w->bounce == NULL)
w->bounce = xmalloc (rec_width);
memcpy (w->bounce, rec, len);
if (fwrite (rec, len, 1, w->file.file) != 1)
{
msg (ME, _("Error writing file %s: %s."),
- handle_get_name (w->fh), strerror (errno));
+ fh_get_name (w->fh), strerror (errno));
err_cond_fail ();
return 0;
}