Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

STRCPY vs strcpy ? FADD/FMUL ?

Can anyone explain why all the standard C functions have been renamed to uppercase versions ? It would seem all they do over 'standard' functions is access a function from a dispatch table. This same functionality could be easily accomplished by use of the linker to link in a version of strcpy and friends that do the vector table dereference if that was required.

It seems that chaning the case on these simply makes it harder to create portable code or to port code from other applications.

Similarly, it is very obtuse to use FADD/FMUL to do mathematical expressions. This is extremely cumbersome! Compiling with -msoft-float creates code that calls library functions that are intended to take care of this abstraction.

It seems like the system is going out of it's way to do things that a linker and companion library are designed to do already.

Have people developed 'conversion' libraries that allow conventional use of ANSI C/C++ in source files but utilize the linker to invoke them the 'bew' way ?

--
Glenn

well the stdlib c functions are one thing (some of them aren't thread/dll safe) but the others it does seem odd.
but the math perhaps its because they want to remind the programmer just how bad float is on one of these devices, and to minimize use on it.
maybe during early development of brew the math lib or stdlib wasn't available.
or maybe its just a case of not working through the issues properly, who knows.
A simple #define fixes the strcpy, and floats on a brew app probably need to be rewritten anynway.

well the stdlib c functions are one thing (some of them aren't thread/dll safe) but the others it does seem odd.
but the math perhaps its because they want to remind the programmer just how bad float is on one of these devices, and to minimize use on it.
maybe during early development of brew the math lib or stdlib wasn't available.
or maybe its just a case of not working through the issues properly, who knows.
A simple #define fixes the strcpy, and floats on a brew app probably need to be rewritten anynway.