Rockbox.org home
releases
current build
extras FAQ
manual
wiki
docs index mailing lists
IRC
forums bugs
patches



Rockbox mail archive

Subject: Re: Plugin API requests
From: Garrett Derner (GaryD_at_AdFreeInternet.com)
Date: 2003-07-04


Björn Stenberg wrote:
>Garrett Derner wrote:
>>
>> 1) Can the _ctype_ array be made available, so plugins can use isspace()
>> and similar macros?
>>
>That's not necessary. You can simply #include <ctype.h> in your plugin and
>the macros will be taken from gcc.

When I do, the linker coughs:
   undefined reference to `_ctype_'

The macros in ctype.h name an array called _ctype_[], which is defined in
ctype.c.

If I include both:

 #include <ctype.h>
 #include <ctype.c>

then everything is fine, since then I have a local copy of _ctype_[257].
Maybe that is the best way. I'll do that.

Come to think of it, what I was suggesting (making _ctype[]_ available
through the plugin API) would not work. Because then the array would not be
called _ctype_[]. It would be rb->_ctype_[], or
my_plugin_api_ptr->_ctype_[], whatever.

Garrett



Page was last modified "Mar 9 2008" The Rockbox Crew