Commit 88aa7765 authored by plundblad's avatar plundblad Committed by Commit bot

Upgrade liblouis to 2.6.0.

This changes to the new mirror of the third_party library liblouis,
necessary because the project moved to github from an svn repository on
code.google.com.  Since the git mirroring infrastructure doesn't support
excluding parts of the tree, this means adding some GPL files and some files
without license headers.  The whitelist in tools/checklicenses/checklicenses.py
has been extended as needed.

One braille table (Hindi computer braille) is not available in liblouis
and has been removed.  A follow-up CL will add support for new braille
tables added in this release.

BUG=341951
R=dtseng@chromium.org, phajdan.jr@chromium.org

Review URL: https://codereview.chromium.org/579623003

Cr-Commit-Position: refs/heads/master@{#295679}
parent 773f55fe
......@@ -450,7 +450,7 @@ deps_os = {
Var('chromium_git') + '/chromium/deps/undoview.git' + '@' + '3ba503e248f3cdbd81b78325a24ece0984637559',
'src/third_party/liblouis/src':
Var('chromium_git') + '/external/liblouis.git' + '@' + '3c2daee56250162e5a75830871601d74328d39f5',
Var('chromium_git') + '/external/liblouis-github.git' + '@' + '5f9c03f2a3478561deb6ae4798175094be8a26c2',
# Used for embedded builds. CrOS & Linux use the system version.
'src/third_party/fontconfig/src':
......
......@@ -25,7 +25,7 @@ CvoxBrailleTableTest.prototype = {
*/
TEST_F('CvoxBrailleTableTest', 'testGetAll', function() {
cvox.BrailleTable.getAll(function(tables) {
assertEquals(60, tables.length);
assertEquals(59, tables.length);
assertNotNullNorUndefined(
cvox.BrailleTable.forId(tables, 'en-US-g1'),
'Can\'t find US English grade 1 table');
......
(Copied from liblouis/liblouis.h)
(Copied from src/liblouis/liblouis.h.in)
/* liblouis Braille Translation and Back-Translation Library
......
Name: Braille Translation Library
Short Name: liblouis
URL: http://liblouis.googlecode.com/svn/tags/liblouis_2_5_1
Version: 2.5.1
License: LGPL3
URL: https://github.com/liblouis/liblouis
Version: 2.6.0
License: LGPL3 and GPL3
License Android Compatible: No
License File: LICENSE
Security Critical: yes
......@@ -16,12 +17,7 @@ Chrome itself.
Local Modifications:
* Add manually created liblouis.h.
* On Android: log to logcat.
* Fix backtranslation to not output unicode braille patterns
(svn r838)
* Fix 3 letters in Danish 8 dot braille table, reverting part of svn r238.
* Fix out-of-bounds array access (code removed by upstream).
* Fix compiler warnings (part of svn r856).
* Add manually created liblouis.h with compiler warning fix.
* Add minimal config.h.
* Add tables.json a list of tables with metadata.
* Add a wrapper to expose the library in native client.
......@@ -57,7 +57,8 @@
'sources': [
'overrides/liblouis/config.h',
'overrides/liblouis/liblouis.h',
'overrides/liblouis/compileTranslationTable.c',
'src/liblouis/compileTranslationTable.c',
'src/liblouis/logging.c',
'src/liblouis/lou_backTranslateString.c',
'src/liblouis/lou_translateString.c',
'src/liblouis/transcommon.ci',
......
/*
* Copyright 2013 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#define TABLESDIR ""
#define PACKAGE_VERSION "2.5.1-google"
#define PACKAGE_VERSION "2.6.0"
......@@ -31,10 +31,11 @@ extern "C"
#endif /* __cplusplus */
#define widechar unsigned short int
#define formtype unsigned char
#ifdef _WIN32
#define EXPORT_CALL __stdcall
char * EXPORT_CALL lou_getProgramPath ();
char *EXPORT_CALL lou_getProgramPath ();
#else
#define EXPORT_CALL
#endif
......@@ -63,47 +64,62 @@ char * EXPORT_CALL lou_getProgramPath ();
ucBrl = 128
} translationModes;
char * EXPORT_CALL lou_version ();
char *EXPORT_CALL lou_version ();
int EXPORT_CALL lou_charSize ();
int EXPORT_CALL lou_charSize ();
/* Return the size of widechar */
int EXPORT_CALL lou_translateString
(const char *tableList,
const widechar *inbuf,
const widechar * inbuf,
int *inlen,
widechar * outbuf,
int *outlen, char *typeform, char *spacing, int mode);
widechar * outbuf, int *outlen, formtype *typeform, char *spacing,
int
mode);
int EXPORT_CALL lou_translate (const char *tableList, const widechar
*inbuf,
* inbuf,
int *inlen, widechar * outbuf, int *outlen,
char *typeform, char *spacing, int *outputPos, int
*inputPos, int *cursorPos, int mode);
int EXPORT_CALL lou_hyphenate (const char *tableList, const widechar
*inbuf,
int inlen, char *hyphens, int mode);
int EXPORT_CALL lou_dotsToChar (const char *tableList, widechar *inbuf,
widechar *outbuf, int length, int mode);
int EXPORT_CALL lou_charToDots (const char *tableList, const widechar
*inbuf,
widechar *outbuf, int length, int mode);
formtype *typeform, char *spacing,
int *outputPos, int *inputPos,
int *cursorPos, int mode);
int EXPORT_CALL lou_translatePrehyphenated (const char *tableList,
const widechar * inbuf,
int *inlen, widechar * outbuf,
int *outlen, formtype
*typeform,
char *spacing, int *outputPos,
int *inputPos, int *cursorPos,
char *inputHyphens,
char *outputHyphens, int mode);
int EXPORT_CALL lou_hyphenate (const char *tableList, const widechar
* inbuf, int inlen, char *hyphens, int mode);
int EXPORT_CALL lou_dotsToChar (const char *tableList, widechar * inbuf,
widechar * outbuf, int length, int mode);
int EXPORT_CALL lou_charToDots (const char *tableList, const widechar
* inbuf,
widechar * outbuf, int length, int mode);
int EXPORT_CALL lou_backTranslateString (const char *tableList,
const widechar *inbuf,
const widechar * inbuf,
int *inlen,
widechar * outbuf,
int *outlen, char *typeform, char
int *outlen, formtype
*typeform, char
*spacing, int mode);
int EXPORT_CALL lou_backTranslate (const char *tableList, const widechar
*inbuf,
int *inlen, widechar * outbuf, int *outlen,
char *typeform, char *spacing, int
*outputPos, int *inputPos, int *cursorPos, int
mode);
void EXPORT_CALL lou_logPrint (char *format, ...);
/* prints error messages to a file */
* inbuf,
int *inlen, widechar * outbuf,
int *outlen, formtype *typeform,
char *spacing, int *outputPos,
int *inputPos, int *cursorPos, int mode);
void EXPORT_CALL lou_logPrint (const char *format, ...);
/* Prints error messages to a file
@deprecated As of 2.6.0, applications using liblouis should implement
their own logging system. */
void EXPORT_CALL lou_logFile (const char *filename);
/* Specifies the name of the file to be used by lou_logPrint. If it is
......@@ -117,25 +133,46 @@ char *typeform, char *spacing, int
void EXPORT_CALL lou_logEnd ();
/* Closes the log file so it can be read by other functions. */
void * EXPORT_CALL lou_getTable (const char *tableList);
void *EXPORT_CALL lou_getTable (const char *tableList);
/* This function checks a table for errors. If none are found it loads
* the table into memory and returns a pointer to it. if errors are found
* it returns a null pointer. It is called by lou_translateString and
* lou_backTranslateString and also by functions in liblouisxml
*/
int EXPORT_CALL lou_compileString (const char *tableList, const char
void EXPORT_CALL lou_registerTableResolver (char ** (* resolver) (const char *table, const char *base));
/* Register a new table resolver. Overrides the default resolver. */
int EXPORT_CALL lou_compileString (const char *tableList, const char
*inString);
char * EXPORT_CALL lou_setDataPath (char *path);
char *EXPORT_CALL lou_setDataPath (char *path);
/* Set the path used for searching for tables and liblouisutdml files.
* Overrides the installation path. */
char * EXPORT_CALL lou_getDataPath ();
char *EXPORT_CALL lou_getDataPath ();
/* Get the path set in the previous function. */
// char EXPORT_CALL * lou_getTablePaths ();
/* Get a list of paths actually used in seraching for tables*/
/* Get a list of paths actually used in seraching for tables */
typedef void (*logcallback)(int level, const char *message);
void EXPORT_CALL lou_registerLogCallback(logcallback callback);
/* Register logging callbacks
* Set to NULL for default callback.
*/
typedef enum
{
LOG_ALL = -2147483647 - 1,
LOG_DEBUG = 10000,
LOG_INFO = 20000,
LOG_WARN = 30000,
LOG_ERROR = 40000,
LOG_FATAL = 50000,
LOG_OFF = 2147483647
} logLevels;
void EXPORT_CALL lou_setLogLevel(logLevels level);
/* Set the level for logging callback to be called at */
void EXPORT_CALL lou_free ();
/* This function should be called at the end of
* the application to free all memory allocated by liblouis. */
......
This diff is collapsed.
......@@ -36,7 +36,7 @@
"locale": "da",
"dots": "8",
"id": "da-comp8",
"fileName": "da.ctb"
"fileName": "da-dk-g18.utb"
},
{
"locale": "nl",
......@@ -186,12 +186,6 @@
"grade": "1",
"fileName": "gr-gr-g1.utb"
},
{
"locale": "hi",
"dots": "8",
"id": "hi-comp8",
"fileName": "hi.ctb"
},
{
"locale": "hi",
"dots": "6",
......
......@@ -231,6 +231,16 @@ PATH_SPECIFIC_WHITELISTED_LICENSES = {
'third_party/libjpeg_turbo': [ # http://crbug.com/98314
'UNKNOWN',
],
# Many liblouis files are mirrored but not used in the NaCl module.
# They are not excluded from the mirror because of lack of infrastructure
# support. Getting license headers added to the files where missing is
# tracked in https://github.com/liblouis/liblouis/issues/22.
'third_party/liblouis/src': [
'GPL (v3 or later)',
'UNKNOWN',
],
'third_party/libpng': [ # http://crbug.com/98318
'UNKNOWN',
],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment