⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wr_bytes.c

📁 操作系统源代码
💻 C
字号:
/* $Header: wr_bytes.c,v 1.5 87/03/10 09:17:12 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". */#define MININT		(1 << (sizeof(int) * 8 - 1))#define MAXCHUNK	(~MININT)	/* Highest count we write(2).	*//* Notice that MAXCHUNK itself might be too large with some compilers.   You have to put it in an int!*/static int maxchunk = MAXCHUNK;/* * Just write "cnt" bytes to file-descriptor "fd". */wr_bytes(fd, string, cnt)	register char	*string;	register long	cnt;{	while (cnt) {		register int n = cnt >= maxchunk ? maxchunk : cnt;		if (write(fd, string, n) != n)			wr_fatal();		string += n;		cnt -= n;	}}

⌨️ 快捷键说明

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