TaggedOpenLibrary constants off by one fix.
[AROS.git] / test / dos / namefromfh.c
blobaca94f45a497c763799a05185e38738ee72e0061
1 #include <proto/dos.h>
2 #include <stdio.h>
4 int main(void)
6 TEXT buffer[512];
7 BPTR fh = Open("__TEST__", MODE_NEWFILE);
9 if (fh != NULL)
11 if (NameFromFH(fh, buffer, 512))
13 printf("got name: %s\n", buffer);
15 else
17 printf("namefromlock failed. ioerr = %ld\n", IoErr());
20 Close(fh);
21 DeleteFile("__TEST__");
23 else
25 printf("couldn't create file\n");
29 return 0;