wr_ran~1.c

来自「操作系统源代码」· C语言 代码 · 共 37 行

C
37
字号
/* $Header: wr_ranlib.c,v 1.4 87/03/10 09:18:01 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 <ranlib.h>#include "object.h"wr_ranlib(fd, ran, cnt)	register struct ranlib	*ran;	register long	cnt;{#if ! (BYTES_REVERSED || WORDS_REVERSED)	if (sizeof (struct ranlib) != SZ_RAN)#endif	{		char buf[100 * SZ_RAN];		while (cnt) {			register int i = (cnt > 100) ? 100 : cnt;			register char *c = buf;			long j = i * SZ_RAN;			cnt -= i;			while (i--) {				put4(ran->ran_off,c); c += 4;				put4(ran->ran_pos,c); c += 4;				ran++;			}			wr_bytes(fd, buf, j);		}	}#if ! (BYTES_REVERSED || WORDS_REVERSED)	else	wr_bytes(fd, (char *) ran, cnt * SZ_RAN);#endif}

⌨️ 快捷键说明

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