File:  [MW Coherent from dump] / coherent / d / bin / cc / c / common / sget.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:39 2019 UTC (7 years, 2 months ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

/*
 * Standard stream library for the
 * C compiler and other compilers that use
 * C compiler factilities.
 * Input a string of max. length 'n'.
 */
#include <stdio.h>
#ifdef   vax
#include "INC$LIB:mch.h"
#else
#include "mch.h"
#endif

sget(p, n)
register char	*p;
register	n;
{
	register c;

	while (c = bget()) {
		if (c == EOF)
			cfatal("unexpected EOF");
		if (n>1) {
			*p++ = c;
			--n;
		}
	}
	*p = 0;
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.