diff --git a/library/GNUmakefile.68k b/library/GNUmakefile.68k index 37407a7..67bf272 100644 --- a/library/GNUmakefile.68k +++ b/library/GNUmakefile.68k @@ -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 # @@ -151,6 +151,7 @@ C_LIB = \ libgen_dirname.o \ locale_init_exit.o \ locale_localeconv.o \ + locale_open_locale.o \ locale_setlocale.o \ mount_convertinfo.o \ mount_fstatfs.o \ diff --git a/library/GNUmakefile.os4 b/library/GNUmakefile.os4 index b3466c2..0090e73 100644 --- a/library/GNUmakefile.os4 +++ b/library/GNUmakefile.os4 @@ -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 # @@ -155,6 +155,7 @@ C_LIB = \ libgen_dirname.o \ locale_init_exit.o \ locale_localeconv.o \ + locale_open_locale.o \ locale_setlocale.o \ mount_convertinfo.o \ mount_fstatfs.o \ diff --git a/library/amiga_addtof.c b/library/amiga_addtof.c index 19613ab..48583eb 100644 --- a/library/amiga_addtof.c +++ b/library/amiga_addtof.c @@ -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 * @@ -57,7 +57,7 @@ typedef LONG (* CFUNC)(APTR arg); /****************************************************************************/ -static LONG INTERRUPT ASM +STATIC LONG INTERRUPT ASM call_routine(REG(a1,struct Isrvstr *i)) { CFUNC p = (CFUNC)i->ccode; diff --git a/library/amiga_invertstring.c b/library/amiga_invertstring.c index 3011a4b..fcd9868 100644 --- a/library/amiga_invertstring.c +++ b/library/amiga_invertstring.c @@ -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 * @@ -49,7 +49,7 @@ /****************************************************************************/ -static int +STATIC int do_escape(int cc) { int result; @@ -91,7 +91,7 @@ do_escape(int cc) /****************************************************************************/ -static ULONG +STATIC ULONG do_angle(STRPTR * strp, struct InputEvent *ie) { ULONG result; diff --git a/library/amiga_setsuperattrs.c b/library/amiga_setsuperattrs.c index 8900489..cc59aed 100644 --- a/library/amiga_setsuperattrs.c +++ b/library/amiga_setsuperattrs.c @@ -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 * @@ -46,7 +46,7 @@ /****************************************************************************/ -static ULONG +STATIC ULONG SetSuperAttrsA(Class * cl,Object * obj,struct TagItem * tags) { ULONG result = 0; diff --git a/library/changes b/library/changes index 7b62411..911cc24 100644 --- a/library/changes +++ b/library/changes @@ -25,6 +25,29 @@ buffered files which now bypasses close/read/write/lseek and directly invokes the hook code for unbuffered files. +- Added various floating point constants to , 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) diff --git a/library/crtbegin.c b/library/crtbegin.c index d24819b..8277358 100644 --- a/library/crtbegin.c +++ b/library/crtbegin.c @@ -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 * @@ -30,7 +30,7 @@ static void (*__DTOR_LIST__[1]) (void) __attribute__((section(".dtors"))) = { (v /****************************************************************************/ -static void +STATIC VOID _do_ctors(void) { void (**pFuncPtr)(void); @@ -45,7 +45,7 @@ _do_ctors(void) /****************************************************************************/ -static void +STATIC VOID _do_dtors(void) { ULONG i = (ULONG)__DTOR_LIST__[0]; @@ -79,7 +79,7 @@ typedef void (*func_ptr)(void); /****************************************************************************/ -static void +STATIC VOID _do_ctors(void) { extern func_ptr __CTOR_LIST__[]; @@ -92,7 +92,7 @@ _do_ctors(void) /****************************************************************************/ -static void +STATIC VOID _do_dtors(void) { extern func_ptr __DTOR_LIST__[]; diff --git a/library/debug.c b/library/debug.c index 06a9d13..efcbd7f 100644 --- a/library/debug.c +++ b/library/debug.c @@ -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 * @@ -133,7 +133,7 @@ _POPDEBUGLEVEL(void) /****************************************************************************/ -static void +STATIC VOID _INDENT(void) { if(program_name_len > 0) diff --git a/library/debug_kputfmt.c b/library/debug_kputfmt.c index 12452a7..baacf26 100644 --- a/library/debug_kputfmt.c +++ b/library/debug_kputfmt.c @@ -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 * @@ -43,7 +43,7 @@ parameter table is provided, pick up the parameters and store them in the table. The table layout follows the format string and can include 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) { 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)) { kputc(c); diff --git a/library/dirent_opendir.c b/library/dirent_opendir.c index 52ea871..79569f0 100644 --- a/library/dirent_opendir.c +++ b/library/dirent_opendir.c @@ -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 * @@ -57,7 +57,7 @@ /****************************************************************************/ -static struct Node * +STATIC struct Node * find_by_name(struct List * list,const char * name) { struct Node * result = NULL; diff --git a/library/fcntl_open.c b/library/fcntl_open.c index af2d086..088c892 100644 --- a/library/fcntl_open.c +++ b/library/fcntl_open.c @@ -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 * @@ -56,7 +56,7 @@ /* 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 caller of the ChangeMode() function. */ -static LONG +STATIC LONG safe_change_mode(LONG type,BPTR file_handle,LONG mode) { LONG result = DOSFALSE; diff --git a/library/include/dos.h b/library/include/dos.h index 58d9c87..622f9db 100644 --- a/library/include/dos.h +++ b/library/include/dos.h @@ -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 * @@ -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 * names (and the other way round). If you wish to disable this, set the diff --git a/library/include/math.h b/library/include/math.h index d77a337..c5a7c00 100644 --- a/library/include/math.h +++ b/library/include/math.h @@ -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 * @@ -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 float rintf(float x); extern int isinf(double x); diff --git a/library/locale_init_exit.c b/library/locale_init_exit.c index 1312f43..67db427 100644 --- a/library/locale_init_exit.c +++ b/library/locale_init_exit.c @@ -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 * @@ -88,9 +88,11 @@ __close_all_locales(void) } } + /****************************************************************************/ -CLIB_DESTRUCTOR(__locale_exit) +void +__locale_exit(void) { 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; @@ -134,32 +193,8 @@ CLIB_CONSTRUCTOR(__locale_init) for(i = 0 ; i < NUM_LOCALES ; i++) strcpy(__locale_name_table[i],"C"); - PROFILE_OFF(); - - __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(); + if(__open_locale) + __locale_init(); RETURN(OK); diff --git a/library/locale_localeconv.c b/library/locale_localeconv.c index 00837ee..b9d6818 100644 --- a/library/locale_localeconv.c +++ b/library/locale_localeconv.c @@ -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 * @@ -41,6 +41,7 @@ struct lconv * localeconv(void) { static struct lconv loc; + struct Locale * numeric_locale = __locale_table[LC_NUMERIC]; struct Locale * monetary_locale = __locale_table[LC_MONETARY]; struct lconv * result; diff --git a/library/locale_open_locale.c b/library/locale_open_locale.c new file mode 100644 index 0000000..03ec818 --- /dev/null +++ b/library/locale_open_locale.c @@ -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 + * 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; diff --git a/library/macros.h b/library/macros.h index 08f261b..df29887 100644 --- a/library/macros.h +++ b/library/macros.h @@ -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 * @@ -163,10 +163,10 @@ #endif /* __SASC */ #ifdef __GNUC__ -#define CLIB_CONSTRUCTOR(name) static void __attribute__((constructor)) name##_ctor(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_DESTRUCTOR(name) static void __attribute__((destructor)) name##_dtor(void) +#define CLIB_CONSTRUCTOR(name) STATIC VOID __attribute__((constructor)) name##_ctor(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_DESTRUCTOR(name) STATIC VOID __attribute__((destructor)) name##_dtor(void) #define CONSTRUCTOR_SUCCEED() return #define CONSTRUCTOR_FAIL() exit(RETURN_FAIL) /* ZZZ not a nice thing to do; fix the constructor invocation code! */ #endif /* __GNUC__ */ diff --git a/library/math_acos.c b/library/math_acos.c index 3378a27..a8e37c9 100644 --- a/library/math_acos.c +++ b/library/math_acos.c @@ -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 * @@ -97,7 +97,7 @@ ___acos: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __acos(double x) { double result; @@ -119,7 +119,7 @@ __acos(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __acos(double x) { double result; @@ -153,7 +153,7 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ -INLINE static const double +INLINE STATIC const double __acos(double x) { double z,p,q,r,w,s,c,df; diff --git a/library/math_asin.c b/library/math_asin.c index b3b7e1f..bae2a6e 100644 --- a/library/math_asin.c +++ b/library/math_asin.c @@ -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 * @@ -97,7 +97,7 @@ ___asin: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __asin(double x) { double result; @@ -119,7 +119,7 @@ __asin(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __asin(double x) { double result; @@ -156,7 +156,7 @@ qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ -INLINE static const double +INLINE STATIC const double __asin(double x) { double t,w,p,q,c,r,s; diff --git a/library/math_atan.c b/library/math_atan.c index 3d319e5..3992081 100644 --- a/library/math_atan.c +++ b/library/math_atan.c @@ -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 * @@ -97,7 +97,7 @@ ___atan: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __atan(double x) { double result; @@ -119,7 +119,7 @@ __atan(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __atan(double x) { double result; @@ -169,7 +169,7 @@ static const double one = 1.0, huge = 1.0e300; -INLINE static const double +INLINE STATIC const double __atan(double x) { double w,s1,s2,z; diff --git a/library/math_atan2.c b/library/math_atan2.c index 145aaee..f4be17f 100644 --- a/library/math_atan2.c +++ b/library/math_atan2.c @@ -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 * @@ -62,7 +62,7 @@ extern double __atan(double x); /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __atan2(double y,double x) { const double pi = 3.14159265358979323846; @@ -122,7 +122,7 @@ __atan2(double y,double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __atan(double x) { double result; @@ -134,7 +134,7 @@ __atan(double x) return(result); } -INLINE static const double +INLINE STATIC const double __atan2(double y,double x) { double pi,pi_over_2; @@ -209,7 +209,7 @@ pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */ pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */ pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */ -INLINE static const double +INLINE STATIC const double __atan2(double y,double x) { double z; diff --git a/library/math_ceil.c b/library/math_ceil.c index b3bf19a..fb94390 100644 --- a/library/math_ceil.c +++ b/library/math_ceil.c @@ -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 * @@ -97,7 +97,7 @@ ___ceil: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __ceil(double x) { double result; @@ -119,7 +119,7 @@ __ceil(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __ceil(double x) { int rounding_mode, round_up; @@ -152,7 +152,7 @@ __ceil(double x) static const double huge = 1.0e300; -INLINE static const double +INLINE STATIC const double __ceil(double x) { int i0,i1,j0; diff --git a/library/math_cos.c b/library/math_cos.c index 581ff18..8abb4bd 100644 --- a/library/math_cos.c +++ b/library/math_cos.c @@ -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 * @@ -97,7 +97,7 @@ ___cos: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __cos(double x) { double result; @@ -119,7 +119,7 @@ __cos(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __cos(double x) { double result; @@ -137,7 +137,7 @@ __cos(double x) #if defined(PPC_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __cos(double x) { double y[2],z=0.0; diff --git a/library/math_cosh.c b/library/math_cosh.c index a2bd529..daa9a4e 100644 --- a/library/math_cosh.c +++ b/library/math_cosh.c @@ -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 * @@ -97,7 +97,7 @@ ___cosh: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __cosh(double x) { double result; @@ -119,7 +119,7 @@ __cosh(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __cosh(double x) { double result; @@ -139,7 +139,7 @@ __cosh(double x) static const double one = 1.0, half=0.5, huge = 1.0e300; -INLINE static const double +INLINE STATIC const double __cosh(double x) { double t,w; diff --git a/library/math_exp.c b/library/math_exp.c index 15c2f2c..2cb74ed 100644 --- a/library/math_exp.c +++ b/library/math_exp.c @@ -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 * @@ -97,7 +97,7 @@ ___exp: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __exp(double x) { double result; @@ -119,7 +119,7 @@ __exp(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __exp(double x) { double result; @@ -155,7 +155,7 @@ P3 = 6.61375632143793436117e-05, /* 0x3F11566A, 0xAF25DE2C */ P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */ P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */ -INLINE static const double +INLINE STATIC const double __exp(double x) { double y,hi,lo,c,t; diff --git a/library/math_fabs.c b/library/math_fabs.c index ccd636f..64a2fd9 100644 --- a/library/math_fabs.c +++ b/library/math_fabs.c @@ -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 * @@ -88,7 +88,7 @@ ___fabs: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __fabs(double x) { double result; @@ -110,7 +110,7 @@ __fabs(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __fabs(double x) { double result; @@ -134,7 +134,7 @@ __fabs(double x) /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __fabs(double x) { double res; @@ -153,7 +153,7 @@ __fabs(double x) /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __fabs(double x) { double res; diff --git a/library/math_floor.c b/library/math_floor.c index 699a0fd..8bf9104 100644 --- a/library/math_floor.c +++ b/library/math_floor.c @@ -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 * @@ -97,7 +97,7 @@ ___floor: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __floor(double x) { double result; @@ -119,7 +119,7 @@ __floor(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __floor(double x) { int rounding_mode, round_down; @@ -153,7 +153,7 @@ __floor(double x) #if defined(PPC_FLOATING_POINT_SUPPORT) static const double huge = 1.0e300; -INLINE static const double +INLINE STATIC const double __floor(double x) { int i0,i1,j0; diff --git a/library/math_fmod.c b/library/math_fmod.c index a310cd0..cff3787 100644 --- a/library/math_fmod.c +++ b/library/math_fmod.c @@ -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 * @@ -54,7 +54,7 @@ /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __fmod(double x,double y) { double q,p,result; @@ -79,7 +79,7 @@ __fmod(double x,double y) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __fmod(double x,double y) { double result; @@ -102,7 +102,7 @@ static const double one = 1.0, Zero[] = {0.0, -0.0,}; -INLINE static const double +INLINE STATIC const double __fmod(double x,double y) { int n,hx,hy,hz,ix,iy,sx,i; diff --git a/library/math_frexp.c b/library/math_frexp.c index 8f3e2a9..8510039 100644 --- a/library/math_frexp.c +++ b/library/math_frexp.c @@ -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 * @@ -58,7 +58,7 @@ #if defined(IEEE_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __frexp(double x,int * nptr) { int int_exponent = 0; @@ -106,7 +106,7 @@ __frexp(double x,int * nptr) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __frexp(double x,int * nptr) { double float_exponent; @@ -146,7 +146,7 @@ __frexp(double x,int * nptr) static const double two54 = 1.80143985094819840000e+16; /* 0x43500000, 0x00000000 */ -INLINE static const double +INLINE STATIC const double __frexp(double x,int * eptr) { int hx, ix, lx; diff --git a/library/math_hypot.c b/library/math_hypot.c index 00d1840..f67692e 100644 --- a/library/math_hypot.c +++ b/library/math_hypot.c @@ -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 * @@ -52,7 +52,7 @@ #if defined(IEEE_FLOATING_POINT_SUPPORT) || defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __hypot(double x,double y) { double yx; @@ -85,7 +85,7 @@ __hypot(double x,double y) static const double one = 1.0; -INLINE static const double +INLINE STATIC const double __hypot(double x,double y) { int n0; diff --git a/library/math_kernel_rem_pio2.c b/library/math_kernel_rem_pio2.c index 506d8af..e59a91e 100644 --- a/library/math_kernel_rem_pio2.c +++ b/library/math_kernel_rem_pio2.c @@ -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 * @@ -69,7 +69,7 @@ one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */ two24 = 1.67772160000000000000e+07, /* 0x41700000, 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; double z,fw,f[20],fq[20],q[20]; @@ -341,7 +341,7 @@ int __rem_pio2(double x, double *y) tx[2] = z; nx = 3; 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;} return n; } diff --git a/library/math_kernel_scalbn.c b/library/math_kernel_scalbn.c index 76b6b93..0093612 100644 --- a/library/math_kernel_scalbn.c +++ b/library/math_kernel_scalbn.c @@ -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 * @@ -50,7 +50,7 @@ /****************************************************************************/ -INLINE static double copysign(double x, double y) +INLINE STATIC double copysign(double x, double y) { unsigned int hx,hy; diff --git a/library/math_ldexp.c b/library/math_ldexp.c index 63c5d88..5d0745b 100644 --- a/library/math_ldexp.c +++ b/library/math_ldexp.c @@ -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 * @@ -66,7 +66,7 @@ union dtol long ival[2]; }; -INLINE static const double +INLINE STATIC const double __ldexp(double x,int n) { union dtol number; @@ -96,7 +96,7 @@ __ldexp(double x,int n) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __ldexp(double x,int n) { double result; @@ -129,7 +129,7 @@ union dtol long ival[2]; }; -INLINE static const double +INLINE STATIC const double __ldexp(double x,int n) { union dtol number; diff --git a/library/math_log.c b/library/math_log.c index 91680d4..8a15222 100644 --- a/library/math_log.c +++ b/library/math_log.c @@ -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 * @@ -97,7 +97,7 @@ ___log: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __log(double x) { double result; @@ -119,7 +119,7 @@ __log(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __log(double x) { double result; @@ -150,7 +150,7 @@ Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */ Lg7 = 1.479819860511658591e-01, /* 3FC2F112 DF3E5244 */ zero = 0.0; -INLINE static const double +INLINE STATIC const double __log(double x) { double hfsq,f,s,z,R,w,t1,t2,dk; diff --git a/library/math_log10.c b/library/math_log10.c index c8073bc..87014cf 100644 --- a/library/math_log10.c +++ b/library/math_log10.c @@ -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 * @@ -97,7 +97,7 @@ ___log10: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __log10(double x) { double result; @@ -119,7 +119,7 @@ __log10(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __log10(double x) { double result; @@ -144,7 +144,7 @@ log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */ log10_2lo = 3.69423907715893078616e-13, /* 0x3D59FEF3, 0x11F12B36 */ zero = 0.0; -INLINE static const double +INLINE STATIC const double __log10(double x) { double y,z; diff --git a/library/math_logb.c b/library/math_logb.c index dfce008..3e212a3 100644 --- a/library/math_logb.c +++ b/library/math_logb.c @@ -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 * @@ -54,7 +54,7 @@ /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __logb(double x) { double result; @@ -70,7 +70,7 @@ __logb(double x) #if defined(PPC_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __logb(double x) { unsigned int lx,ix; diff --git a/library/math_modf.c b/library/math_modf.c index f3ab21c..983d1cd 100644 --- a/library/math_modf.c +++ b/library/math_modf.c @@ -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 * @@ -58,7 +58,7 @@ #if defined(IEEE_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __modf(double x,double *nptr) { double int_n; @@ -88,7 +88,7 @@ __modf(double x,double *nptr) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __modf(double x,double *nptr) { double result; @@ -111,7 +111,7 @@ __modf(double x,double *nptr) #if defined(__PPC__) -INLINE static const double +INLINE STATIC const double __modf(double x,double *nptr) { double int_n; diff --git a/library/math_pow.c b/library/math_pow.c index 57f08c8..3cca6a9 100644 --- a/library/math_pow.c +++ b/library/math_pow.c @@ -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 * @@ -98,7 +98,7 @@ ___pow: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __pow(double x,double y) { double result; @@ -121,7 +121,7 @@ __pow(double x,double y) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __exp(double x) { double result; @@ -133,7 +133,7 @@ __exp(double x) return(result); } -INLINE static const double +INLINE STATIC const double __log(double x) { double result; @@ -145,7 +145,7 @@ __log(double x) return(result); } -INLINE static const double +INLINE STATIC const double __pow(double x,double y) { 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_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/ -INLINE static const double +INLINE STATIC const double __pow(double x,double y) { double z,ax,z_h,z_l,p_h,p_l; diff --git a/library/math_sin.c b/library/math_sin.c index 3bde7e6..1287307 100644 --- a/library/math_sin.c +++ b/library/math_sin.c @@ -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 * @@ -97,7 +97,7 @@ ___sin: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __sin(double x) { double result; @@ -119,7 +119,7 @@ __sin(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __sin(double x) { double result; @@ -137,7 +137,7 @@ __sin(double x) #if defined(PPC_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __sin(double x) { double y[2],z=0.0; diff --git a/library/math_sinh.c b/library/math_sinh.c index 5a33030..6112db6 100644 --- a/library/math_sinh.c +++ b/library/math_sinh.c @@ -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 * @@ -97,7 +97,7 @@ ___sinh: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __sinh(double x) { double result; @@ -119,7 +119,7 @@ __sinh(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __sinh(double x) { double result; @@ -139,7 +139,7 @@ __sinh(double x) static const double one = 1.0, shuge = 1.0e307; -INLINE static const double +INLINE STATIC const double __sinh(double x) { double t,w,h; diff --git a/library/math_sqrt.c b/library/math_sqrt.c index f1edd14..59f3117 100644 --- a/library/math_sqrt.c +++ b/library/math_sqrt.c @@ -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 * @@ -97,7 +97,7 @@ ___sqrt: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __sqrt(double x) { double result; @@ -119,7 +119,7 @@ __sqrt(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __sqrt(double x) { double result; @@ -139,7 +139,7 @@ __sqrt(double x) static const double one = 1.0, tiny=1.0e-300; -INLINE static const double +INLINE STATIC const double __sqrt(double x) { double z; diff --git a/library/math_tan.c b/library/math_tan.c index ceb831b..b540b0d 100644 --- a/library/math_tan.c +++ b/library/math_tan.c @@ -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 * @@ -97,7 +97,7 @@ ___tan: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __tan(double x) { double result; @@ -119,7 +119,7 @@ __tan(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __tan(double x) { double result; @@ -137,7 +137,7 @@ __tan(double x) #if defined(PPC_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __tan(double x) { double y[2],z=0.0; diff --git a/library/math_tanh.c b/library/math_tanh.c index d9d3f0d..6f55d42 100644 --- a/library/math_tanh.c +++ b/library/math_tanh.c @@ -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 * @@ -97,7 +97,7 @@ ___tanh: /****************************************************************************/ -INLINE static const double +INLINE STATIC const double __tanh(double x) { double result; @@ -119,7 +119,7 @@ __tanh(double x) #if defined(M68881_FLOATING_POINT_SUPPORT) -INLINE static const double +INLINE STATIC const double __tanh(double x) { double result; @@ -139,7 +139,7 @@ __tanh(double x) static const double one=1.0, two=2.0, tiny = 1.0e-300; -INLINE static const double +INLINE STATIC const double __tanh(double x) { double t,z; diff --git a/library/sas_profile.c b/library/sas_profile.c index b931955..b3ab9be 100644 --- a/library/sas_profile.c +++ b/library/sas_profile.c @@ -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 * @@ -77,11 +77,11 @@ static BOOL initialized; /****************************************************************************/ -static int send_profiler_message(ULONG clock_value, char *id, ULONG flags); -static ULONG get_current_time(void); -static void update_overhead(void); -static void __profile_init(void); -static void __profile_exit(void); +STATIC int send_profiler_message(ULONG clock_value, char *id, ULONG flags); +STATIC ULONG get_current_time(void); +STATIC void update_overhead(void); +STATIC void __profile_init(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) { 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) { ULONG result; @@ -156,7 +156,7 @@ get_current_time(void) /****************************************************************************/ -static void +STATIC void update_overhead(void) { struct EClockVal ev; @@ -192,7 +192,7 @@ _EPILOG(REG(a0,char * id)) /****************************************************************************/ -static void +STATIC VOID __profile_init(void) { struct SPROFMSG * spm; @@ -258,7 +258,7 @@ __profile_init(void) /****************************************************************************/ -static void +STATIC VOID __profile_exit(void) { if(initialized) diff --git a/library/smakefile b/library/smakefile index be78fdf..d836b12 100644 --- a/library/smakefile +++ b/library/smakefile @@ -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 # @@ -174,6 +174,7 @@ LIBGEN_OBJ = \ LOCALE_OBJ = \ locale_init_exit.o \ locale_localeconv.o \ + locale_open_locale.o \ locale_setlocale.o MATH_OBJ = \ diff --git a/library/socket_select.c b/library/socket_select.c index 9cc89e3..566f34b 100644 --- a/library/socket_select.c +++ b/library/socket_select.c @@ -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 * @@ -47,7 +47,7 @@ /****************************************************************************/ -static void +STATIC VOID copy_fd_set(fd_set * to,fd_set * from,int num_fds) { 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) { 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) { 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) { 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) { struct fd * result = NULL; @@ -166,7 +166,7 @@ get_file_descriptor(int file_descriptor) /****************************************************************************/ -static void +STATIC VOID fix_datestamp(struct DateStamp * ds) { 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) { 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) { 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( const fd_set * input_fds, int num_input_fds, @@ -341,7 +341,7 @@ map_descriptor_sets( /****************************************************************************/ -static void +STATIC VOID remap_descriptor_sets( const fd_set * 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) { int num_socket_used = 0; diff --git a/library/stdio_record_locking.c b/library/stdio_record_locking.c index d8b9502..1d312c4 100644 --- a/library/stdio_record_locking.c +++ b/library/stdio_record_locking.c @@ -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 * @@ -100,21 +100,21 @@ static struct FileLockSemaphore * FileLockSemaphore; /****************************************************************************/ -static void release_file_lock_semaphore(struct FileLockSemaphore *fls); -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 delete_locked_region_node(struct LockedRegionNode *lrn); -static long create_locked_region_node(struct LockedRegionNode **result_ptr); -static void delete_file_lock_node(struct FileLockNode *fln); -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_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 void cleanup_locked_records(struct fd * fd); +STATIC VOID release_file_lock_semaphore(struct FileLockSemaphore *fls); +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 delete_locked_region_node(struct LockedRegionNode *lrn); +STATIC LONG create_locked_region_node(struct LockedRegionNode **result_ptr); +STATIC VOID delete_file_lock_node(struct FileLockNode *fln); +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_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 VOID cleanup_locked_records(struct fd * fd); /****************************************************************************/ -static void +STATIC VOID release_file_lock_semaphore(struct FileLockSemaphore * fls) { ENTER(); @@ -129,7 +129,7 @@ release_file_lock_semaphore(struct FileLockSemaphore * fls) /****************************************************************************/ -static struct FileLockSemaphore * +STATIC struct FileLockSemaphore * obtain_file_lock_semaphore(BOOL shared) { 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) { 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) { ENTER(); @@ -318,7 +318,7 @@ delete_locked_region_node(struct LockedRegionNode * lrn) /****************************************************************************/ -static long +STATIC LONG create_locked_region_node(struct LockedRegionNode ** result_ptr) { 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) { 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) { 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( struct FileLockSemaphore * fls, 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( struct FileLockSemaphore * fls, 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) { 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) { ENTER(); diff --git a/library/stdio_vfprintf.c b/library/stdio_vfprintf.c index 260dd00..91c226a 100644 --- a/library/stdio_vfprintf.c +++ b/library/stdio_vfprintf.c @@ -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 * @@ -71,7 +71,7 @@ /****************************************************************************/ -static int +STATIC int get_num_leading_digits(__long_double_t v) { int num_digits; diff --git a/library/stdlib_constructor_begin.c b/library/stdlib_constructor_begin.c index 6d029fc..b0a73af 100644 --- a/library/stdlib_constructor_begin.c +++ b/library/stdlib_constructor_begin.c @@ -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 * @@ -62,7 +62,7 @@ __construct(void) /****************************************************************************/ -static void +STATIC VOID _do_ctors(void) { void * volatile p = &__ctors; @@ -82,7 +82,7 @@ _do_ctors(void) /****************************************************************************/ -static void +STATIC VOID _do_dtors(void) { void * volatile p = &__dtors; @@ -121,7 +121,7 @@ typedef void (*func_ptr)(void); /****************************************************************************/ -static void +STATIC VOID _do_ctors(void) { extern func_ptr __CTOR_LIST__[]; @@ -147,7 +147,7 @@ _do_ctors(void) /****************************************************************************/ -static void +STATIC VOID _do_dtors(void) { extern func_ptr __DTOR_LIST__[]; diff --git a/library/stdlib_free.c b/library/stdlib_free.c index 6ba9873..ef5050e 100644 --- a/library/stdlib_free.c +++ b/library/stdlib_free.c @@ -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 * @@ -52,7 +52,7 @@ /****************************************************************************/ -static char +STATIC CHAR get_hex_char(int n) { char result; @@ -65,7 +65,7 @@ get_hex_char(int n) return(result); } -static void +STATIC VOID int_to_hex(unsigned long v,char * buffer,int min_digits) { int i,j,c; @@ -94,7 +94,7 @@ int_to_hex(unsigned long v,char * buffer,int min_digits) buffer[i] = '\0'; } -static void +STATIC VOID dump_memory(unsigned char * m,int size,int ignore) { 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) { 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) { 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) { struct MemoryNode * mn; diff --git a/library/stdlib_headers.h b/library/stdlib_headers.h index 0e01d3a..6b5a99f 100644 --- a/library/stdlib_headers.h +++ b/library/stdlib_headers.h @@ -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 * @@ -139,7 +139,7 @@ extern char * __getcwd(char * buffer,size_t buffer_size,const char *file,int lin #else -#define __static static +#define __static STATIC #define __free(mem,file,line) free(mem) #define __malloc(size,file,line) malloc(size) diff --git a/library/stdlib_main.c b/library/stdlib_main.c index ccfb3f2..5f9c9d5 100644 --- a/library/stdlib_main.c +++ b/library/stdlib_main.c @@ -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 * @@ -107,7 +107,7 @@ _EPILOG(REG(a0,char * id)) /****************************************************************************/ -static int +STATIC int call_main(void) { /* 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)) { #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) { struct Task * tc = FindTask(NULL); diff --git a/library/stdlib_qsort.c b/library/stdlib_qsort.c index 7303b5b..3a5f820 100644 --- a/library/stdlib_qsort.c +++ b/library/stdlib_qsort.c @@ -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 * @@ -89,7 +89,7 @@ /******************************************************************/ /* swap nbytes between a and b */ -INLINE static void +INLINE STATIC void swap(char * a, char * b, size_t nbytes) { char temp; diff --git a/library/stdlib_red_black.c b/library/stdlib_red_black.c index 8c1741d..17f9641 100644 --- a/library/stdlib_red_black.c +++ b/library/stdlib_red_black.c @@ -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 * @@ -52,7 +52,7 @@ /****************************************************************************/ -static void +STATIC VOID help_insertion (struct MemoryTree * tree, struct MemoryNode * z) { struct MemoryNode *nil = &tree->mt_NullNode; @@ -82,7 +82,7 @@ help_insertion (struct MemoryTree * tree, struct MemoryNode * z) y->mn_Right = z; } -static void +STATIC VOID rotate_left (struct MemoryTree * tree, struct MemoryNode * x) { struct MemoryNode *nil = &tree->mt_NullNode; @@ -105,7 +105,7 @@ rotate_left (struct MemoryTree * tree, struct MemoryNode * x) x->mn_Parent = y; } -static void +STATIC VOID rotate_right (struct MemoryTree * tree, struct MemoryNode * y) { 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) { struct MemoryNode *nil = &tree->mt_NullNode; @@ -164,7 +164,7 @@ get_successor (struct MemoryTree * tree, struct MemoryNode * x) return (result); } -static void +STATIC VOID remove_fixup (struct MemoryTree * tree, struct MemoryNode * x) { struct MemoryNode *root = tree->mt_Root->mn_Left; diff --git a/library/stdlib_stackextension.c b/library/stdlib_stackextension.c index 26f4787..f9c916e 100644 --- a/library/stdlib_stackextension.c +++ b/library/stdlib_stackextension.c @@ -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 * @@ -326,7 +326,7 @@ CLIB_DESTRUCTOR(__stk_exit) /* Move a stackframe with a minimum of requiredstack bytes to the used list and fill the StackSwapStruct structure. */ -static void +STATIC VOID pushframe(ULONG requiredstack, struct StackSwapStruct *sss) { 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 and fill the StackSwapStruct structure. */ -static void +STATIC VOID popframes(struct stackframe *sf, struct StackSwapStruct *sss) { struct stackframe *sf2; diff --git a/library/stdlib_stacksize.c b/library/stdlib_stacksize.c index 0d3c12a..6d641b0 100644 --- a/library/stdlib_stacksize.c +++ b/library/stdlib_stacksize.c @@ -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 * @@ -46,7 +46,7 @@ /******************************************************************************/ -static unsigned int +STATIC unsigned int get_default_stack_size(void) { unsigned int result = 0; diff --git a/library/stdlib_startup.c b/library/stdlib_startup.c index 7a93cf0..4d7ac4d 100644 --- a/library/stdlib_startup.c +++ b/library/stdlib_startup.c @@ -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 * @@ -90,7 +90,7 @@ UBYTE * __quote_vector; /****************************************************************************/ -static BOOL +STATIC BOOL is_escape_character(UBYTE c) { BOOL result; @@ -102,7 +102,7 @@ is_escape_character(UBYTE c) /****************************************************************************/ -static BOOL +STATIC BOOL is_final_quote_character(const char * str) { BOOL result; diff --git a/library/string_memchr.c b/library/string_memchr.c index 8d265d4..40bbd76 100644 --- a/library/string_memchr.c +++ b/library/string_memchr.c @@ -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 * @@ -48,7 +48,7 @@ /****************************************************************************/ -INLINE static void * +INLINE STATIC void * __memchr(const unsigned char * m,unsigned char val,size_t len) { void * result = NULL; diff --git a/library/string_memcmp.c b/library/string_memcmp.c index a5b09ed..b258786 100644 --- a/library/string_memcmp.c +++ b/library/string_memcmp.c @@ -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 * @@ -43,7 +43,7 @@ /****************************************************************************/ -INLINE static int +INLINE STATIC int __memcmp(const char *m1,const char *m2,size_t len) { int result = 0; diff --git a/library/string_memcpy.c b/library/string_memcpy.c index d4b205e..4588b2c 100644 --- a/library/string_memcpy.c +++ b/library/string_memcpy.c @@ -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 * @@ -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) { /* The setup below is intended to speed up copying larger diff --git a/library/string_memmove.c b/library/string_memmove.c index 486fb77..6c0b0fe 100644 --- a/library/string_memmove.c +++ b/library/string_memmove.c @@ -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 * @@ -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) { if(from < to && to < from + len) diff --git a/library/string_memset.c b/library/string_memset.c index 579ef25..f99c56f 100644 --- a/library/string_memset.c +++ b/library/string_memset.c @@ -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 * @@ -43,7 +43,7 @@ /****************************************************************************/ -INLINE static void +INLINE STATIC VOID __memset(unsigned char * to,unsigned char value,size_t len) { /* The setup below is intended to speed up changing larger diff --git a/library/time_asctime_r.c b/library/time_asctime_r.c index e5e0714..ad4ba26 100644 --- a/library/time_asctime_r.c +++ b/library/time_asctime_r.c @@ -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 * @@ -43,7 +43,7 @@ /****************************************************************************/ -static void +STATIC VOID add_to_string(char * to,size_t to_size,const char * string,size_t * offset_ptr) { size_t offset,len; diff --git a/library/time_strftime.c b/library/time_strftime.c index 152ac14..db1688a 100644 --- a/library/time_strftime.c +++ b/library/time_strftime.c @@ -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 * @@ -56,7 +56,7 @@ struct format_hook_data /****************************************************************************/ -static void +STATIC VOID format_hook_function( struct Hook * hook, 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) { 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) { char buffer[40]; diff --git a/library/unistd_wildcard_expand.c b/library/unistd_wildcard_expand.c index 5f68699..0c1cba2 100644 --- a/library/unistd_wildcard_expand.c +++ b/library/unistd_wildcard_expand.c @@ -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 * @@ -111,7 +111,7 @@ struct name_node /****************************************************************************/ -static int +STATIC int compare(const char **a,const char **b) { DECLARE_UTILITYBASE(); @@ -126,6 +126,7 @@ compare(const char **a,const char **b) int __wildcard_expand_init(void) { + APTR old_window_pointer; struct AnchorPath * ap = NULL; struct MinList argument_list; size_t argument_list_size; @@ -139,6 +140,11 @@ __wildcard_expand_init(void) 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? */ if(__quote_vector == NULL || __argc == 0 || __argv == NULL) { @@ -405,6 +411,8 @@ __wildcard_expand_init(void) free(__quote_vector); __quote_vector = NULL; + __set_process_window(old_window_pointer); + PROFILE_ON(); return(error);