Summary: | xkbcomp fails on geometry files with negative floating point values | ||||||
---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Martin <BehZel> | ||||
Component: | App/xkbcomp | Assignee: | Xorg Project Team <xorg-team> | ||||
Status: | RESOLVED MOVED | QA Contact: | Xorg Project Team <xorg-team> | ||||
Severity: | major | ||||||
Priority: | medium | ||||||
Version: | unspecified | ||||||
Hardware: | Other | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
i915 platform: | i915 features: | ||||||
Attachments: |
|
... is this actually a problem though, given that negative co-ordinates don't make any sense there? What do you mean with "negative co-ordinates don't make any sense there"? Every coordinate system allow What do you mean with "negative co-ordinates don't make any sense there"? Every coordinate system allows negative coordinates. And even if not, then it should at least be mentioned somewhere. And then there is just the point, that the same input values should result in the same output, or at least a valid output. I tracked the problem even deeper, back to the library libxkbfile, where in the file libxkbfile-1.0.8/src/xkbtext.c on line 708 is written: frac= val%XkbGeomPtsPerMM; which /should/ be: frac= abs(val%XkbGeomPtsPerMM); (positions after decimal point are always absolute). Thanks for the fix. But what effect would negative co-ordinates in a shape actually achieve, and why would you want them? I understand the general concept that co-ordinate systems should support negative co-ordinates. But what's the value in supporting them in this specific case? -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/app/xkbcomp/issues/2. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 57236 [details] Sample file to demontrate problem xkbcomp has problems with shapes, that contain negative floating point values. To reproduce: See attachment file. 1) $ xkbcomp sample.xkb sample2.xkm 2) $ xkbcomp sample2.xkb sample3.xkb 3) $ xkbcomp sample3.xkb syntax error: line 10 of sample3.xkb last scanned symbol is: corner Errors encountered in sample3.xkb; not compiled. Compare original file (sample.xkb) with sample3.xkb. While positive floating points and negative integers pose no problem, negative floating point values become something like -3.-4 which makes no sense and gets a syntax error.