From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20385 invoked by alias); 20 May 2016 20:08:40 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 20374 invoked by uid 89); 20 May 2016 20:08:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Fri, 20 May 2016 21:02:00 -0000 From: Joseph Myers To: "Paul E. Murphy" CC: Subject: Re: [PATCHv2 4/6] Refactor tst-strtod-round.c In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2016-05/txt/msg00467.txt.bz2 On Tue, 17 May 2016, Paul E. Murphy wrote: > + (use of current MPFR version recommended) and run it as: > + > + gen-tst-strtod-round tst-strtod-round-data > + > + The output file will be generated as tst-strtod-round-data.h If you took both input and output file names, you wouldn't need to use malloc and construct an output file name.... > + if (freopen (fout_name, "w", stdout) == NULL) > + { > + perror ("Could not open output for writing"); > + return EXIT_FAILURE; > + } I don't see a real advantage in using freopen like this over just adjusting the output function calls to output to something other than stdout. -- Joseph S. Myers joseph@codesourcery.com