uncrustify.

This commit is contained in:
Kelvin Sherlock 2018-08-20 20:57:45 -04:00
parent a5e55f826c
commit 8be3dad543
4 changed files with 1705 additions and 1706 deletions

View File

@ -427,8 +427,7 @@ const char *host_error_name(word16 error) {
*/
static int hex(byte c)
{
static int hex(byte c) {
if (c >= '0' && c <= '9') return c - '0';
if (c >= 'a' && c <= 'f') return c + 10 - 'a';
if (c >= 'A' && c <= 'F') return c + 10 - 'A';
@ -560,7 +559,7 @@ void host_get_file_xinfo(const char *path, struct file_info *fi) {
fi->resource_blocks = (tmp + 511) / 512;
tmp = getxattr(path, XATTR_FINDERINFO_NAME, fi->finder_info, 32, 0, 0);
if (tmp == 16 || tmp == 32){
if (tmp == 16 || tmp == 32) {
fi->has_fi = 1;
finder_info_to_filetype(fi->finder_info, &fi->file_type, &fi->aux_type);
@ -602,7 +601,7 @@ void host_get_file_xinfo(const char *path, struct file_info *fi) {
fi->resource_blocks = (tmp + 511) / 512;
tmp = getxattr(path, "user.com.apple.FinderInfo", fi->finder_info, 32);
if (tmp == 16 || tmp == 32){
if (tmp == 16 || tmp == 32) {
fi->has_fi = 1;
finder_info_to_filetype(fi->finder_info, &fi->file_type, &fi->aux_type);
@ -698,7 +697,7 @@ word32 host_get_file_info(const char *path, struct file_info *fi) {
const char *dot = NULL;
const char *slash = NULL;
for(n = 0; ; ++n) {
for(n = 0;; ++n) {
char c = path[n];
if (c == 0) break;
else if (c == '/') { slash = path + n + 1; dot = NULL; }

View File

@ -930,7 +930,7 @@ static word32 fst_open(int class, const char *path) {
if (pcount >= 5) set_memory16_c(pb + OpenRecGS_access, access, 0);
if (pcount >= 6) set_memory16_c(pb + OpenRecGS_fileType, fi.file_type, 0);
if (pcount >= 7) set_memory32_c(pb + OpenRecGS_auxType, fi.aux_type, 0);
if (pcount >= 8) set_memory16_c(pb + OpenRecGS_storageType, fi. storage_type, 0);
if (pcount >= 8) set_memory16_c(pb + OpenRecGS_storageType, fi.storage_type, 0);
if (pcount >= 9) host_set_date_time_rec(pb + OpenRecGS_createDateTime, fi.create_date);
if (pcount >= 10) host_set_date_time_rec(pb + OpenRecGS_modDateTime, fi.modified_date);
@ -968,7 +968,7 @@ static word32 fst_open(int class, const char *path) {
return tooManyFilesOpen;
}
if (type == file_regular){
if (type == file_regular) {
if (g_cfg_host_crlf) {
if (fi.file_type == 0x04 || fi.file_type == 0xb0)

View File

@ -193,7 +193,7 @@ static int scandir_filter(const struct dirent *d) {
const char *name = d->d_name;
if (name[0] == '.') return 0;
for (i = 0; ; ++i) {
for (i = 0;; ++i) {
unsigned char c = name[i];
if (c & 0x80) return 0;
if (c == 0) break;