From owner-freebsd-chat@FreeBSD.ORG Sun Dec 26 17:11:47 2004 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7808516A4CE for ; Sun, 26 Dec 2004 17:11:47 +0000 (GMT) Received: from web80801.mail.yahoo.com (web80801.mail.yahoo.com [66.163.170.96]) by mx1.FreeBSD.org (Postfix) with SMTP id 513BF43D46 for ; Sun, 26 Dec 2004 17:11:47 +0000 (GMT) (envelope-from cmc3list-bsd@yahoo.com) Message-ID: <20041226171147.62405.qmail@web80801.mail.yahoo.com> Received: from [67.65.4.124] by web80801.mail.yahoo.com via HTTP; Sun, 26 Dec 2004 09:11:47 PST Date: Sun, 26 Dec 2004 09:11:47 -0800 (PST) From: To: freebsd-chat@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: freebsd-users list - semi regular post X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: cmc3list-bsd@yahoo.com List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Dec 2004 17:11:47 -0000 FreeBSD Users is a small (too small, so far :-)) informal mailing list for people who use FreeBSD. The list is not meant to compete with the formal FreeBSD lists, but to be a place for people who like to use FreeBSD to hang out, ask questions, talk about what interests them with FreeBSD. Think of it as the users group your town doesn't have :-). To join: http://www.whee.org/mailman/listinfo/freebsd-users I'll try to post here at least monthly. Email me if you have questions or comments. ===== Christopher Mark Conn http://storm.cadcam.iupui.edu/~cmcgoat Austin, Texas, USA From owner-freebsd-chat@FreeBSD.ORG Thu Dec 30 02:03:26 2004 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56A7616A4CE for ; Thu, 30 Dec 2004 02:03:26 +0000 (GMT) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id F10DB43D2D for ; Thu, 30 Dec 2004 02:03:25 +0000 (GMT) (envelope-from joshua.lokken@gmail.com) Received: by wproxy.gmail.com with SMTP id 55so34256wri for ; Wed, 29 Dec 2004 18:03:25 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=YgHvxC3qp0cTUPlK5fQWaW0mXJiVvFBRBm89KgEMr/SBKm3xElNyyVvFo5zxTnonTRDGkK/nWuOJBmfvNOCCJ8z8Em8GFrnSyEEPMjR6psULYA78cqIYsOSJx0wdwBuVkGdLBT0fjkCzajbFjS1DWh21GfRwCZThcCw64hNXdsE= Received: by 10.54.28.19 with SMTP id b19mr252213wrb; Wed, 29 Dec 2004 18:03:25 -0800 (PST) Received: by 10.54.11.33 with HTTP; Wed, 29 Dec 2004 18:03:25 -0800 (PST) Message-ID: Date: Wed, 29 Dec 2004 20:03:25 -0600 From: Joshua Lokken To: Chuck Swiger In-Reply-To: <41D35547.5070105@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <41D35547.5070105@mac.com> cc: freebsd-chat@freebsd.org Subject: Re: less -f X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Joshua Lokken List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 02:03:26 -0000 On Wed, 29 Dec 2004 20:09:27 -0500, Chuck Swiger wrote: > Joshua Lokken wrote: > [ ... ] > > So, I did man less(1), and found this: > > > > -f or --force > > Forces non-regular files to be opened. (A non-regular file is a > > directory or a device special file.) Also suppresses the warn- > > ing message when a binary file is opened. By default, less will > > refuse to open non-regular files. > > > > However,: > [ ... ] > >less -f ~netmin/mydir > > /home/netmin/mydir is a directory > > > > Can someone explain this behavior to me? I admit that I may > > not understand the -f flag wholly, however, this seems in direct > > contradiction with the man page. > > You're right, the manpage says and what the program actually does contradict > each other. Consider the following change to /usr/src/contrib/less: > > --- filename.c~ Thu Jun 29 21:03:08 2000 > +++ filename.c Wed Dec 29 20:04:06 2004 > @@ -954,10 +954,14 @@ > { > static char is_dir[] = " is a directory"; > > - m = (char *) ecalloc(strlen(filename) + sizeof(is_dir), > - sizeof(char)); > - strcpy(m, filename); > - strcat(m, is_dir); > + if (force_open) { > + m = NULL; > + } else { > + m = (char *) ecalloc(strlen(filename) + sizeof(is_dir), > + sizeof(char)); > + strcpy(m, filename); > + strcat(m, is_dir); > + } > } else > { > Is this something that warrants a send-pr? I've never used the tool, and don't want to generate needless problem reports. What's the best way to handle it? Thanks for any advice. -- Joshua Lokken Open Source Advocate From owner-freebsd-chat@FreeBSD.ORG Thu Dec 30 02:16:43 2004 Return-Path: Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2690116A4CE for ; Thu, 30 Dec 2004 02:16:43 +0000 (GMT) Received: from pi.codefab.com (pi.codefab.com [199.103.21.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id B138843D2F for ; Thu, 30 Dec 2004 02:16:42 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from [192.168.1.3] (pool-68-160-208-232.ny325.east.verizon.net [68.160.208.232]) by pi.codefab.com (8.12.11/8.12.11) with ESMTP id iBU2GRm7039817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 29 Dec 2004 21:16:29 -0500 (EST) Message-ID: <41D36550.4080900@mac.com> Date: Wed, 29 Dec 2004 21:17:52 -0500 From: Chuck Swiger Organization: The Courts of Chaos User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Joshua Lokken References: <41D35547.5070105@mac.com> In-Reply-To: X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=1.8 required=5.5 tests=RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=disabled version=3.0.1 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on pi.codefab.com cc: freebsd-chat@freebsd.org Subject: Re: less -f X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2004 02:16:43 -0000 Joshua Lokken wrote: > On Wed, 29 Dec 2004 20:09:27 -0500, Chuck Swiger wrote: [ ... ] >>You're right, the manpage says and what the program actually does contradict >>each other. Consider the following change to /usr/src/contrib/less: >> >>--- filename.c~ Thu Jun 29 21:03:08 2000 >>+++ filename.c Wed Dec 29 20:04:06 2004 >>@@ -954,10 +954,14 @@ >> { >> static char is_dir[] = " is a directory"; >> >>- m = (char *) ecalloc(strlen(filename) + sizeof(is_dir), >>- sizeof(char)); >>- strcpy(m, filename); >>- strcat(m, is_dir); >>+ if (force_open) { >>+ m = NULL; >>+ } else { >>+ m = (char *) ecalloc(strlen(filename) + sizeof(is_dir), >>+ sizeof(char)); >>+ strcpy(m, filename); >>+ strcat(m, is_dir); >>+ } >> } else >> { > > Is this something that warrants a send-pr? I've never used the > tool, and don't want to generate needless problem reports. > What's the best way to handle it? Thanks for any advice. I have forwarded your problem description and the patch on to , so it can be considered by the author of less. It might be reasonable to send-pr this as well, if you would like to see FreeBSD adopt the fix in a shorter timeframe. -- -Chuck