mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Removed a misplaced IsInteractive() from the stdio initialization
function. Now this could have been big trouble... - Removed tests for FileHandle->fh_Type != NULL which used to precede all IsInterative() tests. I verified that IsInteractive() will always return FALSE for NIL: type file handles. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14793 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stdio_init_exit.c,v 1.7 2005-01-08 10:21:25 obarthel Exp $
|
||||
* $Id: stdio_init_exit.c,v 1.8 2005-01-09 09:54:33 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -113,6 +113,8 @@ __stdio_init(void)
|
||||
|
||||
ENTER();
|
||||
|
||||
ASSERT( num_standard_files == (STDERR_FILENO-STDIN_FILENO+1) );
|
||||
|
||||
__iob = malloc(sizeof(*__iob) * num_standard_files);
|
||||
if(__iob == NULL)
|
||||
goto out;
|
||||
@ -183,11 +185,9 @@ __stdio_init(void)
|
||||
/* Check if this stream is attached to a console window. */
|
||||
if(default_file != ZERO)
|
||||
{
|
||||
struct FileHandle * fh = BADDR(default_file);
|
||||
|
||||
PROFILE_OFF();
|
||||
|
||||
if(fh->fh_Type != NULL && IsInteractive(default_file))
|
||||
if(IsInteractive(default_file))
|
||||
SET_FLAG(fd_flags,FDF_IS_INTERACTIVE);
|
||||
|
||||
PROFILE_ON();
|
||||
@ -257,9 +257,7 @@ __stdio_init(void)
|
||||
/* Figure out if the standard error stream is bound to a console. */
|
||||
if(__fd[STDERR_FILENO]->fd_DefaultFile != ZERO)
|
||||
{
|
||||
struct FileHandle * fh = BADDR(IsInteractive(__fd[STDERR_FILENO]->fd_DefaultFile));
|
||||
|
||||
if(fh->fh_Type != NULL && IsInteractive(__fd[STDERR_FILENO]->fd_DefaultFile))
|
||||
if(IsInteractive(__fd[STDERR_FILENO]->fd_DefaultFile))
|
||||
SET_FLAG(__fd[STDERR_FILENO]->fd_Flags,FDF_IS_INTERACTIVE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user