repo.or.cz
/
cake.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Resurrected incomplete Intel graphics driver in case anyone wants to
[cake.git]
/
test
/
dos
/
namefromfh.c
blob
aca94f45a497c763799a05185e38738ee72e0061
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
!=
NULL
)
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
}