Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
2d51e2dc
Commit
2d51e2dc
authored
Apr 08, 2021
by
John van Groningen
Browse files
refactor cDirectory.c for unix to prevent c compiler warnings
parent
40991095
Changes
1
Hide whitespace changes
Inline
Side-by-side
main/Unix/cDirectory.c
View file @
2d51e2dc
...
...
@@ -60,8 +60,6 @@ static int unix_error_to_clean_error(int errCode)
static
int
openSearch
(
const
char
*
path
,
int
length
)
{
int
i
;
gPathLength
=
length
;
gPath
=
(
char
*
)
malloc
(
gPathLength
+
NAME_MAX
+
2
);
if
(
!
gPath
)
{
...
...
@@ -81,19 +79,6 @@ static int openSearch(const char *path, int length)
};
}
int
findNextFileC
(
int
);
int
findFirstFileC
(
CleanString
cs_path
)
{
int
errCode
;
errCode
=
openSearch
(
CleanStringCharacters
(
cs_path
),
CleanStringLength
(
cs_path
));
if
(
errCode
)
return
errCode
;
else
return
findNextFileC
(
0
);
}
void
getCommonFileInfoC
(
int
also_get_file_name
,
CleanString
*
pFileName
,
int
*
pFileSizeLow
,
int
*
pFileSizeHigh
,
int
*
pYear
,
int
*
pMonth
,
int
*
pDay
,
int
*
pDayNr
,
...
...
@@ -144,6 +129,17 @@ int findNextFileC(int dummy)
return
0
;
}
int
findFirstFileC
(
CleanString
cs_path
)
{
int
errCode
;
errCode
=
openSearch
(
CleanStringCharacters
(
cs_path
),
CleanStringLength
(
cs_path
));
if
(
errCode
)
return
errCode
;
else
return
findNextFileC
(
0
);
}
int
getPlatformIdC
(
int
dummy
)
{
#define UnixPlatform 0
...
...
@@ -186,7 +182,7 @@ void closeSearchC()
int
findSingleFileC
(
CleanString
cs_path
)
{
int
err
,
i
,
length
;
int
i
,
length
;
char
*
path_chars
;
gFileStat
.
st_size
=
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment