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:
@@ -18,6 +18,13 @@
|
||||
no requester will appear unless you specifically set the value of the
|
||||
"__no_standard_io" variable to TRUE in your program.
|
||||
|
||||
- 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.
|
||||
|
||||
|
||||
c.lib 1.185 (2.1.2005)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: fcntl_open.c,v 1.4 2005-01-02 09:07:07 obarthel Exp $
|
||||
* $Id: fcntl_open.c,v 1.5 2005-01-09 09:54:33 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@@ -67,7 +67,7 @@ open(const char *path_name, int open_flag, ... /* mode_t mode */ )
|
||||
struct FileHandle * file_handle;
|
||||
BPTR handle = ZERO;
|
||||
BOOL create_new_file = FALSE;
|
||||
LONG is_interactive = FALSE;
|
||||
LONG is_interactive;
|
||||
int fd_slot_number;
|
||||
struct fd * fd;
|
||||
int access_mode;
|
||||
@@ -344,10 +344,7 @@ open(const char *path_name, int open_flag, ... /* mode_t mode */ )
|
||||
|
||||
/* Figure out if this stream is attached to a console. */
|
||||
PROFILE_OFF();
|
||||
|
||||
if(file_handle->fh_Type != NULL)
|
||||
is_interactive = IsInteractive(handle);
|
||||
|
||||
is_interactive = IsInteractive(handle);
|
||||
PROFILE_ON();
|
||||
|
||||
if(is_interactive)
|
||||
|
||||
@@ -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