Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
d71492a8
Commit
d71492a8
authored
Apr 06, 2002
by
rswindell
Browse files
Added test for FULLPATH.
parent
95f93eef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
src/xpdev/wraptest.c
src/xpdev/wraptest.c
+8
-5
No files found.
src/xpdev/wraptest.c
View file @
d71492a8
...
...
@@ -21,6 +21,8 @@ int main()
{
char
compiler
[
128
];
char
*
glob_pattern
=
"*wrap*"
;
char
*
path
=
"."
;
char
fullpath
[
MAX_PATH
+
1
];
int
i
;
int
ch
;
uint
u
;
...
...
@@ -60,7 +62,7 @@ int main()
BEEP
(
i
,
15
);
/* SLEEP test */
printf
(
"
\n
SLEEP() test
\n
"
);
printf
(
"
\n
SLEEP(
5 second
) test
\n
"
);
getkey
();
t
=
time
(
NULL
);
printf
(
"sleeping... "
);
...
...
@@ -69,7 +71,7 @@ int main()
printf
(
"slept %d seconds
\n
"
,
time
(
NULL
)
-
t
);
/* glob test */
printf
(
"
\n
glob() test
\n
"
);
printf
(
"
\n
glob(
%s
) test
\n
"
,
glob_pattern
);
getkey
();
i
=
glob
(
glob_pattern
,
GLOB_MARK
,
NULL
,
&
g
);
if
(
i
==
0
)
{
...
...
@@ -80,9 +82,10 @@ int main()
printf
(
"glob(%s) returned %d
\n
"
,
glob_pattern
,
i
);
/* opendir (and other directory functions) test */
printf
(
"
\n
opendir() test
\n
"
);
printf
(
"
\n
opendir(
%s
) test
\n
"
,
path
);
getkey
();
dir
=
opendir
(
"."
);
printf
(
"
\n
Directory of %s
\n\n
"
,
FULLPATH
(
fullpath
,
path
,
sizeof
(
fullpath
)));
dir
=
opendir
(
path
);
while
(
dir
!=
NULL
&&
(
dirent
=
readdir
(
dir
))
!=
NULL
)
{
t
=
fdate
(
dirent
->
d_name
);
printf
(
"%.24s %10lu %06o %s%c
\n
"
...
...
@@ -95,7 +98,7 @@ int main()
}
if
(
dir
!=
NULL
)
closedir
(
dir
);
printf
(
"
\n
Free disk space: %lu bytes
\n
"
,
getfreediskspace
(
"."
));
printf
(
"
\n
Free disk space: %lu bytes
\n
"
,
getfreediskspace
(
path
));
#endif
#if 1
...
...
Write
Preview
Markdown
is supported
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