From a9c12422ff2b4d8c4aec3d940302fc61b4ee39f7 Mon Sep 17 00:00:00 2001 From: darylm503 Date: Thu, 20 Sep 2012 21:01:21 +0000 Subject: StdLib, StdLibPrivateInternalFiles: Clean up comments, Remove debugging code, Define MAX_OUTPUT, the Maximum number of bytes in a single terminal output operation. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Daryl McDaniel Reviewed-by: Jaben Carsey git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13735 6f19259b-4bc3-4df7-8a09-765794883524 --- StdLib/LibC/Stdio/refill.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'StdLib/LibC') diff --git a/StdLib/LibC/Stdio/refill.c b/StdLib/LibC/Stdio/refill.c index 953e8f674a..a69f022dee 100644 --- a/StdLib/LibC/Stdio/refill.c +++ b/StdLib/LibC/Stdio/refill.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -41,9 +41,6 @@ NetBSD: refill.c,v 1.13 2003/08/07 16:43:30 agc Exp refill.c 8.1 (Berkeley) 6/4/93 */ -#include // REMOVE, For DEBUG only -#include // REMOVE, For DEBUG only - #include #include @@ -93,28 +90,23 @@ __srefill(FILE *fp) if (!__sdidinit) __sinit(); -//Print(L"%a( %d)\n", __func__, fp->_file); fp->_r = 0; /* largely a convenience for callers */ /* SysV does not make this test; take it out for compatibility */ if (fp->_flags & __SEOF) { -//Print(L"%a: %d\n", __func__, __LINE__); return (EOF); } /* if not already reading, have to be reading and writing */ if ((fp->_flags & __SRD) == 0) { -//Print(L"%a: %d\n", __func__, __LINE__); if ((fp->_flags & __SRW) == 0) { errno = EBADF; fp->_flags |= __SERR; // Allows differentiation between errors and EOF -//Print(L"%a: %d\n", __func__, __LINE__); return (EOF); } /* switch to reading */ if (fp->_flags & __SWR) { if (__sflush(fp)) { -//Print(L"%a: %d\n", __func__, __LINE__); return (EOF); } fp->_flags &= ~__SWR; @@ -123,7 +115,6 @@ __srefill(FILE *fp) } fp->_flags |= __SRD; } else { -//Print(L"%a: %d\n", __func__, __LINE__); /* * We were reading. If there is an ungetc buffer, * we must have been reading from that. Drop it, @@ -134,7 +125,6 @@ __srefill(FILE *fp) FREEUB(fp); if ((fp->_r = fp->_ur) != 0) { fp->_p = fp->_up; -//Print(L"%a: %d\n", __func__, __LINE__); return (0); } } @@ -143,7 +133,6 @@ __srefill(FILE *fp) if (fp->_bf._base == NULL) __smakebuf(fp); -//Print(L"%a: %d\n", __func__, __LINE__); /* * Before reading from a line buffered or unbuffered file, * flush all line buffered output files, per the ANSI C @@ -153,7 +142,6 @@ __srefill(FILE *fp) rwlock_rdlock(&__sfp_lock); (void) _fwalk(lflush); rwlock_unlock(&__sfp_lock); -//Print(L"%a: %d\n", __func__, __LINE__); } fp->_p = fp->_bf._base; fp->_r = (*fp->_read)(fp->_cookie, (char *)fp->_p, fp->_bf._size); @@ -165,9 +153,7 @@ __srefill(FILE *fp) fp->_r = 0; fp->_flags |= __SERR; } -//Print(L"%a: %d\n", __func__, __LINE__); return (EOF); } -//Print(L"%a: %d\n", __func__, __LINE__); return (0); } -- cgit v1.2.3