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 printf("Open failed: %ld\n", IoErr());
25 size
= SetFileSize(fh
, atol(argv
[2]), OFFSET_BEGINNING
);
27 printf("SetFileSize: %ld\n", IoErr());
31 printf ("new size is %ld bytes\n", size
);