wr_arhdr.c

来自「minix软件源代码」· C语言 代码 · 共 29 行

C
29
字号
/* $Header: wr_arhdr.c,v 1.6 91/01/18 09:54:56 ceriel Exp $ *//* * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands. * See the copyright notice in the ACK home directory, in the file "Copyright". */#include <arch.h>#include "object.h"wr_arhdr(fd, arhdr)	register struct ar_hdr	*arhdr;{	char buf[AR_TOTAL];	register char *c = buf;	register char *p = arhdr->ar_name;	register int i = 14;	while (i--) {		*c++ = *p++;	}	put2((int)(arhdr->ar_date>>16),c); c += 2;	put2((int)(arhdr->ar_date),c); c += 2;	*c++ = arhdr->ar_uid;	*c++ = arhdr->ar_gid;	put2(arhdr->ar_mode,c); c += 2;	put2((int)(arhdr->ar_size>>16),c); c += 2;	put2((int)(arhdr->ar_size),c);	wr_bytes(fd, buf, (long) AR_TOTAL);}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?