chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.web-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix byte shift error
[ypp-sc-tools.web-live.git]
/
pctb
/
pages.c
diff --git
a/pctb/pages.c
b/pctb/pages.c
index 361ea0ea9926b4cf576d1cdaedfafa5e00370477..de967310454085a02ce4ce467b1fa144cf7c2ba4 100644
(file)
--- a/
pctb/pages.c
+++ b/
pctb/pages.c
@@
-229,7
+229,8
@@
static CanonImage *convert_page(Snapshot *sn) {
long xrgb= XGetPixel(sn, x, y);
int i;
rgb= 0;
long xrgb= XGetPixel(sn, x, y);
int i;
rgb= 0;
- for (i=0; i<3; i++, rgb <<= 8) {
+ for (i=0; i<3; i++) {
+ rgb <<= 8;
unsigned long sample=
((xrgb << shiftmasks[i].lshift)
>> shiftmasks[i].rshift) & SAMPLEMASK;
unsigned long sample=
((xrgb << shiftmasks[i].lshift)
>> shiftmasks[i].rshift) & SAMPLEMASK;
@@
-249,7
+250,7
@@
void take_screenshots(void) {
/* find the window and check it's on the right kind of screen */
raise_and_get_details();
/* find the window and check it's on the right kind of screen */
raise_and_get_details();
-
snapshot(¤t
);
+
wait_for_stability(¤t,0,0
);
test= convert_page(current);
find_structure(test);
free(test);
test= convert_page(current);
find_structure(test);
free(test);
@@
-286,7
+287,7
@@
void take_one_screenshot(void) {
raise_and_get_details();
sync_after_input();
raise_and_get_details();
sync_after_input();
-
snapshot(¤t
);
+
wait_for_stability(¤t,0,0
);
page_images[0]= convert_page(current);
npages= 1;
}
page_images[0]= convert_page(current);
npages= 1;
}