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

- Moved the Workbench console stream initialization into the

initialization code for the stdin/stdout/stderr streams and
  out of the program parameter setup.

- The current program name is now set up in the stdlib
  initialization function.

- Simplified the machine test code; moved the FPU check into
  the math initialization code.

- Added more safety checks to verify that file descriptor
  file handles are valid.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14864 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-03-07 11:16:43 +00:00
parent d370bd123b
commit a9c8cdc554
23 changed files with 558 additions and 445 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: unistd_sync_fd.c,v 1.2 2005-02-28 13:22:53 obarthel Exp $
* $Id: unistd_sync_fd.c,v 1.3 2005-03-07 11:16:43 obarthel Exp $
*
* :ts=4
*
@ -54,20 +54,17 @@ __sync_fd(struct fd * fd,int mode)
__fd_lock(fd);
if(fd->fd_DefaultFile != ZERO)
/* The mode tells us what to flush. 0 means "flush just the data", and
everything else means "flush everything. */
Flush(fd->fd_DefaultFile);
if(mode != 0)
{
/* The mode tells us what to flush. 0 means "flush just the data", and
everything else means "flush everything. */
Flush(fd->fd_DefaultFile);
struct FileHandle * fh = BADDR(fd->fd_DefaultFile);
if(mode != 0)
{
struct FileHandle * fh = BADDR(fd->fd_DefaultFile);
/* Verify that this file is not bound to "NIL:". */
if(fh->fh_Type != NULL)
DoPkt(fh->fh_Type,ACTION_FLUSH, 0,0,0,0,0);
}
/* Verify that this file is not bound to "NIL:". */
if(fh->fh_Type != NULL)
DoPkt(fh->fh_Type,ACTION_FLUSH, 0,0,0,0,0);
}
__fd_unlock(fd);