From owner-cvs-all@FreeBSD.ORG Fri Feb 4 14:01:07 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E069016A4CE; Fri, 4 Feb 2005 14:01:07 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB9AD43D4C; Fri, 4 Feb 2005 14:01:07 +0000 (GMT) (envelope-from delphij@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j14E17PK033202; Fri, 4 Feb 2005 14:01:07 GMT (envelope-from delphij@repoman.freebsd.org) Received: (from delphij@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j14E17Qw033201; Fri, 4 Feb 2005 14:01:07 GMT (envelope-from delphij) Message-Id: <200502041401.j14E17Qw033201@repoman.freebsd.org> From: Xin LI Date: Fri, 4 Feb 2005 14:01:07 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/usr.bin/tail forward.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Feb 2005 14:01:08 -0000 delphij 2005-02-04 14:01:07 UTC FreeBSD src repository Modified files: usr.bin/tail forward.c Log: Save last displayed file by having the "last" pointer global and save it during we show the first file's tail. Instead of: tarsier% tail -f 1 2 ==> 1 <== foo bar ==> 2 <== bar foo ==> 2 <== bar2 foo2 Now with this change, we have: tarsier% tail -f 1 2 ==> 1 <== foo bar ==> 2 <== bar foo bar2 foo2 While I'm there, move a comment to where it should belong to. Also, const'ify the "last" static because we will never need to change the contents it points to. MFC After: 1 week Revision Changes Path 1.38 +8 -6 src/usr.bin/tail/forward.c