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

- Dropped the special flag variable used by the abort() function that

tracks whether or not console output is possible. We now use the
  global "__no_standard_io" instead.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14794 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-01-09 10:10:41 +00:00
parent 5cf80326bc
commit fbc6d94840
11 changed files with 29 additions and 40 deletions

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: amiga_rexxvars.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: amiga_rexxvars.c,v 1.3 2005-01-09 10:10:40 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -50,12 +50,12 @@
/****************************************************************************/ /****************************************************************************/
STATIC struct Library * RexxSysBase; static struct Library * RexxSysBase;
/****************************************************************************/ /****************************************************************************/
#if defined(__amigaos4__) #if defined(__amigaos4__)
STATIC struct RexxSysIFace * IRexxSys; static struct RexxSysIFace * IRexxSys;
#endif /* __amigaos4__ */ #endif /* __amigaos4__ */
/****************************************************************************/ /****************************************************************************/
@@ -144,7 +144,7 @@ CheckRexxMsg(struct RexxMsg *message)
LONG LONG
GetRexxVar(struct RexxMsg *message,STRPTR variable_name,STRPTR *buffer_pointer) GetRexxVar(struct RexxMsg *message,STRPTR variable_name,STRPTR *buffer_pointer)
{ {
STATIC TEXT buffer[256]; static UBYTE buffer[256];
LONG result; LONG result;
/* The following uses a function which was added to rexxsyslib.library V45. /* The following uses a function which was added to rexxsyslib.library V45.

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: amiga_setsuperattrs.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: amiga_setsuperattrs.c,v 1.3 2005-01-09 10:10:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -46,7 +46,7 @@
/****************************************************************************/ /****************************************************************************/
STATIC ULONG static ULONG
SetSuperAttrsA(Class * cl,Object * obj,struct TagItem * tags) SetSuperAttrsA(Class * cl,Object * obj,struct TagItem * tags)
{ {
ULONG result = 0; ULONG result = 0;

View File

@@ -25,6 +25,10 @@
all IsInterative() tests. I verified that IsInteractive() will always all IsInterative() tests. I verified that IsInteractive() will always
return FALSE for NIL: type file handles. return FALSE for NIL: type file handles.
- Dropped the special flag variable used by the abort() function that
tracks whether or not console output is possible. We now use the
global "__no_standard_io" instead.
c.lib 1.185 (2.1.2005) c.lib 1.185 (2.1.2005)

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: signal_data.c,v 1.3 2005-01-02 09:07:07 obarthel Exp $ * $Id: signal_data.c,v 1.4 2005-01-09 10:10:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -54,7 +54,3 @@ int __signals_blocked;
/****************************************************************************/ /****************************************************************************/
BOOL __check_abort_enabled = TRUE; BOOL __check_abort_enabled = TRUE;
/****************************************************************************/
BOOL __termination_message_disabled;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: signal_headers.h,v 1.5 2005-01-02 09:07:07 obarthel Exp $ * $Id: signal_headers.h,v 1.6 2005-01-09 10:10:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -76,10 +76,6 @@ extern int NOCOMMON __signals_blocked;
/****************************************************************************/ /****************************************************************************/
extern BOOL NOCOMMON __termination_message_disabled;
/****************************************************************************/
#ifndef _STDLIB_HEADERS_H #ifndef _STDLIB_HEADERS_H
#include "stdlib_headers.h" #include "stdlib_headers.h"
#endif /* _STDLIB_HEADERS_H */ #endif /* _STDLIB_HEADERS_H */

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: socket_init_exit.c,v 1.7 2005-01-02 09:07:08 obarthel Exp $ * $Id: socket_init_exit.c,v 1.8 2005-01-09 10:10:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -244,15 +244,13 @@ __socket_init(void)
SHOWVALUE(daemon_socket); SHOWVALUE(daemon_socket);
/* Whatever happens, the following likely won't end up
* in the console...
*/
__termination_message_disabled = TRUE;
/* Shut down the three standard I/O streams. */ /* Shut down the three standard I/O streams. */
for(i = STDIN_FILENO ; i <= STDERR_FILENO ; i++) for(i = STDIN_FILENO ; i <= STDERR_FILENO ; i++)
close(i); close(i);
/* The standard I/O streams are no longer attached to a console. */
__no_standard_io = TRUE;
/* Put the socket into the three standard I/O streams. */ /* Put the socket into the three standard I/O streams. */
for(i = STDIN_FILENO ; i <= STDERR_FILENO ; i++) for(i = STDIN_FILENO ; i <= STDERR_FILENO ; i++)
{ {
@@ -284,9 +282,6 @@ __socket_init(void)
/* This program now runs as an internet superserver client (daemon). */ /* This program now runs as an internet superserver client (daemon). */
__is_daemon = TRUE; __is_daemon = TRUE;
/* The standard I/O streams are no longer attached to a console. */
__no_standard_io = TRUE;
} }
} }

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdio_init_exit.c,v 1.8 2005-01-09 09:54:33 obarthel Exp $ * $Id: stdio_init_exit.c,v 1.9 2005-01-09 10:10:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -171,7 +171,7 @@ __stdio_init(void)
iob_flags = IOBF_IN_USE | IOBF_WRITE | IOBF_NO_NUL | IOBF_BUFFER_MODE_NONE; iob_flags = IOBF_IN_USE | IOBF_WRITE | IOBF_NO_NUL | IOBF_BUFFER_MODE_NONE;
fd_flags = FDF_IN_USE | FDF_WRITE; fd_flags = FDF_IN_USE | FDF_WRITE;
default_file = ZERO; default_file = ZERO; /* NOTE: this is really initialized later; see below... */
break; break;
} }

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_setenv.c,v 1.4 2005-01-02 09:07:18 obarthel Exp $ * $Id: stdlib_setenv.c,v 1.5 2005-01-09 10:10:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -61,7 +61,7 @@ struct LocalVariable
/****************************************************************************/ /****************************************************************************/
STATIC struct LocalVariable * __lv_root; static struct LocalVariable * __lv_root;
/****************************************************************************/ /****************************************************************************/

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_showerror.c,v 1.7 2005-01-09 09:40:32 obarthel Exp $ * $Id: stdlib_showerror.c,v 1.8 2005-01-09 10:10:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -156,20 +156,18 @@ __show_error(const char * message)
{ {
/* Try to print the error message on the default error output stream. */ /* Try to print the error message on the default error output stream. */
output = ErrorOutput(); output = ErrorOutput();
if(output == ZERO)
output = Output();
} }
#else #else
{ {
struct Process * this_process = (struct Process *)FindTask(NULL); struct Process * this_process = (struct Process *)FindTask(NULL);
if(this_process->pr_CES != ZERO) output = this_process->pr_CES;
output = this_process->pr_CES;
else
output = Output();
} }
#endif /* __amigaos4__ */ #endif /* __amigaos4__ */
if(output == ZERO)
output = Output();
if(output != ZERO) if(output != ZERO)
{ {
Write(output,(STRPTR)message,(LONG)strlen(message)); Write(output,(STRPTR)message,(LONG)strlen(message));

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_system.c,v 1.2 2005-01-02 09:07:19 obarthel Exp $ * $Id: stdlib_system.c,v 1.3 2005-01-09 10:10:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -69,7 +69,7 @@ system(const char * command)
} }
else else
{ {
STATIC const struct TagItem system_tags[2] = static const struct TagItem system_tags[2] =
{ {
{ SYS_UserShell, TRUE }, { SYS_UserShell, TRUE },
{ TAG_END, 0 } { TAG_END, 0 }

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_termination_message.c,v 1.3 2005-01-02 09:07:19 obarthel Exp $ * $Id: stdlib_termination_message.c,v 1.4 2005-01-09 10:10:41 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -54,7 +54,7 @@ __print_termination_message(const char * termination_message)
{ {
termination_message_printed = TRUE; termination_message_printed = TRUE;
if(NOT __termination_message_disabled && NOT __no_standard_io) if(NOT __no_standard_io)
{ {
fputs((termination_message != NULL) ? termination_message : "Abnormal program termination",stderr); fputs((termination_message != NULL) ? termination_message : "Abnormal program termination",stderr);