tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH 1/2] Add BSD-licensed gettext(1) implementation



On 03.06.2015 02:21, William Orr wrote:
> Simple gettext implementation that models GNU gettext(1). Is
> feature-complete compared to GNU gettext(1).
> ---
>  src/usr.bin/gettext/Makefile  |  11 +++
>  src/usr.bin/gettext/gettext.c | 212 ++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 223 insertions(+)
>  create mode 100644 src/usr.bin/gettext/Makefile
>  create mode 100644 src/usr.bin/gettext/gettext.c
> 
> diff --git a/src/usr.bin/gettext/Makefile b/src/usr.bin/gettext/Makefile
> new file mode 100644
> index 0000000..f37ec5f
> --- /dev/null
> +++ b/src/usr.bin/gettext/Makefile
> @@ -0,0 +1,11 @@
> +.include <bsd.own.mk>
> +
> +PROG=	gettext
> +SRCS=	gettext.c
> +
> +LDADD+=	-lintl -lutil
> +DPADD+=	${LIBINTL} ${LIBUTIL}
> +
> +MAN=	gettext.1
> +

Can we strip this Makefile from SRCS and MAN? They should take
thedefault values.

> +	/* msgdomain can be passed as optional arg iff -s is not passed */
> +	if (argc == 2 && !sflag) {
> +		msgdomain = estrdup(argv[0]);
If we care, there is a possible memory leak of msgdomain. calling
free(msgdomain) before this will resolve it.



Home | Main Index | Thread Index | Old Index