Removed option for SUPPORT_ASIAN_ENCODINGS, and regen'd strings.

This commit is contained in:
Jim Derry 2017-10-03 12:37:23 -04:00
parent 2758939406
commit dfa2501928
24 changed files with 21 additions and 120 deletions

View file

@ -228,7 +228,6 @@ endif ()
# Macro Values
# These additional macros are set in Tidy's source code.
#------------------------------------------------------------------------
add_definitions ( -DSUPPORT_ASIAN_ENCODINGS=1 )
add_definitions ( -DSUPPORT_ACCESSIBILITY_CHECKS=1 )
add_definitions ( -DLIBTIDY_VERSION="${LIBTIDY_VERSION}" )
add_definitions ( -DRELEASE_DATE="${tidy_YEAR}/${tidy_MONTH}/${tidy_DAY}" )

View file

@ -379,10 +379,8 @@ static const CmdOptDesc cmdopt_defs[] = {
{ CmdOptCharEnc, "-utf16le", TC_OPT_UTF16LE, 0, NULL },
{ CmdOptCharEnc, "-utf16be", TC_OPT_UTF16BE, 0, NULL },
{ CmdOptCharEnc, "-utf16", TC_OPT_UTF16, 0, NULL },
#if SUPPORT_ASIAN_ENCODINGS /* #431953 - RJ */
{ CmdOptCharEnc, "-big5", TC_OPT_BIG5, 0, NULL },
{ CmdOptCharEnc, "-shiftjis", TC_OPT_SHIFTJIS, 0, NULL },
#endif
{ CmdOptMisc, "-version", TC_OPT_VERSION, 0, NULL, "-v" },
{ CmdOptMisc, "-help", TC_OPT_HELP, 0, NULL, "-h", "-?" },
{ CmdOptMisc, "-help-config", TC_OPT_HELPCFG, 0, NULL },
@ -2145,11 +2143,8 @@ int main( int argc, char** argv )
strcasecmp(arg, "utf16le") == 0 ||
strcasecmp(arg, "utf16be") == 0 ||
strcasecmp(arg, "utf16") == 0 ||
#if SUPPORT_ASIAN_ENCODINGS
strcasecmp(arg, "shiftjis") == 0 ||
strcasecmp(arg, "big5") == 0 ||
#endif
strcasecmp(arg, "mac") == 0 ||
strcasecmp(arg, "win1252") == 0 ||
strcasecmp(arg, "ibm858") == 0 )

View file

@ -603,11 +603,7 @@ typedef enum
TidyMergeEmphasis, /**< Merge nested B and I elements */
TidyMergeSpans, /**< Merge multiple SPANs */
TidyMetaCharset, /**< Adds/checks/fixes meta charset in the head, based on document type */
#if SUPPORT_ASIAN_ENCODINGS
TidyNCR, /**< Allow numeric character references */
#else
TidyNCRNotUsed, /**< This option is not compiled in */
#endif
TidyNewline, /**< Output line ending (default to platform) */
TidyNumEntities, /**< Use numeric entities */
TidyOmitOptionalTags, /**< Suppress optional start tags and end tags */
@ -618,11 +614,7 @@ typedef enum
TidyPreserveEntities, /**< Preserve entities */
TidyPreTags, /**< Declared pre tags */
TidyPriorityAttributes, /**< Attributes to place first in an element */
#if SUPPORT_ASIAN_ENCODINGS
TidyPunctWrap, /**< consider punctuation and breaking spaces for wrapping */
#else
TidyPunctWrapNotUsed, /**< This option is not compiled in */
#endif
TidyQuiet, /**< No 'Parsing X', guessed DTD or summary */
TidyQuoteAmpersand, /**< Output naked ampersand as &amp; */
TidyQuoteMarks, /**< Output " marks as &quot; */
@ -755,11 +747,8 @@ typedef enum
TidyEncUtf16le,
TidyEncUtf16be,
TidyEncUtf16,
#if SUPPORT_ASIAN_ENCODINGS
TidyEncBig5,
TidyEncShiftjis
#endif
} TidyEncodingOptions;

