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

- When using the wildcard expansion code for command line

parameters (which is by default linked in with libunix.a),
  regular expressions can no longer prompt dos.library requesters
  to appear. However, to be on the safe side, if you are expecting
  to pass regular expressions on the command line, do not use
  the wildcard expansion code such as by overriding the library
  symbols with dummy functions such as are used in the file
  "stdlib_wildcard_expand.c".

- Added a new variable '__open_locale' which can be used to
  restrict all library functions to use the "C" language locale
  rather than the current system locale settings. In addition
  to that, two new functions __locale_exit() and __locale_init()
  can be used to close and (re-)open the system locale at a
  later time.

- Local ("static") functions are now identified by the STATIC
  qualifier. This was done in preparation for changes that will
  deal with global and local data and the issue of thread safety.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14839 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-02-25 10:14:22 +00:00
parent 53d99ac7a2
commit 1550c6fef3
65 changed files with 416 additions and 264 deletions

View File

@@ -1,5 +1,5 @@
# #
# $Id: GNUmakefile.68k,v 1.28 2005-02-20 13:19:40 obarthel Exp $ # $Id: GNUmakefile.68k,v 1.29 2005-02-25 10:14:20 obarthel Exp $
# #
# :ts=8 # :ts=8
# #
@@ -151,6 +151,7 @@ C_LIB = \
libgen_dirname.o \ libgen_dirname.o \
locale_init_exit.o \ locale_init_exit.o \
locale_localeconv.o \ locale_localeconv.o \
locale_open_locale.o \
locale_setlocale.o \ locale_setlocale.o \
mount_convertinfo.o \ mount_convertinfo.o \
mount_fstatfs.o \ mount_fstatfs.o \

View File

