clib2 wchar issues

A forum for general AmigaOS 4.x support questions that are not platform-specific

clib2 wchar issues

Postby Daytona675x » Thu Jun 18, 2015 1:39 pm

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
Daytona675x
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 34
Joined: Wed Jan 22, 2014 6:18 pm
Location: Cologne, Germany

Re: clib2 wchar issues

Postby eliyahu » Thu Jun 18, 2015 8:56 pm

@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
eliyahu
Beta Tester
Beta Tester
 
Posts: 61
Joined: Sat Jun 18, 2011 12:13 am

Re: clib2 wchar issues

Postby Daytona675x » Fri Aug 14, 2015 11:21 am

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
Daytona675x
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 34
Joined: Wed Jan 22, 2014 6:18 pm
Location: Cologne, Germany

Re: clib2 wchar issues

Postby salass00 » Fri Aug 14, 2015 11:45 am

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.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 481
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland


Return to General AmigaOS

Who is online

Users browsing this forum: No registered users and 5 guests

cron