View file

@ -77,11 +77,6 @@ extern "C" {
* Optional Tidy features support
*===========================================================================*/
/* Enable/disable support for Big5 and Shift_JIS character encodings */
#ifndef SUPPORT_ASIAN_ENCODINGS
# define SUPPORT_ASIAN_ENCODINGS 1
#endif
/* Enable/disable support for additional accessibility checks */
#ifndef SUPPORT_ACCESSIBILITY_CHECKS
# define SUPPORT_ACCESSIBILITY_CHECKS 1

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:22:47\n"
"PO-Revision-Date: 2017-10-03 12:37:01\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:22:47\n"
"PO-Revision-Date: 2017-10-03 12:37:01\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:22:47\n"
"PO-Revision-Date: 2017-10-03 12:37:01\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:22:47\n"
"PO-Revision-Date: 2017-10-03 12:37:01\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:22:47\n"
"PO-Revision-Date: 2017-10-03 12:37:01\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:22:47\n"
"PO-Revision-Date: 2017-10-03 12:37:01\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"POT-Creation-Date: 2017-10-03 12:22:47\n"
"POT-Creation-Date: 2017-10-03 12:37:01\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -94,12 +94,8 @@ static PickListItems charEncPicks = {
{ "utf16le", TidyEncUtf16le, { "utf16le", NULL } },
{ "utf16be", TidyEncUtf16be, { "utf16be", NULL } },
{ "utf16", TidyEncUtf16, { "utf16", NULL } },
#if SUPPORT_ASIAN_ENCODINGS
{ "big5", TidyEncBig5, { "big5", NULL } },
{ "shiftjis", TidyEncShiftjis, { "shiftjis", NULL } },
#endif
{ NULL }
};
@ -263,9 +259,7 @@ static const TidyOptionImpl option_defs[] =
{ TidyMergeEmphasis, MU, "merge-emphasis", BL, yes, ParsePickList, &boolPicks },
{ TidyMergeSpans, MU, "merge-spans", IN, TidyAutoState, ParsePickList, &autoBoolPicks },
{ TidyMetaCharset, MS, "add-meta-charset", BL, no, ParsePickList, &boolPicks }, /* 20161004 - Issue #456 */
#if SUPPORT_ASIAN_ENCODINGS
{ TidyNCR, MU, "ncr", BL, yes, ParsePickList, &boolPicks },
#endif
{ TidyNewline, CE, "newline", IN, DLF, ParsePickList, &newlinePicks },
{ TidyNumEntities, MU, "numeric-entities", BL, no, ParsePickList, &boolPicks },
{ TidyOmitOptionalTags, MU, "omit-optional-tags", BL, no, ParsePickList, &boolPicks },
@ -276,9 +270,7 @@ static const TidyOptionImpl option_defs[] =
{ TidyPreserveEntities, MU, "preserve-entities", BL, no, ParsePickList, &boolPicks },
{ TidyPreTags, MU, "new-pre-tags", ST, 0, ParseTagNames, NULL },
{ TidyPriorityAttributes, MU, "priority-attributes", ST, 0, ParseList, NULL },
#if SUPPORT_ASIAN_ENCODINGS
{ TidyPunctWrap, PP, "punctuation-wrap", BL, no, ParsePickList, &boolPicks },
#endif
{ TidyQuiet, MS, "quiet", BL, no, ParsePickList, &boolPicks },
{ TidyQuoteAmpersand, MU, "quote-ampersand", BL, yes, ParsePickList, &boolPicks },
{ TidyQuoteMarks, MU, "quote-marks", BL, no, ParsePickList, &boolPicks },
@ -995,11 +987,8 @@ Bool TY_(AdjustCharEncoding)( TidyDocImpl* doc, int encoding )
case UTF16LE:
case UTF16BE:
case UTF16:
#if SUPPORT_ASIAN_ENCODINGS
case SHIFTJIS:
case BIG5:
#endif
inenc = outenc = encoding;
break;
}

