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:
Bertrik Sikken 2008-08-31 09:44:45 +00:00
parent 9da68f9ed7
commit b7219b7e16
3 changed files with 33 additions and 33 deletions

View file

@ -86,7 +86,7 @@ int sansa_open(struct sansa_t* sansa, int silent)
if (!silent) { if (!silent) {
fprintf(stderr,"[ERR] ioctl() call to get sector size failed, defaulting to %d\n" fprintf(stderr,"[ERR] ioctl() call to get sector size failed, defaulting to %d\n"
,sansa->sector_size); ,sansa->sector_size);
} }
} }
return 0; return 0;
} }

View file

@ -44,7 +44,7 @@ static int lock_volume(HANDLE hDisk)
DWORD dummy; DWORD dummy;
return DeviceIoControl(hDisk, FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0, return DeviceIoControl(hDisk, FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0,
&dummy, NULL); &dummy, NULL);
} }
static int unlock_volume(HANDLE hDisk) static int unlock_volume(HANDLE hDisk)
@ -52,7 +52,7 @@ static int unlock_volume(HANDLE hDisk)
DWORD dummy; DWORD dummy;
return DeviceIoControl(hDisk, FSCTL_UNLOCK_VOLUME, NULL, 0, NULL, 0, return DeviceIoControl(hDisk, FSCTL_UNLOCK_VOLUME, NULL, 0, NULL, 0,
&dummy, NULL); &dummy, NULL);
} }
#ifndef RBUTIL #ifndef RBUTIL

View file

@ -173,10 +173,10 @@ sansa_memmem (haystack, haystack_len, needle, needle_len)
for (begin = (const char *) haystack; begin <= last_possible; ++begin) for (begin = (const char *) haystack; begin <= last_possible; ++begin)
if (begin[0] == ((const char *) needle)[0] && if (begin[0] == ((const char *) needle)[0] &&
!memcmp ((const void *) &begin[1], !memcmp ((const void *) &begin[1],
(const void *) ((const char *) needle + 1), (const void *) ((const char *) needle + 1),
needle_len - 1)) needle_len - 1))
return (void *) begin; return (void *) begin;
return NULL; return NULL;
} }
@ -197,15 +197,15 @@ sansa_memmem (haystack, haystack_len, needle, needle_len)
*/ */
/* crc_tab[] -- this crcTable is being build by chksum_crc32GenTab(). /* crc_tab[] -- this crcTable is being build by chksum_crc32GenTab().
* so make sure, you call it before using the other * so make sure, you call it before using the other
* functions! * functions!
*/ */
static unsigned int crc_tab[256]; static unsigned int crc_tab[256];
/* chksum_crc() -- to a given block, this one calculates the /* chksum_crc() -- to a given block, this one calculates the
* crc32-checksum until the length is * crc32-checksum until the length is
* reached. the crc32-checksum will be * reached. the crc32-checksum will be
* the result. * the result.
*/ */
static unsigned int chksum_crc32 (const unsigned char *block, unsigned int length) 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 /* chksum_crc32gentab() -- to a global crc_tab[256], this one will
* calculate the crcTable for crc32-checksums. * calculate the crcTable for crc32-checksums.
* it is generated to the polynom [..] * it is generated to the polynom [..]
*/ */
static void chksum_crc32gentab (void) static void chksum_crc32gentab (void)
{ {
unsigned long crc, poly; unsigned long crc, poly;
int i, j; int i, j;
poly = 0xEDB88320L; poly = 0xEDB88320L;
for (i = 0; i < 256; i++) for (i = 0; i < 256; i++)
{ {
crc = i; crc = i;
for (j = 8; j > 0; j--) for (j = 8; j > 0; j--)
{ {
if (crc & 1) if (crc & 1)
{ {
crc = (crc >> 1) ^ poly; crc = (crc >> 1) ^ poly;
} }
else else
{ {
crc >>= 1; crc >>= 1;
} }
} }
crc_tab[i] = crc; crc_tab[i] = crc;
} }
} }
/* Known keys for Sansa E200 and C200 firmwares: */ /* Known keys for Sansa E200 and C200 firmwares: */