Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Oct 2017 16:58:45 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r451623 - in head/net/tcpview: . files
Message-ID:  <201710091658.v99GwjlO076327@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Mon Oct  9 16:58:44 2017
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.
  
  This is for ttps://reviews.freebsd.org/D12298.
  
  PR:		222796
  Requested by:	emaste

Added:
  head/net/tcpview/files/patch-hex.c   (contents, props changed)
Modified:
  head/net/tcpview/Makefile   (contents, props changed)

Modified: head/net/tcpview/Makefile
==============================================================================
--- head/net/tcpview/Makefile	Mon Oct  9 15:57:15 2017	(r451622)
+++ head/net/tcpview/Makefile	Mon Oct  9 16:58:44 2017	(r451623)
@@ -3,7 +3,7 @@
 
 PORTNAME=	tcpview
 PORTVERSION=	1.0
-PORTREVISION=	6
+PORTREVISION=	7
 CATEGORIES=	net
 MASTER_SITES=	ftp://ftp.cac.washington.edu/pub/noc-tools/tcpview/
 

Added: head/net/tcpview/files/patch-hex.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/tcpview/files/patch-hex.c	Mon Oct  9 16:58:44 2017	(r451623)
@@ -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 )
+       return NULL;
+     if( *str != '\t' && *str != ' ' && PrintFrames ) 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710091658.v99GwjlO076327>