View file

@ -835,7 +835,6 @@ static languageDefinition language_en = { whichPluralForm_en, {
"<br/>"
"The algorithm is identical to the one used by <code>merge-divs</code>. "
},
#if SUPPORT_ASIAN_ENCODINGS
{/* Important notes for translators:
- Use only <code></code>, <var></var>, <em></em>, <strong></strong>, and
<br/>.
@ -847,7 +846,6 @@ static languageDefinition language_en = { whichPluralForm_en, {
TidyNCR, 0,
"This option specifies if Tidy should allow numeric character references. "
},
#endif
{/* Important notes for translators:
- Use only <code></code>, <var></var>, <em></em>, <strong></strong>, and
<br/>.
@ -1024,7 +1022,6 @@ static languageDefinition language_en = { whichPluralForm_en, {
"<br/>"
"This option takes a space or comma separated list of attribute names. "
},
#if SUPPORT_ASIAN_ENCODINGS
{/* Important notes for translators:
- Use only <code></code>, <var></var>, <em></em>, <strong></strong>, and
<br/>.
@ -1037,7 +1034,6 @@ static languageDefinition language_en = { whichPluralForm_en, {
"This option specifies if Tidy should line wrap after some Unicode or "
"Chinese punctuation characters. "
},
#endif
{/* Important notes for translators:
- Use only <code></code>, <var></var>, <em></em>, <strong></strong>, and
<br/>.

View file

@ -1,4 +1,4 @@
#ifndef language_en_gb_h
#ifndef language_en_gb_h
#define language_en_gb_h
/*
* language_en_gb.h
@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-08-28 10:04:30
* PO_REVISION_DATE=2017-10-03 12:37:01
*/
#ifdef _MSC_VER

View file

@ -1,4 +1,4 @@
#ifndef language_es_h
#ifndef language_es_h
#define language_es_h
/*
* language_es.h
@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-05-13 21:04:45
* PO_REVISION_DATE=2017-10-03 12:37:01
*/
#ifdef _MSC_VER
@ -68,11 +68,7 @@ static languageDefinition language_es = { whichPluralForm_es, {
"code>). Si se establece en <code>yes</code>, entonces etiquetas existentes serán reemplazados "
"con CSS <code>&lt;style&gt;</code> y estructural markup según corresponda. "
},
#if SUPPORT_ASIAN_ENCODINGS
{ TidyNCR, 0, "Esta opción especifica si Tidy debe permitir referencias de caracteres numéricos. " },
#endif /* SUPPORT_ASIAN_ENCODINGS */
{ TEXT_GENERAL_INFO_PLEA, 0,
"\n"
"¿Le gustaría ver Tidy en un español correcto? Por favor considere \n"

View file

@ -1,4 +1,4 @@
#ifndef language_es_mx_h
#ifndef language_es_mx_h
#define language_es_mx_h
/*
* language_es_mx.h
@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-05-13 21:04:45
* PO_REVISION_DATE=2017-10-03 12:37:01
*/
#ifdef _MSC_VER

View file

@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-10-03 12:22:47
* PO_REVISION_DATE=2017-10-03 12:37:01
*/
#ifdef _MSC_VER
@ -319,11 +319,7 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
"imbriqués, comme suit : <code>&lt;span&gt;&lt;span&gt;...&lt;/span&gt;&lt;/span&gt;</code>. <br/"
">L'algorithme est le même que celui de <code>merge-divs</code>. "
},
#if SUPPORT_ASIAN_ENCODINGS
{ TidyNCR, 0, "Cette option précise si Tidy doit autoriser les références numériques de caractères. " },
#endif /* SUPPORT_ASIAN_ENCODINGS */
{ TidyNewline, 0,
"La valeur par défaut est appropriée à la plateforme d'exécution de Tidy. <br/>Généralement "
"<var>CRLF</var> sur PC-DOS, Windows et OS/2; <var>CR</var> sur Classic Mac OS; et <var>LF</var> "
@ -381,14 +377,10 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
"inconnues. <br/>Notez que vous ne pouvez encore ajouter de nouveaux éléments CDATA. <br/>Cette "
"option est ignorée avec le mode XML. "
},
#if SUPPORT_ASIAN_ENCODINGS
{ TidyPunctWrap, 0,
"Cette option précise si Tidy doit passer à la ligne après certains caractères de ponctuation "
"Unicode ou chinois."
},
#endif /* SUPPORT_ASIAN_ENCODINGS */
{ TidyQuiet, 0,
"Cette option précise si Tidy doit afficher le résumé du nombre des erreurs et avertissements, ou "
"les messages de bienvenue et d'information."

View file

@ -1,4 +1,4 @@
#ifndef language_pt_br_h
#ifndef language_pt_br_h
#define language_pt_br_h
/*
* language_pt_br.h
@ -27,8 +27,8 @@
* Template Created by Jim Derry on 01/14/2016.
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=Rafael Fontenelle <rafaelff@gnome.org>
* PO_REVISION_DATE=2017-09-21 00:07-0200
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-10-03 12:37:01
*/
#ifdef _MSC_VER
@ -361,14 +361,10 @@ static languageDefinition language_pt_br = { whichPluralForm_pt_br, {
"<code>&lt;span&gt;&lt;span&gt;...&lt;/span&gt;&lt;/span&gt;</code>. <br/>O "
"algoritmo é idêntico àquele usado por <code>merge-divs</code>. "
},
#if SUPPORT_ASIAN_ENCODINGS
{ TidyNCR, 0,
"Esta opção especifica se o Tidy deve permitir referências de caracteres "
"numéricos. "
},
#endif /* SUPPORT_ASIAN_ENCODINGS */
{ TidyNewline, 0,
"O padrão é apropriado para a plataforma atual. <br/>Geralmente, CRLF no PC-"
"DOS, Windows e OS/2; CR no Mac OS Clássico; e LF nos demais (Linux, Mac OS X "
@ -436,14 +432,10 @@ static languageDefinition language_pt_br = { whichPluralForm_pt_br, {
"que você ainda não pode adicionar novos elementos CDATA. <br/>Esta opção é "
"ignorada no modo XML. "
},
#if SUPPORT_ASIAN_ENCODINGS
{ TidyPunctWrap, 0,
"Essa opção especifica se o Tidy deve quebrar linha após alguns Unicode ou "
"caracteres de pontuação chineses. "
},
#endif /* SUPPORT_ASIAN_ENCODINGS */
{ TidyQuiet, 0,
"Essa opção especifica se o Tidy deve emitir o resumo dos números de erros e "
"avisos, ou as mensagens de boas-vidas ou informacionais. "

View file

@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-10-03 12:22:47
* PO_REVISION_DATE=2017-10-03 12:37:01
*/
#ifdef _MSC_VER

View file

@ -1215,15 +1215,14 @@ static void ParseEntity( TidyDocImpl* doc, GetTokenMode mode )
if (charRead == 1 && c == '#')
{
#if SUPPORT_ASIAN_ENCODINGS
if ( !cfgBool(doc, TidyNCR) ||
if ( !cfgBool(doc, TidyNCR) ||
cfg(doc, TidyInCharEncoding) == BIG5 ||
cfg(doc, TidyInCharEncoding) == SHIFTJIS )
{
TY_(UngetChar)('#', doc->docIn);
return;
}
#endif
TY_(AddCharToLexer)( lexer, c );
entState = ENT_numdec;
continue;

View file

@ -69,7 +69,6 @@ void TY_(PPrintSpaces)(void)
indent_char = ' ';
}
#if SUPPORT_ASIAN_ENCODINGS
/* #431953 - start RJ Wraplen adjusted for smooth international ride */
typedef enum
@ -287,7 +286,6 @@ static WrapPoint Big5WrapPoint(tchar c)
return NoWrapPoint;
}
#endif /* SUPPORT_ASIAN_ENCODINGS */
static void InitIndent( TidyIndent* ind )
{
@ -888,8 +886,6 @@ static void PPrintChar( TidyDocImpl* doc, uint c, uint mode )
}
}
#if SUPPORT_ASIAN_ENCODINGS
/* #431953 - start RJ */
/* Handle encoding-specific issues */
switch ( outenc )
@ -930,22 +926,6 @@ static void PPrintChar( TidyDocImpl* doc, uint c, uint mode )
AddChar( pprint, c );
return;
}
/* #431953 - end RJ */
#else /* SUPPORT_ASIAN_ENCODINGS */
/* otherwise ISO 2022 characters are passed raw */
if (
#ifndef NO_NATIVE_ISO2022_SUPPORT
outenc == ISO2022 ||
#endif
outenc == RAW )
{
AddChar( pprint, c );
return;
}
#endif /* SUPPORT_ASIAN_ENCODINGS */
/* don't map latin-1 chars to entities */
if ( outenc == LATIN1 )

View file

@ -60,7 +60,7 @@ typedef struct _TidyPrintImpl
} TidyPrintImpl;
#if 0 && SUPPORT_ASIAN_ENCODINGS
#if 0
/* #431953 - start RJ Wraplen adjusted for smooth international ride */
uint CWrapLen( TidyDocImpl* doc, uint ind );
#endif

View file

@ -395,11 +395,8 @@ uint TY_(ReadChar)( StreamIn *in )
|| in->encoding == ISO2022
#endif
|| in->encoding == UTF8
#if SUPPORT_ASIAN_ENCODINGS
|| in->encoding == SHIFTJIS /* #431953 - RJ */
|| in->encoding == BIG5 /* #431953 - RJ */
#endif
)
{
in->curcol++;
@ -710,8 +707,6 @@ void TY_(WriteChar)( uint c, StreamOut* out )
}
}
}
#if SUPPORT_ASIAN_ENCODINGS
else if (out->encoding == BIG5 || out->encoding == SHIFTJIS)
{
if (c < 128)
@ -722,8 +717,6 @@ void TY_(WriteChar)( uint c, StreamOut* out )
ch = c & 0xFF; PutByte(ch, out);
}
}
#endif
else
PutByte( c, out );
}
@ -1243,7 +1236,6 @@ static uint ReadCharFromStream( StreamIn* in )
return n;
}
#if SUPPORT_ASIAN_ENCODINGS
/*
This section is suitable for any "multibyte" variable-width
character encoding in which a one-byte code is less than
@ -1273,7 +1265,6 @@ static uint ReadCharFromStream( StreamIn* in )
return n;
}
}
#endif
#ifdef TIDY_WIN32_MLANG_SUPPORT
else if (in->encoding > WIN32MLANG)
@ -1322,10 +1313,8 @@ static struct _enc2iana
{ UTF16LE, "utf-16", "utf16le" },
{ UTF16BE, "utf-16", "utf16be" },
{ UTF16, "utf-16", "utf16" },
#if SUPPORT_ASIAN_ENCODINGS
{ BIG5, "big5", "big5" },
{ SHIFTJIS, "shift_jis", "shiftjis"},
#endif
#ifndef NO_NATIVE_ISO2022_SUPPORT
{ ISO2022, NULL, "iso2022" },
#endif

View file

@ -157,18 +157,8 @@ int TY_(GetCharEncodingFromOptName)(ctmbstr charenc);
#define UTF16LE 9
#define UTF16BE 10
#define UTF16 11
/* Note that Big5 and SHIFTJIS are not converted to ISO 10646 codepoints
** (i.e., to Unicode) before being recoded into UTF-8. This may be
** confusing: usually UTF-8 implies ISO10646 codepoints.
*/
#if SUPPORT_ASIAN_ENCODINGS
#define BIG5 12
#define SHIFTJIS 13
#else
#define BIG5 9
#define SHIFTJIS 10
#endif
#ifdef TIDY_WIN32_MLANG_SUPPORT
/* hack: windows code page numbers start at 37 */