1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- The library no longer sends ACTION_DISK_INFO packets to the console

handler. The side-effects were too varied and irritating after all.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14826 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-02-04 08:49:10 +00:00
parent 2ddfeab0cf
commit 6ad88ff97f
4 changed files with 9 additions and 61 deletions

View File

@ -31,7 +31,10 @@
- References to the HUGE_VAL quantity now involve an accessor function, too.
- Changed the manner in which the __huge_val constant is initialized by
the __math_init() function.
the __math_init() function. The new approach should be more portable.
- The library no longer sends ACTION_DISK_INFO packets to the console
handler. The side-effects were too varied and irritating after all.
c.lib 1.187 (29.1.2005)

View File

@ -1,5 +1,5 @@
/*
* $Id: fcntl_close.c,v 1.7 2005-02-03 16:56:15 obarthel Exp $
* $Id: fcntl_close.c,v 1.8 2005-02-04 08:49:10 obarthel Exp $
*
* :ts=4
*
@ -133,13 +133,12 @@ __close(int file_descriptor,int * error_ptr)
for aliases and their like since the original stream is still in use. */
if(NOT is_alias)
{
if((FLAG_IS_SET(fd->fd_Flags,FDF_NON_BLOCKING) && FLAG_IS_CLEAR(fd->fd_Flags,FDF_DEFAULT_NON_BLOCKING)) ||
(FLAG_IS_CLEAR(fd->fd_Flags,FDF_NON_BLOCKING) && FLAG_IS_SET(fd->fd_Flags,FDF_DEFAULT_NON_BLOCKING)))
if(FLAG_IS_SET(fd->fd_Flags,FDF_NON_BLOCKING))
{
SHOWMSG("resetting non-blocking access mode");
message.action = file_hook_action_set_blocking;
message.arg = FLAG_IS_SET(fd->fd_Flags,FDF_NON_BLOCKING);
message.arg = TRUE;
assert( fd->fd_Hook != NULL );

View File

@ -1,5 +1,5 @@
/*
* $Id: stdio_headers.h,v 1.10 2005-02-03 16:56:16 obarthel Exp $
* $Id: stdio_headers.h,v 1.11 2005-02-04 08:49:10 obarthel Exp $
*
* :ts=4
*
@ -268,8 +268,6 @@ struct iob
mode (sockets only). */
#define FDF_IS_INTERACTIVE (1UL<<11) /* File is attached to a console window or
something like it. */
#define FDF_DEFAULT_NON_BLOCKING (1UL<<12) /* This file defaults to non-blocking I/O
mode. */
/****************************************************************************/

View File

@ -1,5 +1,5 @@
/*
* $Id: stdio_init_exit.c,v 1.15 2005-01-30 09:37:59 obarthel Exp $
* $Id: stdio_init_exit.c,v 1.16 2005-02-04 08:49:10 obarthel Exp $
*
* :ts=4
*
@ -106,28 +106,6 @@ CLIB_DESTRUCTOR(__stdio_exit)
/****************************************************************************/
static LONG
get_console_mode(BPTR console_fh)
{
struct FileHandle * fh;
LONG result = 0;
assert( console_fh != ZERO );
fh = BADDR(console_fh);
if(fh->fh_Type != NULL) /* Check if this is really bound to "NIL:". */
{
D_S(struct InfoData,id);
if(DoPkt(fh->fh_Type,ACTION_DISK_INFO,MKBADDR(id),0,0,0,0))
result = id->id_DiskType;
}
return(result);
}
/****************************************************************************/
int
__stdio_init(void)
{
@ -215,23 +193,8 @@ __stdio_init(void)
PROFILE_OFF();
if(IsInteractive(default_file))
{
SET_FLAG(fd_flags,FDF_IS_INTERACTIVE);
/* Try to figure out if the console is in single
character mode. We don't do that if we opened the
output console window since this will prevent it
from closing, or end up making it visible. */
if(__WBenchMsg == NULL)
{
if(get_console_mode(default_file) == ID_RAWCON)
{
SET_FLAG(fd_flags,FDF_NON_BLOCKING);
SET_FLAG(fd_flags,FDF_DEFAULT_NON_BLOCKING);
}
}
}
PROFILE_ON();
}
@ -296,22 +259,7 @@ __stdio_init(void)
if(__fd[STDERR_FILENO]->fd_DefaultFile != ZERO)
{
if(IsInteractive(__fd[STDERR_FILENO]->fd_DefaultFile))
{
SET_FLAG(__fd[STDERR_FILENO]->fd_Flags,FDF_IS_INTERACTIVE);
/* Careful: the console handler may open an AUTO console window
which so far was hidden when the ACTION_DISK_INFO
packet is sent. We don't want that to happen if we
can avoid it. */
if(__WBenchMsg == NULL)
{
if(get_console_mode(__fd[STDERR_FILENO]->fd_DefaultFile) == ID_RAWCON)
{
SET_FLAG(__fd[STDERR_FILENO]->fd_Flags,FDF_NON_BLOCKING);
SET_FLAG(__fd[STDERR_FILENO]->fd_Flags,FDF_DEFAULT_NON_BLOCKING);
}
}
}
}
PROFILE_ON();