Deleted Added
full compact
iconv.c (250938) iconv.c (252583)
1/* $FreeBSD: head/usr.bin/iconv/iconv.c 250938 2013-05-23 18:07:01Z ed $ */
1/* $FreeBSD: head/usr.bin/iconv/iconv.c 252583 2013-07-03 18:27:45Z peter $ */
2/* $NetBSD: iconv.c,v 1.16 2009/02/20 15:28:21 yamt Exp $ */
3
4/*-
5 * Copyright (c)2003 Citrus Project,
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 59 unchanged lines hidden (view full) ---

69#define INBUFSIZE 1024
70#define OUTBUFSIZE (INBUFSIZE * 2)
71static void
72do_conv(FILE *fp, const char *from, const char *to, bool silent,
73 bool hide_invalid)
74{
75 iconv_t cd;
76 char inbuf[INBUFSIZE], outbuf[OUTBUFSIZE], *out;
2/* $NetBSD: iconv.c,v 1.16 2009/02/20 15:28:21 yamt Exp $ */
3
4/*-
5 * Copyright (c)2003 Citrus Project,
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions

--- 59 unchanged lines hidden (view full) ---

69#define INBUFSIZE 1024
70#define OUTBUFSIZE (INBUFSIZE * 2)
71static void
72do_conv(FILE *fp, const char *from, const char *to, bool silent,
73 bool hide_invalid)
74{
75 iconv_t cd;
76 char inbuf[INBUFSIZE], outbuf[OUTBUFSIZE], *out;
77 char *in;
77 const char *in;
78 size_t inbytes, outbytes, ret;
79
80 if ((cd = iconv_open(to, from)) == (iconv_t)-1)
81 err(EXIT_FAILURE, "iconv_open(%s, %s)", to, from);
82
83 if (hide_invalid) {
84 int arg = 1;
85

--- 134 unchanged lines hidden ---
78 size_t inbytes, outbytes, ret;
79
80 if ((cd = iconv_open(to, from)) == (iconv_t)-1)
81 err(EXIT_FAILURE, "iconv_open(%s, %s)", to, from);
82
83 if (hide_invalid) {
84 int arg = 1;
85

--- 134 unchanged lines hidden ---