diff --git a/.gitignore b/.gitignore index 7b4d5f9..372a0ad 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,7 @@ bin_*/ mcp/locale.c mcp/locale.h +/release +/mcp/locale/*.catalog +/MCC_BetterString-*.lha +/MCC_BetterString-*.readme diff --git a/ChangeLog b/ChangeLog index 7c6fe46..0758cbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,8 +2,14 @@ MUI BetterString MCC class - ChangeLog -------------------------------------- -$Id$ -$URL$ +#### v11.30 RELEASE ########################################################### + +2016-08-06 Jens Maus + + * misc: final 11.30 release preparations + * mcc/HandleInput.c: updated MySPrintf() function to use a inline macros for + AROS and MORPHOS builds instead. + * include: updated SDI headers. #### v11.29 RELEASE ########################################################### diff --git a/Makefile b/Makefile index 51bddd0..cdce6bd 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ # # BetterString.mcc - A better String gadget MUI Custom Class # Copyright (C) 1997-2000 Allan Odgaard -# Copyright (C) 2005-2015 BetterString.mcc Open Source Team +# Copyright (C) 2005-2016 BetterString.mcc Open Source Team # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/dist/MCC_BetterString/AUTHORS.info b/dist/MCC_BetterString/AUTHORS.info deleted file mode 100755 index a8bca3f..0000000 Binary files a/dist/MCC_BetterString/AUTHORS.info and /dev/null differ diff --git a/doc/MCC_BetterString.doc b/doc/MCC_BetterString.doc index d065ddd..36fa804 100644 --- a/doc/MCC_BetterString.doc +++ b/doc/MCC_BetterString.doc @@ -18,7 +18,7 @@ BetterString.mcc/MUIM_BetterString_Insert BetterString.mcc/BetterString.mcc ******************************************************************* - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team $Id$ BetterString is a stringgadget replacement. It is created for MUI, diff --git a/doc/MCC_BetterString.readme b/doc/MCC_BetterString.readme index a65020c..03bf321 100755 --- a/doc/MCC_BetterString.readme +++ b/doc/MCC_BetterString.readme @@ -1,9 +1,9 @@ -Short: BetterString custom class for MUI, V11.29 +Short: BetterString custom class for MUI Author: BetterString.mcc Open Source Team Uploader: Jens Maus Type: dev/mui -Version: 11.29 -Replaces: dev/mui/mcc_betterstring-11.28.lha +Version: 11.30 +Replaces: dev/mui/mcc_betterstring-11.29.lha Requires: AmigaOS 3.0+ or MorphOS, MUI 3.8+, 68020+/PPC604e+ Architecture: ppc-amigaos >= 4.0.0; m68k-amigaos >= 3.0; ppc-morphos >= 1.4.2; i386-aros; ppc-aros; x86_64-aros @@ -27,7 +27,7 @@ maintained and Copyright (c) by the BetterString.mcc Open Source Team. It was released under the GNU Lesser Public License in July 2005 and its development is hosted at: -http://www.sourceforge.net/projects/bstring-mcc/ +https://github.com/amiga-mui/betterstring Please consult the included "COPYING" file for a more detailed information on the licensing of the gadget and its source code. @@ -36,8 +36,8 @@ Please refer to the included ChangeLog in the archive for a detailed information on the changes since the last version release. Enjoy this release and if you find any bugs or have suggestions please always -prefer to go to the project homepage http://www.sf.net/projects/bstring-mcc/ and -use the Bug/Feature Trackers there to report anything to the authors! +prefer to go to the project homepage https://github.com/amiga-mui/betterstring +and use the Bug/Feature Trackers there to report anything to the authors! Have phun, diff --git a/doc/MCC_HotkeyString.doc b/doc/MCC_HotkeyString.doc index e4aa293..6bc1feb 100644 --- a/doc/MCC_HotkeyString.doc +++ b/doc/MCC_HotkeyString.doc @@ -6,7 +6,7 @@ HotkeyString.mcc/MUIA_HotkeyString_Snoop HotkeyString.mcc/HotkeyString.mcc ******************************************************************* - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team $Id$ HotkeyString.mcc is a subclass of BetterString.mcc, it overloads diff --git a/include/SDI_compiler.h b/include/SDI_compiler.h index ec8565d..fd48ed4 100644 --- a/include/SDI_compiler.h +++ b/include/SDI_compiler.h @@ -4,10 +4,10 @@ /* Includeheader Name: SDI_compiler.h - Versionstring: $VER: SDI_compiler.h 1.35 (03.03.2011) - Author: Dirk Stoecker & Jens Langner + Versionstring: $VER: SDI_compiler.h 1.38 (27.03.2016) + Authors: Dirk Stoecker, Jens Maus Distribution: PD - Project page: http://www.sf.net/projects/sditools/ + Project page: https://github.com/adtools/SDI Description: defines to hide compiler stuff 1.1 25.06.98 : created from data made by Gunter Nikl @@ -59,6 +59,11 @@ 1.34 26.07.10 : adapted IPTR and SIPTR definitions as the latest MorphOS SDK already contains them. (tboeckel) 1.35 03.03.11 : fixed AROS macros for m68k (Jason McMullan) + 1.36 30.03.15 : changed FAR define to only define it empty in case __far does not + exist (Gunther Nikl) + 1.37 18.02.16 : changed INLINE define to not include "static" but use a separate STATIC + define (Jens Maus) + 1.38 27.03.16 : when using GCC4/5 for MorphOS compiles VARARGS68K is not supported (Jens Maus) */ @@ -72,9 +77,9 @@ ** (e.g. add your name or nick name). ** ** Find the latest version of this file at: -** http://cvs.sourceforge.net/viewcvs.py/sditools/sditools/headers/ +** https://github.com/adtools/SDI ** -** Jens Langner and +** Jens Maus ** Dirk Stoecker */ @@ -86,6 +91,7 @@ #undef CONST #undef SAVEDS #undef INLINE +#undef STATIC #undef REGARGS #undef STDARGS #undef OFFSET @@ -111,7 +117,7 @@ #define STDARGS #define STACKEXT #define REGARGS - #define INLINE static + #define INLINE #define OFFSET(p,m) __offsetof(struct p,m) #if defined(__PPC__) @@ -125,7 +131,7 @@ #define STDARGS #define STACKEXT #define REGARGS - #define INLINE inline + #define INLINE /*************************************************************************/ #elif defined(__SASC) #define ASM __asm @@ -136,7 +142,7 @@ #define DEPRECATED __attribute__((deprecated)) #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0) #define USED_VAR USED /* for variables only! */ - #define INLINE static __inline __attribute__((always_inline)) + #define INLINE __inline __attribute__((always_inline)) #endif /* we have to distinguish between AmigaOS4 and MorphOS */ #if (defined(_M68000) || defined(__M68000) || defined(__mc68000)) && !defined(__AROS__) @@ -148,7 +154,7 @@ #define STDARGS #define REGARGS #define STACKEXT - #if defined(__MORPHOS__) + #if defined(__MORPHOS__) && __GNUC__ == 2 #define VARARGS68K __attribute__((varargs68k)) #endif #if defined(__AROS__) @@ -157,13 +163,15 @@ #define INTERRUPT #define CHIP #endif - #define FAR + #if !defined(__far) + #define FAR /* __far NOT supported! */ + #endif #define NEAR #elif defined(_DCC) #define REG(reg,arg) __##reg arg #define STACKEXT __stkcheck #define STDARGS __stkargs - #define INLINE static + #define INLINE #endif /* then "common" ones */ @@ -184,7 +192,10 @@ #define SAVEDS __saveds #endif #if !defined(INLINE) - #define INLINE static __inline + #define INLINE __inline +#endif +#if !defined(STATIC) + #define STATIC static #endif #if !defined(REGARGS) #define REGARGS __regargs diff --git a/include/SDI_hook.h b/include/SDI_hook.h index 1dd08c8..049bcf0 100644 --- a/include/SDI_hook.h +++ b/include/SDI_hook.h @@ -4,10 +4,10 @@ /* Includeheader Name: SDI_hook.h - Versionstring: $VER: SDI_hook.h 1.24 (03.03.2011) - Author: SDI & Jens Langner + Versionstring: $VER: SDI_hook.h 1.27 (04.04.2015) + Authors: Dirk Stoecker, Jens Maus Distribution: PD - Project page: http://www.sf.net/projects/sditools/ + Project page: https://github.com/adtools/SDI Description: defines to hide compiler specific hook stuff 1.0 21.06.02 : based on the work made for freeciv and YAM with @@ -52,6 +52,13 @@ 1.22 24.06.10 : fixed AROS macros (Matthias Rustler). 1.23 12.08.10 : added missing proto/alib.h include for AROS 1.24 03.03.11 : fixed AROS macros for m68k (Jason McMullan) + 1.25 18.07.12 : added crosscall macros for functions with 1 and 2 parameters. + These macros are to be used in case i.e. PPC code is to be called + from m68k code. The function pointer must be passed with ENTRY(). + 1.26 17.10.12 : added crosscall macros for functions with 1 and 2 parameters but + no return value. + 1.27 04.04.15 : fixed HOOKPROTO for vbcc (Fredrik Wikstrom) + 1.28 12.07.16 : fixed HOOKPROTO for vbcc (O. Sezer) */ @@ -65,9 +72,9 @@ ** (e.g. add your name or nick name). ** ** Find the latest version of this file at: -** http://cvs.sourceforge.net/viewcvs.py/sditools/sditools/headers/ +** https://github.com/adtools/SDI ** -** Jens Langner and +** Jens Maus ** Dirk Stoecker */ @@ -115,7 +122,7 @@ ** The ENTRY macro, which also gets the function name as argument. */ -#if !defined(__AROS__) && (defined(_M68000) || defined(__M68000) || defined(__mc68000)) +#if !defined(__AROS__) && (defined(_M68000) || defined(__M68000) || defined(__mc68000) || defined(__M68K__)) #define HOOKPROTO(name, ret, obj, param) static SAVEDS ASM ret \ name(REG(a0, struct Hook *hook), REG(a2, obj), REG(a1, param)) #define HOOKPROTONO(name, ret, param) static SAVEDS ASM ret \ @@ -147,7 +154,7 @@ #define HOOKPROTONHNO(name, ret, param) static SAVEDS ret \ name(UNUSED struct Hook *_hook, UNUSED APTR _obj, param) #define HOOKPROTONHNP(name, ret, obj) static SAVEDS ret \ - name(UNUSED struct Hook *_hook, obj, UNUSED APTR _param) + name(UNUSED struct Hook *_hook, obj, UNUSED APTR _param) #define HOOKPROTONHNONP(name, ret) static SAVEDS ret name(void) #endif @@ -192,6 +199,52 @@ static const struct SDI_EmulLibEntry Gate_##name = {SDI_TRAP_LIB, 0, \ (APTR) Trampoline_##name}; \ static ULONG name(struct IClass * cl, Object * obj, Msg msg) + #define CROSSCALL1(name, ret, type1, param1) \ + static STDARGS SAVEDS ret name(type1 param1); \ + static ret Trampoline_##name(void) \ + { \ + ULONG *stk = (ULONG *)REG_A7; \ + type1 param1 = (type1)stk[1]; \ + return name(param1); \ + } \ + static const struct SDI_EmulLibEntry Gate_##name = {SDI_TRAP_LIB, 0, \ + (APTR) Trampoline_##name}; \ + static STDARGS SAVEDS ret name(type1 param1, type2 param2) + #define CROSSCALL1NR(name, type1, param1) \ + static STDARGS SAVEDS void name(type1 param1); \ + static void Trampoline_##name(void) \ + { \ + ULONG *stk = (ULONG *)REG_A7; \ + type1 param1 = (type1)stk[1]; \ + name(param1); \ + } \ + static const struct SDI_EmulLibEntry Gate_##name = {SDI_TRAP_LIB, 0, \ + (APTR) Trampoline_##name}; \ + static STDARGS SAVEDS void name(type1 param1) + #define CROSSCALL2(name, ret, type1, param1, type2, param2) \ + static STDARGS SAVEDS ret name(type1 param1, type2 param2); \ + static ret Trampoline_##name(void) \ + { \ + ULONG *stk = (ULONG *)REG_A7; \ + type1 param1 = (type1)stk[1]; \ + type2 param2 = (type2)stk[2]; \ + return name(param1, param2); \ + } \ + static const struct SDI_EmulLibEntry Gate_##name = {SDI_TRAP_LIB, 0, \ + (APTR) Trampoline_##name}; \ + static STDARGS SAVEDS ret name(type1 param1, type2 param2) + #define CROSSCALL2NR(name, type1, param1, type2, param2) \ + static STDARGS SAVEDS void name(type1 param1, type2 param2); \ + static void Trampoline_##name(void) \ + { \ + ULONG *stk = (ULONG *)REG_A7; \ + type1 param1 = (type1)stk[1]; \ + type2 param2 = (type2)stk[2]; \ + name(param1, param2); \ + } \ + static const struct SDI_EmulLibEntry Gate_##name = {SDI_TRAP_LIB, 0, \ + (APTR) Trampoline_##name}; \ + static STDARGS SAVEDS void name(type1 param1, type2 param2) #define ENTRY(func) (APTR)&Gate_##func #elif defined(__AROS__) @@ -206,22 +259,30 @@ #define DISPATCHERPROTO(name) \ IPTR name(struct IClass * cl, Object * obj, Msg msg); \ AROS_UFP3(IPTR, Gate_##name, \ - AROS_UFPA(struct IClass *, cl, A0), \ - AROS_UFPA(Object *, obj, A2), \ - AROS_UFPA(Msg, msg, A1)) + AROS_UFPA(struct IClass *, cl, A0), \ + AROS_UFPA(Object *, obj, A2), \ + AROS_UFPA(Msg, msg, A1)) #define DISPATCHERx(x,name) \ x IPTR name(struct IClass * cl, Object * obj, Msg msg); \ x AROS_UFH3(IPTR, Gate_##name, \ - AROS_UFHA(struct IClass *, cl, A0), \ - AROS_UFHA(Object *, obj, A2), \ - AROS_UFHA(Msg, msg, A1)) \ + AROS_UFHA(struct IClass *, cl, A0), \ + AROS_UFHA(Object *, obj, A2), \ + AROS_UFHA(Msg, msg, A1)) \ { AROS_USERFUNC_INIT \ - return name(cl, obj, msg); \ + return name(cl, obj, msg); \ AROS_USERFUNC_EXIT \ } \ x IPTR name(struct IClass * cl, Object * obj, Msg msg) #define DISPATCHER(name) DISPATCHERx(,name) #define SDISPATCHER(name) DISPATCHERx(static,name) + #define CROSSCALL1(name, ret, type1, param1) \ + static STDARGS SAVEDS ret Gate_##name(type1 param1) + #define CROSSCALL1NR(name, type1, param1) \ + static STDARGS SAVEDS void Gate_##name(type1 param1) + #define CROSSCALL2(name, ret, type1, param1, type2, param2) \ + static STDARGS SAVEDS ret Gate_##name(type1 param1, type2 param2) + #define CROSSCALL2NR(name, type1, param1, type2, param2) \ + static STDARGS SAVEDS void Gate_##name(type1 param1, type2 param2) #define ENTRY(func) (APTR)Gate_##func #else /* !__MORPHOS__ && !__AROS__*/ @@ -232,11 +293,19 @@ {{NULL, NULL}, (HOOKFUNC)funcname, NULL, (APTR)data} #define MakeStaticHook(hookname, funcname) static struct Hook hookname = \ {{NULL, NULL}, (HOOKFUNC)funcname, NULL, NULL} - #define ENTRY(func) (APTR)func #define DISPATCHERPROTO(name) SAVEDS ASM IPTR name(REG(a0, \ struct IClass * cl), REG(a2, Object * obj), REG(a1, Msg msg)) #define DISPATCHER(name) DISPATCHERPROTO(name) #define SDISPATCHER(name) static DISPATCHERPROTO(name) + #define CROSSCALL1(name, ret, type1, param1) \ + static STDARGS SAVEDS ret name(type1 param1) + #define CROSSCALL1NR(name, type1, param1) \ + static STDARGS SAVEDS void name(type1 param1) + #define CROSSCALL2(name, ret, type1, param1, type2, param2) \ + static STDARGS SAVEDS ret name(type1 param1, type2 param2) + #define CROSSCALL2NR(name, type1, param1, type2, param2) \ + static STDARGS SAVEDS void name(type1 param1, type2 param2) + #define ENTRY(func) (APTR)func #endif diff --git a/include/SDI_lib.h b/include/SDI_lib.h index 930904c..b261af5 100644 --- a/include/SDI_lib.h +++ b/include/SDI_lib.h @@ -4,10 +4,10 @@ /* Includeheader Name: SDI_lib.h - Versionstring: $VER: SDI_lib.h 1.9 (15.03.2009) - Author: Jens Langner + Versionstring: $VER: SDI_lib.h 1.14 (18.02.2016) + Author: Jens Maus Distribution: PD - Project page: http://www.sf.net/projects/sditools/ + Project page: https://github.com/adtools/SDI Description: defines to hide OS specific library function definitions 1.0 09.05.04 : initial version which allows to hide OS specific shared @@ -39,6 +39,10 @@ LIBSTUBVA() will be used now (Thore Böckelmann) 1.11 04.05.09 : reverted the faulty LIBPROTOVA() definition to its previous version (Thore Böckelmann) + 1.12 01.04.14 : removed the necessity of stub functions for AmigaOS4 (Thore + Böckelmann) + 1.13 28.09.15 : removed the exclusion of C++ (Thore Böckelmann) + 1.14 18.02.16 : added LFUNC_NULL (Jens Maus) */ @@ -52,9 +56,9 @@ ** (e.g. add your name or nick name). ** ** Find the latest version of this file at: -** http://cvs.sourceforge.net/viewcvs.py/sditools/sditools/headers/ +** https://github.com/adtools/SDI ** -** Jens Langner and +** Jens Maus ** Dirk Stöcker */ @@ -71,27 +75,30 @@ ** Defines a library jump function "TestFunc" with a ULONG return value and ** which is called by the corresponding library vector of a shared library. ** -** LIBFUNC ULONG TestFunc(REG(d0, text)) +** LIBPROTO(TestFunc, ULONG, REG(a6, UNUSED __BASE_OR_IFACE), REG(a0, char *text)) ** { ** Printf(text); ** return 0; ** } ** -** Please note the use of the LIBFUNC macro which defines this function +** Please note the use of the LIBPROTO macro which defines this function ** automatically as a function which is directly called from within a shared -** library. Since this macro contains compiler attributes it must be -** called first, even if some compiler allow attributes and result type -** mixed, other do not and we want to keep the stuff compiler independent. +** library. For AmigaOS4 the library interface pointer is passed as a variable +** named "self" to the function. For all other systems the library base pointer +** is passed. +** Since this macro contains compiler attributes it must be called first, even +** if some compiler allow attributes and result type mixed, other do not and we +** want to keep the stuff compiler independent. ** ** If you now require to have some OS/compiler independent prototype ** definition please use the following statement: ** -** LIBPROTO(TestFunc, ULONG, REG(d0, text)); +** LIBPROTO(TestFunc, ULONG, REG(a6, UNUSED __BASE_OR_IFACE), REG(a0, char *text)); ** ** This will ensure that you get a proper prototype for the same function -** where this macro will automatically take care that a libstub_* stub -** will also automatically defines as required if you are generating a -** OS4 shared library which should also be backward compatible to OS3. +** where this macro will automatically take care that a LIBSTUB_* stub +** function will also automatically defined as required if you are generating +** a shared library for MorphOS. ** ** So if you then want to add this function to a library interface please ** use the LFUNC_* macros to generate your library function vector @@ -106,19 +113,20 @@ ** specify each function with surrounded "#ifdef" defines. These macros ** will then also take automatically care that the varargs functions ** will only be specified on OS versions where these functions are now -** real functions (like with OS4) +** real functions, like with AmigaOS4. ** -** Such stub functions can then also be easily specified as followed -** (in analogy to the above example) +** Stub functions are needed for MorphOS only and usually look like this: ** -** LIBPROTO(TestFunc, ULONG, REG(d0, text)) +** LIBSTUB(TestFunc, ULONG) ** { -** return TestFunc(text); +** __BASE_OR_IFACE = (__BASE_OR_IFACE_TYPE)REG_A6; +** return CALL_LFUNC(TestFunc, (char *)REG_A0); ** } ** -** On AmigaOS4 using this mechanism for the definition of the library functions -** will automatically ensure that the "struct Interface *self" pointer is included -** and can be easily referenced as such in the function. +** The CALL_LFUNC macro must be used to internally call one of the public +** library functions without going through the interface/jump table. +** The CALL_LFUNC_NP macro does the same job for functions without further +** parameters, except the implicit interface/base pointer. ** ** By using this schema a developer might ensure full source code backward ** compatibility to AmigaOS3 without having to introduce dozens of #ifdef @@ -131,71 +139,49 @@ #if defined(__amigaos4__) #define LIBFUNC - #if !defined(__cplusplus) && \ - (__STDC_VERSION__ >= 199901L || __GNUC__ >= 3 || \ - (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) - #define LIBPROTO(name, ret, ...) \ - LIBFUNC ret name(__VA_ARGS__); \ - LIBFUNC ret libstub_##name(struct Interface *self UNUSED, \ - ## __VA_ARGS__) - #define LIBPROTOVA(name, ret, ...) \ - /*LIBFUNC ret VARARGS68K name(__VA_ARGS__);*/ \ - LIBFUNC ret VARARGS68K \ - libstub_##name(struct Interface *self UNUSED, ## __VA_ARGS__) - #define LIBSTUB(name, ret, ...) \ - LIBFUNC ret name(__VA_ARGS__); \ - LIBFUNC ret libstub_##name(struct Interface *self UNUSED, \ - ## __VA_ARGS__) - #define LIBSTUBVA(name, ret, ...) \ - LIBFUNC ret VARARGS68K \ - libstub_##name(struct Interface *self UNUSED, ## __VA_ARGS__) + #if (__STDC_VERSION__ >= 199901L || __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) + #define LIBPROTO(name, ret, ...) LIBFUNC ret LIB_##name(__VA_ARGS__) + #define LIBPROTOVA(name, ret, ...) LIBFUNC ret VARARGS68K LIB_##name(__VA_ARGS__) + #define LIBSTUB(name, ret, ...) + #define CALL_LFUNC_NP(name, ...) LIB_##name(__BASE_OR_IFACE_VAR) + #define CALL_LFUNC(name, ...) LIB_##name(__BASE_OR_IFACE_VAR, __VA_ARGS__) #endif - #define LFUNC_FAS(name) libstub_##name - #define LFUNC_VAS(name) libstub_##name - #define LFUNC_FA_(name) ,libstub_##name - #define LFUNC_VA_(name) ,libstub_##name - #define LFUNC(name) libstub_##name + #define LFUNC_FAS(name) LIB_##name + #define LFUNC_VAS(name) LIB_##name + #define LFUNC_FA_(name) ,LIB_##name + #define LFUNC_VA_(name) ,LIB_##name + #define LFUNC_NULL ,NULL + #define LFUNC(name) LIB_##name #elif defined(__MORPHOS__) #define LIBFUNC - #if !defined(__cplusplus) && \ - (__STDC_VERSION__ >= 199901L || __GNUC__ >= 3 || \ - (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) - #define LIBPROTO(name, ret, ...) \ - LIBFUNC ret name(__VA_ARGS__); \ - LIBFUNC ret libstub_##name(void) - #define LIBPROTOVA(name, ret, ...) \ - LIBFUNC ret VARARGS68K name(__VA_ARGS__); - #define LIBSTUB(name, ret, ...) \ - LIBFUNC ret name(__VA_ARGS__); \ - LIBFUNC ret libstub_##name(void) - #define LIBSTUBVA(name, ret, ...) \ - LIBFUNC UNUSED ret VARARGS68K libstub_##name(void) + #if (__STDC_VERSION__ >= 199901L || __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) + #define LIBPROTO(name, ret, ...) LIBFUNC ret LIBSTUB_##name(void); LIBFUNC ret LIB_##name(__VA_ARGS__) + #define LIBPROTOVA(name, ret, ...) + #define LIBSTUB(name, ret, ...) LIBFUNC ret LIBSTUB_##name(void) + #define CALL_LFUNC_NP(name, ...) LIB_##name(__BASE_OR_IFACE_VAR) + #define CALL_LFUNC(name, ...) LIB_##name(__BASE_OR_IFACE_VAR, __VA_ARGS__) #endif - #define LFUNC_FAS(name) libstub_##name + #define LFUNC_FAS(name) LIBSTUB_##name #define LFUNC_VAS(name) - #define LFUNC_FA_(name) ,libstub_##name + #define LFUNC_FA_(name) ,LIBSTUB_##name #define LFUNC_VA_(name) - #define LFUNC(name) libstub_##name + #define LFUNC_NULL ,NULL + #define LFUNC(name) LIBSTUB_##name #else #define LIBFUNC SAVEDS ASM - #if !defined(__cplusplus) && \ - (__STDC_VERSION__ >= 199901L || __GNUC__ >= 3 || \ - (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) - #define LIBPROTO(name, ret, ...) \ - LIBFUNC ret name(__VA_ARGS__) - #define LIBPROTOVA(name, ret, ...) \ - LIBFUNC ret STDARGS VARARGS68K name(__VA_ARGS__); - #define LIBSTUB(name, ret, ...) \ - LIBFUNC ret name(__VA_ARGS__); \ - LIBFUNC ret libstub_##name(__VA_ARGS__) - #define LIBSTUBVA(name, ret, ...) \ - LIBFUNC UNUSED ret STDARGS VARARGS68K libstub_##name(__VA_ARGS__) + #if (__STDC_VERSION__ >= 199901L || __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)) + #define LIBPROTO(name, ret, ...) LIBFUNC ret LIB_##name(__VA_ARGS__) + #define LIBPROTOVA(name, ret, ...) + #define LIBSTUB(name, ret, ...) + #define CALL_LFUNC_NP(name, ...) LIB_##name(__BASE_OR_IFACE_VAR) + #define CALL_LFUNC(name, ...) LIB_##name(__BASE_OR_IFACE_VAR, __VA_ARGS__) #endif - #define LFUNC_FAS(name) name + #define LFUNC_FAS(name) LIB_##name #define LFUNC_VAS(name) - #define LFUNC_FA_(name) ,name + #define LFUNC_FA_(name) ,LIB_##name #define LFUNC_VA_(name) - #define LFUNC(name) name + #define LFUNC_NULL ,NULL + #define LFUNC(name) LIB_##name #endif #if !defined(LIBPROTO) || !defined(LIBPROTOVA) diff --git a/include/SDI_stdarg.h b/include/SDI_stdarg.h index a7243e6..e29f9ca 100644 --- a/include/SDI_stdarg.h +++ b/include/SDI_stdarg.h @@ -4,14 +4,22 @@ /* Includeheader Name: SDI_stdarg.h - Versionstring: $VER: SDI_stdarg.h 1.0 (05.07.2004) - Author: Jens Langner + Versionstring: $VER: SDI_stdarg.h 1.3 (06.08.2016) + Author: Jens Maus Distribution: PD - Project page: http://www.sf.net/projects/sditools/ + Project page: https://github.com/adtools/SDI Description: defines to hide OS specific variable arguments function definitions - 1.0 05.07.04 : initial version + 1.0 05.07.2004 : initial version + 1.1 06.06.2014 : added a type cast to VA_ARG() result + 1.2 27.03.2016 : when using GCC4/5 for MorphOS overflow_arg_area is not + supported anymore (Jens Maus) + 1.3 06.08.2016 : implemented VA_COPY() and SDI_VACAST type helper macros + to fight the problem that GCC5 for MorphOS doesn't support + VARARGS68K and thus we need type casts to please the + compiler on complaining about the GCC inline macros that + can be used to partly replace it. */ @@ -25,9 +33,9 @@ ** (e.g. add your name or nick name). ** ** Find the latest version of this file at: -** http://cvs.sourceforge.net/viewcvs.py/sditools/sditools/headers/ +** https://github.com/adtools/SDI ** -** Jens Langner and +** Jens Maus ** Dirk Stöcker */ @@ -89,17 +97,75 @@ #define VA_LIST va_list #define VA_START(va, start) va_startlinear((va), (start)) #define VA_ARG(va, type) va_getlinearva((va), type) + #define VA_COPY(d, s) (d) = (s) #define VA_END(va) va_end((va)) #elif defined(__MORPHOS__) #define VA_LIST va_list #define VA_START(va, start) va_start((va), (start)) - #define VA_ARG(va, type) (va)->overflow_arg_area + #if __GNUC__ == 2 + #define VA_ARG(va, type) (type)((va)->overflow_arg_area) + #else + #define VA_ARG(va, type) va_arg(va, type) + #endif + #define VA_COPY(d, s) __va_copy(d, s) #define VA_END(va) va_end((va)) #else #define VA_LIST va_list #define VA_START(va, start) va_start((va), (start)) - #define VA_ARG(va, type) (va) + #define VA_ARG(va, type) (type)(va) + #if defined(__AROS__) + #define VA_COPY(d, s) va_copy(d, s) + #else + #define VA_COPY(d, s) (d) = (s) + #endif #define VA_END(va) va_end((va)) #endif +/* This counts the number of args */ +#define SDI_NARGS_SEQ( _1, _2, _3, _4, _5, _6, _7, _8, _9,_10,\ + _11,_12,_13,_14,_15,_16,_17,_18,_19,_20,\ + _21,_22,_23,_24,_25,_26,_27,_28,_29,_30,\ + N,...) N +#define SDI_NARGS(...) SDI_NARGS_SEQ(__VA_ARGS__,\ + 30,29,28,27,26,25,24,23,22,21,\ + 20,19,18,17,16,15,14,13,12,11,\ + 10, 9, 8, 7, 6, 5, 4, 3, 2, 1) + +/* This will let macros expand before concating them */ +#define SDI_PRIMITIVE_CAT(x, y) x ## y +#define SDI_CAT(x, y) SDI_PRIMITIVE_CAT(x, y) + +/* This will call a macro on each argument passed in */ +#define SDI_VACAST(...) SDI_CAT(SDI_CAST_, SDI_NARGS(__VA_ARGS__))((ULONG), __VA_ARGS__) +#define SDI_CAST_1(m,x1) m(x1) +#define SDI_CAST_2(m,x1,x2) m(x1),m(x2) +#define SDI_CAST_3(m,x1,x2,x3) m(x1),m(x2),m(x3) +#define SDI_CAST_4(m,x1,x2,x3,x4) m(x1),m(x2),m(x3),m(x4) +#define SDI_CAST_5(m,x1,x2,x3,x4,x5) m(x1),m(x2),m(x3),m(x4),m(x5) +#define SDI_CAST_6(m,x1,x2,x3,x4,x5,x6) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6) +#define SDI_CAST_7(m,x1,x2,x3,x4,x5,x6,x7) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7) +#define SDI_CAST_8(m,x1,x2,x3,x4,x5,x6,x7,x8) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8) +#define SDI_CAST_9(m,x1,x2,x3,x4,x5,x6,x7,x8,x9) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9) +#define SDI_CAST_10(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10) +#define SDI_CAST_11(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11) +#define SDI_CAST_12(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12) +#define SDI_CAST_13(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13) +#define SDI_CAST_14(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14) +#define SDI_CAST_15(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15) +#define SDI_CAST_16(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16) +#define SDI_CAST_17(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17) +#define SDI_CAST_18(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17),m(x18) +#define SDI_CAST_19(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17),m(x18),m(x19) +#define SDI_CAST_20(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17),m(x18),m(x19),m(x20) +#define SDI_CAST_21(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17),m(x18),m(x19),m(x20),m(x21) +#define SDI_CAST_22(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17),m(x18),m(x19),m(x20),m(x21),m(x22) +#define SDI_CAST_23(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17),m(x18),m(x19),m(x20),m(x21),m(x22),m(x23) +#define SDI_CAST_24(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17),m(x18),m(x19),m(x20),m(x21),m(x22),m(x23),m(x24) +#define SDI_CAST_25(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17),m(x18),m(x19),m(x20),m(x21),m(x22),m(x23),m(x24),m(x25) +#define SDI_CAST_26(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17),m(x18),m(x19),m(x20),m(x21),m(x22),m(x23),m(x24),m(x25),m(x26) +#define SDI_CAST_27(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17),m(x18),m(x19),m(x20),m(x21),m(x22),m(x23),m(x24),m(x25),m(x26),m(x27) +#define SDI_CAST_28(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17),m(x18),m(x19),m(x20),m(x21),m(x22),m(x23),m(x24),m(x25),m(x26),m(x27),m(x28) +#define SDI_CAST_29(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17),m(x18),m(x19),m(x20),m(x21),m(x22),m(x23),m(x24),m(x25),m(x26),m(x27),m(x28),m(x29) +#define SDI_CAST_30(m,x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12,x13,x14,x15,x16,x17,x18,x19,x20,x21,x22,x23,x24,x25,x26,x27,x28,x29,x30) m(x1),m(x2),m(x3),m(x4),m(x5),m(x6),m(x7),m(x8),m(x9),m(x10),m(x11),m(x12),m(x13),m(x14),m(x15),m(x16),m(x17),m(x18),m(x19),m(x20),m(x21),m(x22),m(x23),m(x24),m(x25),m(x26),m(x27),m(x28),m(x29),m(x30) + #endif /* SDI_STDARG_H */ diff --git a/include/mcc_common.h b/include/mcc_common.h index 5bed88c..2ccf2b8 100644 --- a/include/mcc_common.h +++ b/include/mcc_common.h @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/include/mui/BetterString_mcc.h b/include/mui/BetterString_mcc.h index b608346..9ef2a7f 100644 --- a/include/mui/BetterString_mcc.h +++ b/include/mui/BetterString_mcc.h @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/include/mui/HotkeyString_mcc.h b/include/mui/HotkeyString_mcc.h index bc3ba92..e13e376 100644 --- a/include/mui/HotkeyString_mcc.h +++ b/include/mui/HotkeyString_mcc.h @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/include/shellstart.c b/include/shellstart.c index 1666514..6172a78 100644 --- a/include/shellstart.c +++ b/include/shellstart.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/AllocBitMap.c b/mcc/AllocBitMap.c index 3ce59c2..c8d0991 100644 --- a/mcc/AllocBitMap.c +++ b/mcc/AllocBitMap.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/AllocFunctions.c b/mcc/AllocFunctions.c index e46e615..c5ff1bd 100644 --- a/mcc/AllocFunctions.c +++ b/mcc/AllocFunctions.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/BetterString-Test.c b/mcc/BetterString-Test.c index f2562a4..d7ec278 100644 --- a/mcc/BetterString-Test.c +++ b/mcc/BetterString-Test.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -111,7 +111,7 @@ int main(void) app = ApplicationObject, MUIA_Application_Author, "BetterString.mcc Open Source Team", MUIA_Application_Base, "BetterString-Test", - MUIA_Application_Copyright, "(C) 2005-2015 BetterString.mcc Open Source Team", + MUIA_Application_Copyright, "(C) 2005-2016 BetterString.mcc Open Source Team", MUIA_Application_Description, "BetterString.mcc demonstration program", MUIA_Application_Title, "BetterString-Test", MUIA_Application_Version, "$VER: BetterString-Demo V1.0 (18.05.2007)", diff --git a/mcc/ClipboardServer.c b/mcc/ClipboardServer.c index b125161..b18eead 100644 --- a/mcc/ClipboardServer.c +++ b/mcc/ClipboardServer.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/Debug.c b/mcc/Debug.c index 62fccc0..24ac2c2 100644 --- a/mcc/Debug.c +++ b/mcc/Debug.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/Dispatcher.c b/mcc/Dispatcher.c index 8debb24..2bbc653 100644 --- a/mcc/Dispatcher.c +++ b/mcc/Dispatcher.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/FileNameCompl.c b/mcc/FileNameCompl.c index 06bab3d..8c28b44 100644 --- a/mcc/FileNameCompl.c +++ b/mcc/FileNameCompl.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/GetSetAttrs.c b/mcc/GetSetAttrs.c index 866a9ce..030707d 100644 --- a/mcc/GetSetAttrs.c +++ b/mcc/GetSetAttrs.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/HandleInput.c b/mcc/HandleInput.c index 6ca640c..8e635ba 100644 --- a/mcc/HandleInput.c +++ b/mcc/HandleInput.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -40,7 +40,11 @@ #define BlockEnabled(data) (isFlagSet((data)->Flags, FLG_BlockEnabled) && (data)->BlockStart != (data)->BlockStop) -#if defined(__amigaos4__) || defined(__MORPHOS__) +#if defined(__AROS__) || defined(__MORPHOS__) +#define MySPrintf(buf, fmt, ...) \ + ({ IPTR __args[] = { SDI_VACAST(__VA_ARGS__) }; \ + RawDoFmt(fmt, __args, NULL, (STRPTR)buf); }) +#elif defined(__amigaos4__) static int VARARGS68K MySPrintf(char *buf, const char *fmt, ...) { VA_LIST args; @@ -51,8 +55,6 @@ static int VARARGS68K MySPrintf(char *buf, const char *fmt, ...) return(strlen(buf)); } -#elif defined(__AROS__) -#define MySPrintf __sprintf /* from amiga lib */ #else static int STDARGS MySPrintf(char *buf, const char *fmt, ...) { diff --git a/mcc/InitConfig.c b/mcc/InitConfig.c index f8068f0..cc10ec5 100644 --- a/mcc/InitConfig.c +++ b/mcc/InitConfig.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/Makefile b/mcc/Makefile index 2de8c47..82f70eb 100644 --- a/mcc/Makefile +++ b/mcc/Makefile @@ -2,7 +2,7 @@ # # BetterString.mcc - A better String gadget MUI Custom Class # Copyright (C) 1997-2000 Allan Odgaard -# Copyright (C) 2005-2015 BetterString.mcc Open Source Team +# Copyright (C) 2005-2016 BetterString.mcc Open Source Team # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/mcc/Pointer.c b/mcc/Pointer.c index e36db32..6a3a2c5 100644 --- a/mcc/Pointer.c +++ b/mcc/Pointer.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/PrintString.c b/mcc/PrintString.c index 5404dde..90ee514 100644 --- a/mcc/PrintString.c +++ b/mcc/PrintString.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/hotkeystring/Debug.c b/mcc/hotkeystring/Debug.c index 201adb2..b9c6e8f 100644 --- a/mcc/hotkeystring/Debug.c +++ b/mcc/hotkeystring/Debug.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/hotkeystring/Dispatcher.c b/mcc/hotkeystring/Dispatcher.c index 96bd7b0..699a6d6 100644 --- a/mcc/hotkeystring/Dispatcher.c +++ b/mcc/hotkeystring/Dispatcher.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/hotkeystring/HandleInput.c b/mcc/hotkeystring/HandleInput.c index 01794f7..2905edf 100644 --- a/mcc/hotkeystring/HandleInput.c +++ b/mcc/hotkeystring/HandleInput.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/hotkeystring/HotkeyString-Test.c b/mcc/hotkeystring/HotkeyString-Test.c index b59be31..9702764 100644 --- a/mcc/hotkeystring/HotkeyString-Test.c +++ b/mcc/hotkeystring/HotkeyString-Test.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/hotkeystring/Makefile b/mcc/hotkeystring/Makefile index b8bdaf1..6656b1d 100644 --- a/mcc/hotkeystring/Makefile +++ b/mcc/hotkeystring/Makefile @@ -2,7 +2,7 @@ # # BetterString.mcc - A better String gadget MUI Custom Class # Copyright (C) 1997-2000 Allan Odgaard -# Copyright (C) 2005-2015 BetterString.mcc Open Source Team +# Copyright (C) 2005-2016 BetterString.mcc Open Source Team # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/mcc/hotkeystring/library.c b/mcc/hotkeystring/library.c index ae4ec4c..7f47407 100644 --- a/mcc/hotkeystring/library.c +++ b/mcc/hotkeystring/library.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/hotkeystring/private.h b/mcc/hotkeystring/private.h index 7b752b0..d866497 100644 --- a/mcc/hotkeystring/private.h +++ b/mcc/hotkeystring/private.h @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/hotkeystring/vastubs.c b/mcc/hotkeystring/vastubs.c index 9fcb1d0..241afac 100755 --- a/mcc/hotkeystring/vastubs.c +++ b/mcc/hotkeystring/vastubs.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/hotkeystring/version.h b/mcc/hotkeystring/version.h index a028964..be245f7 100644 --- a/mcc/hotkeystring/version.h +++ b/mcc/hotkeystring/version.h @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -29,9 +29,9 @@ // for setting all necessary version information #define LIB_VERSION 12 -#define LIB_REVISION 25 -#define LIB_DATE "21.03.2015" -#define LIB_COPYRIGHT "Copyright (C) 2005-2015 BetterString.mcc Open Source Team" +#define LIB_REVISION 26 +#define LIB_DATE "06.08.2016" +#define LIB_COPYRIGHT "Copyright (C) 2005-2016 BetterString.mcc Open Source Team" // set the LIB_REV_STRING #define LIB_REV_STRING STR(LIB_VERSION) "." STR(LIB_REVISION) diff --git a/mcc/library.c b/mcc/library.c index 751a768..cd5a448 100644 --- a/mcc/library.c +++ b/mcc/library.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/private.h b/mcc/private.h index cd9f607..1aafe50 100644 --- a/mcc/private.h +++ b/mcc/private.h @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/vastubs.c b/mcc/vastubs.c index 65f7325..59c6172 100755 --- a/mcc/vastubs.c +++ b/mcc/vastubs.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcc/version.h b/mcc/version.h index 8a98f90..73d9e25 100644 --- a/mcc/version.h +++ b/mcc/version.h @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -29,9 +29,9 @@ // for setting all necessary version information #define LIB_VERSION 11 -#define LIB_REVISION 29 -#define LIB_DATE "21.03.2015" -#define LIB_COPYRIGHT "Copyright (C) 2005-2015 BetterString.mcc Open Source Team" +#define LIB_REVISION 30 +#define LIB_DATE "06.08.2016" +#define LIB_COPYRIGHT "Copyright (C) 2005-2016 BetterString.mcc Open Source Team" // set the LIB_REV_STRING #define LIB_REV_STRING STR(LIB_VERSION) "." STR(LIB_REVISION) diff --git a/mcp/BetterString_mcp.h b/mcp/BetterString_mcp.h index ee66976..8485d22 100644 --- a/mcp/BetterString_mcp.h +++ b/mcp/BetterString_mcp.h @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcp/C_c.sd b/mcp/C_c.sd index 04bd8e3..f2366d5 100644 --- a/mcp/C_c.sd +++ b/mcp/C_c.sd @@ -4,7 +4,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcp/C_h.sd b/mcp/C_h.sd index af4750a..9f8fe44 100644 --- a/mcp/C_h.sd +++ b/mcp/C_h.sd @@ -4,7 +4,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcp/CreatePrefsGroup.c b/mcp/CreatePrefsGroup.c index b663c58..9d8441c 100644 --- a/mcp/CreatePrefsGroup.c +++ b/mcp/CreatePrefsGroup.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcp/Debug.c b/mcp/Debug.c index 7aaaeb4..17071b7 100644 --- a/mcp/Debug.c +++ b/mcp/Debug.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcp/Debug.h b/mcp/Debug.h index 8ac9c4d..2ef8030 100644 --- a/mcp/Debug.h +++ b/mcp/Debug.h @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcp/Dispatcher.c b/mcp/Dispatcher.c index 922f7b6..afb0bf3 100644 --- a/mcp/Dispatcher.c +++ b/mcp/Dispatcher.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcp/Makefile b/mcp/Makefile index da69abf..efe5083 100644 --- a/mcp/Makefile +++ b/mcp/Makefile @@ -2,7 +2,7 @@ # # BetterString.mcc - A better String gadget MUI Custom Class # Copyright (C) 1997-2000 Allan Odgaard -# Copyright (C) 2005-2015 BetterString.mcc Open Source Team +# Copyright (C) 2005-2016 BetterString.mcc Open Source Team # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -381,13 +381,13 @@ $(TESTTARGET): $(TESTOBJS) locale.h: locale.c locale.c: $(LOCALE)/BetterString_mcp.pot C_h.sd C_c.sd @echo " MK $@" - @$(FC) $(LOCALE)/BetterString_mcp.pot locale.h=C_h.sd locale.c=C_c.sd + @$(FC) $(LOCALE)/BetterString_mcp.pot locale.h=C_h.sd locale.c=C_c.sd CODESET ISO-8859-1 ## CATALOG GENERATION ################# $(LOCALE)/%.catalog: $(LOCALE)/%.po @echo " MK $@" - @$(FC) POFILE $< CATALOG $@ + @$(FC) REVISION $(shell git rev-list --all --count $<) POFILE $< CATALOG $@ CODESET UTF-8 .IGNORE: $(CATALOGS) diff --git a/mcp/Preference.c b/mcp/Preference.c index d2eec5e..4adaa1a 100644 --- a/mcp/Preference.c +++ b/mcp/Preference.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcp/icon.c b/mcp/icon.c index 9257b1a..182604f 100644 --- a/mcp/icon.c +++ b/mcp/icon.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcp/icon.h b/mcp/icon.h index f6be390..039f2ca 100644 --- a/mcp/icon.h +++ b/mcp/icon.h @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcp/library.c b/mcp/library.c index 5c00a4e..5e62989 100644 --- a/mcp/library.c +++ b/mcp/library.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcp/private.h b/mcp/private.h index daaa0d6..7461759 100644 --- a/mcp/private.h +++ b/mcp/private.h @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcp/vastubs.c b/mcp/vastubs.c index 9fcb1d0..241afac 100755 --- a/mcp/vastubs.c +++ b/mcp/vastubs.c @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/mcp/version.h b/mcp/version.h index 8a98f90..73d9e25 100644 --- a/mcp/version.h +++ b/mcp/version.h @@ -2,7 +2,7 @@ BetterString.mcc - A better String gadget MUI Custom Class Copyright (C) 1997-2000 Allan Odgaard - Copyright (C) 2005-2015 BetterString.mcc Open Source Team + Copyright (C) 2005-2016 BetterString.mcc Open Source Team This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -29,9 +29,9 @@ // for setting all necessary version information #define LIB_VERSION 11 -#define LIB_REVISION 29 -#define LIB_DATE "21.03.2015" -#define LIB_COPYRIGHT "Copyright (C) 2005-2015 BetterString.mcc Open Source Team" +#define LIB_REVISION 30 +#define LIB_DATE "06.08.2016" +#define LIB_COPYRIGHT "Copyright (C) 2005-2016 BetterString.mcc Open Source Team" // set the LIB_REV_STRING #define LIB_REV_STRING STR(LIB_VERSION) "." STR(LIB_REVISION) diff --git a/tools/mkrelease.sh b/tools/mkrelease.sh index b1095b1..c62f475 100755 --- a/tools/mkrelease.sh +++ b/tools/mkrelease.sh @@ -4,7 +4,7 @@ # # BetterString.mcc - A better String gadget MUI Custom Class # Copyright (C) 1997-2000 Allan Odgaard -# Copyright (C) 2005-2015 BetterString.mcc Open Source Team +# Copyright (C) 2005-2016 BetterString.mcc Open Source Team # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -67,7 +67,7 @@ for language in `ls mcp/locale/*.catalog`; do done cp -a -R dist/* "release/" -cp -a AUTHORS ChangeLog COPYING "release/MCC_BetterString/" +cp -a ChangeLog COPYING "release/MCC_BetterString/" cp -a doc/MCC_BetterString.readme "release/MCC_BetterString/ReadMe" cp -a doc/MCC_BetterString.doc "release/MCC_BetterString/Developer/Autodocs/MCC/" cp -a doc/MCC_HotkeyString.doc "release/MCC_BetterString/Developer/Autodocs/MCC/"