From brix@fangorn.brixandersen.dk  Sat Apr  7 02:41:24 2007
Return-Path: <brix@fangorn.brixandersen.dk>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 35EB816A406
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  7 Apr 2007 02:41:24 +0000 (UTC)
	(envelope-from brix@fangorn.brixandersen.dk)
Received: from ns2.pil.dk (relay.pil.dk [195.41.47.38])
	by mx1.freebsd.org (Postfix) with ESMTP id 0036C13C45E
	for <FreeBSD-gnats-submit@freebsd.org>; Sat,  7 Apr 2007 02:41:23 +0000 (UTC)
	(envelope-from brix@fangorn.brixandersen.dk)
Received: from fangorn.brixandersen.dk (osgiliath.brixandersen.dk [87.53.223.189])
	by ns2.pil.dk (Postfix) with ESMTP id B35E17BA3CD;
	Sat,  7 Apr 2007 04:14:17 +0200 (CEST)
Received: by fangorn.brixandersen.dk (Postfix, from userid 1001)
	id 58DA22E02F; Sat,  7 Apr 2007 04:14:17 +0200 (CEST)
Message-Id: <20070407021417.58DA22E02F@fangorn.brixandersen.dk>
Date: Sat,  7 Apr 2007 04:14:17 +0200 (CEST)
From: Henrik Brix Andersen <henrik@brixandersen.dk>
Reply-To: Henrik Brix Andersen <henrik@brixandersen.dk>
To: FreeBSD-gnats-submit@freebsd.org
Cc: ports@fsck.ch
Subject: [patch] x11/slim theme parse error under 7-CURRENT
X-Send-Pr-Version: 3.113
X-GNATS-Notify: ports@fsck.ch

>Number:         111342
>Category:       ports
>Synopsis:       [patch] x11/slim theme parse error under 7-CURRENT
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 07 02:50:04 GMT 2007
>Closed-Date:    Mon Apr 09 11:57:33 GMT 2007
>Last-Modified:  Mon Apr  9 12:00:11 GMT 2007
>Originator:     Henrik Brix Andersen
>Release:        FreeBSD 6.2-STABLE i386
>Organization:
pil.dk
>Environment:
System: FreeBSD fangorn.brixandersen.dk 6.2-STABLE FreeBSD 6.2-STABLE #48: Sat Mar 24 20:05:55 CET 2007 root@fangorn.brixandersen.dk:/usr/obj/usr/src/sys/FANGORN i386


	
>Description:
Since upgrading a work station to FreeBSD 7.0-CURRENT, x11/slim-1.2.6
parses all themes wrongly (all percentages are evaluated to
zero). This also applies to the default theme provided by slim itself.

I have tracked down this issue which seems to be caused by a stricter
gcc in 7-CURRENT compared to RELENG_6.
	
>How-To-Repeat:
Install x11/slim under 7-CURRENT and observe that the input panel is
wrongly placed at the top of the screen even though
/usr/local/share/slim/themes/default/slim.theme specifies non-zero
offsets (given in percent).

	
>Fix:
The patch below fixes this issue by eliminating the 'const char* tmp'
variable.

I have submitted the patch upstream for inclusion in the next release.

	

--- patch-cfg.cpp begins here ---
--- cfg.cpp.orig	Sat Apr  7 03:45:30 2007
+++ cfg.cpp	Sat Apr  7 03:46:20 2007
@@ -211,8 +211,7 @@ int Cfg::absolutepos(const string& posit
     int n = -1;
     n = position.find("%");
     if (n>0) { // X Position expressed in percentage
-        const char* tmp =  position.substr(0, n).c_str();
-        int result = (max*string2int(tmp)/100) - (width / 2);
+        int result = (max*string2int(position.substr(0, n).c_str())/100) - (width / 2);
         return result < 0 ? 0 : result ;
     } else { // Absolute X position
         return string2int(position.c_str());
--- patch-cfg.cpp ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sat Apr 7 02:50:13 UTC 2007 
State-Changed-Why:  
Awaiting maintainers feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=111342 

From: ports@fsck.ch
To: bug-followup@FreeBSD.org
Cc: ports@fsck.ch
Subject: Re: ports/111342: [patch] x11/slim theme parse error under 
     7-CURRENT
Date: Mon, 9 Apr 2007 01:31:06 +0200 (CEST)

 Hi
 
 Thanks for the patch. I am away from FreeBSD until mid of June, so I can't
 test any patches. What I see looks good, please feel free to commit when
 it satisfies your own tests. And thanks for submitting this upstream, the
 people from slim are usually quite happy to receive patches.
 
 Thanks a lot,
 Tobias
 

From: Henrik Brix Andersen <henrik@brixandersen.dk>
To: bug-followup@FreeBSD.org, henrik@brixandersen.dk
Cc:  
Subject: Re: ports/111342: [patch] x11/slim theme parse error under
	7-CURRENT
Date: Mon, 9 Apr 2007 12:57:26 +0200

 --OgqxwSJOaUobr8KG
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 I just received confirmation from the author of slim that my patch has
 been accepted and will be part of the next release.
 
 --=20
 Henrik Brix Andersen <henrik@brixandersen.dk>
 
 --OgqxwSJOaUobr8KG
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.7 (FreeBSD)
 Comment: GnuPG signed
 
 iD8DBQFGGhwVv+Q4flTiePgRAkcHAJ0ZEFoEo1TwvtFfIW9ZgZSb3kXKQQCeJkKp
 z37qlhmwK4sZUTpREnv9v+U=
 =eCBJ
 -----END PGP SIGNATURE-----
 
 --OgqxwSJOaUobr8KG--
State-Changed-From-To: feedback->closed 
State-Changed-By: rafan 
State-Changed-When: Mon Apr 9 11:57:29 UTC 2007 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=111342 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/111342: commit references a PR
Date: Mon,  9 Apr 2007 11:57:30 +0000 (UTC)

 rafan       2007-04-09 11:57:24 UTC
 
   FreeBSD ports repository
 
   Modified files:
     x11/slim             Makefile 
   Added files:
     x11/slim/files       patch-cfg.cpp 
   Log:
   - Fix theme parsing on 7.x. This patch is also accepted by upstream.
   
   PR:             ports/111342
   Submitted by:   Henrik Brix Andersen <henrik at brixandersen.dk>
   Approved by:    Tobias <ports at fsck.ch> (maintainer)
   
   Revision  Changes    Path
   1.7       +1 -0      ports/x11/slim/Makefile
   1.1       +12 -0     ports/x11/slim/files/patch-cfg.cpp (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
