wr_arhdr.c

Go to the documentation of this file.
00001 /* $Header: /opt/proj/minix/cvsroot/src/commands/aal/wr_arhdr.c,v 1.1.1.1 2005/04/21 14:53:58 beng Exp $ */
00002 /*
00003  * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
00004  * See the copyright notice in the ACK home directory, in the file "Copyright".
00005  */
00006 #include <arch.h>
00007 #include "object.h"
00008 
00009 wr_arhdr(fd, arhdr)
00010         register struct ar_hdr  *arhdr;
00011 {
00012         char buf[AR_TOTAL];
00013         register char *c = buf;
00014         register char *p = arhdr->ar_name;
00015         register int i = 14;
00016 
00017         while (i--) {
00018                 *c++ = *p++;
00019         }
00020         put2((int)(arhdr->ar_date>>16),c); c += 2;
00021         put2((int)(arhdr->ar_date),c); c += 2;
00022         *c++ = arhdr->ar_uid;
00023         *c++ = arhdr->ar_gid;
00024         put2(arhdr->ar_mode,c); c += 2;
00025         put2((int)(arhdr->ar_size>>16),c); c += 2;
00026         put2((int)(arhdr->ar_size),c);
00027         wr_bytes(fd, buf, (long) AR_TOTAL);
00028 }

Generated on Fri Apr 14 22:56:38 2006 for minix by  doxygen 1.4.6