5 int main(int argc
, char **argv
)
11 printf("Usage: %s <file name>\n", argv
[0]);
15 fh
= Open(argv
[1], MODE_OLDFILE
);
19 struct FileInfoBlock
*fib
;
21 printf("IsInteractive: %d\n", (int)IsInteractive(fh
));
23 fib
= AllocDosObject(DOS_FIB
, NULL
);
26 if (ExamineFH(fh
, fib
))
29 printf("Filename = %s\n" , fib
->fib_FileName
);
30 printf("Protection = 0x%08X\n", (unsigned)fib
->fib_Protection
);
34 printf("examinefh failed, ioerr = %d\n", (int)IoErr());
36 FreeDosObject(DOS_FIB
, fib
);
40 printf("couldn't allocate fileinfoblock\n");
47 printf("Couldn't open file\n");