@@ -1,5 +1,5 @@
# #
# $Id: GNUmakefile.os4,v 1.28 2005-02-20 13:19:40 obarthel Exp $ # $Id: GNUmakefile.os4,v 1.29 2005-02-25 10:14:20 obarthel Exp $
# #
# :ts=8 # :ts=8
# #
@@ -155,6 +155,7 @@ C_LIB = \
libgen_dirname.o \ libgen_dirname.o \
locale_init_exit.o \ locale_init_exit.o \
locale_localeconv.o \ locale_localeconv.o \
locale_open_locale.o \
locale_setlocale.o \ locale_setlocale.o \
mount_convertinfo.o \ mount_convertinfo.o \
mount_fstatfs.o \ mount_fstatfs.o \

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: amiga_addtof.c,v 1.2 2005-01-02 09:07:06 obarthel Exp $ * $Id: amiga_addtof.c,v 1.3 2005-02-25 10:14:20 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -57,7 +57,7 @@ typedef LONG (* CFUNC)(APTR arg);
/****************************************************************************/ /****************************************************************************/
static LONG INTERRUPT ASM STATIC LONG INTERRUPT ASM
call_routine(REG(a1,struct Isrvstr *i)) call_routine(REG(a1,struct Isrvstr *i))
{ {
CFUNC p = (CFUNC)i->ccode; CFUNC p = (CFUNC)i->ccode;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: amiga_invertstring.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: amiga_invertstring.c,v 1.3 2005-02-25 10:14:20 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -49,7 +49,7 @@
/****************************************************************************/ /****************************************************************************/
static int STATIC int
do_escape(int cc) do_escape(int cc)
{ {
int result; int result;
@@ -91,7 +91,7 @@ do_escape(int cc)
/****************************************************************************/ /****************************************************************************/
static ULONG STATIC ULONG
do_angle(STRPTR * strp, struct InputEvent *ie) do_angle(STRPTR * strp, struct InputEvent *ie)
{ {
ULONG result; ULONG result;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: amiga_setsuperattrs.c,v 1.3 2005-01-09 10:10:41 obarthel Exp $ * $Id: amiga_setsuperattrs.c,v 1.4 2005-02-25 10:14:20 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,29 @@
buffered files which now bypasses close/read/write/lseek and buffered files which now bypasses close/read/write/lseek and
directly invokes the hook code for unbuffered files. directly invokes the hook code for unbuffered files.
- Added various floating point constants to <math.h>, courtesy
of Henning Nielsen Lund. Thank you very much!
- When using the wildcard expansion code for command line
parameters (which is by default linked in with libunix.a),
regular expressions can no longer prompt dos.library requesters
to appear. However, to be on the safe side, if you are expecting
to pass regular expressions on the command line, do not use
the wildcard expansion code such as by overriding the library
symbols with dummy functions such as are used in the file
"stdlib_wildcard_expand.c".
- Added a new variable '__open_locale' which can be used to
restrict all library functions to use the "C" language locale
rather than the current system locale settings. In addition
to that, two new functions __locale_exit() and __locale_init()
can be used to close and (re-)open the system locale at a
later time.
- Local ("static") functions are now identified by the STATIC
qualifier. This was done in preparation for changes that will
deal with global and local data and the issue of thread safety.
c.lib 1.188 (7.2.2005) c.lib 1.188 (7.2.2005)

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: crtbegin.c,v 1.3 2004-09-29 16:54:54 obarthel Exp $ * $Id: crtbegin.c,v 1.4 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -30,7 +30,7 @@ static void (*__DTOR_LIST__[1]) (void) __attribute__((section(".dtors"))) = { (v
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
_do_ctors(void) _do_ctors(void)
{ {
void (**pFuncPtr)(void); void (**pFuncPtr)(void);
@@ -45,7 +45,7 @@ _do_ctors(void)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
_do_dtors(void) _do_dtors(void)
{ {
ULONG i = (ULONG)__DTOR_LIST__[0]; ULONG i = (ULONG)__DTOR_LIST__[0];
@@ -79,7 +79,7 @@ typedef void (*func_ptr)(void);
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
_do_ctors(void) _do_ctors(void)
{ {
extern func_ptr __CTOR_LIST__[]; extern func_ptr __CTOR_LIST__[];
@@ -92,7 +92,7 @@ _do_ctors(void)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
_do_dtors(void) _do_dtors(void)
{ {
extern func_ptr __DTOR_LIST__[]; extern func_ptr __DTOR_LIST__[];

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: debug.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: debug.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=8 * :ts=8
* *
@@ -133,7 +133,7 @@ _POPDEBUGLEVEL(void)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
_INDENT(void) _INDENT(void)
{ {
if(program_name_len > 0) if(program_name_len > 0)

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: debug_kputfmt.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: debug_kputfmt.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -43,7 +43,7 @@
parameter table is provided, pick up the parameters and store them in parameter table is provided, pick up the parameters and store them in
the table. The table layout follows the format string and can include the table. The table layout follows the format string and can include
both 16 and 32 bit data. */ both 16 and 32 bit data. */
static size_t STATIC size_t
process_var_args(char *format_string,va_list argument_list,unsigned short * table) process_var_args(char *format_string,va_list argument_list,unsigned short * table)
{ {
size_t num_args = 0; size_t num_args = 0;
@@ -150,7 +150,7 @@ process_var_args(char *format_string,va_list argument_list,unsigned short * tabl
/****************************************************************************/ /****************************************************************************/
static VOID ASM STATIC VOID ASM
raw_put_char(REG(d0,UBYTE c)) raw_put_char(REG(d0,UBYTE c))
{ {
kputc(c); kputc(c);

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: dirent_opendir.c,v 1.6 2005-02-21 16:09:39 obarthel Exp $ * $Id: dirent_opendir.c,v 1.7 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -57,7 +57,7 @@
/****************************************************************************/ /****************************************************************************/
static struct Node * STATIC struct Node *
find_by_name(struct List * list,const char * name) find_by_name(struct List * list,const char * name)
{ {
struct Node * result = NULL; struct Node * result = NULL;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: fcntl_open.c,v 1.9 2005-02-20 13:19:40 obarthel Exp $ * $Id: fcntl_open.c,v 1.10 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -56,7 +56,7 @@
/* This is used in place of ChangeMode() in order to work around a bug in /* This is used in place of ChangeMode() in order to work around a bug in
dos.library V40 and below: a "NIL:" file handle will crash the dos.library V40 and below: a "NIL:" file handle will crash the
caller of the ChangeMode() function. */ caller of the ChangeMode() function. */
static LONG STATIC LONG
safe_change_mode(LONG type,BPTR file_handle,LONG mode) safe_change_mode(LONG type,BPTR file_handle,LONG mode)
{ {
LONG result = DOSFALSE; LONG result = DOSFALSE;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: dos.h,v 1.7 2005-02-03 17:33:54 obarthel Exp $ * $Id: dos.h,v 1.8 2005-02-25 10:14:22 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -272,6 +272,32 @@ extern unsigned int (* __get_default_stack_size)(void);
/****************************************************************************/ /****************************************************************************/
/*
* This library falls back onto locale.library to perform string collation
* in strcoll(), character conversion in toupper() and various other
* functions. This may not your intention. To restrict the library to use
* only the "C" language locale, declare the following variable in your
* code and set it to FALSE, so that it overrides the default settings.
* The variable value is checked during program startup and, if set to
* TRUE, has the effect of opening locale.library and obtaining the
* default locale.
*/
extern BOOL __open_locale;
/*
* Two functions control how this library uses the locale.library API to
* perform string collation, character and time conversion, etc.
*
* __locale_init() opens locale.library and attempts to open the default
* locale. If it succeeds, it will return 0 and -1 otherwise.
*
* __locale_exit() releases the default locale and closes locale.library.
*/
extern void __locale_exit(void);
extern int __locale_init(void);
/****************************************************************************/
/* /*
* If linked with -lunix, Unix path names are translated to Amiga path * If linked with -lunix, Unix path names are translated to Amiga path
* names (and the other way round). If you wish to disable this, set the * names (and the other way round). If you wish to disable this, set the

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math.h,v 1.5 2005-01-02 09:07:21 obarthel Exp $ * $Id: math.h,v 1.6 2005-02-25 10:14:22 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -85,6 +85,22 @@ extern double tanh(double x);
/****************************************************************************/ /****************************************************************************/
#define M_E 2.7182818284590452354
#define M_LOG2E 1.4426950408889634074
#define M_LOG10E 0.43429448190325182765
#define M_LN2 0.69314718055994530942
#define M_LN10 2.30258509299404568402
#define M_PI 3.14159265358979323846
#define M_PI_2 1.57079632679489661923
#define M_PI_4 0.78539816339744830962
#define M_1_PI 0.31830988618379067154
#define M_2_PI 0.63661977236758134308
#define M_2_SQRTPI 1.12837916709551257390
#define M_SQRT2 1.41421356237309504880
#define M_SQRT1_2 0.70710678118654752440
/****************************************************************************/
extern double rint(double x); extern double rint(double x);
extern float rintf(float x); extern float rintf(float x);
extern int isinf(double x); extern int isinf(double x);

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: locale_init_exit.c,v 1.4 2005-01-02 09:07:07 obarthel Exp $ * $Id: locale_init_exit.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -88,9 +88,11 @@ __close_all_locales(void)
} }
} }
/****************************************************************************/ /****************************************************************************/
CLIB_DESTRUCTOR(__locale_exit) void
__locale_exit(void)
{ {
ENTER(); ENTER();
@@ -125,7 +127,64 @@ CLIB_DESTRUCTOR(__locale_exit)
/****************************************************************************/ /****************************************************************************/
CLIB_CONSTRUCTOR(__locale_init) int
__locale_init(void)
{
int result = -1;
ENTER();
PROFILE_OFF();
if(__LocaleBase == NULL)
{
__LocaleBase = OpenLibrary("locale.library",38);
#if defined(__amigaos4__)
{
if (__LocaleBase != NULL)
{
__ILocale = (struct LocaleIFace *)GetInterface(__LocaleBase, "main", 1, 0);
if(__ILocale == NULL)
{
CloseLibrary(__LocaleBase);
__LocaleBase = NULL;
}
}
}
#endif /* __amigaos4__ */
}
if(__LocaleBase != NULL && __default_locale == NULL)
{
DECLARE_LOCALEBASE();
__default_locale = OpenLocale(NULL);
}
if(__default_locale != NULL)
result = 0;
PROFILE_ON();
RETURN(result);
return(result);
}
/****************************************************************************/
CLIB_DESTRUCTOR(__locale_exit_destructor)
{
ENTER();
__locale_exit();
LEAVE();
}
/****************************************************************************/
CLIB_CONSTRUCTOR(__locale_init_constructor)
{ {
int i; int i;
@@ -134,32 +193,8 @@ CLIB_CONSTRUCTOR(__locale_init)
for(i = 0 ; i < NUM_LOCALES ; i++) for(i = 0 ; i < NUM_LOCALES ; i++)
strcpy(__locale_name_table[i],"C"); strcpy(__locale_name_table[i],"C");
PROFILE_OFF(); if(__open_locale)
__locale_init();
__LocaleBase = OpenLibrary("locale.library",38);
#if defined(__amigaos4__)
{
if (__LocaleBase != NULL)
{
__ILocale = (struct LocaleIFace *)GetInterface(__LocaleBase, "main", 1, 0);
if(__ILocale == NULL)
{
CloseLibrary(__LocaleBase);
__LocaleBase = NULL;
}
}
}
#endif /* __amigaos4__ */
if(__LocaleBase != NULL)
{
DECLARE_LOCALEBASE();
__default_locale = OpenLocale(NULL);
}
PROFILE_ON();
RETURN(OK); RETURN(OK);

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: locale_localeconv.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: locale_localeconv.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -41,6 +41,7 @@ struct lconv *
localeconv(void) localeconv(void)
{ {
static struct lconv loc; static struct lconv loc;
struct Locale * numeric_locale = __locale_table[LC_NUMERIC]; struct Locale * numeric_locale = __locale_table[LC_NUMERIC];
struct Locale * monetary_locale = __locale_table[LC_MONETARY]; struct Locale * monetary_locale = __locale_table[LC_MONETARY];
struct lconv * result; struct lconv * result;

View File

@@ -0,0 +1,40 @@
/*
* $Id: locale_open_locale.c,v 1.1 2005-02-25 10:14:21 obarthel Exp $
*
* :ts=4
*
* Portable ISO 'C' (1994) runtime library for the Amiga computer
* Copyright (c) 2002-2005 by Olaf Barthel <olsen@sourcery.han.de>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Neither the name of Olaf Barthel nor the names of contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _LOCALE_HEADERS_H
#include "locale_headers.h"
#endif /* _LOCALE_HEADERS_H */
/****************************************************************************/
BOOL __open_locale = TRUE;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: macros.h,v 1.8 2005-01-30 09:37:59 obarthel Exp $ * $Id: macros.h,v 1.9 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -163,10 +163,10 @@
#endif /* __SASC */ #endif /* __SASC */
#ifdef __GNUC__ #ifdef __GNUC__
#define CLIB_CONSTRUCTOR(name) static void __attribute__((constructor)) name##_ctor(void) #define CLIB_CONSTRUCTOR(name) STATIC VOID __attribute__((constructor)) name##_ctor(void)
#define CLIB_DESTRUCTOR(name) static void __attribute__((destructor)) name##_dtor(void) #define CLIB_DESTRUCTOR(name) STATIC VOID __attribute__((destructor)) name##_dtor(void)
#define PROFILE_CONSTRUCTOR(name) static void __attribute__((constructor)) name##_ctor(void) #define PROFILE_CONSTRUCTOR(name) STATIC VOID __attribute__((constructor)) name##_ctor(void)
#define PROFILE_DESTRUCTOR(name) static void __attribute__((destructor)) name##_dtor(void) #define PROFILE_DESTRUCTOR(name) STATIC VOID __attribute__((destructor)) name##_dtor(void)
#define CONSTRUCTOR_SUCCEED() return #define CONSTRUCTOR_SUCCEED() return
#define CONSTRUCTOR_FAIL() exit(RETURN_FAIL) /* ZZZ not a nice thing to do; fix the constructor invocation code! */ #define CONSTRUCTOR_FAIL() exit(RETURN_FAIL) /* ZZZ not a nice thing to do; fix the constructor invocation code! */
#endif /* __GNUC__ */ #endif /* __GNUC__ */

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_acos.c,v 1.4 2005-02-03 16:56:15 obarthel Exp $ * $Id: math_acos.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___acos:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__acos(double x) __acos(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __acos(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__acos(double x) __acos(double x)
{ {
double result; double result;
@@ -153,7 +153,7 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
INLINE static const double INLINE STATIC const double
__acos(double x) __acos(double x)
{ {
double z,p,q,r,w,s,c,df; double z,p,q,r,w,s,c,df;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_asin.c,v 1.4 2005-02-03 16:56:15 obarthel Exp $ * $Id: math_asin.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___asin:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__asin(double x) __asin(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __asin(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__asin(double x) __asin(double x)
{ {
double result; double result;
@@ -156,7 +156,7 @@ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
INLINE static const double INLINE STATIC const double
__asin(double x) __asin(double x)
{ {
double t,w,p,q,c,r,s; double t,w,p,q,c,r,s;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_atan.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: math_atan.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___atan:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__atan(double x) __atan(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __atan(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__atan(double x) __atan(double x)
{ {
double result; double result;
@@ -169,7 +169,7 @@ static const double
one = 1.0, one = 1.0,
huge = 1.0e300; huge = 1.0e300;
INLINE static const double INLINE STATIC const double
__atan(double x) __atan(double x)
{ {
double w,s1,s2,z; double w,s1,s2,z;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_atan2.c,v 1.5 2005-02-03 16:56:15 obarthel Exp $ * $Id: math_atan2.c,v 1.6 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -62,7 +62,7 @@ extern double __atan(double x);
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__atan2(double y,double x) __atan2(double y,double x)
{ {
const double pi = 3.14159265358979323846; const double pi = 3.14159265358979323846;
@@ -122,7 +122,7 @@ __atan2(double y,double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__atan(double x) __atan(double x)
{ {
double result; double result;
@@ -134,7 +134,7 @@ __atan(double x)
return(result); return(result);
} }
INLINE static const double INLINE STATIC const double
__atan2(double y,double x) __atan2(double y,double x)
{ {
double pi,pi_over_2; double pi,pi_over_2;
@@ -209,7 +209,7 @@ pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */
pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */ pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */
pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
INLINE static const double INLINE STATIC const double
__atan2(double y,double x) __atan2(double y,double x)
{ {
double z; double z;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_ceil.c,v 1.3 2005-01-26 09:24:38 obarthel Exp $ * $Id: math_ceil.c,v 1.4 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___ceil:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__ceil(double x) __ceil(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __ceil(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__ceil(double x) __ceil(double x)
{ {
int rounding_mode, round_up; int rounding_mode, round_up;
@@ -152,7 +152,7 @@ __ceil(double x)
static const double huge = 1.0e300; static const double huge = 1.0e300;
INLINE static const double INLINE STATIC const double
__ceil(double x) __ceil(double x)
{ {
int i0,i1,j0; int i0,i1,j0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_cos.c,v 1.3 2005-01-26 09:24:38 obarthel Exp $ * $Id: math_cos.c,v 1.4 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___cos:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__cos(double x) __cos(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __cos(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__cos(double x) __cos(double x)
{ {
double result; double result;
@@ -137,7 +137,7 @@ __cos(double x)
#if defined(PPC_FLOATING_POINT_SUPPORT) #if defined(PPC_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__cos(double x) __cos(double x)
{ {
double y[2],z=0.0; double y[2],z=0.0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_cosh.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: math_cosh.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___cosh:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__cosh(double x) __cosh(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __cosh(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__cosh(double x) __cosh(double x)
{ {
double result; double result;
@@ -139,7 +139,7 @@ __cosh(double x)
static const double one = 1.0, half=0.5, huge = 1.0e300; static const double one = 1.0, half=0.5, huge = 1.0e300;
INLINE static const double INLINE STATIC const double
__cosh(double x) __cosh(double x)
{ {
double t,w; double t,w;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_exp.c,v 1.3 2005-01-02 09:07:07 obarthel Exp $ * $Id: math_exp.c,v 1.4 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___exp:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__exp(double x) __exp(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __exp(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__exp(double x) __exp(double x)
{ {
double result; double result;
@@ -155,7 +155,7 @@ P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */
P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */ P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */
P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */ P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
INLINE static const double INLINE STATIC const double
__exp(double x) __exp(double x)
{ {
double y,hi,lo,c,t; double y,hi,lo,c,t;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_fabs.c,v 1.5 2005-01-02 09:07:07 obarthel Exp $ * $Id: math_fabs.c,v 1.6 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -88,7 +88,7 @@ ___fabs:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__fabs(double x) __fabs(double x)
{ {
double result; double result;
@@ -110,7 +110,7 @@ __fabs(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__fabs(double x) __fabs(double x)
{ {
double result; double result;
@@ -134,7 +134,7 @@ __fabs(double x)
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__fabs(double x) __fabs(double x)
{ {
double res; double res;
@@ -153,7 +153,7 @@ __fabs(double x)
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__fabs(double x) __fabs(double x)
{ {
double res; double res;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_floor.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: math_floor.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___floor:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__floor(double x) __floor(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __floor(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__floor(double x) __floor(double x)
{ {
int rounding_mode, round_down; int rounding_mode, round_down;
@@ -153,7 +153,7 @@ __floor(double x)
#if defined(PPC_FLOATING_POINT_SUPPORT) #if defined(PPC_FLOATING_POINT_SUPPORT)
static const double huge = 1.0e300; static const double huge = 1.0e300;
INLINE static const double INLINE STATIC const double
__floor(double x) __floor(double x)
{ {
int i0,i1,j0; int i0,i1,j0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_fmod.c,v 1.4 2005-02-03 16:56:15 obarthel Exp $ * $Id: math_fmod.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -54,7 +54,7 @@
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__fmod(double x,double y) __fmod(double x,double y)
{ {
double q,p,result; double q,p,result;
@@ -79,7 +79,7 @@ __fmod(double x,double y)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__fmod(double x,double y) __fmod(double x,double y)
{ {
double result; double result;
@@ -102,7 +102,7 @@ static const double
one = 1.0, one = 1.0,
Zero[] = {0.0, -0.0,}; Zero[] = {0.0, -0.0,};
INLINE static const double INLINE STATIC const double
__fmod(double x,double y) __fmod(double x,double y)
{ {
int n,hx,hy,hz,ix,iy,sx,i; int n,hx,hy,hz,ix,iy,sx,i;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_frexp.c,v 1.3 2005-02-03 16:56:15 obarthel Exp $ * $Id: math_frexp.c,v 1.4 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -58,7 +58,7 @@
#if defined(IEEE_FLOATING_POINT_SUPPORT) #if defined(IEEE_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__frexp(double x,int * nptr) __frexp(double x,int * nptr)
{ {
int int_exponent = 0; int int_exponent = 0;
@@ -106,7 +106,7 @@ __frexp(double x,int * nptr)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__frexp(double x,int * nptr) __frexp(double x,int * nptr)
{ {
double float_exponent; double float_exponent;
@@ -146,7 +146,7 @@ __frexp(double x,int * nptr)
static const double static const double
two54 = 1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */ two54 = 1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */
INLINE static const double INLINE STATIC const double
__frexp(double x,int * eptr) __frexp(double x,int * eptr)
{ {
int hx, ix, lx; int hx, ix, lx;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_hypot.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: math_hypot.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -52,7 +52,7 @@
#if defined(IEEE_FLOATING_POINT_SUPPORT) || defined(M68881_FLOATING_POINT_SUPPORT) #if defined(IEEE_FLOATING_POINT_SUPPORT) || defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__hypot(double x,double y) __hypot(double x,double y)
{ {
double yx; double yx;
@@ -85,7 +85,7 @@ __hypot(double x,double y)
static const double one = 1.0; static const double one = 1.0;
INLINE static const double INLINE STATIC const double
__hypot(double x,double y) __hypot(double x,double y)
{ {
int n0; int n0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_kernel_rem_pio2.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: math_kernel_rem_pio2.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -69,7 +69,7 @@ one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */ two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */ twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */
INLINE static int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int *ipio2) INLINE STATIC int kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int *ipio2)
{ {
int jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih; int jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
double z,fw,f[20],fq[20],q[20]; double z,fw,f[20],fq[20],q[20];
@@ -341,7 +341,7 @@ int __rem_pio2(double x, double *y)
tx[2] = z; tx[2] = z;
nx = 3; nx = 3;
while(tx[nx-1]==zero) nx--; /* skip zero term */ while(tx[nx-1]==zero) nx--; /* skip zero term */
n = __kernel_rem_pio2(tx,y,e0,nx,2,two_over_pi); n = kernel_rem_pio2(tx,y,e0,nx,2,two_over_pi);
if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;} if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
return n; return n;
} }

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_kernel_scalbn.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: math_kernel_scalbn.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -50,7 +50,7 @@
/****************************************************************************/ /****************************************************************************/
INLINE static double copysign(double x, double y) INLINE STATIC double copysign(double x, double y)
{ {
unsigned int hx,hy; unsigned int hx,hy;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_ldexp.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: math_ldexp.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -66,7 +66,7 @@ union dtol
long ival[2]; long ival[2];
}; };
INLINE static const double INLINE STATIC const double
__ldexp(double x,int n) __ldexp(double x,int n)
{ {
union dtol number; union dtol number;
@@ -96,7 +96,7 @@ __ldexp(double x,int n)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__ldexp(double x,int n) __ldexp(double x,int n)
{ {
double result; double result;
@@ -129,7 +129,7 @@ union dtol
long ival[2]; long ival[2];
}; };
INLINE static const double INLINE STATIC const double
__ldexp(double x,int n) __ldexp(double x,int n)
{ {
union dtol number; union dtol number;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_log.c,v 1.5 2005-02-03 16:56:15 obarthel Exp $ * $Id: math_log.c,v 1.6 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___log:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__log(double x) __log(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __log(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__log(double x) __log(double x)
{ {
double result; double result;
@@ -150,7 +150,7 @@ Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */
Lg7 = 1.479819860511658591e-01, /* 3FC2F112 DF3E5244 */ Lg7 = 1.479819860511658591e-01, /* 3FC2F112 DF3E5244 */
zero = 0.0; zero = 0.0;
INLINE static const double INLINE STATIC const double
__log(double x) __log(double x)
{ {
double hfsq,f,s,z,R,w,t1,t2,dk; double hfsq,f,s,z,R,w,t1,t2,dk;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_log10.c,v 1.4 2005-02-03 16:56:15 obarthel Exp $ * $Id: math_log10.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___log10:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__log10(double x) __log10(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __log10(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__log10(double x) __log10(double x)
{ {
double result; double result;
@@ -144,7 +144,7 @@ log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */
log10_2lo = 3.69423907715893078616e-13, /* 0x3D59FEF3, 0x11F12B36 */ log10_2lo = 3.69423907715893078616e-13, /* 0x3D59FEF3, 0x11F12B36 */
zero = 0.0; zero = 0.0;
INLINE static const double INLINE STATIC const double
__log10(double x) __log10(double x)
{ {
double y,z; double y,z;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_logb.c,v 1.4 2005-02-03 16:56:15 obarthel Exp $ * $Id: math_logb.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -54,7 +54,7 @@
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__logb(double x) __logb(double x)
{ {
double result; double result;
@@ -70,7 +70,7 @@ __logb(double x)
#if defined(PPC_FLOATING_POINT_SUPPORT) #if defined(PPC_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__logb(double x) __logb(double x)
{ {
unsigned int lx,ix; unsigned int lx,ix;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_modf.c,v 1.4 2005-02-03 16:56:15 obarthel Exp $ * $Id: math_modf.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -58,7 +58,7 @@
#if defined(IEEE_FLOATING_POINT_SUPPORT) #if defined(IEEE_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__modf(double x,double *nptr) __modf(double x,double *nptr)
{ {
double int_n; double int_n;
@@ -88,7 +88,7 @@ __modf(double x,double *nptr)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__modf(double x,double *nptr) __modf(double x,double *nptr)
{ {
double result; double result;
@@ -111,7 +111,7 @@ __modf(double x,double *nptr)
#if defined(__PPC__) #if defined(__PPC__)
INLINE static const double INLINE STATIC const double
__modf(double x,double *nptr) __modf(double x,double *nptr)
{ {
double int_n; double int_n;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_pow.c,v 1.5 2005-02-03 16:56:15 obarthel Exp $ * $Id: math_pow.c,v 1.6 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -98,7 +98,7 @@ ___pow:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__pow(double x,double y) __pow(double x,double y)
{ {
double result; double result;
@@ -121,7 +121,7 @@ __pow(double x,double y)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__exp(double x) __exp(double x)
{ {
double result; double result;
@@ -133,7 +133,7 @@ __exp(double x)
return(result); return(result);
} }
INLINE static const double INLINE STATIC const double
__log(double x) __log(double x)
{ {
double result; double result;
@@ -145,7 +145,7 @@ __log(double x)
return(result); return(result);
} }
INLINE static const double INLINE STATIC const double
__pow(double x,double y) __pow(double x,double y)
{ {
double result; double result;
@@ -208,7 +208,7 @@ ivln2 = 1.44269504088896338700e+00, /* 0x3FF71547, 0x652B82FE =1/ln2 */
ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/ ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/
ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/ ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
INLINE static const double INLINE STATIC const double
__pow(double x,double y) __pow(double x,double y)
{ {
double z,ax,z_h,z_l,p_h,p_l; double z,ax,z_h,z_l,p_h,p_l;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_sin.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: math_sin.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___sin:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__sin(double x) __sin(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __sin(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__sin(double x) __sin(double x)
{ {
double result; double result;
@@ -137,7 +137,7 @@ __sin(double x)
#if defined(PPC_FLOATING_POINT_SUPPORT) #if defined(PPC_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__sin(double x) __sin(double x)
{ {
double y[2],z=0.0; double y[2],z=0.0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_sinh.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: math_sinh.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___sinh:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__sinh(double x) __sinh(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __sinh(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__sinh(double x) __sinh(double x)
{ {
double result; double result;
@@ -139,7 +139,7 @@ __sinh(double x)
static const double one = 1.0, shuge = 1.0e307; static const double one = 1.0, shuge = 1.0e307;
INLINE static const double INLINE STATIC const double
__sinh(double x) __sinh(double x)
{ {
double t,w,h; double t,w,h;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_sqrt.c,v 1.5 2005-02-03 16:56:15 obarthel Exp $ * $Id: math_sqrt.c,v 1.6 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___sqrt:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__sqrt(double x) __sqrt(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __sqrt(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__sqrt(double x) __sqrt(double x)
{ {
double result; double result;
@@ -139,7 +139,7 @@ __sqrt(double x)
static const double one = 1.0, tiny=1.0e-300; static const double one = 1.0, tiny=1.0e-300;
INLINE static const double INLINE STATIC const double
__sqrt(double x) __sqrt(double x)
{ {
double z; double z;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_tan.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: math_tan.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___tan:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__tan(double x) __tan(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __tan(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__tan(double x) __tan(double x)
{ {
double result; double result;
@@ -137,7 +137,7 @@ __tan(double x)
#if defined(PPC_FLOATING_POINT_SUPPORT) #if defined(PPC_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__tan(double x) __tan(double x)
{ {
double y[2],z=0.0; double y[2],z=0.0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: math_tanh.c,v 1.2 2005-01-02 09:07:07 obarthel Exp $ * $Id: math_tanh.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -97,7 +97,7 @@ ___tanh:
/****************************************************************************/ /****************************************************************************/
INLINE static const double INLINE STATIC const double
__tanh(double x) __tanh(double x)
{ {
double result; double result;
@@ -119,7 +119,7 @@ __tanh(double x)
#if defined(M68881_FLOATING_POINT_SUPPORT) #if defined(M68881_FLOATING_POINT_SUPPORT)
INLINE static const double INLINE STATIC const double
__tanh(double x) __tanh(double x)
{ {
double result; double result;
@@ -139,7 +139,7 @@ __tanh(double x)
static const double one=1.0, two=2.0, tiny = 1.0e-300; static const double one=1.0, two=2.0, tiny = 1.0e-300;
INLINE static const double INLINE STATIC const double
__tanh(double x) __tanh(double x)
{ {
double t,z; double t,z;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: sas_profile.c,v 1.2 2005-02-21 10:21:43 obarthel Exp $ * $Id: sas_profile.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -77,11 +77,11 @@ static BOOL initialized;
/****************************************************************************/ /****************************************************************************/
static int send_profiler_message(ULONG clock_value, char *id, ULONG flags); STATIC int send_profiler_message(ULONG clock_value, char *id, ULONG flags);
static ULONG get_current_time(void); STATIC ULONG get_current_time(void);
static void update_overhead(void); STATIC void update_overhead(void);
static void __profile_init(void); STATIC void __profile_init(void);
static void __profile_exit(void); STATIC void __profile_exit(void);
/****************************************************************************/ /****************************************************************************/
@@ -90,7 +90,7 @@ void ASM _EPILOG(REG(a0, char *id));
/****************************************************************************/ /****************************************************************************/
static int STATIC int
send_profiler_message(ULONG clock_value,char * id,ULONG flags) send_profiler_message(ULONG clock_value,char * id,ULONG flags)
{ {
extern long __builtin_getreg(int); extern long __builtin_getreg(int);
@@ -142,7 +142,7 @@ send_profiler_message(ULONG clock_value,char * id,ULONG flags)
/****************************************************************************/ /****************************************************************************/
static ULONG STATIC ULONG
get_current_time(void) get_current_time(void)
{ {
ULONG result; ULONG result;
@@ -156,7 +156,7 @@ get_current_time(void)
/****************************************************************************/ /****************************************************************************/
static void STATIC void
update_overhead(void) update_overhead(void)
{ {
struct EClockVal ev; struct EClockVal ev;
@@ -192,7 +192,7 @@ _EPILOG(REG(a0,char * id))
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
__profile_init(void) __profile_init(void)
{ {
struct SPROFMSG * spm; struct SPROFMSG * spm;
@@ -258,7 +258,7 @@ __profile_init(void)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
__profile_exit(void) __profile_exit(void)
{ {
if(initialized) if(initialized)

View File

@@ -1,5 +1,5 @@
_# _#
# $Id: smakefile,v 1.22 2005-02-20 13:19:40 obarthel Exp $ # $Id: smakefile,v 1.23 2005-02-25 10:14:21 obarthel Exp $
# #
# :ts=8 # :ts=8
# #
@@ -174,6 +174,7 @@ LIBGEN_OBJ = \
LOCALE_OBJ = \ LOCALE_OBJ = \
locale_init_exit.o \ locale_init_exit.o \
locale_localeconv.o \ locale_localeconv.o \
locale_open_locale.o \
locale_setlocale.o locale_setlocale.o
MATH_OBJ = \ MATH_OBJ = \

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: socket_select.c,v 1.4 2005-02-03 16:56:15 obarthel Exp $ * $Id: socket_select.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -47,7 +47,7 @@
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
copy_fd_set(fd_set * to,fd_set * from,int num_fds) copy_fd_set(fd_set * to,fd_set * from,int num_fds)
{ {
ENTER(); ENTER();
@@ -72,7 +72,7 @@ copy_fd_set(fd_set * to,fd_set * from,int num_fds)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
zero_fd_set(fd_set * set,int num_fds) zero_fd_set(fd_set * set,int num_fds)
{ {
ENTER(); ENTER();
@@ -96,7 +96,7 @@ zero_fd_set(fd_set * set,int num_fds)
/****************************************************************************/ /****************************************************************************/
static fd_set * STATIC fd_set *
allocate_fd_set(int num_fds,fd_set * duplicate_this_set) allocate_fd_set(int num_fds,fd_set * duplicate_this_set)
{ {
fd_set * result = NULL; fd_set * result = NULL;
@@ -130,7 +130,7 @@ allocate_fd_set(int num_fds,fd_set * duplicate_this_set)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
free_fd_set(fd_set * set) free_fd_set(fd_set * set)
{ {
if(set != NULL) if(set != NULL)
@@ -139,7 +139,7 @@ free_fd_set(fd_set * set)
/****************************************************************************/ /****************************************************************************/
static struct fd * STATIC struct fd *
get_file_descriptor(int file_descriptor) get_file_descriptor(int file_descriptor)
{ {
struct fd * result = NULL; struct fd * result = NULL;
@@ -166,7 +166,7 @@ get_file_descriptor(int file_descriptor)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
fix_datestamp(struct DateStamp * ds) fix_datestamp(struct DateStamp * ds)
{ {
const LONG ticks_per_minute = 60 * TICKS_PER_SECOND; const LONG ticks_per_minute = 60 * TICKS_PER_SECOND;
@@ -195,7 +195,7 @@ fix_datestamp(struct DateStamp * ds)
/****************************************************************************/ /****************************************************************************/
static struct DateStamp * STATIC struct DateStamp *
timeval_to_datestamp(struct DateStamp * ds,const struct timeval * tv) timeval_to_datestamp(struct DateStamp * ds,const struct timeval * tv)
{ {
assert( ds != NULL && tv != NULL ); assert( ds != NULL && tv != NULL );
@@ -211,7 +211,7 @@ timeval_to_datestamp(struct DateStamp * ds,const struct timeval * tv)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
add_dates(struct DateStamp * to,const struct DateStamp * from) add_dates(struct DateStamp * to,const struct DateStamp * from)
{ {
assert( to != NULL && from != NULL ); assert( to != NULL && from != NULL );
@@ -225,7 +225,7 @@ add_dates(struct DateStamp * to,const struct DateStamp * from)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
map_descriptor_sets( map_descriptor_sets(
const fd_set * input_fds, const fd_set * input_fds,
int num_input_fds, int num_input_fds,
@@ -341,7 +341,7 @@ map_descriptor_sets(
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
remap_descriptor_sets( remap_descriptor_sets(
const fd_set * socket_fds, const fd_set * socket_fds,
int num_socket_fds, int num_socket_fds,
@@ -432,7 +432,7 @@ remap_descriptor_sets(
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
get_num_descriptors_used(int num_fds,int * num_socket_used_ptr,int * num_file_used_ptr) get_num_descriptors_used(int num_fds,int * num_socket_used_ptr,int * num_file_used_ptr)
{ {
int num_socket_used = 0; int num_socket_used = 0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdio_record_locking.c,v 1.2 2005-02-21 10:22:00 obarthel Exp $ * $Id: stdio_record_locking.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -100,21 +100,21 @@ static struct FileLockSemaphore * FileLockSemaphore;
/****************************************************************************/ /****************************************************************************/
static void release_file_lock_semaphore(struct FileLockSemaphore *fls); STATIC VOID release_file_lock_semaphore(struct FileLockSemaphore *fls);
static struct FileLockSemaphore *obtain_file_lock_semaphore(BOOL shared); STATIC struct FileLockSemaphore *obtain_file_lock_semaphore(BOOL shared);
static void remove_locked_region_node(struct FileLockSemaphore *fls, struct fd *fd, LONG start, LONG stop, LONG original_length); STATIC VOID remove_locked_region_node(struct FileLockSemaphore *fls, struct fd *fd, LONG start, LONG stop, LONG original_length);
static void delete_locked_region_node(struct LockedRegionNode *lrn); STATIC VOID delete_locked_region_node(struct LockedRegionNode *lrn);
static long create_locked_region_node(struct LockedRegionNode **result_ptr); STATIC LONG create_locked_region_node(struct LockedRegionNode **result_ptr);
static void delete_file_lock_node(struct FileLockNode *fln); STATIC VOID delete_file_lock_node(struct FileLockNode *fln);
static long create_file_lock_node(struct fd *fd, struct FileLockNode **result_ptr); STATIC LONG create_file_lock_node(struct fd *fd, struct FileLockNode **result_ptr);
static long find_file_lock_node_by_file_handle(struct FileLockSemaphore *fls, BPTR file_handle, struct FileLockNode **result_ptr); STATIC LONG find_file_lock_node_by_file_handle(struct FileLockSemaphore *fls, BPTR file_handle, struct FileLockNode **result_ptr);
static long find_file_lock_node_by_drawer_and_name(struct FileLockSemaphore *fls, BPTR dir_lock, STRPTR file_name, struct FileLockNode **result_ptr); STATIC LONG find_file_lock_node_by_drawer_and_name(struct FileLockSemaphore *fls, BPTR dir_lock, STRPTR file_name, struct FileLockNode **result_ptr);
static struct LockedRegionNode *find_colliding_region(struct FileLockNode *fln, LONG start, LONG stop, BOOL shared); STATIC struct LockedRegionNode *find_colliding_region(struct FileLockNode *fln, LONG start, LONG stop, BOOL shared);
static void cleanup_locked_records(struct fd * fd); STATIC VOID cleanup_locked_records(struct fd * fd);
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
release_file_lock_semaphore(struct FileLockSemaphore * fls) release_file_lock_semaphore(struct FileLockSemaphore * fls)
{ {
ENTER(); ENTER();
@@ -129,7 +129,7 @@ release_file_lock_semaphore(struct FileLockSemaphore * fls)
/****************************************************************************/ /****************************************************************************/
static struct FileLockSemaphore * STATIC struct FileLockSemaphore *
obtain_file_lock_semaphore(BOOL shared) obtain_file_lock_semaphore(BOOL shared)
{ {
struct FileLockSemaphore * result = NULL; struct FileLockSemaphore * result = NULL;
@@ -234,7 +234,7 @@ obtain_file_lock_semaphore(BOOL shared)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
remove_locked_region_node(struct FileLockSemaphore * fls,struct fd * fd,LONG start,LONG UNUSED stop,LONG original_length) remove_locked_region_node(struct FileLockSemaphore * fls,struct fd * fd,LONG start,LONG UNUSED stop,LONG original_length)
{ {
ENTER(); ENTER();
@@ -304,7 +304,7 @@ remove_locked_region_node(struct FileLockSemaphore * fls,struct fd * fd,LONG sta
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
delete_locked_region_node(struct LockedRegionNode * lrn) delete_locked_region_node(struct LockedRegionNode * lrn)
{ {
ENTER(); ENTER();
@@ -318,7 +318,7 @@ delete_locked_region_node(struct LockedRegionNode * lrn)
/****************************************************************************/ /****************************************************************************/
static long STATIC LONG
create_locked_region_node(struct LockedRegionNode ** result_ptr) create_locked_region_node(struct LockedRegionNode ** result_ptr)
{ {
struct LockedRegionNode * lrn; struct LockedRegionNode * lrn;
@@ -349,7 +349,7 @@ create_locked_region_node(struct LockedRegionNode ** result_ptr)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
delete_file_lock_node(struct FileLockNode * fln) delete_file_lock_node(struct FileLockNode * fln)
{ {
ENTER(); ENTER();
@@ -370,7 +370,7 @@ delete_file_lock_node(struct FileLockNode * fln)
/****************************************************************************/ /****************************************************************************/
static long STATIC LONG
create_file_lock_node(struct fd * fd,struct FileLockNode ** result_ptr) create_file_lock_node(struct fd * fd,struct FileLockNode ** result_ptr)
{ {
struct FileLockNode * result = NULL; struct FileLockNode * result = NULL;
@@ -433,7 +433,7 @@ create_file_lock_node(struct fd * fd,struct FileLockNode ** result_ptr)
/****************************************************************************/ /****************************************************************************/
static long STATIC LONG
find_file_lock_node_by_drawer_and_name( find_file_lock_node_by_drawer_and_name(
struct FileLockSemaphore * fls, struct FileLockSemaphore * fls,
BPTR dir_lock, BPTR dir_lock,
@@ -499,7 +499,7 @@ find_file_lock_node_by_drawer_and_name(
/****************************************************************************/ /****************************************************************************/
static LONG STATIC LONG
find_file_lock_node_by_file_handle( find_file_lock_node_by_file_handle(
struct FileLockSemaphore * fls, struct FileLockSemaphore * fls,
BPTR file_handle, BPTR file_handle,
@@ -555,7 +555,7 @@ find_file_lock_node_by_file_handle(
/****************************************************************************/ /****************************************************************************/
static struct LockedRegionNode * STATIC struct LockedRegionNode *
find_colliding_region(struct FileLockNode * fln,LONG start,LONG stop,BOOL shared) find_colliding_region(struct FileLockNode * fln,LONG start,LONG stop,BOOL shared)
{ {
struct LockedRegionNode * result = NULL; struct LockedRegionNode * result = NULL;
@@ -612,7 +612,7 @@ find_colliding_region(struct FileLockNode * fln,LONG start,LONG stop,BOOL shared
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
cleanup_locked_records(struct fd * fd) cleanup_locked_records(struct fd * fd)
{ {
ENTER(); ENTER();

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdio_vfprintf.c,v 1.10 2005-02-21 10:22:01 obarthel Exp $ * $Id: stdio_vfprintf.c,v 1.11 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -71,7 +71,7 @@
/****************************************************************************/ /****************************************************************************/
static int STATIC int
get_num_leading_digits(__long_double_t v) get_num_leading_digits(__long_double_t v)
{ {
int num_digits; int num_digits;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_constructor_begin.c,v 1.3 2005-01-02 09:07:08 obarthel Exp $ * $Id: stdlib_constructor_begin.c,v 1.4 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -62,7 +62,7 @@ __construct(void)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
_do_ctors(void) _do_ctors(void)
{ {
void * volatile p = &__ctors; void * volatile p = &__ctors;
@@ -82,7 +82,7 @@ _do_ctors(void)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
_do_dtors(void) _do_dtors(void)
{ {
void * volatile p = &__dtors; void * volatile p = &__dtors;
@@ -121,7 +121,7 @@ typedef void (*func_ptr)(void);
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
_do_ctors(void) _do_ctors(void)
{ {
extern func_ptr __CTOR_LIST__[]; extern func_ptr __CTOR_LIST__[];
@@ -147,7 +147,7 @@ _do_ctors(void)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
_do_dtors(void) _do_dtors(void)
{ {
extern func_ptr __DTOR_LIST__[]; extern func_ptr __DTOR_LIST__[];

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_free.c,v 1.5 2005-01-02 09:07:18 obarthel Exp $ * $Id: stdlib_free.c,v 1.6 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -52,7 +52,7 @@
/****************************************************************************/ /****************************************************************************/
static char STATIC CHAR
get_hex_char(int n) get_hex_char(int n)
{ {
char result; char result;
@@ -65,7 +65,7 @@ get_hex_char(int n)
return(result); return(result);
} }
static void STATIC VOID
int_to_hex(unsigned long v,char * buffer,int min_digits) int_to_hex(unsigned long v,char * buffer,int min_digits)
{ {
int i,j,c; int i,j,c;
@@ -94,7 +94,7 @@ int_to_hex(unsigned long v,char * buffer,int min_digits)
buffer[i] = '\0'; buffer[i] = '\0';
} }
static void STATIC VOID
dump_memory(unsigned char * m,int size,int ignore) dump_memory(unsigned char * m,int size,int ignore)
{ {
const int mod = 20; const int mod = 20;
@@ -162,7 +162,7 @@ dump_memory(unsigned char * m,int size,int ignore)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
check_memory_node(struct MemoryNode * mn,const char * file,int line) check_memory_node(struct MemoryNode * mn,const char * file,int line)
{ {
size_t size = mn->mn_Size; size_t size = mn->mn_Size;
@@ -328,7 +328,7 @@ __find_memory_node(void * address)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
remove_and_free_memory_node(struct MemoryNode * mn) remove_and_free_memory_node(struct MemoryNode * mn)
{ {
size_t allocation_size; size_t allocation_size;
@@ -434,7 +434,7 @@ __free_memory_node(struct MemoryNode * mn,const char * UNUSED file,int UNUSED li
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
free_memory(void * ptr,BOOL force,const char * file,int line) free_memory(void * ptr,BOOL force,const char * file,int line)
{ {
struct MemoryNode * mn; struct MemoryNode * mn;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_headers.h,v 1.7 2005-02-03 12:14:55 obarthel Exp $ * $Id: stdlib_headers.h,v 1.8 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -139,7 +139,7 @@ extern char * __getcwd(char * buffer,size_t buffer_size,const char *file,int lin
#else #else
#define __static static #define __static STATIC
#define __free(mem,file,line) free(mem) #define __free(mem,file,line) free(mem)
#define __malloc(size,file,line) malloc(size) #define __malloc(size,file,line) malloc(size)

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_main.c,v 1.10 2005-01-13 15:39:39 obarthel Exp $ * $Id: stdlib_main.c,v 1.11 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -107,7 +107,7 @@ _EPILOG(REG(a0,char * id))
/****************************************************************************/ /****************************************************************************/
static int STATIC int
call_main(void) call_main(void)
{ {
/* Initialization functions; must be called exactly in this /* Initialization functions; must be called exactly in this
@@ -243,7 +243,7 @@ call_main(void)
/****************************************************************************/ /****************************************************************************/
static void ASM STATIC VOID ASM
detach_cleanup(REG(d0, LONG UNUSED unused_return_code),REG(d1, BPTR segment_list)) detach_cleanup(REG(d0, LONG UNUSED unused_return_code),REG(d1, BPTR segment_list))
{ {
#if defined(__amigaos4__) #if defined(__amigaos4__)
@@ -282,7 +282,7 @@ detach_cleanup(REG(d0, LONG UNUSED unused_return_code),REG(d1, BPTR segment_list
/****************************************************************************/ /****************************************************************************/
static ULONG STATIC ULONG
get_stack_size(void) get_stack_size(void)
{ {
struct Task * tc = FindTask(NULL); struct Task * tc = FindTask(NULL);

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_qsort.c,v 1.4 2005-02-03 16:56:16 obarthel Exp $ * $Id: stdlib_qsort.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -89,7 +89,7 @@
/******************************************************************/ /******************************************************************/
/* swap nbytes between a and b */ /* swap nbytes between a and b */
INLINE static void INLINE STATIC void
swap(char * a, char * b, size_t nbytes) swap(char * a, char * b, size_t nbytes)
{ {
char temp; char temp;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_red_black.c,v 1.2 2005-01-02 09:07:18 obarthel Exp $ * $Id: stdlib_red_black.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -52,7 +52,7 @@
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
help_insertion (struct MemoryTree * tree, struct MemoryNode * z) help_insertion (struct MemoryTree * tree, struct MemoryNode * z)
{ {
struct MemoryNode *nil = &tree->mt_NullNode; struct MemoryNode *nil = &tree->mt_NullNode;
@@ -82,7 +82,7 @@ help_insertion (struct MemoryTree * tree, struct MemoryNode * z)
y->mn_Right = z; y->mn_Right = z;
} }
static void STATIC VOID
rotate_left (struct MemoryTree * tree, struct MemoryNode * x) rotate_left (struct MemoryTree * tree, struct MemoryNode * x)
{ {
struct MemoryNode *nil = &tree->mt_NullNode; struct MemoryNode *nil = &tree->mt_NullNode;
@@ -105,7 +105,7 @@ rotate_left (struct MemoryTree * tree, struct MemoryNode * x)
x->mn_Parent = y; x->mn_Parent = y;
} }
static void STATIC VOID
rotate_right (struct MemoryTree * tree, struct MemoryNode * y) rotate_right (struct MemoryTree * tree, struct MemoryNode * y)
{ {
struct MemoryNode *nil = &tree->mt_NullNode; struct MemoryNode *nil = &tree->mt_NullNode;
@@ -130,7 +130,7 @@ rotate_right (struct MemoryTree * tree, struct MemoryNode * y)
/****************************************************************************/ /****************************************************************************/
static struct MemoryNode * STATIC STRUCT MemoryNode *
get_successor (struct MemoryTree * tree, struct MemoryNode * x) get_successor (struct MemoryTree * tree, struct MemoryNode * x)
{ {
struct MemoryNode *nil = &tree->mt_NullNode; struct MemoryNode *nil = &tree->mt_NullNode;
@@ -164,7 +164,7 @@ get_successor (struct MemoryTree * tree, struct MemoryNode * x)
return (result); return (result);
} }
static void STATIC VOID
remove_fixup (struct MemoryTree * tree, struct MemoryNode * x) remove_fixup (struct MemoryTree * tree, struct MemoryNode * x)
{ {
struct MemoryNode *root = tree->mt_Root->mn_Left; struct MemoryNode *root = tree->mt_Root->mn_Left;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_stackextension.c,v 1.4 2005-01-02 09:07:19 obarthel Exp $ * $Id: stdlib_stackextension.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -326,7 +326,7 @@ CLIB_DESTRUCTOR(__stk_exit)
/* Move a stackframe with a minimum of requiredstack bytes to the used list /* Move a stackframe with a minimum of requiredstack bytes to the used list
and fill the StackSwapStruct structure. */ and fill the StackSwapStruct structure. */
static void STATIC VOID
pushframe(ULONG requiredstack, struct StackSwapStruct *sss) pushframe(ULONG requiredstack, struct StackSwapStruct *sss)
{ {
struct stackframe *sf; struct stackframe *sf;
@@ -504,7 +504,7 @@ stkext_f(struct StackSwapStruct sss, long d0, long d1, long a0, long a1, long a6
/* Move all used stackframes upto (and including) sf to the spares list /* Move all used stackframes upto (and including) sf to the spares list
and fill the StackSwapStruct structure. */ and fill the StackSwapStruct structure. */
static void STATIC VOID
popframes(struct stackframe *sf, struct StackSwapStruct *sss) popframes(struct stackframe *sf, struct StackSwapStruct *sss)
{ {
struct stackframe *sf2; struct stackframe *sf2;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_stacksize.c,v 1.2 2005-01-02 09:07:19 obarthel Exp $ * $Id: stdlib_stacksize.c,v 1.3 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -46,7 +46,7 @@
/******************************************************************************/ /******************************************************************************/
static unsigned int STATIC unsigned int
get_default_stack_size(void) get_default_stack_size(void)
{ {
unsigned int result = 0; unsigned int result = 0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: stdlib_startup.c,v 1.6 2005-01-09 15:58:02 obarthel Exp $ * $Id: stdlib_startup.c,v 1.7 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -90,7 +90,7 @@ UBYTE * __quote_vector;
/****************************************************************************/ /****************************************************************************/
static BOOL STATIC BOOL
is_escape_character(UBYTE c) is_escape_character(UBYTE c)
{ {
BOOL result; BOOL result;
@@ -102,7 +102,7 @@ is_escape_character(UBYTE c)
/****************************************************************************/ /****************************************************************************/
static BOOL STATIC BOOL
is_final_quote_character(const char * str) is_final_quote_character(const char * str)
{ {
BOOL result; BOOL result;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: string_memchr.c,v 1.4 2005-02-03 16:56:17 obarthel Exp $ * $Id: string_memchr.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -48,7 +48,7 @@
/****************************************************************************/ /****************************************************************************/
INLINE static void * INLINE STATIC void *
__memchr(const unsigned char * m,unsigned char val,size_t len) __memchr(const unsigned char * m,unsigned char val,size_t len)
{ {
void * result = NULL; void * result = NULL;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: string_memcmp.c,v 1.5 2005-02-03 16:56:17 obarthel Exp $ * $Id: string_memcmp.c,v 1.6 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -43,7 +43,7 @@
/****************************************************************************/ /****************************************************************************/
INLINE static int INLINE STATIC int
__memcmp(const char *m1,const char *m2,size_t len) __memcmp(const char *m1,const char *m2,size_t len)
{ {
int result = 0; int result = 0;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: string_memcpy.c,v 1.5 2005-02-03 16:56:17 obarthel Exp $ * $Id: string_memcpy.c,v 1.6 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -229,7 +229,7 @@ memcpy(void *dst, const void *src, size_t len)
/****************************************************************************/ /****************************************************************************/
INLINE static void INLINE STATIC VOID
__memcpy(unsigned char * to,unsigned char * from,size_t len) __memcpy(unsigned char * to,unsigned char * from,size_t len)
{ {
/* The setup below is intended to speed up copying larger /* The setup below is intended to speed up copying larger

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: string_memmove.c,v 1.4 2005-02-03 16:56:17 obarthel Exp $ * $Id: string_memmove.c,v 1.5 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -351,7 +351,7 @@ memmove(void *dest, const void * src, size_t len)
/****************************************************************************/ /****************************************************************************/
INLINE static void INLINE STATIC VOID
__memmove(unsigned char * to,unsigned char * from,size_t len) __memmove(unsigned char * to,unsigned char * from,size_t len)
{ {
if(from < to && to < from + len) if(from < to && to < from + len)

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: string_memset.c,v 1.5 2005-02-03 16:56:17 obarthel Exp $ * $Id: string_memset.c,v 1.6 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -43,7 +43,7 @@
/****************************************************************************/ /****************************************************************************/
INLINE static void INLINE STATIC VOID
__memset(unsigned char * to,unsigned char value,size_t len) __memset(unsigned char * to,unsigned char value,size_t len)
{ {
/* The setup below is intended to speed up changing larger /* The setup below is intended to speed up changing larger

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: time_asctime_r.c,v 1.6 2005-02-03 16:56:17 obarthel Exp $ * $Id: time_asctime_r.c,v 1.7 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -43,7 +43,7 @@
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
add_to_string(char * to,size_t to_size,const char * string,size_t * offset_ptr) add_to_string(char * to,size_t to_size,const char * string,size_t * offset_ptr)
{ {
size_t offset,len; size_t offset,len;

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: time_strftime.c,v 1.7 2005-02-03 16:56:17 obarthel Exp $ * $Id: time_strftime.c,v 1.8 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -56,7 +56,7 @@ struct format_hook_data
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
format_hook_function( format_hook_function(
struct Hook * hook, struct Hook * hook,
long c, long c,
@@ -85,7 +85,7 @@ format_hook_function(
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
store_string_via_hook(const char * string,int len,struct Hook * hook) store_string_via_hook(const char * string,int len,struct Hook * hook)
{ {
DECLARE_UTILITYBASE(); DECLARE_UTILITYBASE();
@@ -102,7 +102,7 @@ store_string_via_hook(const char * string,int len,struct Hook * hook)
/****************************************************************************/ /****************************************************************************/
static void STATIC VOID
format_date(const char *format,const struct tm *tm,struct Hook * hook) format_date(const char *format,const struct tm *tm,struct Hook * hook)
{ {
char buffer[40]; char buffer[40];

View File

@@ -1,5 +1,5 @@
/* /*
* $Id: unistd_wildcard_expand.c,v 1.7 2005-02-07 11:19:32 obarthel Exp $ * $Id: unistd_wildcard_expand.c,v 1.8 2005-02-25 10:14:21 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@@ -111,7 +111,7 @@ struct name_node
/****************************************************************************/ /****************************************************************************/
static int STATIC int
compare(const char **a,const char **b) compare(const char **a,const char **b)
{ {
DECLARE_UTILITYBASE(); DECLARE_UTILITYBASE();
@@ -126,6 +126,7 @@ compare(const char **a,const char **b)
int int
__wildcard_expand_init(void) __wildcard_expand_init(void)
{ {
APTR old_window_pointer;
struct AnchorPath * ap = NULL; struct AnchorPath * ap = NULL;
struct MinList argument_list; struct MinList argument_list;
size_t argument_list_size; size_t argument_list_size;
@@ -139,6 +140,11 @@ __wildcard_expand_init(void)
PROFILE_OFF(); PROFILE_OFF();
/* Disable dos.library requesters during pattern matching below. We
do this so early in order to make it easier to reset the window
pointer in the cleanup code. */
old_window_pointer = __set_process_window((APTR)-1);
/* No work to be done? */ /* No work to be done? */
if(__quote_vector == NULL || __argc == 0 || __argv == NULL) if(__quote_vector == NULL || __argc == 0 || __argv == NULL)
{ {
@@ -405,6 +411,8 @@ __wildcard_expand_init(void)
free(__quote_vector); free(__quote_vector);
__quote_vector = NULL; __quote_vector = NULL;
__set_process_window(old_window_pointer);
PROFILE_ON(); PROFILE_ON();
return(error); return(error);