svn commit: r451623 - in head/net/tcpview: . files
Alexey Dokuchaev
danfe at FreeBSD.org
Mon Oct 9 17:08:02 UTC 2017
On Mon, Oct 09, 2017 at 04:58:45PM +0000, Cy Schubert wrote:
> New Revision: 451623
> URL: https://svnweb.freebsd.org/changeset/ports/451623
>
> Log:
> Use fgets() instead of gets().
>
> The approach I used was to create a "poor man's" gets macro as an example.
> Though not the same as gets() it approximates gets() well enough. We might
> want to consider this approach in base.
I don't think I understand this comment, really.
> Added: head/net/tcpview/files/patch-hex.c
> @@ -0,0 +1,10 @@
> +--- hex.c.orig 1993-04-22 13:40:04.000000000 -0700
> ++++ hex.c 2017-10-06 07:25:01.182767000 -0700
> +@@ -85,6 +85,7 @@
> + char *s;
> +
> + do {
> ++#define gets(a) fgets(a,sizeof(a),stdin)
> + if( gets(str) == NULL )
gets(3) called only once in this port; why not simply patch that single
call properly instead of bringing in a "poor man's" macro?
./danfe
More information about the svn-ports-head
mailing list