repo.or.cz
/
AROS.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Converted bz2_au.library into the OS3, OS4 and MorphOS-compatible
[AROS.git]
/
test
/
dos
/
namefromfh.c
blob
0b50384f391ec47f35121cc6bfbd3b3b215d96dc
1
#include <proto/dos.h>
2
#include <stdio.h>
3
4
int
main
(
void
)
5
{
6
TEXT buffer
[
512
];
7
BPTR fh
=
Open
(
"__TEST__"
,
MODE_NEWFILE
);
8
9
if
(
fh
!=
BNULL
)
10
{
11
if
(
NameFromFH
(
fh
,
buffer
,
512
))
12
{
13
printf
(
"got name: %s
\n
"
,
buffer
);
14
}
15
else
16
{
17
printf
(
"namefromlock failed. ioerr = %ld
\n
"
,
IoErr
());
18
}
19
20
Close
(
fh
);
21
DeleteFile
(
"__TEST__"
);
22
}
23
else
24
{
25
printf
(
"couldn't create file
\n
"
);
26
}
27
28
29
return
0
;
30
}