From owner-freebsd-questions@FreeBSD.ORG Wed May 26 10:13:31 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 956C516A4CE for ; Wed, 26 May 2004 10:13:31 -0700 (PDT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F18E43D2F for ; Wed, 26 May 2004 10:13:31 -0700 (PDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.10/8.12.10) id i4QHCwP6084448; Wed, 26 May 2004 12:12:58 -0500 (CDT) (envelope-from dan) Date: Wed, 26 May 2004 12:12:58 -0500 From: Dan Nelson To: Richard Burnett-Godfree Message-ID: <20040526171258.GA4375@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.2-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: questions@freebsd.org Subject: Re: fputs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 May 2004 17:13:31 -0000 In the last episode (May 26), Richard Burnett-Godfree said: > I am trying to port software currently running on hp-ux to freeBSD > 4.9. > > In the code the software use fputs to output chars to the terminal. > > What seems to be happening is these are all buffered until the > process terminates and then they all come out rather than being sent > to the terminal during the program operation. Do I need to change an > environment setting ?? Should I swap to printf ?? What is the syntax > ?? > > Regards > Richard > > if (strcmp(term, "wy50") == 0 || strcmp(term, "wy60") == 0) > {fputs ("\033z(", stdout); ... > } Try adding an fflush(stdout) at the end of that code block. -- Dan Nelson dnelson@allantgroup.com