Bug 3424 - next/prev borked when startglyph > 0xffff
Summary: next/prev borked when startglyph > 0xffff
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: App/other (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1690
  Show dependency treegraph
 
Reported: 2005-05-29 11:30 UTC by James Cloos
Modified: 2005-08-27 19:40 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
xfd.c patch to not maks start glyph index AND 0xFFFF (570 bytes, patch)
2005-05-29 11:31 UTC, James Cloos
cloos: 6.8-branch?
Details | Splinter Review
unmask row to allow row*0xff+col == start (659 bytes, patch)
2005-05-29 12:14 UTC, James Cloos
no flags Details | Splinter Review

Description James Cloos 2005-05-29 11:30:08 UTC
When xfd(1x) was updated to support Xft and fonts w/ glyph indices > 0xffff one
line was missed.  In xfd.c / change_page() start is declared inline as Dimension.
As such, all changes to the start glyph's index are masked & 0xffff.

The attached diff corrects this by a s/Dimension/unsigned long/ on that line.
Comment 1 James Cloos 2005-05-29 11:31:35 UTC
Created attachment 2790 [details] [review]
xfd.c patch to not maks start glyph index AND 0xFFFF
Comment 2 James Cloos 2005-05-29 11:33:59 UTC
Forgot to add:

I made the diff against the version under xapps HEAD.  It should apply against
every version in the tree that may end up in a release....
Comment 3 James Cloos 2005-05-29 12:02:50 UTC
There is one more stop in change_page() that needs updating.  It has this code:

    if (!page || newstart != oldstart) {
	unsigned int row = (unsigned int) ((newstart >> 8) & 0xff);
	unsigned int col = (unsigned int) (newstart & 0xff);

	XtSetArg (arg, XtNlabel, buf);
	sprintf (buf, xfd_resources.start_format, newstart, row, col);

row,col are still limited to < 65536.

The default format string uses %d for row and col, so if row isn't masked
with & 0xff it'll be almost valid.

That is probably the only backward-compatable way to do it, given that the
format string is done as a resource....  
Comment 4 James Cloos 2005-05-29 12:14:56 UTC
Created attachment 2791 [details] [review]
unmask row to allow row*0xff+col == start
Comment 5 James Cloos 2005-06-05 14:10:32 UTC
changed product from xapps to xorg and reassigned to owner of xorg (team I presume?)
Comment 6 Adam Jackson 2005-08-28 12:40:04 UTC
applied to head, thanks!


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.