Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JEmF3-0003wL-FD for mharc-grub-devel@gnu.org; Tue, 15 Jan 2008 08:54:13 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JEmF1-0003uq-5E for grub-devel@gnu.org; Tue, 15 Jan 2008 08:54:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JEmEw-0003rT-OX for grub-devel@gnu.org; Tue, 15 Jan 2008 08:54:10 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JEmEw-0003rQ-IY for grub-devel@gnu.org; Tue, 15 Jan 2008 08:54:06 -0500 Received: from rv-out-0910.google.com ([209.85.198.189]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JEmEw-0007e7-7p for grub-devel@gnu.org; Tue, 15 Jan 2008 08:54:06 -0500 Received: by rv-out-0910.google.com with SMTP id c27so3188882rvf.6 for ; Tue, 15 Jan 2008 05:54:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=aVj595Jkd6BDDmg5nrrsbTvlXhdv0CqUHPEInq6ElhE=; b=OMm/XwSFRTeE9ha0GLupXCuWZoa/aOuche8srYh95TtAWs+BUsIkcARm7yLfdBNTzt95OpsjEo+fuIrumMn3MCU1r+SU8uKUIuGywmmNPORMBy2LR/5ADa3C9+wDKui3S1EtbM+JO839Nh+btG9TkV0iWfpWr+UCk5/FPynH9WY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Cg0IZofp3P5FTeNDlE6S4IF5k3T4advKqaqUcpKVHZgGxq2pzciQQIg65Pqh2+VVoQWsQPD/aIYBuggHUghVCoKrn7JWMj+Q17/RKuBLQBzKZsQy+LeXy5JQJonnA+L1i2UsksnxdIYkL8YDJqX1w1q6ELbgzcCM/0jNu6oD00o= Received: by 10.141.48.10 with SMTP id a10mr4625883rvk.35.1200405244298; Tue, 15 Jan 2008 05:54:04 -0800 (PST) Received: by 10.35.110.12 with HTTP; Tue, 15 Jan 2008 05:54:04 -0800 (PST) Message-ID: Date: Tue, 15 Jan 2008 21:54:04 +0800 From: Bean To: "The development of GRUB 2" In-Reply-To: <87abn74ajo.fsf@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47852F7C.6030407@nic.fi> <874pdhh920.fsf@xs4all.nl> <87abn74ajo.fsf@xs4all.nl> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: [PATCH] jpeg image reader X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jan 2008 13:54:11 -0000 On Jan 15, 2008 7:01 PM, Marco Gerards wrote: > > static grub_err_t > > grub_jpeg_decode_sof (struct grub_jpeg_data *data) > > { > > int i, cc; > > grub_uint32_t next_marker; > > > > next_marker = data->file->offset; > > next_marker += grub_jpeg_get_word (data); > > > > if (grub_jpeg_get_byte (data) != 8) > > return grub_error (GRUB_ERR_BAD_FILE_TYPE, > > "jpeg: only 8-bit precision is supported"); > > > > data->image_height = grub_jpeg_get_word (data); > > data->image_width = grub_jpeg_get_word (data); > > > > if ((!data->image_height) || (!data->image_width)) > > return grub_error (GRUB_ERR_BAD_FILE_TYPE, "jpeg: invalid image size"); > > > > cc = grub_jpeg_get_byte (data); > > if (cc != 3) > > return grub_error (GRUB_ERR_BAD_FILE_TYPE, > > "jpeg: component count must be 3"); > > > > for (i = 0; i < cc; i++) > > { > > int id, ss; > > > > id = grub_jpeg_get_byte (data) - 1; > > if ((id < 0) || (id >= 3)) > > return grub_error (GRUB_ERR_BAD_FILE_TYPE, "jpeg: invalid index"); > > > > ss = grub_jpeg_get_byte (data); /* sampling factor */ > > if (!id) > > { > > data->vs = ss & 0xF; /* vertical sampling */ > > data->hs = ss >> 4; /* horizontal sampling */ > > Please use correct interpunction. I'm sorry, what do you mean by correct interpunction ? -- Bean