2 Copyright © 1995-2015, The AROS Development Team. All rights reserved.
11 int main(int argc
, char **argv
)
14 LONG result
= RETURN_OK
;
18 printf("Usage: %s <file name>\n", argv
[0]);
22 fh
= Open(argv
[1], MODE_OLDFILE
);
26 struct FileInfoBlock
*fib
;
28 printf("IsInteractive: %d\n", (int)IsInteractive(fh
));
30 fib
= AllocDosObject(DOS_FIB
, NULL
);
33 if (ExamineFH(fh
, fib
))
36 printf("Filename = %s\n", fib
->fib_FileName
);
37 printf("Protection = 0x%08X\n",
38 (unsigned)fib
->fib_Protection
);
42 printf("ExamineFH() failed, ioerr = %d\n", (int)IoErr());
46 if (strcasecmp(fib
->fib_FileName
, FilePart(argv
[1])) != 0)
48 printf("File name from FIB does not match"
49 " file name from argument\n");
50 result
= RETURN_ERROR
;
53 FreeDosObject(DOS_FIB
, fib
);
57 printf("couldn't allocate fileinfoblock\n");
65 printf("Couldn't open file\n");