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

c.lib 1.177 (29.9.2004)

- Moved the locale initialization/cleanup code into constructors
  and destructors.

- The socket cleanup function is now a destructor.

- The math cleanup function is now a destructor.

- The wildcard cleanup function is now a destructor.

- The stdio cleanup function is now a destructor.

- The stack extension cleanup function is now a destructor.

- The code that cleans up after the program's current directory
  was changed is now a destructor function.

- Moved the initialization/cleanup code for unlink() into constructors
  and destructors.

- Moved the initialization/cleanup code for usergroup.library into
  constructors and destructors.

- Added usleep(), and created wrapper code that both sleep() and
  usleep() can use.

- Added strtoll() and strtoull(), with further changes to <limits.h>
  and <stdlib.h>.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14737 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2004-09-29 14:17:46 +00:00
parent 53bb602493
commit 8555296691
44 changed files with 239 additions and 341 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: stdio_init_exit.c,v 1.1.1.1 2004-07-26 16:31:36 obarthel Exp $
* $Id: stdio_init_exit.c,v 1.2 2004-09-29 14:17:44 obarthel Exp $
*
* :ts=4
*
@ -52,7 +52,7 @@
/****************************************************************************/
void
__stdio_exit(void)
__close_all_files(void)
{
int i;
@ -60,7 +60,7 @@ __stdio_exit(void)
__check_abort_enabled = FALSE;
if(__iob != NULL)
if(__iob != NULL && __num_iob > 0)
{
for(i = 0 ; i < __num_iob ; i++)
{
@ -72,7 +72,7 @@ __stdio_exit(void)
__iob = NULL;
}
if(__fd != NULL)
if(__fd != NULL && __num_fd > 0)
{
for(i = 0 ; i < __num_fd ; i++)
{
@ -89,6 +89,17 @@ __stdio_exit(void)
/****************************************************************************/
CLIB_DESTRUCTOR(__stdio_exit)
{
ENTER();
__close_all_files();
LEAVE();
}
/****************************************************************************/
int
__stdio_init(void)
{