mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
Replaced TAB characters by spaces in sansapatcher
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18368 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
9da68f9ed7
commit
b7219b7e16
3 changed files with 33 additions and 33 deletions
|
@ -86,7 +86,7 @@ int sansa_open(struct sansa_t* sansa, int silent)
|
|||
if (!silent) {
|
||||
fprintf(stderr,"[ERR] ioctl() call to get sector size failed, defaulting to %d\n"
|
||||
,sansa->sector_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ static int lock_volume(HANDLE hDisk)
|
|||
DWORD dummy;
|
||||
|
||||
return DeviceIoControl(hDisk, FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0,
|
||||
&dummy, NULL);
|
||||
&dummy, NULL);
|
||||
}
|
||||
|
||||
static int unlock_volume(HANDLE hDisk)
|
||||
|
@ -52,7 +52,7 @@ static int unlock_volume(HANDLE hDisk)
|
|||
DWORD dummy;
|
||||
|
||||
return DeviceIoControl(hDisk, FSCTL_UNLOCK_VOLUME, NULL, 0, NULL, 0,
|
||||
&dummy, NULL);
|
||||
&dummy, NULL);
|
||||
}
|
||||
|
||||
#ifndef RBUTIL
|
||||
|
|
|
@ -173,10 +173,10 @@ sansa_memmem (haystack, haystack_len, needle, needle_len)
|
|||
|
||||
for (begin = (const char *) haystack; begin <= last_possible; ++begin)
|
||||
if (begin[0] == ((const char *) needle)[0] &&
|
||||
!memcmp ((const void *) &begin[1],
|
||||
(const void *) ((const char *) needle + 1),
|
||||
needle_len - 1))
|
||||
return (void *) begin;
|
||||
!memcmp ((const void *) &begin[1],
|
||||
(const void *) ((const char *) needle + 1),
|
||||
needle_len - 1))
|
||||
return (void *) begin;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -197,15 +197,15 @@ sansa_memmem (haystack, haystack_len, needle, needle_len)
|
|||
*/
|
||||
|
||||
/* crc_tab[] -- this crcTable is being build by chksum_crc32GenTab().
|
||||
* so make sure, you call it before using the other
|
||||
* functions!
|
||||
* so make sure, you call it before using the other
|
||||
* functions!
|
||||
*/
|
||||
static unsigned int crc_tab[256];
|
||||
|
||||
/* chksum_crc() -- to a given block, this one calculates the
|
||||
* crc32-checksum until the length is
|
||||
* reached. the crc32-checksum will be
|
||||
* the result.
|
||||
* crc32-checksum until the length is
|
||||
* reached. the crc32-checksum will be
|
||||
* the result.
|
||||
*/
|
||||
static unsigned int chksum_crc32 (const unsigned char *block, unsigned int length)
|
||||
{
|
||||
|
@ -221,32 +221,32 @@ static unsigned int chksum_crc32 (const unsigned char *block, unsigned int lengt
|
|||
}
|
||||
|
||||
/* chksum_crc32gentab() -- to a global crc_tab[256], this one will
|
||||
* calculate the crcTable for crc32-checksums.
|
||||
* it is generated to the polynom [..]
|
||||
* calculate the crcTable for crc32-checksums.
|
||||
* it is generated to the polynom [..]
|
||||
*/
|
||||
|
||||
static void chksum_crc32gentab (void)
|
||||
{
|
||||
unsigned long crc, poly;
|
||||
int i, j;
|
||||
unsigned long crc, poly;
|
||||
int i, j;
|
||||
|
||||
poly = 0xEDB88320L;
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
crc = i;
|
||||
for (j = 8; j > 0; j--)
|
||||
{
|
||||
if (crc & 1)
|
||||
{
|
||||
crc = (crc >> 1) ^ poly;
|
||||
}
|
||||
else
|
||||
{
|
||||
crc >>= 1;
|
||||
}
|
||||
}
|
||||
crc_tab[i] = crc;
|
||||
}
|
||||
poly = 0xEDB88320L;
|
||||
for (i = 0; i < 256; i++)
|
||||
{
|
||||
crc = i;
|
||||
for (j = 8; j > 0; j--)
|
||||
{
|
||||
if (crc & 1)
|
||||
{
|
||||
crc = (crc >> 1) ^ poly;
|
||||
}
|
||||
else
|
||||
{
|
||||
crc >>= 1;
|
||||
}
|
||||
}
|
||||
crc_tab[i] = crc;
|
||||
}
|
||||
}
|
||||
|
||||
/* Known keys for Sansa E200 and C200 firmwares: */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue