From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54670) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKXRk-0001NB-Rg for qemu-devel@nongnu.org; Thu, 12 May 2011 11:05:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QKXRi-00055J-Tt for qemu-devel@nongnu.org; Thu, 12 May 2011 11:05:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QKXRi-00055F-Lv for qemu-devel@nongnu.org; Thu, 12 May 2011 11:04:58 -0400 Message-ID: <4DCBF70C.60807@redhat.com> Date: Thu, 12 May 2011 18:04:44 +0300 From: Avi Kivity MIME-Version: 1.0 References: <1304674751-19111-1-git-send-email-Jes.Sorensen@redhat.com> <1304674751-19111-2-git-send-email-Jes.Sorensen@redhat.com> <201105062040.00128.bradh@frogmouth.net> <4DC3D77C.4030703@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/2] Add documentation for qemu_progres_print() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Jes Sorensen , qemu-devel@nongnu.org, Brad Hards On 05/06/2011 06:10 PM, Markus Armbruster wrote: > Here's my try: > > /* > * Report progress. > * @percent is how much progress we made. > * If @max is zero, @percent is how much of the job is done. > * Else, @percent is a progress delta since the last call, as a fraction > * of @max. I.e. delta is @percent * @max / 100. This is for > * convenience, it lets you account for @max% of the total work in some > * function, and still count @percent from 0 to 100. > */ My personal preference is to use fractions of 1 in the code and only covert to percentages during actual output. -- error compiling committee.c: too many arguments to function