diff options
author | Steve Bavin <pondlife@pondlife.me> | 2007-11-08 12:11:34 +0000 |
---|---|---|
committer | Steve Bavin <pondlife@pondlife.me> | 2007-11-08 12:11:34 +0000 |
commit | f87eb608a8fbb8eca629d080e8ef83dbcce6203e (patch) | |
tree | 80a979923c9858babaa7d2db9c3c42c62f2e08e0 /uisimulator | |
parent | 9e05cc537baf69ab636d4ba5b8c4b1265e3729ee (diff) | |
download | rockbox-f87eb608a8fbb8eca629d080e8ef83dbcce6203e.tar.gz rockbox-f87eb608a8fbb8eca629d080e8ef83dbcce6203e.zip |
Code police; trailing spaces mainly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15527 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/common/io.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/uisimulator/common/io.c b/uisimulator/common/io.c index fff12a0832..4e202228a8 100644 --- a/uisimulator/common/io.c +++ b/uisimulator/common/io.c | |||
@@ -80,7 +80,7 @@ static wchar_t* utf8_to_ucs2(const unsigned char *utf8, void *buffer) | |||
80 | 80 | ||
81 | while (*utf8) | 81 | while (*utf8) |
82 | utf8 = utf8decode(utf8, ucs++); | 82 | utf8 = utf8decode(utf8, ucs++); |
83 | 83 | ||
84 | *ucs = 0; | 84 | *ucs = 0; |
85 | return buffer; | 85 | return buffer; |
86 | } | 86 | } |
@@ -90,7 +90,7 @@ static unsigned char *ucs2_to_utf8(const wchar_t *ucs, unsigned char *buffer) | |||
90 | 90 | ||
91 | while (*ucs) | 91 | while (*ucs) |
92 | utf8 = utf8encode(*ucs++, utf8); | 92 | utf8 = utf8encode(*ucs++, utf8); |
93 | 93 | ||
94 | *utf8 = 0; | 94 | *utf8 = 0; |
95 | return buffer; | 95 | return buffer; |
96 | } | 96 | } |
@@ -150,13 +150,13 @@ struct sim_dirent { | |||
150 | int attribute; | 150 | int attribute; |
151 | long size; | 151 | long size; |
152 | long startcluster; | 152 | long startcluster; |
153 | unsigned short wrtdate; /* Last write date */ | 153 | unsigned short wrtdate; /* Last write date */ |
154 | unsigned short wrttime; /* Last write time */ | 154 | unsigned short wrttime; /* Last write time */ |
155 | }; | 155 | }; |
156 | 156 | ||
157 | struct dirstruct { | 157 | struct dirstruct { |
158 | void *dir; /* actually a DIR* dir */ | 158 | void *dir; /* actually a DIR* dir */ |
159 | char *name; | 159 | char *name; |
160 | } SIM_DIR; | 160 | } SIM_DIR; |
161 | 161 | ||
162 | struct mydir { | 162 | struct mydir { |
@@ -354,7 +354,7 @@ MYDIR *sim_opendir(const char *name) | |||
354 | 354 | ||
355 | struct sim_dirent *sim_readdir(MYDIR *dir) | 355 | struct sim_dirent *sim_readdir(MYDIR *dir) |
356 | { | 356 | { |
357 | char buffer[512]; /* sufficiently big */ | 357 | char buffer[MAX_PATH]; /* sufficiently big */ |
358 | static struct sim_dirent secret; | 358 | static struct sim_dirent secret; |
359 | STAT_T s; | 359 | STAT_T s; |
360 | DIRENT_T *x11 = READDIR(dir->dir); | 360 | DIRENT_T *x11 = READDIR(dir->dir); |
@@ -375,7 +375,7 @@ struct sim_dirent *sim_readdir(MYDIR *dir) | |||
375 | STAT(buffer, &s); /* get info */ | 375 | STAT(buffer, &s); /* get info */ |
376 | 376 | ||
377 | #define ATTR_DIRECTORY 0x10 | 377 | #define ATTR_DIRECTORY 0x10 |
378 | 378 | ||
379 | secret.attribute = S_ISDIR(s.st_mode)?ATTR_DIRECTORY:0; | 379 | secret.attribute = S_ISDIR(s.st_mode)?ATTR_DIRECTORY:0; |
380 | secret.size = s.st_size; | 380 | secret.size = s.st_size; |
381 | 381 | ||
@@ -448,7 +448,7 @@ int sim_creat(const char *name) | |||
448 | if(name[0] == '/') | 448 | if(name[0] == '/') |
449 | { | 449 | { |
450 | snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name); | 450 | snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name); |
451 | 451 | ||
452 | debugf("We create the real file '%s'\n", buffer); | 452 | debugf("We create the real file '%s'\n", buffer); |
453 | return OPEN(buffer, O_BINARY | O_WRONLY | O_CREAT | O_TRUNC, 0666); | 453 | return OPEN(buffer, O_BINARY | O_WRONLY | O_CREAT | O_TRUNC, 0666); |
454 | } | 454 | } |
@@ -457,7 +457,7 @@ int sim_creat(const char *name) | |||
457 | #else | 457 | #else |
458 | return OPEN(name, O_BINARY | O_WRONLY | O_CREAT | O_TRUNC, 0666); | 458 | return OPEN(name, O_BINARY | O_WRONLY | O_CREAT | O_TRUNC, 0666); |
459 | #endif | 459 | #endif |
460 | } | 460 | } |
461 | 461 | ||
462 | ssize_t sim_read(int fd, void *buf, size_t count) | 462 | ssize_t sim_read(int fd, void *buf, size_t count) |
463 | { | 463 | { |
@@ -518,7 +518,7 @@ int sim_rmdir(const char *name) | |||
518 | return RMDIR(name); | 518 | return RMDIR(name); |
519 | #else | 519 | #else |
520 | char buffer[MAX_PATH]; /* sufficiently big */ | 520 | char buffer[MAX_PATH]; /* sufficiently big */ |
521 | if(name[0] == '/') | 521 | if(name[0] == '/') |
522 | { | 522 | { |
523 | snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name); | 523 | snprintf(buffer, sizeof(buffer), "%s%s", get_sim_rootdir(), name); |
524 | 524 | ||
@@ -587,7 +587,7 @@ long sim_filesize(int fd) | |||
587 | return _filelength(fd); | 587 | return _filelength(fd); |
588 | #else | 588 | #else |
589 | struct stat buf; | 589 | struct stat buf; |
590 | 590 | ||
591 | if (!fstat(fd, &buf)) | 591 | if (!fstat(fd, &buf)) |
592 | return buf.st_size; | 592 | return buf.st_size; |
593 | else | 593 | else |
@@ -601,7 +601,7 @@ void fat_size(IF_MV2(int volume,) unsigned long* size, unsigned long* free) | |||
601 | if (volume != 0) { | 601 | if (volume != 0) { |
602 | debugf("io.c: fat_size(volume=%d); simulator only supports volume 0\n", | 602 | debugf("io.c: fat_size(volume=%d); simulator only supports volume 0\n", |
603 | volume); | 603 | volume); |
604 | 604 | ||
605 | if (size) *size = 0; | 605 | if (size) *size = 0; |
606 | if (free) *free = 0; | 606 | if (free) *free = 0; |
607 | return; | 607 | return; |
@@ -671,9 +671,9 @@ void *sim_codec_load_ram(char* codecptr, int size, void **pd) | |||
671 | 671 | ||
672 | *pd = NULL; | 672 | *pd = NULL; |
673 | 673 | ||
674 | /* We have to create the dynamic link library file from ram so we | 674 | /* We have to create the dynamic link library file from ram so we |
675 | can simulate the codec loading. With voice and crossfade, | 675 | can simulate the codec loading. With voice and crossfade, |
676 | multiple codecs may be loaded at the same time, so we need | 676 | multiple codecs may be loaded at the same time, so we need |
677 | to find an unused filename */ | 677 | to find an unused filename */ |
678 | for (codec_count = 0; codec_count < 10; codec_count++) | 678 | for (codec_count = 0; codec_count < 10; codec_count++) |
679 | { | 679 | { |
@@ -698,7 +698,7 @@ void *sim_codec_load_ram(char* codecptr, int size, void **pd) | |||
698 | /* Now load the library. */ | 698 | /* Now load the library. */ |
699 | *pd = dlopen(path, RTLD_NOW); | 699 | *pd = dlopen(path, RTLD_NOW); |
700 | if (*pd == NULL) { | 700 | if (*pd == NULL) { |
701 | DEBUGF("failed to load %s\n", path); | 701 | DEBUGF("failed to load %s\n", path); |
702 | #ifdef WIN32 | 702 | #ifdef WIN32 |
703 | FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, | 703 | FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, |
704 | buf, sizeof buf, NULL); | 704 | buf, sizeof buf, NULL); |