[liblouis-liblouisxml] Re: Using liblouis within an Android app.

  • From: Bert Frees <bertfrees@xxxxxxxxx>
  • To: "liblouis-liblouisxml@xxxxxxxxxxxxx" <liblouis-liblouisxml@xxxxxxxxxxxxx>
  • Date: Tue, 5 Jan 2016 11:36:47 +0100

Yes but I guess applications might want to know at build time?

2016-01-05 11:29 GMT+01:00 Davy Kager <DavyKager@xxxxxxxxxx>:

How are other libs going to know the size of widechar?

In liblouis.h.in we also have this function, which may help judging by
its documentation:

int EXPORT_CALL lou_charSize ();

/* Return the size of widechar */

-----Oorspronkelijk bericht-----
Van: liblouis-liblouisxml-bounce@xxxxxxxxxxxxx [mailto:
liblouis-liblouisxml-bounce@xxxxxxxxxxxxx] Namens Christian Egli
Verzonden: maandag 4 januari 2016 11:35
Aan: liblouis-liblouisxml@xxxxxxxxxxxxx
Onderwerp: [liblouis-liblouisxml] Re: Using liblouis within an Android app.

On 12/29/2015 08:54 PM, Dave Mielke wrote:
I have liblouis building with the Android NDK now.

Cool. Did you write a java wrapper or did you use one of the existing ones?

There are two fixes that could be made:

First, the simple one: I'm probably compiling with more warnings
enabled. I'm
getting:

liblouis/compileTranslationTable.c: In function 'resolveTable':
liblouis/compileTranslationTable.c:4650: warning: passing argument 1
of 'copyStringArray' from incompatible pointer type
liblouis/compileTranslationTable.c:4629: note: expected 'const char
**' but argument is of type 'char **'

This, of course, could easily be fixed. I can do it. Would you prefer
that I post a patch to this mailing list, or would you be willing to
add me (github user DaveMielke) as a developer so that I can push it.
Or, maybe, you'd prefer some other method.

I've seen this warning but haven't been bothered by it hard enough to
figure out how to fix it. I'd be very happy if you could provide a patch
either directly to the mailing list or preferably via a pull request on
github.

At the moment I'm a bit reluctant to just hand out push access to the repo.

Now, for the more complicated one: The liblouis.h header needs to be
derived from liblouis.h.in for exactly one small reason:

#define widechar @WIDECHAR_TYPE@

Is this because having liblouis.h include config.h is seen as
undesirable? As I see it, either liblouis.h could include config.h or
it could include some other very small header that just #defines
widechar. This would eliminate the need to save a whole separate copy of
liblouis.h just for that one line.

Hm, I had never thought of that solution. If I understand correctly we
would have to define a config.h.in and define WIDECHAR_TYPE in there or
alternatively we would have to AC_DEFINE widechar in configure.ac,
because at the moment it doesn't seem to be defined in config.h. Also
presumably config.h will not be installed. How are other libs going to know
the size of widechar? That would direct towards your second suggestion of
extracting the #defines widechar into a very small header file.

Thanks
Christian

--
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland

For a description of the software, to download it and links to
project pages go to http://liblouis.org
DISCLAIMER:
De informatie verzonden met dit e-mail bericht is uitsluitend bestemd voor
de geadresseerde. Indien u niet de beoogde geadresseerde bent, verzoeken
wij u vriendelijk dit aan de afzender te melden (of via: info@xxxxxxxxxx
<mailto:info@xxxxxxxxxx>) en het origineel en eventuele kopieën te
verwijderen.

The information sent in this e-mail is solely intended for the individual
or company to whom it is addressed. If you received this message in error,
please notify the sender immediately (or mail to info@xxxxxxxxxx<mailto:
info@xxxxxxxxxx>) and delete the original message and possible copies.

For a description of the software, to download it and links to
project pages go to http://liblouis.org

Other related posts: