clib2 wchar issues

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
User avatar
Daytona675x
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 34
Joined: Wed Jan 22, 2014 5:18 pm
Location: Cologne, Germany
Contact:

clib2 wchar issues

Post by Daytona675x »

Hi, just stepped into two problems regarding clib2 and some wchar functions. Most likely there's more but so far I only tried to use those:

In clib2/include/wchar.h:
The prototype for vswprintf is wrong, the destination pointer is a simple char* while it should be a wchar_t*.
It should be

Code: Select all

int vswprintf(wchar_t* ws,const wchar_t* format,va_list arg);
or even better

Code: Select all

int vswprintf(wchar_t* ws,size_t len,const wchar_t* format,va_list arg);
(although that would probably be vsnwprintf then, other implementations are not really consequent / consistent here too ;) ).

In clib2/include/wctype.h:
at least towupper isn't implemented it seems, at least the linker complains that it doesn't exist.
Warp3D driver code-basher and bug-smasher - btw.: driver writing is nothing mysterious
User avatar
eliyahu
Beta Tester
Beta Tester
Posts: 63
Joined: Fri Jun 17, 2011 11:13 pm

Re: clib2 wchar issues

Post by eliyahu »

@Daytona675x

nice find. have you thought about fixing it directly? clib2 is an open-source component and the header you're referencing is available here: http://clib2.cvs.sourceforge.net/viewvc ... y/include/

-- eliyahu
User avatar
Daytona675x
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 34
Joined: Wed Jan 22, 2014 5:18 pm
Location: Cologne, Germany
Contact:

Re: clib2 wchar issues

Post by Daytona675x »

Ah, didn't know that it was open-source, thanks for that info.
However, I don't have free time left to fix every bug I run into on my own :-) I'll leave that to the people already involved with it.
Warp3D driver code-basher and bug-smasher - btw.: driver writing is nothing mysterious
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 530
Joined: Sat Jun 18, 2011 3:12 pm
Location: Finland
Contact:

Re: clib2 wchar issues

Post by salass00 »

The clib2 repository has been moved so that it's now hosted under the adtools group on github:
https://github.com/adtools/clib2

If anyone wants to make improvements to clib2 I think this is where they should be made.
Post Reply