Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 May 2004 12:12:58 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Richard Burnett-Godfree <Richard@Tribune-IS.com>
Cc:        questions@freebsd.org
Subject:   Re: fputs
Message-ID:  <20040526171258.GA4375@dan.emsphone.com>
In-Reply-To: <NIBBIELIKMBOHLBOEMCFGECACCAA.Richard@Tribune-IS.com>
References:  <NIBBIELIKMBOHLBOEMCFGECACCAA.Richard@Tribune-IS.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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