From owner-freebsd-questions@FreeBSD.ORG Tue Oct 20 03:42:48 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F01FC106566C for ; Tue, 20 Oct 2009 03:42:48 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id AF9BC8FC1D for ; Tue, 20 Oct 2009 03:42:48 +0000 (UTC) Received: from r55.edvax.de (port-92-195-71-245.dynamic.qsc.de [92.195.71.245]) by mx01.qsc.de (Postfix) with ESMTP id 2F8693C94F; Tue, 20 Oct 2009 05:42:48 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id n9K3gg8l001608; Tue, 20 Oct 2009 05:42:42 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Tue, 20 Oct 2009 05:42:41 +0200 From: Polytropon To: Patrick Mahan Message-Id: <20091020054241.ce4a38fe.freebsd@edvax.de> In-Reply-To: <4ADCAB4F.5040707@mahan.org> References: <20091019013337.GA9522@thought.org> <4ADBFDBA.6040702@pchotshots.com> <20091019170634.GA12371@thought.org> <4ADCAB4F.5040707@mahan.org> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Gary Kline , FreeBSD Mailing List Subject: Re: need C help, passing char buffer[] by-value.... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Oct 2009 03:42:49 -0000 Just a little and quite formal side note: On Mon, 19 Oct 2009 11:09:19 -0700, Patrick Mahan wrote: > while (*tp != '\0' && *tp++ != '<'); It's often a good choice, especially for increasing readability of code, to code the "empty statement" on a line on its own (as you usually put any statements on an own line for clarity), so the reader doesn't accidentally take it as and "end of command" notification, e. g. while(1) ; instead of while(1); which could be confused with the syntactical meaning of whatsthis(1); I'm just mentioning this because I saw this in a programming project when I was at university. A young programmer who was given the task to look at code a very skilled programmer gave him. Somewhere in the code, an endless loop caused the program not to work properly. The student could not find this endless loop because it was coded in the manner as given above. It was not the polite form of for(;;); :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...