From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] lcms2 (was Re: Emacs 26.1 release branch created) Date: Sat, 30 Sep 2017 12:22:16 +0300 Message-ID: <83shf44k3b.fsf@gnu.org> References: <83377mls4d.fsf@gnu.org> <87bmmazt77.fsf@udel.edu> <83zi9ukbj3.fsf@gnu.org> <20170916145112.GA22458@holos.localdomain> <83wp4yk7ve.fsf@gnu.org> <20170929202540.ui7zugo57ctxa6yn@logos.localdomain> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1506763353 4611 195.159.176.226 (30 Sep 2017 09:22:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Sep 2017 09:22:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: Mark Oteiza Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 30 11:22:29 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dyDyb-0000Tf-Fn for ged-emacs-devel@m.gmane.org; Sat, 30 Sep 2017 11:22:25 +0200 Original-Received: from localhost ([::1]:38652 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyDyi-000698-Pz for ged-emacs-devel@m.gmane.org; Sat, 30 Sep 2017 05:22:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyDyb-000690-VF for emacs-devel@gnu.org; Sat, 30 Sep 2017 05:22:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dyDyX-0007dj-Dp for emacs-devel@gnu.org; Sat, 30 Sep 2017 05:22:25 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:35980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dyDyX-0007da-9z; Sat, 30 Sep 2017 05:22:21 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2129 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dyDyW-0008Ay-Q0; Sat, 30 Sep 2017 05:22:21 -0400 In-reply-to: <20170929202540.ui7zugo57ctxa6yn@logos.localdomain> (message from Mark Oteiza on Fri, 29 Sep 2017 16:25:40 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:218964 Archived-At: > Date: Fri, 29 Sep 2017 16:25:40 -0400 > From: Mark Oteiza > Cc: emacs-devel@gnu.org > > Here is the patch I thought I would not get done. Thanks, it looks good (didn't try to build it, though). > * src/lcms.h: New file. Not sure why you needed a header file. Do you envision the struct defined in it to be used elsewhere in Emacs sources? If not, you can define the struct in lcms.c instead. > +static void > +jch_to_xyz (const cmsJCh *jch, cmsCIEXYZ *xyz, const cmsViewingConditions *vc) > +{ > + cmsHANDLE h; > + > + h = cmsCIECAM02Init (0, vc); > + cmsCIECAM02Reverse (h, jch, xyz); > + cmsCIECAM02Done (h); > +} cmsCIECAM02Reverse was not used previously, so it will have to be added to the WINDOWSNT parts. Let me know if you want me to send a patch for that. > + double Mp = sqrt (jab->a * jab->a + jab->b * jab->b); I'd use 'hypot' here, it's supposed to be more accurate and avoids overflow/underflow for large or small a and b. Or are we sure a and b are always confined to some small range of values?