diff options
| author | dholland <dholland@NetBSD.org> | 2009-05-24 23:20:22 +0000 |
|---|---|---|
| committer | dholland <dholland@NetBSD.org> | 2009-05-24 23:20:22 +0000 |
| commit | 478be95d8d1ddb2e9cb1831f0115097af1e41bc4 (patch) | |
| tree | 81172dfe5cc4fc359e2a3a3e251e366c5c2d1706 /trek/cgetc.c | |
| parent | 5a874af0513d6e4a0b2b796da83651a4c2351310 (diff) | |
| download | bsdgames-darwin-478be95d8d1ddb2e9cb1831f0115097af1e41bc4.tar.gz bsdgames-darwin-478be95d8d1ddb2e9cb1831f0115097af1e41bc4.zip | |
Abolish cgetc(). It contained one line of code, which was wrong.
Call getchar() directly, and handle EOF properly instead of looping
(in some cases) or pretending that EOF is 0 (which it isn't).
Diffstat (limited to 'trek/cgetc.c')
| -rw-r--r-- | trek/cgetc.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/trek/cgetc.c b/trek/cgetc.c deleted file mode 100644 index 420f11b7..00000000 --- a/trek/cgetc.c +++ /dev/null @@ -1,48 +0,0 @@ -/* $NetBSD: cgetc.c,v 1.8 2009/05/24 18:22:27 dholland Exp $ */ - -/* - * Copyright (c) 1980, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include <sys/cdefs.h> -#ifndef lint -#if 0 -static char sccsid[] = "@(#)cgetc.c 8.1 (Berkeley) 5/31/93"; -#else -__RCSID("$NetBSD: cgetc.c,v 1.8 2009/05/24 18:22:27 dholland Exp $"); -#endif -#endif /* not lint */ - -#include <stdio.h> -#include "trek.h" - -char -cgetc(int i __unused) -{ - return getchar(); -} |
