forget difference between big and small commands - obsolete with vm.
[minix.git] / commands / aal / wr_arhdr.c
bloba074f2dfe94dddf0465c6e9aa2293a9ed11c1598
1 /* $Header$ */
2 /*
3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
5 */
6 #include <arch.h>
7 #include "object.h"
9 wr_arhdr(fd, arhdr)
10 register struct ar_hdr *arhdr;
12 char buf[AR_TOTAL];
13 register char *c = buf;
14 register char *p = arhdr->ar_name;
15 register int i = 14;
17 while (i--) {
18 *c++ = *p++;
20 put2((int)(arhdr->ar_date>>16),c); c += 2;
21 put2((int)(arhdr->ar_date),c); c += 2;
22 *c++ = arhdr->ar_uid;
23 *c++ = arhdr->ar_gid;
24 put2(arhdr->ar_mode,c); c += 2;
25 put2((int)(arhdr->ar_size>>16),c); c += 2;
26 put2((int)(arhdr->ar_size),c);
27 wr_bytes(fd, buf, (long) AR_TOTAL);