- fixed endianess issue in genesys backend when creating

slope table
merge-requests/1/head
Stéphane Voltz 2005-08-05 12:18:35 +00:00
rodzic bf897c3502
commit 9857b4cf6c
2 zmienionych plików z 17 dodań i 0 usunięć

Wyświetl plik

@ -1,3 +1,8 @@
2005-08-05 St<53>hane Voltz <stefdev@modulonet.fr>
* backend/genesys.c: Fixed endianess issue in slope table
generation. Tested ok on x86 architecture.
2005-08-02 Henning Meier-Geinitz <henning@meier-geinitz.de>
* po/sane-backends.da.po: Updated Danish translation (from

Wyświetl plik

@ -704,6 +704,7 @@ genesys_create_slope_table2 (Genesys_Device * dev,
SANE_Int sum = 0;
int vstart, vend;
int i;
SANE_Byte h,l;
DBG (DBG_proc,
"sanei_genesys_create_slope_table2: %d steps, step_type = %d, "
@ -808,7 +809,18 @@ genesys_create_slope_table2 (Genesys_Device * dev,
}
}
/* post fix endianess issue */
if(!little_endian)
{
for(i=0; i <steps; i++)
{
h = (SANE_Byte) slope_table[i] / 256;
l = (SANE_Byte) slope_table[i] % 256;
*(SANE_Byte *)(slope_table+i)=h;
*((SANE_Byte *)(slope_table+i)+1)=l;
}
}
DBG (DBG_proc,
"sanei_genesys_create_slope_table2: returns sum=%d, completed\n", sum);