new approach for handling aliases (based on local node allocation)
[unix-history] / usr / src / sys / i386 / stand / cat.c
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* William Jolitz.
*
* %sccs.include.noredist.c%
*/
#ifndef lint
char copyright[] =
"@(#) Copyright (c) 1990 The Regents of the University of California.\n\
All rights reserved.\n";
#endif /* not lint */
#ifndef lint
static char sccsid[] = "@(#)cat.c 7.1 (Berkeley) %G%";
#endif /* not lint */
main()
{
int c, i;
char buf[50];
do {
printf("File: ");
gets(buf);
i = open(buf, 0);
} while (i <= 0);
while ((c = getc(i)) > 0)
putchar(c);
exit(0);
}