2 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
3 * See the copyright notice in the ACK home directory, in the file "Copyright".
5 /* $Id: asize.c,v 1.8 1994/06/24 10:13:48 ceriel Exp $ */
11 asize -- determine object size
20 unsigned short nrsect;
31 if (! rd_open(*++argv)) {
32 fprintf(stderr, "asize: cannot open %s\n", *argv);
37 fprintf(stderr, "asize: %s-- bad format\n", *argv);
41 nrsect = buf.oh_nsect;
43 fprintf(stderr, "asize: %s-- no sections\n", *argv);
48 printf("%s: ", *argv);
51 while (nrsect-- > 0) {
53 printf("%ld", sbuf.os_size);
58 printf(" = %ld = 0x%lx\n", sum, sum);
66 fprintf(stderr, "read error\n");