1 #include <exec/types.h>
2 #include <dos/dosextens.h>
4 #include <proto/exec.h>
10 int main(int argc
, char **argv
) {
15 printf("usage: %s filename newsize\n", argv
[0]);
19 fh
= Open(argv
[1], MODE_READWRITE
);
21 PrintFault(IoErr(), "SetFileSize");
25 size
= SetFileSize(fh
, atol(argv
[2]), OFFSET_BEGINNING
);
27 PrintFault(IoErr(), "SetFileSize");
32 Printf("New size is %ld bytes\n", size
);